JPH0944447A - Interface circuit - Google Patents

Interface circuit

Info

Publication number
JPH0944447A
JPH0944447A JP21096995A JP21096995A JPH0944447A JP H0944447 A JPH0944447 A JP H0944447A JP 21096995 A JP21096995 A JP 21096995A JP 21096995 A JP21096995 A JP 21096995A JP H0944447 A JPH0944447 A JP H0944447A
Authority
JP
Japan
Prior art keywords
command
transfer
data
information
completion
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
JP21096995A
Other languages
Japanese (ja)
Inventor
Hideo Honma
英雄 本間
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP21096995A priority Critical patent/JPH0944447A/en
Publication of JPH0944447A publication Critical patent/JPH0944447A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To preferentially process even a command transferred later by providing a means for reading the commands/data from a buffer for queuing the commands in a reverse order. SOLUTION: A CPU 107 receives and takes out the data of a fixed length at the head of the command and takes out and receives remaining command length information. The CPU 107 analyzes the command, counts a data amount and takes it out. It is assumed that the commands/the data transferred from an interface 101 are automatically queued in FIFO. In this case, they are not queued in the FIFO and the command to be preferentially processed is defined as a preferentially processing command. Information transferred first immediately after reset is defined as the command and the CPU 107 takes out the command from a queue and checks it. Then, whether or not it is the preferentially processing command is judged, and in the case of the preferentially processing command, a command processing is started as it is when data transfer is not required and it is processed before the commands already in the queue.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はホストコンピュータに接
続するデバイスのインターフェース回路に関し、特に受
信したコマンドを優先的に処理する機構に関するもので
ある。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an interface circuit of a device connected to a host computer, and more particularly to a mechanism for preferentially processing a received command.

【0002】[0002]

【従来の技術】ホストコンピュータ(以下、単に、ホス
トという場合もある)に接続するデバイスのインターフ
ェース回路構成の従来例を図15に示す。この従来例で
はデバイスとしてプリンタを仮定している。101はホ
ストと接続するインターフェース回路で、物理レベル、
インターフェースプロトコルを制御する。ここでインタ
ーフェースプロトコルはホストからの転送情報のデータ
/コマンドの区別はできないものとする。すなわち、ホ
ストからの転送情報はインターフェース上を単に”デー
タ”としてデバイスに受け取られ、その後の処理過程で
データ/コマンドの区別がなされるものとする。ホスト
から転送された情報はインターフェース回路101から
転送ロジック102の操作でアクセス制御ロジック10
3を介してRAM104へ格納される。インターフェー
ス回路101とアクセス制御ロジック103との間はI
/FBus(インターフェースバス)で接続される。イ
ンターフェース回路101にホストから情報が転送され
ると、転送ロジック102へ転送要求を出し、転送ロジ
ック102はこれを受けてインターフェース回路内の情
報をアクセス制御ロジックへ書き込む。この処理はハー
ドウェアロジックで高速に行われ、CPU等によるソフ
トウェア処理は必要としない。アクセス制御ロジック1
03は転送ロジックの制御信号をRAM104のアクセ
ス信号に変換し、情報を書き込む。
2. Description of the Related Art FIG. 15 shows a conventional example of the interface circuit configuration of a device connected to a host computer (hereinafter, also simply referred to as a host). In this conventional example, a printer is assumed as the device. 101 is an interface circuit connected to the host, which is at the physical level,
Control the interface protocol. Here, it is assumed that the interface protocol cannot distinguish the data / command of the transfer information from the host. That is, the transfer information from the host is simply received by the device as "data" on the interface, and the data / command is distinguished in the subsequent processing. The information transferred from the host is accessed from the access control logic 10 by the operation of the transfer logic 102 from the interface circuit 101.
3 is stored in the RAM 104. I is provided between the interface circuit 101 and the access control logic 103.
/ FBus (interface bus). When information is transferred from the host to the interface circuit 101, a transfer request is sent to the transfer logic 102, and the transfer logic 102 receives the request and writes the information in the interface circuit to the access control logic. This processing is performed at high speed by hardware logic and does not require software processing by a CPU or the like. Access control logic 1
03 converts the control signal of the transfer logic into the access signal of the RAM 104 and writes the information.

【0003】CPU107はプログラムROM108の
内容に従って動作し、デバイスの各種の制御を行う。ホ
ストからの情報の転送の有無は定期的に入力RAM10
4をチェックして行う。リセット状態の直後ではCPU
107はホストからの情報がコマンドであると仮定し、
その有効性をチェックする。有効であればそれに対応し
た処理を行う。このときコマンドにデータが伴う場合
は、そのコマンドに続いた情報をデータとして受取り、
そのコマンド処理を行う。
The CPU 107 operates according to the contents of the program ROM 108 and controls various devices. Whether or not information is transferred from the host is regularly input to the RAM 10
Check 4 and do. Immediately after the reset state, the CPU
107 assumes that the information from the host is a command,
Check its effectiveness. If it is valid, the corresponding process is performed. At this time, if the command is accompanied by data, the information following the command is received as data,
The command is processed.

【0004】そのデータがプリンタの印字データである
場合は、DMAC(DMAコントローラ)109はデー
タをRAM104からプリンタエンジン110にDMA
(ダイレクト メモリ アクセス)転送する。RAM1
04はインターフェースからの転送情報のバッファと、
CPU107のワーク領域の両方の機能を持ち、アクセ
ス制御ロジック103はRAM104へのI/FBus
とCPUBusとの両方からのアクセスの調停を行う。
When the data is the print data of the printer, the DMAC (DMA controller) 109 DMAs the data from the RAM 104 to the printer engine 110.
(Direct memory access) Transfer. RAM1
04 is a buffer of transfer information from the interface,
The access control logic 103 has both functions of the work area of the CPU 107, and the access control logic 103 is an I / FB bus to the RAM 104.
And arbitration of access from both CPU Bus.

【0005】以上述べたように、ホストから転送された
情報は一度RAM104に格納され、次にCPU107
に読み込まれて処理されるが、アクセス制御ロジックは
このバッファ領域をFIFO(ファーストイン ファー
ストアウト)のように制御する。すなわち、転送ロジッ
クはインターフェース回路101からの情報をFIFO
がフルになるまで転送し、CPU107はそのFIFO
から情報を転送された順に読みだして処理する。このF
IFO容量はアクセス制御ロジック103でCPU10
7のワーク領域とは別になるように構成する。またこの
ように構成することによりCPUはRAM104のバッ
ファアドレスを管理する必要無しに順次情報を処理でき
る。
As described above, the information transferred from the host is once stored in the RAM 104, and then the CPU 107
However, the access control logic controls this buffer area like a FIFO (First In First Out). That is, the transfer logic transfers the information from the interface circuit 101 to the FIFO.
Is transferred to the FIFO, and the CPU 107 transfers the FIFO.
The information is read from and processed in the order in which it was transferred. This F
The IFO capacity is the access control logic 103 and the CPU 10
It is configured to be different from the work area of No. 7. Further, with such a configuration, the CPU can sequentially process the information without having to manage the buffer address of the RAM 104.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、上記の
従来例では以下の問題があった。ホストから転送された
コマンド/データはそのままバッファに入れられキュー
イングされたあと、これとは非同期にCPUに読み込ま
れ処理される。このバッファはFIFO構造であるため
CPUは先に届いた順に処理を行うが、何らかのトラブ
ルで処理に時間がかかる場合がある。この状態では後に
届いたコマンドはFIFOの中でキューイングされ続
け、処理を実行する時間が不確実となる。すなわち、も
しデバイスのリセット、実行中のコマンドの取消等のコ
マンドを受信しても、その実行がいつ行われるか不確実
となりうる。
However, the above-mentioned conventional example has the following problems. The command / data transferred from the host is put into a buffer as it is and queued, and then is asynchronously read and processed by the CPU. Since this buffer has a FIFO structure, the CPU performs processing in the order in which it arrives first, but it may take some time for processing due to some trouble. In this state, commands that arrive later will continue to be queued in the FIFO, and the time to execute the processing becomes uncertain. That is, if a command such as device reset or cancellation of a command being executed is received, it may be uncertain when the command will be executed.

