JP2010257035A - Computer - Google Patents

Computer Download PDF

Info

Publication number
JP2010257035A
JP2010257035A JP2009103755A JP2009103755A JP2010257035A JP 2010257035 A JP2010257035 A JP 2010257035A JP 2009103755 A JP2009103755 A JP 2009103755A JP 2009103755 A JP2009103755 A JP 2009103755A JP 2010257035 A JP2010257035 A JP 2010257035A
Authority
JP
Japan
Prior art keywords
interrupt
data
signal
mpu
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2009103755A
Other languages
Japanese (ja)
Inventor
Naoki Kasai
直樹 笠井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toppan Inc
Original Assignee
Toppan Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toppan Printing Co Ltd filed Critical Toppan Printing Co Ltd
Priority to JP2009103755A priority Critical patent/JP2010257035A/en
Publication of JP2010257035A publication Critical patent/JP2010257035A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a computer monitoring interrupts from a plurality of data sources and performing transfer of data without missing. <P>SOLUTION: The computer 100 includes: a plurality of data buffer circuits 4-1 to 4-N for temporarily holding a plurality of pieces of the data and sending them to an MPU (Micro Processing Unit); a plurality of interrupt signal edge detection circuits 2-1 to 2-N sequentially detecting change points from interrupt request signals from the data sources 1-1 to 1-N and generating edge signals; a plurality of FIFO (First In First Out) buffer circuits 3-1 to 3-N temporarily holding the edge signals from the interrupt signal edge detection circuits 2-1 to 2-N; an interrupt sampler circuit 5 registering outputs of the FIFO buffer circuits 3-1 to 3-N into a queue; and an interrupt controller 6 reading the queue of the interrupt sampler circuit 5 and generating an interrupt signal to the MPU 7. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、複数のデータ源から任意のタイミングでデータを受信するコンピュータに関するものである。   The present invention relates to a computer that receives data from a plurality of data sources at an arbitrary timing.

コンピュータにおいては、年々、システムの肥大化・高速化に伴い、単一システムで実現する形態から、複数のサブシステムに分割しそれらを統合化するといった、いわゆる分散処理が図られてきている。分散処理によりシステム化しやすくなるメリットがある反面、サブシステム間の情報伝達が複雑になるというデメリットが生じる。任意のデータ源の出力を、任意の出力タイミングでの受け取りしなければならなくなるケースが頻繁に発生している。そのため、サブシステム間、あるいは、下位システムと上位システム間でのデータの授受をより信頼性高く、より効率良く実行でき、かつ、より容易に実現できることが望まれている。   As computers become larger and faster every year, so-called distributed processing has been attempted, such as dividing a single system into a plurality of subsystems and integrating them. While there is a merit that it becomes easy to systematize by distributed processing, there is a demerit that information transmission between subsystems becomes complicated. There are frequent cases where the output of an arbitrary data source must be received at an arbitrary output timing. Therefore, it is desired that data can be exchanged between subsystems or between lower systems and higher systems more reliably, more efficiently, and more easily realized.

組み込み機器、又は、PCを用いるアプリケーション分野において、外部データ源からデータを効率よく取り込むための手段として、割り込み手法が広く知られている(特許文献1参照)。割り込み手法は、正確なタイミング、かつ、正確なデータ取り込みを容易に実現できるため、ポーリング手法より優れた方法であると言える。   In an application field using an embedded device or a PC, an interrupt method is widely known as means for efficiently capturing data from an external data source (see Patent Document 1). The interrupt method can be said to be superior to the polling method because accurate timing and accurate data acquisition can be easily realized.

しかし、複数のデータ源から同時に割り込みが発生した場合、その同時処理への対処が容易ではなく、データの取りこぼし等が発生するケースが多く見られる。この対処をするための処理も複雑になりがちである。   However, when interrupts occur simultaneously from a plurality of data sources, it is not easy to deal with the simultaneous processing, and there are many cases where data is lost. The processing for dealing with this tends to be complicated.

特開平5−143360号公報JP-A-5-143360

本発明の目的は、複数のデータ源からの割り込み要求を監視し取りこぼしなくデータの授受を行うことができるコンピュータを提供することにある。   An object of the present invention is to provide a computer capable of monitoring interrupt requests from a plurality of data sources and exchanging data without missing them.

請求項1の発明に係るコンピュータは、複数のデータ源から任意のタイミングでデータを受信するコンピュータにおいて、前記複数のデータを一時的に保持してMPUへ送るための複数のデータバッファ回路と、前記データ源からの割り込み要求信号から変化点を順次に検出してエッジ信号を生成する複数の割り込み信号エッジ検出回路と、前記割り込み信号エッジ検出回路からの前記エッジ信号を一時的に保持する複数のFIFOバッファ回路と、前記FIFOバッファ回路の出力を待ち行列に登録する割り込みサンプラ回路と、前記割り込みサンプラ回路の前記待ち行列を読み出して前記MPUへの割り込み信号を発生させる割り込みコントローラと、を具備することを特徴とする。   According to a first aspect of the present invention, there is provided a computer for receiving data from a plurality of data sources at an arbitrary timing, a plurality of data buffer circuits for temporarily holding the plurality of data and sending the data to an MPU; A plurality of interrupt signal edge detection circuits that sequentially detect change points from an interrupt request signal from a data source and generate an edge signal, and a plurality of FIFOs that temporarily hold the edge signal from the interrupt signal edge detection circuit A buffer circuit; an interrupt sampler circuit that registers the output of the FIFO buffer circuit in a queue; and an interrupt controller that reads the queue of the interrupt sampler circuit and generates an interrupt signal to the MPU. Features.

