JPH0432922A - Interface control circuit - Google Patents
Interface control circuitInfo
- Publication number
- JPH0432922A JPH0432922A JP2132826A JP13282690A JPH0432922A JP H0432922 A JPH0432922 A JP H0432922A JP 2132826 A JP2132826 A JP 2132826A JP 13282690 A JP13282690 A JP 13282690A JP H0432922 A JPH0432922 A JP H0432922A
- Authority
- JP
- Japan
- Prior art keywords
- data
- cpu
- signal
- control circuit
- fifo
- 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
Links
- 230000004044 response Effects 0.000 claims abstract description 6
- 229920006395 saturated elastomer Polymers 0.000 abstract description 4
- 230000005540 biological transmission Effects 0.000 abstract 1
- 238000000034 method Methods 0.000 description 11
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 230000006866 deterioration Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
Abstract
Description
【発明の詳細な説明】
技術分野
本発明はインタフェース制御回路に関し、特に情報処理
装置間通信のインタフェースの制御回路に関する。TECHNICAL FIELD The present invention relates to an interface control circuit, and more particularly to a control circuit for an interface for communication between information processing devices.
従来技術
一般に、インタフェース回路には、並列転送(パラレル
)方式のものと直列転送(シリアル)方式のものとがあ
る。2. Description of the Related Art In general, there are two types of interface circuits: one using a parallel transfer method and one using a serial transfer method.
従来、この種のインタフェース回路はプリンタ装置等に
使われており、並列転送の仕様である、いわゆるセント
ロニクス仕様インタフェースにおいては、転送データを
予め定められた手順に基づいて受信し、1回の受信毎に
CPUに受信データがあることを知らせるように制御さ
れていた。また、直列転送の仕様である、例えば周知の
R3232C仕様のインタフェースにおいては、受信回
路で1ビツトずつ受取ったデータを集積し、1ワードが
生成される毎にCPUに受信データがあることを通知す
るように制御されていた。Conventionally, this type of interface circuit has been used in printer devices, etc., and in the so-called Centronics specification interface, which is a specification for parallel transfer, transfer data is received based on a predetermined procedure, and the transfer data is It was controlled to notify the CPU of the presence of received data. In addition, in the interface of serial transfer specifications, for example, the well-known R3232C specification, the receiving circuit accumulates the data received one bit at a time, and notifies the CPU that there is received data every time one word is generated. It was controlled like that.
つまり、上述した従来のインタフェース回路は、1ワー
ド受信あるいは1ワード生成する毎にCPUに対して割
込みを発生し、CPUは1回の割込み処理で1ワードを
読込み、編集し格納するというように制御していたので
ある。この場合、割込み処理ルーチンにおけるCPυ内
部の処理、すなわちプログラムカウンタ及び他の汎用レ
ジスタのセーブあるいはロードに要する処理時間は長い
ものである。そのため、lワード毎に処理する方式では
CPUの使用効率が悪く、特に外部装置からのデータ転
送速度が増大した時にCPUが受信処理にかかわる時間
が長くなり、性能が見かけ上悪くなるという欠点があっ
た。In other words, the conventional interface circuit described above generates an interrupt to the CPU every time one word is received or generated, and the CPU reads, edits, and stores one word in one interrupt process. That's what I was doing. In this case, the processing time required for internal processing of CPυ in the interrupt processing routine, that is, for saving or loading the program counter and other general-purpose registers, is long. Therefore, the method of processing every word has the disadvantage that the CPU is not used efficiently, and especially when the data transfer rate from an external device increases, the time required for the CPU to perform reception processing increases, resulting in an apparent deterioration in performance. Ta.
発明の目的
本発明は上述した従来の欠点を解決するためになされた
ものであり、その目的はCPUの使用効率を向上させ、
その見かけ上の性能を良くすることができるインタフェ
ース制御回路を提供することである。OBJECT OF THE INVENTION The present invention has been made to solve the above-mentioned conventional drawbacks, and its purpose is to improve the efficiency of CPU usage,
An object of the present invention is to provide an interface control circuit that can improve its apparent performance.
発明の構成
本発明によるインタフェース制御回路は、上位装置から
予め定められたデータ単位毎に区切って転送されてくる
データを順次蓄積保持する保持手段と、この保持データ
を受けてデータ処理するデータ処理手段とを含むインタ
フェース制御回路であって、前記保持手段の保持データ
量が予め定められた所定量(1データ単位置を除く)に
達したときに前記データ処理手段への割込み信号を発生
する手段を設け、前記データ処理手段は前記割込み信号
に応答して前記保持データを連続して読出すようにした
ことを特徴とする。Structure of the Invention The interface control circuit according to the present invention includes a holding means for sequentially accumulating and holding data divided into predetermined data units and transferred from a host device, and a data processing means for receiving and processing the held data. an interface control circuit comprising: means for generating an interrupt signal to the data processing means when the amount of data held in the holding means reaches a predetermined amount (excluding one data single position); The data processing means is configured to continuously read out the held data in response to the interrupt signal.
実施例 次に、本発明について図面を参照して説明する。Example Next, the present invention will be explained with reference to the drawings.
第1図は本発明によるインタフェース制御回路の一実施
例の構成を示すブロック図である。FIG. 1 is a block diagram showing the configuration of an embodiment of an interface control circuit according to the present invention.
図において、1及び2はホストコンピュータ等、外部装
置からの受信データを内部のデータ形式に変換する受信
回路である。1は直列データを並列データに変換する直
並列変換回路であり、2は並列データの受信回路である
。なお、これら2つの回路は通常択一的に使用される。In the figure, 1 and 2 are receiving circuits that convert received data from an external device such as a host computer into an internal data format. 1 is a serial/parallel conversion circuit that converts serial data into parallel data, and 2 is a parallel data receiving circuit. Note that these two circuits are usually used alternatively.
4は先入れ先出しレジスタ(以下、FIFOと略す)で
あり、直並列変換回路1または並列受信回路2からのデ
ータ信号による1バイト分のデータを順次保持蓄積する
ものである。その出力はデータバスeに接続されている
。また、このFIFO4は周知のD型フリップフロップ
(D−PP)の多段縦続接続で構成されており、全D〜
1?12の保持値が“0”である場合には、空であるこ
とを示すFIFOEmpty信号gがCPU5に送出さ
れる。さらにまた、このFIFO4への書込みタイミン
グはタイミング制御回路3からの書込み信号dによって
行われる。Reference numeral 4 denotes a first-in first-out register (hereinafter abbreviated as FIFO), which sequentially holds and accumulates one byte worth of data based on the data signal from the serial/parallel conversion circuit 1 or the parallel reception circuit 2. Its output is connected to data bus e. In addition, this FIFO 4 is composed of well-known D-type flip-flops (D-PP) connected in multi-stage cascade, and all D to
When the held value of 1 to 12 is "0", a FIFO Empty signal g indicating that it is empty is sent to the CPU 5. Furthermore, the timing of writing to the FIFO 4 is determined by the write signal d from the timing control circuit 3.
タイミング制御回路3は、内部に図示せぬ累算器を有し
ており、その累算器(カウンタ)は直並列変換回路1か
らのデータ有効信号Cまたは並列受信回路2からのデー
タ有効信号すに応答して1ずつインクリメントされる。The timing control circuit 3 has an accumulator (not shown) inside, and the accumulator (counter) receives the data valid signal C from the serial/parallel converter circuit 1 or the data valid signal C from the parallel receiving circuit 2. It is incremented by 1 in response to .
さらに、その累算器の値が後述する所定値に達すると、
CPU5に対して割込み信号fを送出する。なお、その
累算器の値はCPU5からのデータカウンタリセット信
号iの入力により、リセットされる。Furthermore, when the value of the accumulator reaches a predetermined value, which will be described later,
An interrupt signal f is sent to the CPU 5. Note that the value of the accumulator is reset by inputting a data counter reset signal i from the CPU 5.
CPU5は、タイミング制御回路3からの割込み信号f
の人力に応答して割込み処理ルーチンを起動し、FIF
OJ内の保持データを、データバスeを介してFIFO
4へのデータ保持速度より速く読出し、メモリ6に書込
む処理を行う。なお、hはメモリ6へのアドレスである
。The CPU 5 receives an interrupt signal f from the timing control circuit 3.
The interrupt processing routine is started in response to human input from the FIF.
Data held in OJ is transferred to FIFO via data bus e.
The data is read out and written into the memory 6 faster than the data retention speed in the memory 4. Note that h is an address to the memory 6.
かかる構成において、今、並列受信回路2が選択されて
いる時、図示せぬ外部装置からのデータを受信するとデ
ータ有効信号すをタイミング制御回路3に送出し、その
受信データをデータ信号aとして送出する。すると、タ
イミング制御回路3はデータ信号aに有効データが送出
されたタイミングで書込み信号dを送出してFIFO4
に書込むとともに、内部の累算器を1インクリメントす
る。In such a configuration, when the parallel receiving circuit 2 is currently selected and receives data from an external device (not shown), it sends a data valid signal to the timing control circuit 3, and sends out the received data as a data signal a. do. Then, the timing control circuit 3 sends out a write signal d at the timing when valid data is sent to the data signal a, and writes it into the FIFO 4.
and increments the internal accumulator by 1.
ここで、FIFO4の容量をMバイトとし、累算器の値
がある値しに達した時、タイミング制御回路3は、F
I FO4が飽和状態であると判断し、CPU5に割込
み信号fを送出するものとする。Here, the capacity of FIFO 4 is M bytes, and when the value of the accumulator reaches a certain value, the timing control circuit 3
It is assumed that the IFO4 is determined to be in a saturated state and an interrupt signal f is sent to the CPU5.
CPU5は割込み信号fを受信すると、第3図に示され
ているような割込み処理を実行する。When the CPU 5 receives the interrupt signal f, it executes the interrupt process as shown in FIG.
第3図は割込み処理手順を示すフローチャートである。FIG. 3 is a flowchart showing the interrupt processing procedure.
図において、割込み処理の初めに(INTIn;Int
errupt ln ) 、CP U 5の内部レジス
タの保持データをメモリ6の予約領域に格納する(ステ
ップ31)。In the figure, at the beginning of interrupt processing (INTIn; Int
errupt ln), the data held in the internal register of the CPU 5 is stored in the reserved area of the memory 6 (step 31).
次に、F I FO4の内容を1バイト読出しくステッ
プ32) 、CPU5は本データの属性に応じて適宜編
集処理を行う(ステップ33)。これは、制御データ、
文字データ等の種類に応じて所定の形式に変換する処理
である。Next, 1 byte of the contents of the FIFO 4 is read (step 32), and the CPU 5 performs editing processing as appropriate according to the attributes of this data (step 33). This is control data,
This is a process of converting character data etc. into a predetermined format depending on the type.
編集処理後のデータはメモリ6に格納する(ステップ3
4)。次に、CPU5は信号gをチエツクすることによ
ってFIFO4が空であるか否かを判断しくステップ3
5)、空でなければFIFO4から再度データを読出し
、同様の処理を行う(ステップ35→32→33・・・
)。The data after the editing process is stored in the memory 6 (step 3
4). Next, the CPU 5 checks the signal g to determine whether the FIFO 4 is empty or not.
5) If it is not empty, read data from FIFO4 again and perform the same process (steps 35→32→33...
).
一方、空であればタイミング制御回路3の累算器を信号
iによりリセットしくステップ36)、メモリ6に格納
しておいた内部レジスタの保持データを復帰させてもと
の状態に戻しくステップ37)、割込み処理を終了する
(INT Ret ; InterrupL Re
turn) 。On the other hand, if it is empty, the accumulator of the timing control circuit 3 is reset by the signal i (step 36), and the data stored in the internal register stored in the memory 6 is restored to the original state (step 37). ), ends the interrupt processing (INT Ret; InterruptL Re
turn).
また、第2図はFIFO4の内容量と読81L時間との
関係を示すタイムチャートである。図において、時刻0
で内容量が0バイトであったFIFO4の保持データは
、1時間後にLに達し、上述の累算器で飽和状態と判定
される。このとき、CPU5に割込み信号fが送出され
る。Further, FIG. 2 is a time chart showing the relationship between the content capacity of FIFO 4 and the reading time of 81L. In the figure, time 0
The data held in FIFO 4, whose content capacity was 0 bytes, reaches L after one hour, and is determined to be in a saturated state by the accumulator described above. At this time, an interrupt signal f is sent to the CPU 5.
CPU5は割込み信号fを受信した時においては、どの
ような処理を行っているか不明であり、さらにdT時間
経過後にFIFO4のデータを読出し始める。ところが
、FIFO4に対しては順次データが保持蓄積されるた
め、CPU5はさらにX時間経過後にF I FO4を
読出し終える。When the CPU 5 receives the interrupt signal f, it is unknown what kind of processing it is performing, and it starts reading data from the FIFO 4 after a lapse of time dT. However, since data is sequentially held and accumulated in the FIFO 4, the CPU 5 finishes reading the FIFO 4 after X time has elapsed.
ここで、飽和状態と判定される値りがFIFO4の容量
Mより少ないのは割込み時のCPU5の状態に応じて時
間dTが変化するためである。詳細については後述する
。Here, the reason why the value determined to be saturated is smaller than the capacity M of the FIFO 4 is because the time dT changes depending on the state of the CPU 5 at the time of the interrupt. Details will be described later.
FIFO4が空になると信号gが送出され、CPU5は
データの読出しを終了するので、再びFIFOJ内のデ
ータ量は増加し始めるごとになる。When the FIFO 4 becomes empty, the signal g is sent out and the CPU 5 finishes reading the data, so that the amount of data in the FIFO J starts to increase again.
つまり、従来はデータの1バイトを受信する毎にCPU
の割込み処理によるデータ読出しを行っていたのに対し
、本実施例ではインタフェース回路内にFIFOを設け
ておき、その飽和状態を探知してデータ読出しを2バイ
ト以上のある一定単位毎に連続して行っているのである
。これにより、CPUの1バイト当りのリード処理にお
ける割込み処理のオーバヘッド時間が従来の数百性の1
に短縮されるため、見かけ上CPUの性能が向上するの
である。In other words, conventionally, each time a byte of data was received, the CPU
In contrast, in this embodiment, a FIFO is provided in the interface circuit, and the saturation state of the FIFO is detected and data is read out continuously in certain units of 2 bytes or more. That's what we're doing. As a result, the overhead of interrupt processing in read processing per byte of the CPU is reduced from several hundreds to 1
This apparently improves the performance of the CPU.
さらに、本実施例ではFIFOを用いているため、アド
レス指定が不要となり、受信データの装置内部への取込
み時間を短縮できるのである。よって、外部装置に対し
て待ち状態である時間を短縮することもできる。なお、
制御が複雑になってもかまわないのであれば、メモリを
利用しても良い。Furthermore, since FIFO is used in this embodiment, there is no need to specify an address, and the time required to import received data into the device can be shortened. Therefore, the time spent waiting for the external device can also be shortened. In addition,
If you don't mind complicated control, you can use memory.
次に、第2図に示されているFIFOの容量Mと値りと
の関係について説明する。まず、1回の受信によりFI
FOに保持されるデータをNワードとする。つまり、上
述の実施例では1ワード−1バイトとなる。すなわち、
MとLとの関係は、LXN<Mとなる。なお、Lは2以
上でなければならない。L−1では従来の処理と同じだ
からである。Next, the relationship between the FIFO capacity M and the value shown in FIG. 2 will be explained. First, one reception causes FI
Assume that the data held in the FO is N words. That is, in the above-described embodiment, it is 1 word - 1 byte. That is,
The relationship between M and L is LXN<M. Note that L must be 2 or more. This is because the processing in L-1 is the same as the conventional processing.
また、LはCPUの読出し速度に応じて定める必要があ
る。つまり、先述のように、割込み信号が送出されてか
ら実際にCPUが読出し処理を開始するまでの間にもF
IFO内にデータが保持蓄積されるため、割込みがかか
ってからCPUが実際に読出しを開始するまでの最大時
間値よりMLが大とならなければならない。さもないと
FIFOがバンクしてしまうからである。すなオ)ち、
第2図中の時間dTの最大値に応じてLを定めておけば
良いのである。Further, L needs to be determined according to the read speed of the CPU. In other words, as mentioned earlier, F
Since data is held and accumulated in the IFO, ML must be larger than the maximum time value from when an interrupt occurs until the CPU actually starts reading. Otherwise, the FIFO will become banked. Sunao) Chi,
It is sufficient to determine L according to the maximum value of time dT in FIG. 2.
発明の詳細
な説明したように本発明によれば、データを順次蓄積保
持する保持手段においてその保持データが所定値に達し
たときに始めてCPUへ割込み信号を発生するようにし
、CPUはこの割込信号に応答して当該保持データを連
続して読出し処理するように構成しているので、CPU
の割込み処理が極めて少なくなり、CPUのオーバヘッ
ドが著しく減少し、よってCPUの使用効率を向上させ
、その見かけ上の性能を良くすることができるという効
果がある。DETAILED DESCRIPTION OF THE INVENTION According to the present invention, an interrupt signal is generated to the CPU only when the held data reaches a predetermined value in the holding means that sequentially accumulates and holds data, and the CPU does not respond to this interrupt. Since the configuration is such that the retained data is continuously read and processed in response to a signal, the CPU
This has the effect of significantly reducing interrupt processing and significantly reducing CPU overhead, thereby improving CPU usage efficiency and improving its apparent performance.
第1図は本発明の実施例によるインタフェース制御回路
の構成を示すブロック図、第2図はFIFOの内容量と
読出し時間との関係を示すタイムチャート、第3図は割
込み処理手順を示すフローチャートである。
主要部分の符号の説明FIG. 1 is a block diagram showing the configuration of an interface control circuit according to an embodiment of the present invention, FIG. 2 is a time chart showing the relationship between FIFO content capacity and read time, and FIG. 3 is a flow chart showing the interrupt processing procedure. be. Explanation of symbols of main parts
Claims (1)
って転送されてくるデータを順次蓄積保持する保持手段
と、この保持データを受けてデータ処理するデータ処理
手段とを含むインタフェース制御回路であって、前記保
持手段の保持データ量が予め定められた所定量(1デー
タ単位置を除く)に達したときに前記データ処理手段へ
の割込み信号を発生する手段を設け、前記データ処理手
段は前記割込み信号に応答して前記保持データを連続し
て読出すようにしたことを特徴とするインタフェース制
御回路。(1) An interface control circuit including a holding means for sequentially accumulating and holding data divided into predetermined data units and transferred from a host device, and a data processing means for receiving and processing this held data. means for generating an interrupt signal to the data processing means when the amount of data held in the holding means reaches a predetermined amount (excluding one data single position); An interface control circuit characterized in that the held data is continuously read out in response to an interrupt signal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2132826A JPH0432922A (en) | 1990-05-23 | 1990-05-23 | Interface control circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2132826A JPH0432922A (en) | 1990-05-23 | 1990-05-23 | Interface control circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH0432922A true JPH0432922A (en) | 1992-02-04 |
Family
ID=15090453
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2132826A Pending JPH0432922A (en) | 1990-05-23 | 1990-05-23 | Interface control circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0432922A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003040253A (en) * | 2001-07-31 | 2003-02-13 | Takeda Chem Ind Ltd | Storage box having bottom cushioning function |
JP2006248109A (en) * | 2005-03-11 | 2006-09-21 | Toshiba Corp | Beam light scanner, image forming apparatus, and beam light scanning method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6429061A (en) * | 1987-07-23 | 1989-01-31 | Fuji Xerox Co Ltd | Data transmission system |
JPH0198017A (en) * | 1987-10-09 | 1989-04-17 | Nec Corp | Printer controller |
-
1990
- 1990-05-23 JP JP2132826A patent/JPH0432922A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6429061A (en) * | 1987-07-23 | 1989-01-31 | Fuji Xerox Co Ltd | Data transmission system |
JPH0198017A (en) * | 1987-10-09 | 1989-04-17 | Nec Corp | Printer controller |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003040253A (en) * | 2001-07-31 | 2003-02-13 | Takeda Chem Ind Ltd | Storage box having bottom cushioning function |
JP2006248109A (en) * | 2005-03-11 | 2006-09-21 | Toshiba Corp | Beam light scanner, image forming apparatus, and beam light scanning method |
JP4597719B2 (en) * | 2005-03-11 | 2010-12-15 | 株式会社東芝 | Beam light scanning device, image forming apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8291138B2 (en) | Skip based control logic for first in first out buffer | |
CN113468097B (en) | Data exchange method based on system on chip | |
US6584512B1 (en) | Communication DMA device for freeing the data bus from the CPU and outputting divided data | |
JPH0432922A (en) | Interface control circuit | |
JPH0479422A (en) | Transmission control circuit | |
JPH0458355A (en) | Interface control circuit | |
JPH0721103A (en) | Data transfer device | |
JP3218659B2 (en) | FIFO buffer circuit | |
JP3592169B2 (en) | Asynchronous data transfer control device and asynchronous data transfer control method | |
JP2615677B2 (en) | Shared extended storage control method | |
JP2823625B2 (en) | Data processing device | |
JP2834948B2 (en) | Data transfer method | |
JPS62175853A (en) | Interface control system | |
CN117311662A (en) | Data clearing system and method | |
SU752318A1 (en) | Multiplexor channel | |
JPH0581165A (en) | Data transfer circuit | |
JPS6235148B2 (en) | ||
JPH10105488A (en) | Communication controller | |
KR950014159B1 (en) | Fifo register control method | |
JP2511697B2 (en) | Data receiver | |
JP2533958B2 (en) | Data preceding set device | |
JPH10136027A (en) | Communication controller | |
JPH07253920A (en) | Fifo ram controller | |
JPH05314059A (en) | Memory access control circuit | |
JPH1068761A (en) | Fail search circuit |