【0007】もしFIFOの中の情報を逆順に取り出す
構造としても、インターフェースは情報がデータ/コマ
ンドの区別をしないため、それがコマンドなのかデータ
なのか区別できない。このためインターフェース回路は
根本的にコマンドの受信をCPUに割込等の手段で通知
する事は不可能である。
Even if the information in the FIFO is taken out in reverse order, the interface does not distinguish between data and command, so it cannot distinguish whether it is command or data. Therefore, the interface circuit cannot fundamentally notify the CPU of the reception of the command by means such as an interrupt.

【0008】したがって、本発明の目的は、インターフ
ェースが情報のコマンド/データの区別ができない場合
でも、情報に含まれるコマンドの情報を識別し、CPU
に通知して必要に応じて優先処理を可能とするものであ
る。
Therefore, an object of the present invention is to identify the information of the command included in the information even if the interface cannot distinguish the command / data of the information, and the CPU
The notification is sent to the user and priority processing can be performed if necessary.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するた
め、本発明ではインターフェース回路からの単一のデー
タストリームからなる転送情報からコマンドの転送完了
およびそのコマンドに付随するデータの転送完了を検出
する手段、この検出時に動作を停止させる転送停止手
段、転送完了をCPUへ通知する手段、コマンドをキュ
ーイングするバッファからコマンド/データを逆順に読
みだす手段を設ける事により、後から転送されたコマン
ドであっても優先処理を可能とするものである。
In order to achieve the above object, the present invention detects the completion of command transfer and the completion of data transfer associated with the command from the transfer information consisting of a single data stream from the interface circuit. By providing a means, a transfer stopping means for stopping the operation at the time of this detection, a means for notifying the CPU of the transfer completion, and a means for reading the command / data from the buffer for queuing the command in reverse order, Even if there is, priority processing is possible.

【0010】このコマンドの転送完了識別手段として、
転送情報のカウント手段を設け、転送シーケンスはコマ
ンドから開始するものとして所定のカウント数の転送完
了をCPUに通知し、それに含まれる残りコマンドの情
報量からカウンタを再設定してコマンドの転送完了を検
出することを特徴とする。
As a transfer completion identifying means for this command,
A transfer information counting means is provided to notify the CPU of the completion of transfer of a predetermined count number as the transfer sequence starts from a command, and the counter is reset based on the information amount of the remaining command included in the transfer sequence to complete the transfer of the command. It is characterized by detecting.

【0011】もしくは、このコマンドの転送完了識別手
段として、コマンド終了コード(デリミタ)検出回路を
設け、転送シーケンスはコマンドから開始するものとし
てデリミタを検出し、これをCPUに通知する事を特徴
とする。
Alternatively, a command end code (delimiter) detection circuit is provided as the transfer completion identifying means for the command, the transfer sequence starts from a command, the delimiter is detected, and this is notified to the CPU. .

【0012】データ転送完了識別手段として、転送情報
のカウント手段を設け、コマンドに含まれるデータ量を
カウントして検出する事を特徴とする。
As a data transfer completion identifying means, a transfer information counting means is provided to count and detect the amount of data contained in the command.

【0013】転送モードを保持する手段を設け、コマン
ド/データ転送モード、及びデータ転送モードでは優先
処理/非優先処理モードを設け、データモードの非優先
処理モードでデータ転送完了した場合は、CPUに通知
することなくコマンドモードに移行することを特徴とす
る。これにより定型化した処理をCPUに依存せずに効
率的に処理可能となる。
A means for holding the transfer mode is provided, a priority processing / non-priority processing mode is provided in the command / data transfer mode, and the data transfer mode. When data transfer is completed in the non-priority processing mode of the data mode, the CPU is notified. The feature is that the mode shifts to the command mode without notifying. As a result, it becomes possible to efficiently perform the standardized processing without depending on the CPU.

【0014】[0014]

【実施例】次に、本発明の実施例を説明する。EXAMPLES Next, examples of the present invention will be described.

【0015】(実施例1)本発明の実施例1を図1に示
す。先に述べた従来例と同一の構成要素は同一の番号で
示してある。101はホストマシン(図示せず)と接続
し情報転送を行うインターフェース回路、102は情報
転送のための信号制御を行う転送ロジック、103はR
AM104へのアクセスを制御するアクセス制御ロジッ
クである。ここでインターフェースはそのプロトコル上
でデータ/コマンドの区別を行わないものとする。RA
M104にはインターフェース回路101側のI/FB
usとCPU107側のCPUBusの両方がアクセス
するため、アクセス制御ロジック103がその調停を行
う。105は転送情報量をカウントするカウンタで、イ
ンターフェース回路101の転送毎にカウントダウンす
る。すなわち残りの情報量を保持する。転送停止ロジッ
ク106はカウンタ105が0であることを検出し、転
送ロジック102を停止させるとともに動作モードに応
じてCPU107に割り込みを発生させる。CPU10
7はこの割り込みによりデータあるいはコマンドの転送
完了を検出し、アクセス制御ロジック103を介してR
AM104から情報を取り出して処理する。108はC
PU107のプログラムROM、109はDMAコント
ローラ、110はプリンタエンジンである。
(Embodiment 1) Embodiment 1 of the present invention is shown in FIG. The same components as those of the conventional example described above are indicated by the same numbers. Reference numeral 101 is an interface circuit that is connected to a host machine (not shown) to transfer information, 102 is a transfer logic that controls signals for information transfer, and 103 is R
It is an access control logic that controls access to the AM 104. It is assumed here that the interface does not distinguish data / command on the protocol. RA
I / FB of the interface circuit 101 side is provided in M104.
Since both us and CPUBus on the side of the CPU 107 access, the access control logic 103 performs the arbitration. A counter 105 counts the amount of transfer information, and counts down every transfer of the interface circuit 101. That is, the remaining amount of information is retained. The transfer stop logic 106 detects that the counter 105 is 0, stops the transfer logic 102, and causes the CPU 107 to generate an interrupt in accordance with the operation mode. CPU10
7 detects the completion of data or command transfer by this interrupt, and R via the access control logic 103.
Information is retrieved from the AM 104 and processed. 108 is C
The program ROM of the PU 107, 109 is a DMA controller, and 110 is a printer engine.

【0016】転送停止ロジック106の構成例を図2に
示す。停止判定回路201はカウンタ=0と動作モード
を検出し、転送停止を指示すると共にCPUに対して割
り込みを発生させる。またこのとき必要に応じてカウン
タローダ203でロードレジスタ204の内容をカウン
タ105にロードする。CPU107はCPUBusを
介してロードレジスタ204に値を設定することも、そ
の値をカウンタローグ203でカウンタ105にロード
することもできる。202はモード保持回路でモードに
応じて動作アルゴリズムを切り替える。このモード情報
は動作シークェンスによって停止判定回路201が参
照、変更する場合とCPU107がソフト処理で参照変
更する場合の両方がある。
A configuration example of the transfer stop logic 106 is shown in FIG. The stop determination circuit 201 detects the counter = 0 and the operation mode, gives an instruction to stop the transfer, and generates an interrupt to the CPU. At this time, the contents of the load register 204 are loaded into the counter 105 by the counter loader 203 as needed. The CPU 107 can set a value in the load register 204 via the CPUBus or load the value in the counter 105 by the counter log 203. A mode holding circuit 202 switches the operation algorithm according to the mode. This mode information may be referenced or changed by the stop determination circuit 201 depending on the operation sequence, or may be referenced or changed by the CPU 107 by software processing.