本発明によれば、複数のデータ源からに割り込みを監視し取りこぼしなくデータの授受を行うことができる。このことにより、本発明によれば、割り込み処理ソフトウエアに対する時間的制約が緩和され、開発、テストが容易になり、ひいてはサブシステムによる分散化を実現しやすくなるため、より大規模なシステム開発をし易くなる。   According to the present invention, it is possible to monitor interrupts from a plurality of data sources and exchange data without missing them. As a result, according to the present invention, the time restriction on the interrupt processing software is eased, and development and testing are facilitated. As a result, it is easy to realize decentralization by subsystems. It becomes easy to do.

本発明の実施の形態1に係るコンピュータを示すブロック図である。It is a block diagram which shows the computer which concerns on Embodiment 1 of this invention. 本発明の実施の形態1において割り込み要求の発生から割り込み情報を待ち行列に登録するまでのハードウエアの処理フローの一例を説明するための図である。It is a figure for demonstrating an example of the processing flow of the hardware from generation | occurrence | production of an interruption request | requirement to registering interruption information into a queue in Embodiment 1 of this invention. 本発明の実施の形態1において待ち行列に登録された割り込み要求をMPUに割り込み通知するまでのハードウエアの処理フローの一例を説明するための図である。It is a figure for demonstrating an example of the processing flow of the hardware until it notifies interruption request | requirement registered into the queue in Embodiment 1 of this invention to MPU. 本発明の実施の形態1において割り込み要求に対するMPUのソフトウエアの処理フローの一例を説明するための図である。It is a figure for demonstrating an example of the processing flow of the software of MPU with respect to the interruption request in Embodiment 1 of this invention. 本発明の実施の形態1において割り込みメッセージに対するMPUのソフトウエアの処理フローの一例を説明するための図である。It is a figure for demonstrating an example of the processing flow of the software of MPU with respect to the interruption message in Embodiment 1 of this invention. 本発明の実施の形態1において3個のデータ源から同時に割り込み要求が発生した場合の処理フローに対するタイムチャートを示す図である。It is a figure which shows the time chart with respect to a processing flow when the interruption request generate | occur | produces simultaneously from three data sources in Embodiment 1 of this invention.

次に、本発明の実施の形態について、図面を参照して詳細に説明する。
(実施の形態1)
図1は、本発明の実施の形態1に係るコンピュータを示すブロック図である。図1に示すように、本発明の実施の形態1に係るコンピュータ100は、複数のデータバッファ回路4−1、4−2、…、4−Nと、複数の割り込み信号エッジ検出回路2−1、2−2、…、2−Nと、複数のFIFOバッファ回路3−1、3−2、…、3−Nと、割り込みサンプラ回路5と、割り込みコントローラ6と、を具備している。
Next, embodiments of the present invention will be described in detail with reference to the drawings.
(Embodiment 1)
FIG. 1 is a block diagram showing a computer according to Embodiment 1 of the present invention. As shown in FIG. 1, the computer 100 according to the first embodiment of the present invention includes a plurality of data buffer circuits 4-1, 4-2,..., 4-N and a plurality of interrupt signal edge detection circuits 2-1. , 2-N, a plurality of FIFO buffer circuits 3-1, 3-2,..., 3-N, an interrupt sampler circuit 5, and an interrupt controller 6.

複数のデータバッファ回路4−1、4−2、…、4−Nの入力端子には、複数のデータ源1−1、1−2、…、1−Nが接続されている。複数のデータバッファ回路4−1、4−2、…、4−Nの出力端子は、MPU7の入力端子に接続されている。複数の割り込み信号エッジ検出回路2−1、2−2、…、2−Nの入力端子には、複数のデータ源1−1、1−2、…、1−Nの出力端子が接続されている。複数の割り込み信号エッジ検出回路2−1、2−2、…、2−Nの出力端子は、複数のFIFOバッファ回路3−1、3−2、…、3−Nの入力端子に接続されている。複数のFIFOバッファ回路3−1、3−2、…、3−Nの出力端子は、割り込みサンプラ回路5の入力端子に接続されている。割り込みサンプラ回路5の出力端子は、割り込みコントローラ6の入力端子に接続されている。割り込みコントローラ6の出力端子は、MPU(Micro Processing Unit)7の入力端子に接続されている。   A plurality of data sources 1-1, 1-2,..., 1-N are connected to input terminals of the plurality of data buffer circuits 4-1, 4-2,. The output terminals of the plurality of data buffer circuits 4-1, 4-2,..., 4-N are connected to the input terminal of the MPU 7. The input terminals of the plurality of interrupt signal edge detection circuits 2-1, 2-2,..., 2-N are connected to the output terminals of the plurality of data sources 1-1, 1-2,. Yes. The output terminals of the plurality of interrupt signal edge detection circuits 2-1, 2-2,..., 2-N are connected to the input terminals of the plurality of FIFO buffer circuits 3-1, 3-2,. Yes. The output terminals of the plurality of FIFO buffer circuits 3-1, 3-2 to 3 -N are connected to the input terminal of the interrupt sampler circuit 5. The output terminal of the interrupt sampler circuit 5 is connected to the input terminal of the interrupt controller 6. An output terminal of the interrupt controller 6 is connected to an input terminal of an MPU (Micro Processing Unit) 7.