【0017】アクセス制御ロジック103の構成例を図
7に示す。アクセス制御ロジックの機能は上述したよう
にI/FBus側とCPUBus側のアクセス調停を行
うとともにRAM104の一部をインターフェースから
の転送情報のバッファとして機能させることである。こ
れは具体的には入出力ポインタを用いてFIFOとして
機能させることである。これによりインターフェースか
ら転送されたコマンド/データはこのFIFOでキュー
イングされることになる。またRAMアドレスはCPU
アドレス空間上にはられているものとする。
A configuration example of the access control logic 103 is shown in FIG. The function of the access control logic is to perform access arbitration on the I / FBus side and the CPUBus side as described above, and to cause part of the RAM 104 to function as a buffer for transfer information from the interface. Specifically, this is to function as a FIFO using the input / output pointer. As a result, the command / data transferred from the interface will be queued in this FIFO. RAM address is CPU
It is assumed to be in the address space.

【0018】動作の中心となるのはアービタ701でI
/FBus、CPUBus両方の制御信号を調停しRA
M104の制御信号として動作させる。入力ポインタ7
02はFIFOの書き込みアドレス、出力ポインタ70
3は読み出しアドレスを発生させる。バッファ状態検出
回路704はポインタ702、703の値を比較し、F
IFOがフルか、空きがあるか、空かを判定する。RA
Mへのアクセスは下記のモードがある。 (1)I/FBusからの書き込み 入力ポインタでアクセスし、アクセス後入力ポインタを
インクリメント (2)CPUBusからのFIFO読み出し 出力ポインタでアクセスし、アクセス後出力ポインタを
インクリメント (3)CPUからのFIFO逆順読み出し 入力ポインタをデクリメントしてアクセス (4)CPUからFIFOの書き込み 入力ポインタでアクセスし、アクセス後入力ポインタを
インクリメント (5)CPUからの通常アクセス CPUアドレスで直接RAMにアクセスし、入出力ポイ
ンタには影響しない。
The core of the operation is the arbiter 701.
/ RA for arbitrating control signals of both FBus and CPUBus
It is operated as a control signal for M104. Input pointer 7
02 is a write address of the FIFO, and an output pointer 70
3 generates a read address. The buffer state detection circuit 704 compares the values of the pointers 702 and 703 and F
Determine if the IFO is full, free, or empty. RA
There are the following modes to access M. (1) Write from I / FBus Access with input pointer and increment input pointer after access (2) FIFO read from CPUBus Access with output pointer and increment output pointer after access (3) Reverse FIFO read from CPU Access by decrementing the input pointer (4) Write from FIFO by CPU Access with input pointer, increment input pointer after access (5) Normal access from CPU Directly access RAM by CPU address and affect input / output pointer do not do.

【0019】これらのCPUからのアクセス時の動作の
切り替えは通常アクセス(5)以外をRAMアドレスの
一部あるいはRAMアドレス以外に別個のポートとして
マップし、デコーダ707で動作を切り替えることで実
現できる。スイッチ705、706はこれらのモードに
応じてRAM104に接続するバスを切り替える。この
切り替えはデコーダ707の出力に応じてアービタ70
1が行う。
The operation switching at the time of access from these CPUs can be realized by mapping a part other than the normal access (5) as a part of the RAM address or a port other than the RAM address as a separate port and switching the operation by the decoder 707. The switches 705 and 706 switch the bus connected to the RAM 104 according to these modes. This switching is performed according to the output of the decoder 707.
1 does.

【0020】次に、基本的な情報の流れを図3で説明す
る。図3はソフト/ハード両方の処理をまとめたもので
ある。ホストはリセット後コマンドから転送を開始す
る。ホストが転送する情報はコマンド及びコマンドに付
随するデータである。したがってその転送内容はコマン
ドM(データ無し)あるいはコマンドN+コマンドNの
データ、の組み合わせのくりかえしとなる。
Next, the basic flow of information will be described with reference to FIG. FIG. 3 shows a summary of both software and hardware processing. After reset, the host starts the transfer from the command. The information transferred by the host is a command and data associated with the command. Therefore, the transfer content is a combination of command M (no data) or command N + command N data.

【0021】コマンドは固定長、もしくは先頭からきめ
られた長さの中にその残りのデータ量を決定できる情報
を含むものとする。CPUはまずコマンドの先頭の一定
長のデータを受信して取りだし、ここから残りのコマン
ド長情報を取り出してこれを受信する(S301)。こ
の動作により転送情報をカウントする事でコマンド全体
を取り出すことができる。データ量はそのコマンドの中
にそのデータ量の情報が含まれるものとする。これによ
りコマンドをCPUが解析してデータ量をカウントして
取り出す事ができる。インターフェースから転送された
コマンド/データは上述したように自動的にFIFOに
キューイングされるものとする。ここでFIFOにキュ
ーイングせず優先的に処理を行いたいコマンドを優先処
理コマンドと呼ぶ。
It is assumed that the command includes a fixed length, or a length determined from the beginning, which includes information capable of determining the remaining data amount. The CPU first receives and fetches the fixed length data of the command, extracts the remaining command length information from this, and receives it (S301). By this operation, the entire command can be taken out by counting the transfer information. As for the data amount, the information of the data amount is included in the command. This allows the CPU to analyze the command, count the amount of data, and take out the command. The command / data transferred from the interface shall be automatically queued in the FIFO as described above. Here, a command that is desired to be preferentially processed without being queued in the FIFO is called a priority processing command.

【0022】リセット直後、始めに転送されてくる情報
はコマンドであるものとする。CPUはこのコマンドを
キューから取り出してチェックする(S302)。この
読み出しはFIFOの逆順読み出し、あるいはRAMア
ドレス空間に直接アクセスして読みだせばよい。次に、
優先処理コマンドであるか否かを判断し(S303)、
これが優先処理コマンドでなければFIFOのキューに
もどす(S308)。このコマンドがデータ転送を伴う
ものであれば、そのコマンドに含まれるデータ量の情報
を受信し、キューイングする(S310)。その後再び
コマンド受信に戻る。
Immediately after reset, the information transferred first is a command. The CPU takes out this command from the queue and checks it (S302). This reading may be performed by reading in the reverse order of the FIFO, or by directly accessing the RAM address space and reading. next,
It is determined whether the command is a priority processing command (S303),
If this is not a priority processing command, it is returned to the FIFO queue (S308). If this command involves data transfer, information on the amount of data contained in the command is received and queued (S310). After that, it returns to command reception again.

【0023】優先処理コマンドの場合、データ転送を必
要としなければそのままコマンド処理に入り(S30
7)、先にキューに入っているコマンドよりも先に処理
が行われる。データ転送を伴う場合はコマンドに記述さ
れるデータ量の転送終了後データをコマンドの時と同様
にキューから取りだし(S306)、コマンド処理を行
う。この後再びコマンド受信に戻る。
In the case of the priority processing command, if the data transfer is not required, the command processing is directly performed (S30
7), the processing is performed before the command queued first. When data transfer is involved, after the transfer of the amount of data described in the command is completed, the data is taken out from the queue as in the case of the command (S306), and command processing is performed. After this, the process returns to command reception again.

【0024】図3を用いて説明を行った優先処理コマン
ドの処理は、コマンド/データ入出力に同期して実行さ
れるものである。これに対し、通常のコマンド処理は図
4に示すように、インターフェース側の処理とは非同期
にFIFOを読みだす別のタスクとして実行される。し
たがって、キューが混みあっていればその実行時間は不
確定となる。
The processing of the priority processing command described with reference to FIG. 3 is executed in synchronization with the command / data input / output. On the other hand, the normal command processing is executed as another task for reading the FIFO asynchronously with the processing on the interface side, as shown in FIG. Therefore, if the queue is busy, the execution time will be uncertain.

【0025】さらに詳細な転送停止ロジック106及び
これと同期したCPUのアルゴリズムを図5、図6で説
明する。
Further detailed transfer stop logic 106 and the algorithm of the CPU synchronized therewith will be described with reference to FIGS.