コンピュータ100は、複数のデータ源1−1、1−2、…、1−Nから任意のタイミングでデータを受信する。複数のデータバッファ回路4−1、4−2、…、4−Nは、複数のデータ源1−1、1−2、…、1−Nから複数のデータを一時的に保持してMPU7へ送るためのものである。複数の割り込み信号エッジ検出回路2−1、2−2、…、2−Nは、データ源1−1、1−2、…、1−Nからの割り込み要求信号から変化点を順次に検出してエッジ信号を生成する。複数のFIFOバッファ回路3−1、3−2、…、3−Nは、割り込み信号エッジ検出回路2−1、2−2、…、2−Nからのエッジ信号を一時的に保持する。割り込みサンプラ回路5は、FIFOバッファ回路3−1、3−2、…、3−Nの出力を待ち行列に登録する。割り込みコントローラ6は、割り込みサンプラ回路6の待ち行列を読み出してMPU7への割り込み信号を発生させる。   The computer 100 receives data from the plurality of data sources 1-1, 1-2,. A plurality of data buffer circuits 4-1, 4-2,..., 4-N temporarily hold a plurality of data from the plurality of data sources 1-1, 1-2,. It is for sending. A plurality of interrupt signal edge detection circuits 2-1, 2-2,..., 2-N sequentially detect change points from interrupt request signals from the data sources 1-1, 1-2,. To generate an edge signal. The plurality of FIFO buffer circuits 3-1, 3-2,..., 3-N temporarily hold edge signals from the interrupt signal edge detection circuits 2-1, 2-2,. The interrupt sampler circuit 5 registers the outputs of the FIFO buffer circuits 3-1, 3-2, ..., 3-N in a queue. The interrupt controller 6 reads the queue of the interrupt sampler circuit 6 and generates an interrupt signal to the MPU 7.

データ源(割り込み発生源)1−1、1−2、…、1−Nは、その数がNである。データ源1−1、1−2、…、1−Nからの信号線のコネクタの形状やサイズなどの物理的な制約以外にその接続数Nに対する制約は生じない。データ源(割り込み発生源)1−1、1−2、…、1−Nは、割り込みを要求する信号線11と渡すべきデータ信号線12によりコンピュータ100に接続されている。   The number of data sources (interrupt generation sources) 1-1, 1-2,..., 1-N is N. There are no restrictions on the number of connections N other than physical restrictions such as the shape and size of the connectors of the signal lines from the data sources 1-1, 1-2,. The data sources (interrupt generation sources) 1-1, 1-2,..., 1-N are connected to the computer 100 by a signal line 11 for requesting an interrupt and a data signal line 12 to be passed.

割り込み信号エッジ検出回路2−1、2−2、…、2−Nは、データ源1−1、1−2、…、1−Nからの割り込み要求信号(データ源からデータバッファ回路への書き込み完了信号でも可)に対してエッジ部の検出(信号アサート期間の正規化)を行ってエッジ信号13を生成する。このエッジ信号13については後述するが、割り込み要求完了応答11、または、データ源1−1、1−2、…、1−Nからデータバッファ回路4−1、4−2、…、4−Nに書き込みが完了したことを示す信号を元に生成される。データ源1−1、1−2、…、1−Nの数Nだけ割り込み信号エッジ検出回路2−1、2−2、…、2−Nが配置されデータ源1−1、1−2、…、1−Nからの信号が並列に処理される。   The interrupt signal edge detection circuits 2-1, 2-2, ..., 2-N are interrupt request signals from the data sources 1-1, 1-2, ..., 1-N (writing from the data source to the data buffer circuit). The edge signal is detected (normalization of the signal assertion period) for the edge signal 13 is generated with respect to the completion signal. The edge signal 13 will be described later, but the interrupt request completion response 11 or the data sources 1-1, 1-2,..., 1-N to the data buffer circuits 4-1, 4-2,. Is generated based on a signal indicating that writing has been completed. .., 2-N are arranged as many as the number N of data sources 1-1, 1-2,..., 1-N, and the data sources 1-1, 1-2,. ..., signals from 1-N are processed in parallel.

FIFOバッファ回路3−1、3−2、…、3−Nは、信号線13を介して割り込みエッジ信号を割り込み情報としてFIFO(First In First Out)バッファ に一時的に保持する。このバッファの容量は、読み出し、書き込み共にハードウエアで実行、かつ、双方共にウエイトに対する制約条件がないため、小容量でよい。データ源1−1、1−2、…、1−Nの数NだけFIFOバッファ回路3−1、3−2、…、3−Nが配置され、各データ源1−1、1−2、…、1−Nからの信号が並列に処理される。   The FIFO buffer circuits 3-1, 3-2,..., 3-N temporarily hold an interrupt edge signal as interrupt information via a signal line 13 in a FIFO (First In First Out) buffer. The capacity of this buffer may be small because both reading and writing are executed by hardware, and both have no restrictions on the weight. , 3-N are arranged as many as the number N of data sources 1-1, 1-2,..., 1-N, and the data sources 1-1, 1-2, ..., signals from 1-N are processed in parallel.