【0026】ここでまず転送の動作モードについて説明
する。動作モードはまずコマンドモードとデータモード
に分類される。コマンドモードはコマンドを転送するモ
ードであり、データモードはデータを転送するモードで
ある。これとは別に優先フラグがある。これはコマンド
/データ各モードにおいて優先処理される情報転送に関
するモードを保持する。これらは図2のモード保持回路
202に保持される。
First, the transfer operation mode will be described. The operation modes are first classified into command modes and data modes. The command mode is a command transfer mode, and the data mode is a data transfer mode. Apart from this, there is a priority flag. This holds a mode relating to information transfer which is preferentially processed in each command / data mode. These are held in the mode holding circuit 202 of FIG.

【0027】転送停止ロジック106の動作アルゴリズ
ムについて図5で説明する。リセット直後モードは優先
フラグネゲート、コマンドモードとなる(S501、S
502)。その後ロードレジスタ204の内容をカウン
タローダ203でカウンタ105にロードし(S50
3)、転送停止を解除して転送する(S504)。この
ときロードレジスタ204の内容は上述したコマンドの
先頭から一定の長さを示すように、あらかじめCPU1
07がセットしておくものとする。ホストから所定の情
報量が転送されるとカウンタ105=0となり転送停止
する(S505、S506)。このときコマンドモード
あるいは優先フラグがアサートされていれば(S50
7、S510)、CPU107に対し割り込みを発生さ
せ(S508)、CPU107が転送停止解除要求を出
すのを待つループに入る(S509)。
The operation algorithm of the transfer stop logic 106 will be described with reference to FIG. Immediately after reset, the mode becomes the priority flag negate and command mode (S501, S
502). After that, the contents of the load register 204 are loaded into the counter 105 by the counter loader 203 (S50
3) Release the transfer stop and transfer (S504). At this time, the contents of the load register 204 are set in advance so that the CPU 1
07 shall be set. When a predetermined amount of information is transferred from the host, the counter 105 becomes 0 and the transfer is stopped (S505, S506). At this time, if the command mode or the priority flag is asserted (S50
7, S510), an interrupt is generated for the CPU 107 (S508), and a loop is waited for the CPU 107 to issue a transfer stop release request (S509).

【0028】転送停止時点でデータモードであり優先フ
ラグがネゲートであれば、優先処理の必要がないものと
判断し、再びコマンドモードに戻りコマンドの先頭の受
信を開始する。転送内容のチェック、処理はS508の
割り込み発生によりCPU107が処理する。このとき
必要に応じたモード、優先フラグ、次の転送情報量セッ
トの処理をCPU107が行う。CPU107が転送停
止解除要求を出すと転送停止ロジック106は再びロー
ドレジスタをカウンタへロードし、情報の受信完了を待
ち動作を行う。
If the data mode is in effect when the transfer is stopped and the priority flag is negate, it is determined that the priority processing is not necessary, the mode is returned to the command mode and the reception of the beginning of the command is started. The CPU 107 processes the transfer contents check and processing in response to the occurrence of the interrupt in S508. At this time, the CPU 107 performs the processing of the mode, the priority flag, and the next transfer information amount set as needed. When the CPU 107 issues a transfer stop release request, the transfer stop logic 106 loads the load register into the counter again and waits for the completion of information reception.

【0029】CPU107の割り込み処理のアルゴリズ
ムを図6で説明する。まず転送停止ロジック106から
の割り込み要求をネゲートし(S601)、転送内容を
キューイングされたバッファから取り出す(S60
2)。バッファから取り出す動作は入力ポインタ702
をその情報受信以前に戻す動作を含む。このときコマン
ドモードであれば(S603)、転送内容がコマンドで
あるものとしてチェックする(S604)。このときコ
マンド転送が完了していなければ、今受信した情報から
コマンドの残りの部分の転送量をロードレジスタ204
へセットし(S618)、転送停止解除要求を出して
(S611)、割り込み処理を終了する。コマンド転送
が完了した場合の動作は以下の4通りの場合がある。 (1)優先コマンドかつデータ転送なし コマンド処理をただちに行う(S615)。次のコマン
ド転送量をロードレジスタ204へセットし(S61
7)、転送停止解除要求を出して(S611)、終了す
る。 (2)優先コマンドかつデータ転送あり 優先フラグをアサートし(S608)、データモードに
入る(S609)。次のデータ転送量をロードレジスタ
204へセットし(S610)、転送停止解除要求を出
して(S611)、終了する。 (3)非優先コマンドかつデータ転送なし コマンドをキューへ戻し、次のコマンド転送量をロード
レジスタ204へセットし(S617)、転送停止解除
要求を出して(S611)、終了する。 (4)非優先コマンドかつデータ転送あり データモードに入る(S609)。次のデータ転送量を
ロードレジスタ204へセットし(S610)、転送停
止解除要求を出して(S611)、終了する。
The algorithm of the interrupt processing of the CPU 107 will be described with reference to FIG. First, the interrupt request from the transfer stop logic 106 is negated (S601), and the transfer content is taken out from the queued buffer (S60).
2). The operation of taking out from the buffer is the input pointer 702.
Includes the operation of returning to before receiving the information. At this time, if it is the command mode (S603), it is checked that the transfer content is a command (S604). At this time, if the command transfer is not completed, the transfer amount of the remaining part of the command is calculated from the information received just now to the load register 204.
Is set (S618), a transfer stop cancellation request is issued (S611), and the interrupt processing is ended. There are the following four operations when the command transfer is completed. (1) Priority command and no data transfer Command processing is immediately performed (S615). The next command transfer amount is set in the load register 204 (S61
7) Then, a transfer stop cancellation request is issued (S611), and the process ends. (2) Priority command and data transfer present The priority flag is asserted (S608) and the data mode is entered (S609). The next data transfer amount is set in the load register 204 (S610), a transfer stop cancellation request is issued (S611), and the process ends. (3) A non-priority command and no data transfer command is returned to the queue, the next command transfer amount is set in the load register 204 (S617), a transfer stop cancellation request is issued (S611), and the process ends. (4) Non-priority command and data transfer enabled Enter data mode (S609). The next data transfer amount is set in the load register 204 (S610), a transfer stop cancellation request is issued (S611), and the process ends.

【0030】割り込み処理がデータモードであった場合
は必ず優先フラグはアサートされている。これは図5の
アルゴリズムに示したようにデータモードかつ優先フラ
グネゲートである場合は割り込みを発生させないためで
ある。
The priority flag is always asserted when the interrupt processing is in the data mode. This is because no interrupt is generated in the data mode and the priority flag negate as shown in the algorithm of FIG.

【0031】この場合CPU107はモードをコマンド
を受信するためコマンドモードとし、そのデータを使用
するコマンドの処理を行う。この後優先フラグをネゲー
トし次のコマンド転送量をロードレジスタ204へセッ
トし転送停止解除要求を出して終了する。以上述べた動
作によりコマンド及び優先処理を行うコマンドに付随す
るデータの転送完了時にCPUに対して割り込みを発生
させ、優先処理を行わせる事が可能となる。
In this case, the CPU 107 sets the mode to the command mode for receiving the command and processes the command using the data. After that, the priority flag is negated, the next command transfer amount is set in the load register 204, a transfer stop cancellation request is issued, and the process ends. By the operation described above, it is possible to generate an interrupt to the CPU when the transfer of the data accompanying the command and the command for performing the priority processing is completed, and to perform the priority processing.

【0032】(実施例2)本発明の実施例2を図8に示
す。図8は実施例2の転送停止ロジック106の回路ブ
ロック図であり、図2と同一の構成要素は同一の番号で
示してある。実施例1ではコマンドの転送完了はカウン
タ105でカウントして検出したが、実施例2ではコマ
ンドは不定長で、その後は特定のコード(デリミタ)で
区切られているものとする。801はコマンドバッフ
ァ、802はデリミタチェック回路で、コマンドモード
時にデリミタを検出する。転送停止信号は停止判定回路
201とデリミタチェック回路からの信号とをモードに
応じてスイッチ803で切り替える。基本的にコマンド
モードではデリミタチェック、データモードではカウン
タ=0で転送停止を行う。
(Embodiment 2) Embodiment 2 of the present invention is shown in FIG. FIG. 8 is a circuit block diagram of the transfer stop logic 106 of the second embodiment, and the same components as those of FIG. 2 are indicated by the same numbers. In the first embodiment, the completion of command transfer is detected by counting with the counter 105, but in the second embodiment, it is assumed that the command has an indefinite length and thereafter is separated by a specific code (delimiter). A command buffer 801 and a delimiter check circuit 802 detect a delimiter in the command mode. As the transfer stop signal, the switch 803 switches between the stop determination circuit 201 and the signal from the delimiter check circuit according to the mode. Basically, the delimiter check is performed in the command mode, and the transfer is stopped with the counter = 0 in the data mode.

【0033】転送停止ロジック106の動作アルゴリズ
ムを図9で説明する。リセット直後優先フラグをネゲー
トして(S901)、コマンドモードに入って(S90
2)、転送停止を解除する(S903)。この状態で転
送情報にデリミタを検出するループに入る(S90
4)。デリミタを検出するとコマンド転送完了と判断し
転送を停止して(S905)、CPU107に割り込み
を発生させる(S906)。割り込み処理でモード、優
先フラグを処理し転送停止解除要求が発行されると(S
907)、モードをチェックして(S908)、コマン
ドモードであれば再びコマンド転送完了待ち状態とな
る。割り込み処理でデータモードが指定されると、ロー
ドレジスタ204をカウンタローダ203でカウンタ1
05へロードし(S910)、転送停止を解除する(S
911)。データモードではカウンタ=0を検出して
(S912)、転送停止信号を発生させた後(S91
3)、優先フラグをチェックする(S914)。アサー
トであれば優先コマンドのデータ転送が完了した状態で
あるため、転送停止後割り込みを発生させる(S90
5、S906)。ネゲートであればデータをキューに入
れたまま次のコマンドモードになり(S902)、再び
コマンド転送完了待ち状態となる。
The operation algorithm of the transfer stop logic 106 will be described with reference to FIG. Immediately after reset, the priority flag is negated (S901), and the command mode is entered (S90).
2) The transfer stop is released (S903). In this state, a loop for detecting a delimiter in the transfer information is entered (S90
4). When the delimiter is detected, it is determined that the command transfer is completed, transfer is stopped (S905), and an interrupt is generated in the CPU 107 (S906). When the transfer stop release request is issued by processing the mode and priority flags in the interrupt processing (S
907), the mode is checked (S908), and if it is the command mode, the command transfer completion waiting state is entered again. When the data mode is designated in the interrupt processing, the load register 204 is set to the counter 1 by the counter loader 203.
05 is loaded (S910) and the transfer stop is released (S
911). In the data mode, counter = 0 is detected (S912), and a transfer stop signal is generated (S91).
3), the priority flag is checked (S914). If it is asserted, since the data transfer of the priority command is completed, an interrupt is generated after the transfer is stopped (S90
5, S906). If the gate is negated, the next command mode is entered with the data queued (S902), and the command transfer completion waiting state is resumed.

【0034】CPU107の割り込み処理アルゴリズム
について図10で説明する。割り込み要求解除(S10
01)後、コマンドモードであるか否かをチェックし
(S1002)、コマンドモードであれば転送内容をコ
マンドバッファ801から取り出して(S1003)チ
ェックする(S1004)。その処理内容は以下の様に
分類される。ここで入力ポインタ修正とはアクセス制御
ロジック103内の入力ポインタ702を修正し、コマ
ンド転送前の状態に戻すことである。 (1)優先コマンドかつデータ転送なし 入力ポインタ修正(S1006)後、コマンド処理をた
だちに行う(S1015)。その後転送停止解除要求を
出して(S1011)終了する。 (2)優先コマンドかつデータ転送あり 入力ポインタ修正(S1006)後、優先フラグをアサ
ートし(S1008)、データモードに入る(S100
9)。次のデータ転送量をロードレジスタ204へセッ
トし(S1010)、転送停止解除要求を出して(S1
011)終了する。 (3)非優先コマンドかつデータ転送なし ただちに転送停止解除要求を出して(S1011)終了
する。 (4)非優先コマンドかつデータ転送あり データモードに入る(S1009)。次のデータ転送量
をロードレジスタ204へセットして(S1010)、
転送停止解除要求を出して(S1011)終了する。
The interrupt processing algorithm of the CPU 107 will be described with reference to FIG. Cancel interrupt request (S10
After 01), it is checked whether or not it is the command mode (S1002), and if it is the command mode, the transfer contents are taken out from the command buffer 801 (S1003) and checked (S1004). The processing contents are classified as follows. Here, the correction of the input pointer is to correct the input pointer 702 in the access control logic 103 and return it to the state before the command transfer. (1) Priority command and no data transfer After input pointer correction (S1006), command processing is performed immediately (S1015). After that, a transfer stop cancellation request is issued (S1011) and the process ends. (2) With priority command and data transfer After input pointer correction (S1006), the priority flag is asserted (S1008) and the data mode is entered (S100).
9). The next data transfer amount is set in the load register 204 (S1010), and a transfer stop release request is issued (S1).
011) Finish. (3) Non-priority command and no data transfer Immediately, a transfer stop cancellation request is issued (S1011) and the process ends. (4) Non-priority command and data transfer available Enter data mode (S1009). The next data transfer amount is set in the load register 204 (S1010),
A transfer stop cancellation request is issued (S1011), and the process ends.

【0035】ステップS1002でコマンドモードであ
るか否かをチェックしたとき、モードがデータモードで
ある場合は、データをRAM104内のFIFOから取
り出す(S1013)。これは入力ポインタ修正も含
む。このデータは優先処理コマンドのデータであり、優
先フラグはアサートされている。コマンドモードに戻り
(S1014)、優先コマンドの処理を行う(S101
5)。この後優先フラグをネゲートして(S101
6)、転送停止解除要求を出して(S1011)終了す
る。以上述べた構成により、不定長のコマンドであって
も優先コマンドを検出し、優先処理を行う事が可能とな
る。
When it is checked in step S1002 whether it is the command mode or not, if the mode is the data mode, the data is taken out from the FIFO in the RAM 104 (S1013). This also includes input pointer modification. This data is the data of the priority processing command, and the priority flag is asserted. Return to the command mode (S1014), and process the priority command (S101).
5). After this, the priority flag is negated (S101
6) Then, a transfer stop cancellation request is issued (S1011), and the process ends. With the configuration described above, it is possible to detect a priority command and perform priority processing even if the command has an indefinite length.

【0036】(実施例3)本発明の実施例3を図11に
示す。図11は転送停止ロジック106とアクセス制御
ロジック103の構成例であり、図2、図7、図8と同
一の構成例は同一の番号を示している。本実施例の特徴
は優先コマンドチェック回路1101、入力ポインタ退
避レジスタ1102を有し、入力ポインタ退避レジスタ
1102から発生する入力ポインタコントロール信号及
びCPU107により入力ポインタを制御し、優先コマ
ンド処理時に入力ポインタ修正を自動的に行う事にあ
る。
(Embodiment 3) Embodiment 3 of the present invention is shown in FIG. FIG. 11 shows a configuration example of the transfer stop logic 106 and the access control logic 103, and the same configuration examples as those in FIGS. 2, 7, and 8 indicate the same numbers. The feature of this embodiment is that it has a priority command check circuit 1101 and an input pointer save register 1102, controls the input pointer by the input pointer control signal generated from the input pointer save register 1102, and the CPU 107, and corrects the input pointer when processing the priority command. It is to do it automatically.