データバッファ回路4−1、4−2、…、4−Nは、データ源1−1、1−2、…、1−Nから受信するデータを一時的に保持するためのFIFOバッファである。データ源1−1、1−2、…、1−Nの数Nだけデータバッファ回路4−1、4−2、…、4−Nが配置され、データ源1−1、1−2、…、1−Nからのデータが並列に処理される。   The data buffer circuits 4-1, 4-2,..., 4-N are FIFO buffers for temporarily storing data received from the data sources 1-1, 1-2,. Data buffers 1-1, 4-2,..., 4-N are arranged as many as the number N of data sources 1-1, 1-2,. , 1-N are processed in parallel.

割り込みサンプラ5は、割り込み要求を待ち行列に登録するためのFIFOバッファとその制御をする回路である。N個だけ配置されたFIFOバッファ回路3−1、3−2、…、3−Nが空(エンプティ)でない場合、順次に読み出し(デキュー)し、データ源ナンバ(1〜N)の情報を付加し、信号線14を介して割り込みサンプラ5に書き込む(エンキュー)。   The interrupt sampler 5 is a FIFO buffer for registering an interrupt request in a queue and a circuit for controlling the FIFO buffer. When N-th FIFO buffer circuits 3-1, 3-2,..., 3-N are not empty (empty), they are sequentially read (dequeued), and data source number (1 to N) information is added. Then, it writes into the interrupt sampler 5 via the signal line 14 (enqueue).

上記順次読み出しは、割り込みの現実的な応答時間より十分に高速なタイミングでサンプリングすることにより、順次読み出しによる時間的なロスは無視しても差し支えない。ハードウエア処理で行う順次読み出しのサンプリングのサイクルを数十〜数百MHz(数十ns〜数ns)にすることは一般に容易であるが、一方、割り込みタイミングの精度は数百ns〜数μsが現実的と想定されるためである。   In the sequential reading, the time loss due to the sequential reading can be ignored by sampling at a timing sufficiently faster than the actual response time of the interrupt. It is generally easy to set the sampling cycle of sequential reading performed by hardware processing to several tens to several hundreds MHz (several tens to several ns). On the other hand, the accuracy of interrupt timing is several hundred ns to several μs. This is because it is assumed to be realistic.

割り込みコントローラ6は、MPU7におけるソフトウエア割り込み処理と割り込みサンプラ回路5の間の調停を行う回路である。割り込みコントローラ6は、割り込みサンプラ回路6の待ち行列を読み出してMPU7への割り込み信号を発生させて発生順に逐次に信号線16を介してMPU7に割り込みを発生させる。一つ一つの割り込みを見ると、割り込み要求信号16とその割り込み完了信号17が対をなしている。   The interrupt controller 6 is a circuit that performs arbitration between software interrupt processing in the MPU 7 and the interrupt sampler circuit 5. The interrupt controller 6 reads the queue of the interrupt sampler circuit 6 to generate an interrupt signal to the MPU 7, and sequentially generates an interrupt to the MPU 7 via the signal line 16 in the order of generation. Looking at each interrupt, the interrupt request signal 16 and its interrupt completion signal 17 are paired.

MPU7は、割り込みを受けて割り込み処理をソフトウエアで実行する部分である。メモリ装置8は、MPU7のワーク用メモリ装置である。説明を簡単にするため、該割り込み処理によりN個のデータ源1−1、1−2、…、1−Nからのデータに保持しておく場所とする。   The MPU 7 is a part that receives an interrupt and executes interrupt processing by software. The memory device 8 is a work memory device of the MPU 7. In order to simplify the description, it is assumed that the data from the N data sources 1-1, 1-2,.

データバッファ回路4−1、4−2、…、4−N、割り込みコントローラ6、MPU7、メモリ装置8は、データバス10及びコントロールバス9により接続されている。データバス10は、データをやりとりするための信号線の集合体(バス幅は取り扱うデータに幅に依存する)であり、バス周辺に接続された回路は、アクセス時のみバスに接続する。コントロールバス9は、割り込み要求を示す信号線、データバスのリード/ライトタイミングを決める信号線等の集合体である。この他にアドレスバスがあるが、本発明の本質ではないため省略することとする。   The data buffer circuits 4-1, 4-2,..., 4-N, the interrupt controller 6, the MPU 7, and the memory device 8 are connected by a data bus 10 and a control bus 9. The data bus 10 is an aggregate of signal lines for exchanging data (the bus width depends on the data to be handled), and circuits connected to the periphery of the bus are connected to the bus only during access. The control bus 9 is a collection of signal lines indicating interrupt requests, signal lines for determining the read / write timing of the data bus, and the like. There are other address buses, but they are omitted because they are not the essence of the present invention.

次に、本発明の実施の形態1に係るコンピュータ100の動作について、図面を参照して詳細に説明する。コンピュータ100の動作は、大きく分けて、(i)割り込み要求を待ち行列に登録するまでのハードウエアの処理(図2参照)、(ii)待ち行列に登録された割り込み要求をMPUに通知するまでのハードウエアの処理(図3参照)、(iii)割り込み処理とその割り込みに対するソフトウエアの処理(図4参照)、(iv)割り込みメッセージに対するソフトウエアの処理(図5参照)の4つがある。これらは、全て独立、かつ、並行して実行される。   Next, the operation of the computer 100 according to Embodiment 1 of the present invention will be described in detail with reference to the drawings. The operation of the computer 100 is broadly divided into (i) hardware processing until the interrupt request is registered in the queue (see FIG. 2), and (ii) until the interrupt request registered in the queue is notified to the MPU. Hardware processing (see FIG. 3), (iii) interrupt processing and software processing for the interrupt (see FIG. 4), and (iv) software processing for the interrupt message (see FIG. 5). These are all executed independently and in parallel.

(i)N個接続されたデータ源1−1、1−2、…、1−Nから割り込み要求があった場合、割り込み要求の履歴を先着順にFIFOバッファ回路3−1、3−2、…、3−Nに書き込む処理(図2の処理31〜34)と、対応する割り込みデータを先着順にデータバッファ回路4−1、4−2、…、4−Nに書き込む処理(図2の処理35)とは、並行して実行される。図2の処理34でN種類の情報源が1系統に統合される。ここでの統合とは、個々の割り込み発生源をチャンネルナンバー情報に変換して、1系統の回路及び1系統のバッファにて処理することを意味している。   (I) When there is an interrupt request from the N connected data sources 1-1, 1-2,..., 1-N, the history of interrupt requests is received in the FIFO buffer circuit 3-1, 3-2,. , 3-N (processing 31 to 34 in FIG. 2) and corresponding interrupt data are written to the data buffer circuits 4-1, 4-2,..., 4-N in the order of arrival (processing 35 in FIG. 2). ) Is executed in parallel. In the process 34 of FIG. 2, N types of information sources are integrated into one system. Here, integration means that each interrupt generation source is converted into channel number information and processed by one system circuit and one system buffer.

割り込み信号エッジ検出回路2−1、2−2、…、2−N、FIFOバッファ回路3−1、3−2、…、3−N、データバッファ回路4−1、4−2、…、4−Nは、データ源1−1、1−2、…、1−Nの数だけハードウエアとして配置されるため、この段階での割り込みの取りこぼしは起こり得ないが、この段階で割り込み要求から待ち行列に登録されるまでの間に遅延が生じる。その最大時間Tは、下式で表わされる。
T=データ源の数N[U] / サンプリング周期K[Hz] (式1)
一般に、Nの範囲を2〜20、Kを100MHzとすると、Tは最大で200nsとなる。これは前述(段落[0018]参照)の割り込みタイミングの精度と比較して、十分に無視できるオーダーと言ってもよい。
.., 2-N, FIFO buffer circuits 3-1, 3-2,..., 3-N, data buffer circuits 4-1, 4-2,. Since -N is arranged as hardware by the number of data sources 1-1, 1-2,..., 1-N, interrupts cannot be missed at this stage. There is a delay before it is registered in the matrix. The maximum time T is expressed by the following equation.
T = number of data sources N [U] / sampling period K [Hz] (Equation 1)
In general, if N is 2 to 20 and K is 100 MHz, T is 200 ns at the maximum. This can be said to be an order that can be sufficiently ignored as compared with the interrupt timing accuracy described above (see paragraph [0018]).

データ源1−1、1−2、…、1−Nから割り込み要求の形式として下記の2通りのものが挙げられる。
(A)1つの形式は、データ源1−1、1−2、…、1−Nから割り込み要求のみを受け、能動的に必要なデータをデータ源1−1、1−2、…、1−Nから取り出す形式で、イベント発生を知らせることを主眼においた信号路の形態に多く見受けられる。この形式は、相対的に、データ量が少ない、発生頻度が少ない、処理時間の余裕がある処理になりやすい傾向がある。この場合、処理31〜34から処理35の順に動作が実行される。エッジ信号13は、割り込み要求信号11から生成される。
There are the following two types of interrupt requests from the data sources 1-1, 1-2,..., 1-N.
(A) One form is to receive only an interrupt request from the data sources 1-1, 1-2,..., 1-N, and actively transmit necessary data to the data sources 1-1, 1-2,. In the form of taking out from -N, it is often seen in the form of a signal path with the main purpose of notifying the occurrence of an event. This format tends to be a process with a relatively small amount of data, a low occurrence frequency, and a processing time allowance. In this case, the operations are executed in the order of processing 31 to 34 to processing 35. The edge signal 13 is generated from the interrupt request signal 11.

(B)他の形式は、データ源1−1、1−2、…、1−Nから受動的に必要なデータを受け、データの受信を以って割り込みを能動的に生成する形式で、パケット通信などのデータ通知に主眼をおいた通信路の形態に多く見受けられる。この形式は、相対的に、データ量が多い、発生頻度が多い、処理時間の余裕がない処理になりやすい傾向がある。この場合、処理35から処理31〜34の順に動作が実行される。エッジ信号13は、データ源1−1、1−2、…、1−Nからデータバッファ回路4−1、4−2、…、4−Nに書き込みが完了したことを示す信号から生成される。   (B) The other format is a format in which necessary data is passively received from the data sources 1-1, 1-2,..., 1-N, and an interrupt is actively generated by receiving the data. It is often seen in the form of communication channels that focus on data notification such as packet communication. This format tends to be a process that has a relatively large amount of data, a high frequency of occurrence, and a processing time that is not excessive. In this case, the operation is executed in the order of the process 35 to the processes 31-34. The edge signal 13 is generated from a signal indicating that writing has been completed from the data sources 1-1, 1-2,..., 1-N to the data buffer circuits 4-1, 4-2,. .