【0037】本実施例では実施例1と同様のコマンドフ
ォーマットを仮定しており、固定長、もしくは先頭から
きめられた長さの中にその残りのデータ量を決定できる
情報を含むものとする。またこの固定長もしくはきめら
れた長さの中にそのコマンドが優先処理コマンドである
ことを示す情報が含まれるものとする。
In this embodiment, the same command format as in the first embodiment is assumed, and it is assumed that the fixed length or the length determined from the beginning includes information that can determine the remaining data amount. Further, it is assumed that the fixed length or the set length includes information indicating that the command is a priority processing command.

【0038】優先コマンドパターンチェツク回路110
1はコマンドモードにおいて優先コマンドパターンを検
出し、転送停止時に入力ポインタ退避レジスタ1102
を入力ポインタ702にリストアして、コマンド転送以
前の状態に戻す。コマンド自体はコマンドバッファ80
1からCPUに読み込まれ処理される。
Priority command pattern check circuit 110
1 detects the priority command pattern in the command mode, and when the transfer is stopped, the input pointer save register 1102
Is restored to the input pointer 702 to restore the state before the command transfer. The command itself is the command buffer 80
1 is read by the CPU and processed.

【0039】転送停止ロジック106のアルゴリズムを
図12に示す。これは図5のアルゴリズムに入力ポイン
タ退避レジスタへの操作を付加したものである。リセッ
ト後優先フラグをネゲート(S1201)、コマンドモ
ード(S1202)、入力ポインタ702の内容を入力
ポインタ退避レジスタ1101へ退避(S1203)、
ロードレジスタ204の内容をカウンタ105へロード
し(S1204)、転送停止を解除して(S120
5)、コマンド転送待ちループに入る(S1206)。
カウンタ=0で転送を停止させ(S1207)、優先フ
ラグをチェックする(S1208)。アサートであれば
優先コマンドあるいは優先コマンドのデータ転送完了で
あるため入力ポインタ退避レジスタ1101を入力ポイ
ンタにリストアし(S1212)、割り込みを発生させ
る(S1213)。これによりCPUは割り込み処理に
おいて入力ボインタの処理が不要となる。転送停止解除
要求が発生すると(S1214)、その時点で入力のポ
インタの内容を入力ポインタ退避レジスタに退避させ
(S1203)、コマンドもしくはデータ受信処理を行
う。
The algorithm of the transfer stop logic 106 is shown in FIG. This is a modification of the algorithm of FIG. 5 with an operation for the input pointer save register. After reset, the priority flag is negated (S1201), the command mode (S1202), the content of the input pointer 702 is saved in the input pointer save register 1101 (S1203),
The contents of the load register 204 are loaded into the counter 105 (S1204), and the transfer stop is released (S120
5) Enter a command transfer waiting loop (S1206).
When the counter = 0, the transfer is stopped (S1207) and the priority flag is checked (S1208). If it is asserted, the priority command or the data transfer of the priority command is completed, so the input pointer save register 1101 is restored to the input pointer (S1212), and an interrupt is generated (S1213). As a result, the CPU does not need the processing of the input pointer in the interrupt processing. When a transfer stop cancellation request is generated (S1214), the contents of the input pointer are saved in the input pointer save register at that time (S1203), and the command or data reception process is performed.

【0040】要約すると、転送停止後優先フラグがネゲ
ートであれば、大別して以下の処理を行う。 (1)コマンドモードかつ優先コマンド検出 コマンドの先端部を受信し、優先コマンドであることを
検出したため優先フラグをアサートし入力ポインタ退避
レジスタ内容を入力ポインタにリストアし、割り込みを
発生させる。 (2)コマンドモードかつ優先コマンド非検出 非優先コマンドを受信して、そのまま割り込み発生させ
る。 (3)データモード 非優先コマンドのデータ受信完了後、次のコマンド受信
処理に入る。
In summary, if the priority flag after transfer is negated, the following processing is roughly performed. (1) Command mode and priority command detection The front end of the command is received, and since it is detected that the command is a priority command, the priority flag is asserted, the contents of the input pointer save register are restored to the input pointer, and an interrupt is generated. (2) Command mode and non-priority command non-detection A non-priority command is received and an interrupt is generated as it is. (3) Data mode After the data reception of the non-priority command is completed, the next command reception process starts.

【0041】実施例1では優先フラグがアサートされる
のは、優先コマンドのデータ転送時のみであったが、本
実施例では各コマンドの先頭部受信後、優先コマンドで
あることを検出すればコマンドモードかつ優先フラグア
サートの状態で残りのコマンド受信を行う。CPU側の
割り込み処理は図6とほぼ同様である。ただしS606
の優先処理コマンドチェックは優先フラグチェックにお
きかえられ、コマンドはRAM104のFIFOではな
くコマンドバッファ801から読み込むため、S612
のコマンドをバッファへ戻す操作は不要となる。以上述
べた様に本実施例ではコマンド先頭の特定パターンを検
出し、優先処理コマンドを識別してアクセス制御回路1
03の入力ポインタ702を制御するため、CPUの優
先コマンド処理時においてもFIFOポインタ処理が不
要となる。
In the first embodiment, the priority flag is asserted only during the data transfer of the priority command, but in the present embodiment, if it is detected that the priority command is received after the head portion of each command is received, the command is detected. The remaining commands are received in the mode and with the priority flag asserted. The interrupt processing on the CPU side is almost the same as in FIG. However, S606
The priority flag command check is replaced with the priority flag check, and the command is read from the command buffer 801 instead of the FIFO of the RAM 104.
It is not necessary to return the command to the buffer. As described above, in this embodiment, the specific pattern at the beginning of the command is detected, the priority processing command is identified, and the access control circuit 1
Since the input pointer 702 of No. 03 is controlled, the FIFO pointer processing becomes unnecessary even when the CPU processes the priority command.

【0042】(実施例4)本発明の実施例4を図13に
示す。図13は転送停止ロジック106の構成例であ
り、図2、図8、図11と同一の要素は同一の番号を記
してある。本実施例は実施例2の構成例である図8の構
成例に優先コマンドパターンチェック回路1101を付
加したもので、デリミタで区切られたコマンドを使用す
る場合においても優先処理コマンドの処理時にFIFO
入力ポインタのリストアを自動的に行う事を特徴とす
る。
(Embodiment 4) Embodiment 4 of the present invention is shown in FIG. FIG. 13 shows an example of the configuration of the transfer stop logic 106, and the same elements as those in FIGS. 2, 8 and 11 have the same numbers. In this embodiment, a priority command pattern check circuit 1101 is added to the configuration example of FIG. 8 which is the configuration example of the second embodiment, and even when a command delimited by delimiters is used, the FIFO is processed at the time of processing of the priority processing command.
The feature is that the input pointer is restored automatically.

【0043】本実施例は実施例2と同じくコマンドは不
定長で、その後端は特定のコード(デリミタ)で区切ら
れているものとする。デリミタチェック回路802はコ
マンドモード時にデリミタ検出時に転送停止信号を発生
させるが優先コマンドパターンチェック回路1101は
優先処理コマンドのパターンを検出した場合にそのコマ
ンドのデリミタが検出された時点で入力ポインタコント
ロール信号を操作して入力ポインタ702の入力ポイン
タ退避レジスタの制御を行う。
In this embodiment, as in the second embodiment, the command has an indefinite length, and the rear end is separated by a specific code (delimiter). The delimiter check circuit 802 generates a transfer stop signal when the delimiter is detected in the command mode, but the priority command pattern check circuit 1101 outputs the input pointer control signal when the delimiter of the command is detected when the pattern of the priority processing command is detected. It is operated to control the input pointer save register of the input pointer 702.