上記(A)、(B)で実行順序やエッジ信号13の生成方法こそ異なれども、本発明は複数のデータ源1−1、1−2、…、1−Nからの割り込みに対するものであり、本発明が上記相違に限定されるものではない。   Although the execution order and the generation method of the edge signal 13 are different in the above (A) and (B), the present invention is for interrupts from a plurality of data sources 1-1, 1-2,. The present invention is not limited to the above differences.

(ii)割り込みコントローラ6は、常時、割り込みサンプラ回路5の内の待ち行列に登録された割り込み情報を1つずつ取り出し、MPU7に割り込み信号16を発行する(図3の処理36〜41)。割り込みサンプラ回路5は、MPU77からの割り込み完了応答信号17を以って、次の割り込み情報に対する処理を行う。このことより、MPU7に対する多重割り込みは生じない。なお、処理41における”A mod B”とは、AをBで割った余りを表している。nは、0, 1, 2, 3 … N-2, N-1の値を繰り返すことになる。   (Ii) The interrupt controller 6 always extracts the interrupt information registered in the queue in the interrupt sampler circuit 5 one by one and issues the interrupt signal 16 to the MPU 7 (processes 36 to 41 in FIG. 3). The interrupt sampler circuit 5 performs processing for the next interrupt information in response to the interrupt completion response signal 17 from the MPU 77. As a result, multiple interrupts to the MPU 7 do not occur. Note that “A mod B” in the process 41 represents a remainder obtained by dividing A by B. n repeats the values 0, 1, 2, 3 ... N-2, N-1.

(iii)図4の処理は、MPU7の中のソフトウエア処理になる。割り込み信号18を受け次第、対応する割り込みベクタの飛び先(割り込み処理ルーチン)に実行制御が移される(図4の処理42)。割り込み処理ルーチンでの処理は、実行環境により異なる。Windows(登録商標)などの大規模なOSを搭載している環境では、メッセージキューに割り込みイベント発生のメッセージを投函する(図4の処理43)だけで、実際のデータの読み出しはしないで、割り込み完了応答信号19を発行して処理を抜ける。これは、デバイスドライバに相当する部分になる。   (Iii) The processing in FIG. 4 is software processing in the MPU 7. As soon as the interrupt signal 18 is received, execution control is transferred to the jump destination (interrupt processing routine) of the corresponding interrupt vector (process 42 in FIG. 4). Processing in the interrupt processing routine varies depending on the execution environment. In an environment where a large-scale OS such as Windows (registered trademark) is installed, the interrupt event occurrence message is simply posted to the message queue (process 43 in FIG. 4), and the actual data is not read. A completion response signal 19 is issued to exit the processing. This is a part corresponding to a device driver.

他方、OSを搭載していない環境、あるいは、簡易OSを使用している環境では、デバイスドライバとアプリケーションソフトウエアを分割する必要性がないため、(iv)を取り除いた上で、処理43の代わりに図5の処理46を直接実行してもよい。本発明は、実行環境の相違を問題にしていない。   On the other hand, in an environment where no OS is installed or an environment where a simple OS is used, there is no need to divide the device driver and application software, so instead of processing 43 after removing (iv) Alternatively, the process 46 of FIG. 5 may be directly executed. The present invention does not consider the difference in execution environment.

(iv)図5の処理も、MPU7の中のソフトウエア処理になる。イベントハンドラは、図4の処理43に対する実行処理であるが、イベントハンドラ内で実際にデータ読み出しが行われる(処理46)。その実行タイミングは、通常、OS側で管理されることになるため、リアルタイム性を考慮する必要はない。   (Iv) The processing of FIG. 5 is also software processing in the MPU 7. The event handler is an execution process for the process 43 of FIG. 4, but data is actually read in the event handler (process 46). The execution timing is normally managed on the OS side, so there is no need to consider real-time characteristics.

次に、図6を用いて、3個のデータ源から同時に発行された場合における、割り込み処理タイミングについて説明する。3個の割り込みタイミングは、説明の都合上、少しずらして記載されているが、ほほ同時に入力されていることとする(50,51,52)。   Next, with reference to FIG. 6, the interrupt processing timing when issued simultaneously from three data sources will be described. The three interrupt timings are described as being slightly shifted for convenience of explanation, but are assumed to be input almost simultaneously (50, 51, 52).

52,53,54はそのエッジ部の波形であり、このタイミングでFIFOバッファ回3−1、3−2、…、3−Nに割り込み情報を書き込む。割り込み情報は、書き込みとほぼ同時に読み出しされ、データ源ナンバの情報を付加した上で、割り込みサンプラ5の内のバッファに書き込みされる。56は割り込みサンプラ5に入力された割り込み情報数を示すカウンタである。このカウンタは、通常、0になっているが、情報数は書き込みで+1、読み出しで−1される。+1するタイミングは70で示され、−1するタイミングは71で示される。上記書き込みと読み出しは対になっている必然性はない。この読み出し信号57と同時にMPU7に対して割り込み要求信号16が出力される。   Reference numerals 52, 53, and 54 denote waveforms at the edges, and interrupt information is written to the FIFO buffer times 3-1, 3-2,..., 3-N at this timing. The interrupt information is read out almost at the same time as the writing, and is added to the buffer in the interrupt sampler 5 after adding the information of the data source number. A counter 56 indicates the number of interrupt information input to the interrupt sampler 5. This counter is normally 0, but the number of information is +1 for writing and -1 for reading. The timing of +1 is indicated by 70, and the timing of -1 is indicated by 71. The writing and reading are not necessarily in pairs. Simultaneously with the read signal 57, an interrupt request signal 16 is output to the MPU 7.

58は、57の割り込み要求に対するMPU7のソフトウエア処理実行タイミングを示している。59は、その処理完了をもって、割り込み処理完了応答を出力するタイミングを示している。   Reference numeral 58 denotes the MPU 7 software processing execution timing in response to the 57 interrupt request. 59 indicates the timing at which an interrupt process completion response is output upon completion of the process.

このように、ハードウエア処理による時間遅延は、一定で、かつ、無視できるオーダーであるが、ソフトウエアにおける処理時間は、割り込み処理内容に依存している。また、その用途も多種多様である。すなわち、ソフトウエアを介在させることで、データ源1−1、1−2、…、1−Nからの割り込み要求11から割り込み処理完了応答19までの時間のバラツキが大きく(最悪値の見積りができない)、時間見積りは不可能ということになる。   Thus, the time delay due to hardware processing is a constant and negligible order, but the processing time in software depends on the contents of interrupt processing. Moreover, the use is also various. That is, by interposing software, the time variation from the interrupt request 11 from the data sources 1-1, 1-2,..., 1-N to the interrupt processing completion response 19 is large (the worst value cannot be estimated). ), Time estimation is impossible.

しかし、割り込み処理の本来の目的からも、所定のタイミングでデータを受け取りができればよいという観点から考慮しなければならない。この観点からして、データバッファ回路4−1、4−2、…、4−Nを用意することが上記時間ばらつきの対策となる。すなわち、データ源1−1、1−2、…、1−Nから出力されるデータをデータバッファ回路4−1、4−2、…、4−Nに書き込むまでの時間が問題であり、本発明では、該書き込み処理はハードウエア処理で実行すること、かつ、ウエイトに対する制約がないため、データ源1−1、1−2、…、1−Nからの出力レートと同じレートで書き込みが可能である。一方、データバッファ回路4−1、4−2、…、4−Nの読み出しは、すぐに読み出す必要はなく、データバッファ回路4−1、4−2、…、4−Nのメモリ装置に満杯にならない範囲で読み出せばよい。   However, the original purpose of interrupt processing must be considered from the viewpoint that data can be received at a predetermined timing. From this point of view, preparing the data buffer circuits 4-1, 4-2,. That is, the time until data output from the data sources 1-1, 1-2,..., 1-N is written to the data buffer circuits 4-1, 4-2,. In the invention, the writing process is executed by hardware processing and there is no restriction on the weight, so writing can be performed at the same rate as the output rate from the data sources 1-1, 1-2,. It is. On the other hand, the data buffer circuits 4-1, 4-2,..., 4-N need not be read immediately, and the data buffer circuits 4-1, 4-2,. It suffices to read within a range that does not become.

このように、データバッファ回路4−1、4−2、…、4−Nは、処理のリアルタイム性に対する緩衝(データ用)としての役割を果たしている。同様に、データバッファ回路4−1、4−2、…、4−Nは、割り込み情報に対しては、割り込みサンプラ5の内のバッファが緩衝の役割を果たしている。   As described above, the data buffer circuits 4-1, 4-2,..., 4-N serve as a buffer (for data) with respect to real-time processing. Similarly, in the data buffer circuits 4-1, 4-2,..., 4-N, the buffer in the interrupt sampler 5 serves as a buffer for interrupt information.

割り込み間隔に対する許容時間、及び、割り込み処理に対する許容時間は、本来、次の式(2)を満たすように設計するのが常識である。

Figure 2010257035
ここで、
Figure 2010257035
とする。任意のn(n=1, 2, …, N)に対して
Figure 2010257035
を満たす必要がなくなることが、緩衝の効果である。すなわち、式(3)から、式(2)に時間制約が緩和されたことになる。 It is common knowledge that the permissible time for the interrupt interval and the permissible time for the interrupt processing are originally designed to satisfy the following equation (2).
Figure 2010257035
here,
Figure 2010257035
And For any n (n = 1, 2,…, N)
Figure 2010257035
It is a buffering effect that it is not necessary to satisfy the above. That is, the time constraint is relaxed from Equation (3) to Equation (2).

緩衝の更なる効果として、瞬間的に式(2)が満たされない場合でも、式(4)、式(5)を満たしていれば、割り込みやデータの取りこぼしは生じないことが挙げられる。

Figure 2010257035
ここで、 As a further effect of the buffer, even if the expression (2) is not satisfied instantaneously, if the expressions (4) and (5) are satisfied, no interruption or data loss occurs.
Figure 2010257035
here,