【0044】転送停止ロジック106のアルゴリズムを
図14に示す。図14は図9のアルゴリズムに入力ポイ
ンタの退避操作、優先コマンド検出動作を付加したもの
である。ステップS1401〜S1406までの動作は
実施例3の図12と同じである。このあと優先コマンド
パターンチェック回路1101が優先処理コマンドを検
出した場合、優先フラグのアサート(S1408)、入
力ポインタ退避レジスタ1102の内容を入力ポインタ
702にリストアして(S1409)優先処理コマンド
の受信以前の値に戻して割り込みを発生させる(S14
10)。
The algorithm of the transfer stop logic 106 is shown in FIG. FIG. 14 shows an addition of the input pointer save operation and the priority command detection operation to the algorithm of FIG. The operations of steps S1401 to S1406 are the same as those of FIG. 12 of the third embodiment. After that, when the priority command pattern check circuit 1101 detects a priority processing command, the priority flag is asserted (S1408), the contents of the input pointer save register 1102 are restored to the input pointer 702 (S1409), and the priority processing command before reception is received. Return to the value and generate an interrupt (S14
10).

【0045】CPU107から転送停止解除要求が出さ
れた後(S1411)、コマンドモードであれば(S1
412)、次のコマンド入力処理に戻る。データモード
であればロードレジスタ204の内容をカウンタ105
へロードし(S1413)転送停止を解除して(S14
14)カウンタ=0(データ転送完了)待ちループに入
る(S1415)。データ転送完了優先フラグがアサー
トされていれば(S1417)、入力ポインタ退避レジ
スタ1102の内容を入力ポインタ702にリストアし
て(S1409)、優先処理コマンド転送以前の値に戻
して割り込みを発生させる。優先フラグがネゲートであ
れば次のコマンドの受信処理に戻る。
After the transfer stop cancellation request is issued from the CPU 107 (S1411), in the command mode (S1).
412) and returns to the next command input process. In the data mode, the contents of the load register 204 are counted by the counter 105.
(S1413) and cancel the transfer stop (S1413).
14) Enter a counter = 0 (data transfer completion) waiting loop (S1415). If the data transfer completion priority flag is asserted (S1417), the contents of the input pointer save register 1102 are restored to the input pointer 702 (S1409), the value before the priority processing command transfer is restored, and an interrupt is generated. If the priority flag is negate, the process returns to the reception process of the next command.

【0046】CPU側の割り込み処理は図10とほぼ同
様である。ただし、ステップS1005の優先処理コマ
ンドチェックは優先フラグチェックにおきかえられ、ス
テップS1006の入力ポインタ修正操作は不要とな
る。以上説明したように本実施例においてはデリミタで
区切られた不定長のコマンドにおいても優先処理コマン
ドを識別してアクセス制御回路103の入力ポインタ7
02を制御するため、CPUの優先コマンド処理時にお
いてもFIFOポインタ処理が不要となる。
The interrupt processing on the CPU side is almost the same as in FIG. However, the priority processing command check in step S1005 is replaced with the priority flag check, and the input pointer correction operation in step S1006 is unnecessary. As described above, in the present embodiment, the priority processing command is identified by the delimiter-delimited command and the input pointer 7 of the access control circuit 103 is identified.
02 is controlled, the FIFO pointer processing is not required even when the CPU processes the priority command.

【0047】[0047]

【発明の効果】以上説明したように本発明によれば情報
を単一にデータストリームとして扱うインターフェース
を持つデバイスにおいても、ホストから連続的に送られ
てくるコマンド/データの中からコマンドを識別して取
り出す事が可能となり、優先処理を行いたいコマンド及
びデータはキューに入れることなく優先的に処理する事
が可能となる。またコマンドの形式は固定長、コマンド
の長さ情報をコマンドの内部に持つ不定長、デリミタで
区切られた不定長のいずれでも適用可能である。
As described above, according to the present invention, even in a device having an interface that handles information as a single data stream, a command can be identified from commands / data continuously sent from a host. It becomes possible to take out the command and data to be preferentially processed without being put in the queue. Further, the command format may be fixed length, an indefinite length having command length information inside the command, or an indefinite length separated by a delimiter.

【図面の簡単な説明】[Brief description of drawings]

【図1】図1は、本発明の実施例1における転送停止ロ
ジックの構成例である。
FIG. 1 is a configuration example of a transfer stop logic according to a first embodiment of the present invention.

【図2】図2は、本発明の実施例2における転送停止ロ
ジックの構成例である。
FIG. 2 is a configuration example of a transfer stop logic according to the second embodiment of the present invention.

【図3】図3は、コマンド/データ受信処理の基本アル
ゴリズムである。
FIG. 3 is a basic algorithm of command / data reception processing.

【図4】図4は、通常コマンド処理の基本アルゴリズム
である。
FIG. 4 is a basic algorithm of normal command processing.

【図5】図5は、実施例1における転送停止ロジックの
動作アルゴリズムである。
FIG. 5 is an operation algorithm of a transfer stop logic in the first embodiment.

【図6】図6は、実施例1におけるCPU割り込み処理
アルゴリズムである。
FIG. 6 is a CPU interrupt processing algorithm according to the first embodiment.

【図7】図7は、実施例1におけるアクセス制御ロジッ
クの構成例である。
FIG. 7 is a configuration example of an access control logic according to the first embodiment.

【図8】図8は、実施例2における転送停止ロジックの
構成例である。
FIG. 8 is a configuration example of a transfer stop logic according to the second embodiment.

【図9】図9は、実施例2における転送停止ロジックの
動作アルゴリズムである。
FIG. 9 is an operation algorithm of a transfer stop logic according to the second embodiment.

【図10】図10は、実施例2におけるCPU割り込み
処理アルゴリズムである。
FIG. 10 is a CPU interrupt processing algorithm according to the second embodiment.

【図11】図11は、実施例3における転送停止ロジッ
クとアクセス制御ロジックの構成例である。
FIG. 11 is a configuration example of a transfer stop logic and an access control logic according to the third embodiment.

【図12】図12は、実施例3における転送停止ロジッ
クの動作アルゴリズムである。
FIG. 12 is an operation algorithm of a transfer stop logic according to the third embodiment.

【図13】図13は、実施例4における転送停止ロジッ
クの構成例である。
FIG. 13 is a configuration example of a transfer stop logic according to the fourth embodiment.

【図14】図14は、実施例4における転送停止ロジッ
クの動作アルゴリズムである。
FIG. 14 is an operation algorithm of a transfer stop logic according to the fourth embodiment.

【図15】図15は、従来例の構成図である。FIG. 15 is a configuration diagram of a conventional example.

【符号の説明】[Explanation of symbols]