Figure 2010257035
Figure 2010257035

とする。 And

本発明の手法により、割り込み処理に対するソフトウエアの処理時間の制約は、式(2)のみを満たせばよく、加えて、MPU7の上で多重割り込み処理も発生しない。そのためソフトウエアのリエントラント性などの複雑な配慮は不要となり、ソフトウエアの開発、テストが大幅に容易になる。   According to the method of the present invention, the restriction of the software processing time for interrupt processing only needs to satisfy Expression (2), and in addition, multiple interrupt processing does not occur on the MPU 7. This eliminates the need for complicated considerations such as software reentrancy, and greatly facilitates software development and testing.

特に、計測分野などでは、複数のセンサを取り付けでリアルタイムにそのデータをサンプリングするケースが非常に多く、本発明が効力を発揮しやすい分野でもある。   In particular, in the measurement field and the like, there are very many cases where a plurality of sensors are attached and the data is sampled in real time, and this is an area where the present invention is easily effective.

1−1〜1−N データ源
2−1〜2−N 割り込み信号エッジ検出回路
3−1〜3−N FIFOバッファ回路
4−1〜4−N データバッファ回路
5 割り込みサンプラ回路
6 割り込みコントローラ
7 MPU
8 メモリ装置
9 コントロールバス
10 データバス
1-1 to 1-N data source 2-1 to 2-N interrupt signal edge detection circuit
3-1 to 3-N FIFO buffer circuit 4-1 to 4-N data buffer circuit 5 Interrupt sampler circuit 6 Interrupt controller 7 MPU
8 Memory device 9 Control bus 10 Data bus

Claims (1)

複数のデータ源から任意のタイミングでデータを受信するコンピュータにおいて、
前記複数のデータを一時的に保持してMPUへ送るための複数のデータバッファ回路と、
前記データ源からの割り込み要求信号から変化点を順次に検出してエッジ信号を生成する複数の割り込み信号エッジ検出回路と、
前記割り込み信号エッジ検出回路からの前記エッジ信号を一時的に保持する複数のFIFOバッファ回路と、
前記FIFOバッファ回路の出力を待ち行列に登録する割り込みサンプラ回路と、
前記割り込みサンプラ回路の前記待ち行列を読み出して前記MPUへの割り込み信号を発生させる割り込みコントローラと、
を具備することを特徴とするコンピュータ。
In a computer that receives data from a plurality of data sources at an arbitrary timing,
A plurality of data buffer circuits for temporarily holding the plurality of data and sending them to the MPU;
A plurality of interrupt signal edge detection circuits that sequentially detect change points from the interrupt request signal from the data source and generate an edge signal;
A plurality of FIFO buffer circuits for temporarily holding the edge signal from the interrupt signal edge detection circuit;
An interrupt sampler circuit that registers the output of the FIFO buffer circuit in a queue;
An interrupt controller that reads the queue of the interrupt sampler circuit and generates an interrupt signal to the MPU;
A computer comprising:
JP2009103755A 2009-04-22 2009-04-22 Computer Pending JP2010257035A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009103755A JP2010257035A (en) 2009-04-22 2009-04-22 Computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009103755A JP2010257035A (en) 2009-04-22 2009-04-22 Computer

Publications (1)

Publication Number Publication Date
JP2010257035A true JP2010257035A (en) 2010-11-11

Family

ID=43317909

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009103755A Pending JP2010257035A (en) 2009-04-22 2009-04-22 Computer

Country Status (1)

Country Link
JP (1) JP2010257035A (en)

Similar Documents

Publication Publication Date Title
US10621025B2 (en) Methods for data acquisition systems in real time applications
CN101616174B (en) Method for optimizing system performance by dynamically tracking IO processing path of storage system
CN103678199A (en) Data transmission method and data transmission equipment
US10310996B2 (en) Hardware queue manager with water marking
TW201346487A (en) Data transfer between asynchronous clock domains
CN107943736A (en) Time-triggered protocol equipment and the data handling system for including time-triggered protocol equipment
TWI604303B (en) Inout/output expander chip and verification method therefor
JP2011527800A (en) Method for transmitting information using PCI Express tag field
TWI750386B (en) Bus system
KR20110134465A (en) Data transmission system and data read method thereof
JP2010257035A (en) Computer
EP3979026A1 (en) Control system, programmable logic controller, and information processing method
JP5239769B2 (en) Request order control system, request order control method, and request order control program
US8156264B2 (en) Digital output sensor FIFO buffer with single port memory
CN105701055A (en) Electronic device and data transmission method thereof
US7290069B2 (en) Data acquisition system which monitors progress of data storage
JP2011065537A (en) Data receiving system and interruption performing method
JP2012093944A (en) Information processor and information processing method
US10277520B2 (en) Packet transfer buffer for computer system with multiple source and destination interfaces
WO2010061482A1 (en) Testing apparatus, serial transmission system, program, and recording medium
JP6384359B2 (en) Information processing apparatus having distributed shared memory, method, and program
WO2023229616A1 (en) Distributed firmware interfacing processors and intergrated circuits
JP2007285737A (en) Semiconductor test device
RU2592461C2 (en) Method of transmitting data between processes
CN116414766A (en) Heterogeneous system inter-core time synchronization method, heterogeneous system and mobile terminal