101 インターフェース回路 102 転送ロジック 103 アクセス制御ロジック 104 RAM 105 カウンタ 106 転送停止ロジック 107 CPU 108 ROM 109 DMAコントローラ 110 プリンタエンジン 201 転送停止回路 202 モード保持回路 203 カウンタローダ 204 ロードレジスタ 701 アービタ 702 入力ポインタ 703 出力ポインタ 704 バッファ状態検出回路 705 データバス切り換えスイッチ 706 アドレスバス切り替えスイッチ 801 コマンドバッファ 802 デリミタチェック回路 803 転送停止信号切り替えスイッチ 1101 優先コマンドパターンチェック回路 1102 入力ポインタ退避レジスタ 101 Interface Circuit 102 Transfer Logic 103 Access Control Logic 104 RAM 105 Counter 106 Transfer Stop Logic 107 CPU 108 ROM 109 DMA Controller 110 Printer Engine 201 Transfer Stop Circuit 202 Mode Holding Circuit 203 Counter Loader 204 Load Register 701 Arbiter 702 Input Pointer 703 Output Pointer 704 buffer state detection circuit 705 data bus changeover switch 706 address bus changeover switch 801 command buffer 802 delimiter check circuit 803 transfer stop signal changeover switch 1101 priority command pattern check circuit 1102 input pointer save register

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 ホストコンピュータと、該ホストコンピ
ュータによって制御される被制御装置との間に配置され
たインターフェース回路において、(A)インターフェ
ースは転送情報をコマンドとデータの区別せず、単一の
データストリームとして扱い、(B)インターフェース
回路とバッファ間はハードウェア転送ロジックでCPU
処理を介在することなく転送し、(C)ホストコンピュ
ータはコマンド及びコマンドとそれに付随したデータを
連続してデバイスへ転送し、(D)バッファはFIFO
構造をもち、ホストコンピュータから転送されたコマン
ド/データはこの中にキューイングされ、かつ(E)C
PUはホストコンピュータから情報転送とは非同期にF
IFO構造のバッファから転送順に情報を読み込み処理
を行うように構成されており、 現在もしくは次に転送される情報がコマンド/データの
識別情報を保持する識別情報保持手段と、識別情報が優
先情報であるか否かを判断して保持する判断保持手段
と、ホストコンピュータからのコマンド転送完了を検出
するコマンド転送完了検出手段と、データ転送完了を検
出するデータ転送完了検出手段と、前記両検出手段によ
る検出時にインターフェース回路の転送を停止する転送
停止手段と、コマンド転送完了検出時にCPUに対し割
り込みを発生させる割り込み発生手段と、該割り込み発
生手段による割り込み処理において最後に転送されたコ
マンド/データを読み出すバッファアクセス手段とを有
することを特徴とするインターフェース回路。
1. In an interface circuit arranged between a host computer and a controlled device controlled by the host computer, (A) the interface does not distinguish transfer information from command and data, It is handled as a stream, and (B) between the interface circuit and the buffer is a hardware transfer logic CPU
Data is transferred without intervention, (C) the host computer transfers commands and commands and their accompanying data to the device continuously, and (D) buffer is a FIFO.
Commands / data having a structure and transferred from the host computer are queued in this, and (E) C
PU is F asynchronous with the information transfer from the host computer.
It is configured to read information from a buffer having an IFO structure in the order of transfer, and the information to be transferred now or next is identification information holding means for holding identification information of command / data, and the identification information is priority information. The judgment holding means for judging and holding whether or not there is, the command transfer completion detecting means for detecting the command transfer completion from the host computer, the data transfer completion detecting means for detecting the data transfer completion, and the both detecting means. Transfer stop means for stopping the transfer of the interface circuit at the time of detection, interrupt generating means for generating an interrupt to the CPU at the time of detecting the completion of command transfer, and a buffer for reading the command / data transferred last in the interrupt processing by the interrupt generating means Interface circuit having access means .
【請求項2】 データ転送完了時に識別情報が優先情報
でなければ次の転送される情報はコマンドであると識別
し、転送を再開する転送停止手段を有し、優先情報であ
ればCPUに対し割り込みを発生させる割り込み発生手
段を有することを特徴とする請求項1記載のインターフ
ェース回路。
2. When the data transfer is completed, if the identification information is not the priority information, the next information to be transferred is identified as a command, and transfer stop means for restarting the transfer is provided. The interface circuit according to claim 1, further comprising an interrupt generation unit that generates an interrupt.
【請求項3】 コマンドもしくはデータ転送完了後の割
り込み処理において、最後に転送されたコマンド/デー
タはバッファから読みだして検出し、コマンド/データ
が優先処理であればFIFO構造であるバッファの入力
ポインタを情報転送以前の値に戻し、優先情報でなけれ
ば転送後の値に保持するバッファアクセス手段を有する
ことを特徴とする請求項2記載のインターフェース回
路。
3. In the interrupt processing after the completion of command or data transfer, the last transferred command / data is read from the buffer and detected, and if the command / data is prioritized processing, the input pointer of the buffer having the FIFO structure 3. The interface circuit according to claim 2, further comprising a buffer access unit for returning the value to the value before the information transfer and holding the value after the transfer if the priority information is not the priority information.
【請求項4】 転送情報をカウントするカウント手段を
有し、カウント手段にカウント値があらかじめセットさ
れた転送量となったときコマンド/データの転送完了と
する転送完了検出手段を有することを特徴とする請求項
2記載のインターフェース回路。
4. A transfer completion detecting means is provided which has a counting means for counting transfer information, and which has a command / data transfer completion when the count value reaches a preset transfer amount in the counting means. The interface circuit according to claim 2.
【請求項5】 転送情報の中から特定のコードを識別す
るコード識別手段と、転送情報のカウント手段を有し、
コマンド転送時にはこのコード識別時に、データ転送時
には所定のカウント完了時に転送完了を検出する転送完
了検出手段を有することを特徴とする請求項2記載のイ
ンターフェース回路。
5. A code identifying means for identifying a specific code from the transfer information and a transfer information counting means,
3. The interface circuit according to claim 2, further comprising transfer completion detecting means for detecting transfer completion at the time of code identification at the time of command transfer, and at completion of a predetermined count at the time of data transfer.
【請求項6】 コマンド転送時に転送されたコマンドを
保持するコマンド保持手段と、このコマンド保持手段に
入力されるコマンドから特定のパターンを検出する特定
パターン検出手段と、FIFOバッファの入力ポインタ
を退避させるポインタ退避レジスタを有し、コマンド/
データの転送開始時に退避レジスタに入力ポインタを退
避させ、コマンド転送完了時の特定パターン検出時もし
くはデータ転送完了時の優先情報時に退避レジスタの内
容を入力ポインタに回復させることを特徴とする請求項
2記載のインターフェース回路。
6. A command holding means for holding a command transferred at the time of command transfer, a specific pattern detecting means for detecting a specific pattern from a command input to this command holding means, and an input pointer of a FIFO buffer are saved. It has a pointer save register
3. The input pointer is saved in the save register at the start of data transfer, and the contents of the save register are restored to the input pointer at the time of specific pattern detection at the completion of command transfer or priority information at the completion of data transfer. The described interface circuit.
JP21096995A 1995-07-27 1995-07-27 Interface circuit Pending JPH0944447A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21096995A JPH0944447A (en) 1995-07-27 1995-07-27 Interface circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21096995A JPH0944447A (en) 1995-07-27 1995-07-27 Interface circuit

Publications (1)

Publication Number Publication Date
JPH0944447A true JPH0944447A (en) 1997-02-14

Family

ID=16598130

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21096995A Pending JPH0944447A (en) 1995-07-27 1995-07-27 Interface circuit

Country Status (1)

Country Link
JP (1) JPH0944447A (en)

Similar Documents

Publication Publication Date Title
US5784647A (en) Interface for fetching highest priority demand from priority queue, predicting completion within time limitation then issuing demand, else adding demand to pending queue or canceling
US5701434A (en) Interleave memory controller with a common access queue
EP0241129B1 (en) Addressing arrangement for a RAM buffer controller
US4860244A (en) Buffer system for input/output portion of digital data processing system
US5182800A (en) Direct memory access controller with adaptive pipelining and bus control features
EP0542417A1 (en) Method and direct memory access controller for asynchronously reading/writing data from/to a memory with improved throughput
JP2004171209A (en) Shared memory data transfer device
EP1006451B1 (en) A DMA transfer device capable of high-speed consecutive access to pages in a memory
CN113468097B (en) Data exchange method based on system on chip
CA2007737C (en) Data transfer operations between two asynchronous buses
US7631132B1 (en) Method and apparatus for prioritized transaction queuing
JP4642531B2 (en) Arbitration of data requests
JPH0944447A (en) Interface circuit
JP2731761B2 (en) Network control device
JPH07325779A (en) Input/output controller
JP2990800B2 (en) Interrupt processing device
JPS5829043A (en) Printer controlling system
JP2806771B2 (en) Bus arbitration circuit
JPH07306946A (en) Parallel readout processing by composition of transaction
JP2004220309A (en) Multiprocessor system
JP2713204B2 (en) Information processing system
JP2527066B2 (en) Reception queue processor
JPH02294755A (en) Data processor
JP2002082901A (en) Bus controller
JPH0546547A (en) Data processor