JPH0210627B2 - - Google Patents
Info
- Publication number
- JPH0210627B2 JPH0210627B2 JP58047223A JP4722383A JPH0210627B2 JP H0210627 B2 JPH0210627 B2 JP H0210627B2 JP 58047223 A JP58047223 A JP 58047223A JP 4722383 A JP4722383 A JP 4722383A JP H0210627 B2 JPH0210627 B2 JP H0210627B2
- Authority
- JP
- Japan
- Prior art keywords
- transmission
- reception
- block
- data
- command
- 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.)
- Expired
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4204—Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
- G06F13/4221—Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
- G06F13/4226—Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus with asynchronous protocol
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
- G06F13/12—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor
- G06F13/122—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor where hardware performs an I/O function other than control of data transfer
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Communication Control (AREA)
Description
【発明の詳細な説明】
この発明は、例えば中央処理装置(CPU)と
周辺処理装置(μ−CON)との間で半二重通信
方式でデータを所定数のブロツクに分割して送受
信するデータ送受信方式に関する。DETAILED DESCRIPTION OF THE INVENTION The present invention provides a system for transmitting and receiving data divided into a predetermined number of blocks using a half-duplex communication method between, for example, a central processing unit (CPU) and a peripheral processing unit (μ-CON). Regarding transmission and reception methods.
一般に、かかるデータ送受信方式においては、
CPUからの一方の指令、例えば受信指令を実行
しているときはμ−CONはビジー状態となり、
したがつて、データ受信動作が終了するまでは他
の指令、例えば送信指令は待たされることにな
る。これは伝送すべきデータ量が多くなつて、複
数のブロツクに分割して送受信する場合も同様で
あり、この場合の待ち時間はより一層長くなる。
そこで、一方の指令実行中に他方の指令を割り込
ませることにより半二重通信方式による送受信処
理を効率よく行なうことが要求されている。 Generally, in such a data transmission/reception method,
When executing one command from the CPU, for example a receive command, μ-CON is in a busy state.
Therefore, other commands, such as transmission commands, will have to wait until the data reception operation is completed. This also applies when the amount of data to be transmitted increases and is divided into a plurality of blocks for transmission and reception, and the waiting time in this case becomes even longer.
Therefore, there is a demand for efficient transmission and reception processing using the half-duplex communication system by interrupting the execution of one command with the execution of another command.
第1図はCPUとμ−CONからなるシステムの
一般的な構成を示すブロツク図、第2図は送受信
データの構成を示す構成図、第3図は従来の送受
信動作を説明する説明図である。第1図におい
て、1は上位計算機(CPU)、2は端末デイスプ
レイ装置等の周辺処理装置(μ−CON)である。 Figure 1 is a block diagram showing the general configuration of a system consisting of a CPU and μ-CON, Figure 2 is a block diagram showing the configuration of transmitted and received data, and Figure 3 is an explanatory diagram explaining conventional transmitting and receiving operations. . In FIG. 1, 1 is a host computer (CPU), and 2 is a peripheral processing device (μ-CON) such as a terminal display device.
CPU1は受信バツフア1Rおよび送信バツフ
ア1S等より構成され、μ−CONは受信バツフ
ア21Rおよび送信バツフア21S等からなる送
受信制御部21と、マイクロプロセツサ部
(MPU)22とから構成される。たゞし、CPU
1内の受信バツフア1Rおよび送信バツフア1S
は、1つのバツフアで兼用されることもある。な
お、LDはデータ線、LRは受信指令を与える制御
線、LSは送信指令を与える制御線、LTはμ−
CONからCPUへ送信終了要求信号を送出する制
御線である。 The CPU 1 is composed of a reception buffer 1R, a transmission buffer 1S, etc., and the μ-CON is composed of a transmission/reception control section 21 consisting of a reception buffer 21R, a transmission buffer 21S, etc., and a microprocessor section (MPU) 22. Yes, CPU
Reception buffer 1R and transmission buffer 1S in 1
may be used in one buffer. Note that L D is a data line, L R is a control line that gives a reception command, L S is a control line that gives a transmission command, and L T is μ−.
This is a control line that sends a transmission end request signal from CON to the CPU.
送受信の起動は、CPU1から送信指令(以下、
SND指令と略記する。)または受信指令(以下、
RCV指令と略記する。)を制御線LS,LRを介して
μ−CON2へ送ることにより行なわれ、これに
よつてデータの送信または受信が行なわれる。つ
まり、ここでは送受信の主導権がCPU側にある
場合について、以下に説明する。また、RCV指
令時には、データはCPU1からμ−CON2へ、
またSND指令時にはμ−CON2からCPU1へ伝
送されるものとし、以下同様とする。これは、
CPU側から見ると送、受信に関係が逆になるが、
こゝでは上述の如く統一して表現するものとす
る。送受信されるデータの形式(フオーマツト)
は例えば第2図に示されるように、所定のデータ
DAにオーダ(命令)ORDERを付して表わされ、
このため、μ−CON側の送受信制御部(TR)2
1またはマイクロプロセツサ部22には、オーダ
ORDERを解読するためのインタプリタ機能を有
するのが普通である。ところで、一般に伝送すべ
きデータ量は増大する傾向にあり、かつ各送受信
バツフア容量はハードウエアによつて制限を受け
るため、一回の指令によるブロツク転送では送り
切れず、したがつて、複数個のブロツクに分割し
て転送することが必要とされる。 To start transmission and reception, send a transmission command (hereinafter referred to as
Abbreviated as SND Directive. ) or reception command (hereinafter referred to as
Abbreviated as RCV Directive. ) is sent to μ-CON2 via the control lines L S and L R , thereby transmitting or receiving data. In other words, the case where the CPU has the initiative in sending and receiving will be described below. Also, at the time of RCV command, data is transferred from CPU1 to μ-CON2,
Furthermore, when the SND command is issued, it is assumed that the signal is transmitted from μ-CON 2 to CPU 1, and the same applies hereafter. this is,
From the CPU side, the relationship between sending and receiving is reversed, but
Here, it will be expressed in a unified manner as described above. Format of data sent and received
For example, as shown in FIG.
It is expressed by adding order (instruction) ORDER to DA,
For this reason, the transmission/reception control section (TR) 2 on the μ-CON side
1 or the microprocessor section 22, the order
It usually has an interpreter function to decipher ORDER. By the way, the amount of data to be transmitted generally tends to increase, and the capacity of each sending/receiving buffer is limited by the hardware. It is necessary to divide it into blocks and transfer it.
そこで、従来は例えば第3図の如くすることに
より対処している。 Conventionally, this problem has been dealt with, for example, as shown in FIG.
すなわち、同図はCPU1の内部で発生した受
信要求のデータ量が、CPU1の受信バツフア1
R容量よりも多いため、このデータを同図イの如
くBL1,2,3の3ブロツクに分割して転送す
る場合の例を示すものである。ブロツクBL1の
受信処理は、同図ロの如くCPU内の受信バツフ
ア1RのブロツクデータBL1をオーダORDER
とともに送受信制御部TRの受信バツフア21R
を介してMPU22へ送出することにより行なわ
れる。(MPU22の斜線部参照)。MPU22はデ
ータBL1の先頭にあるオーダORDERをインタ
プリト(解読)することにより、CPUから送ら
れてくる全データ量(同図イ参照)を認識し、同
図ハ,ニの如くしてブロツクBL2,BL3を受信
し終えた時点で、初めて受信したデータの処理を
実行する。したがつて、例えばブロツクBL2の
受信処理を行なつているときに、たとえCPU側
において緊急を要する送信要求が発生したとして
も、μ−CONのMPU側ではデータブロツクBL
1の受信によつて認識した量のデータが全て送ら
れてくる迄は、CPUからの送信指令を受け付け
ることができず、このため、同図ホの如きブロツ
ク送信処理は受信処理が終る迄待たされることに
なる。つまり、一般に半二授通信方式では、μ−
CONがCPUから与えられる一方の指令を実行し
ている間はビジー状態となり、該指令による一連
の動作が終了しない限りは、CPUからの他方の
指令を受け付けることができない。この他方の指
令要求は、CPU内部から発生する場合もあるし、
また、μ−CON側からのハードウエア線による
割込みである場合もあるが、いずれにしても、デ
ータ量が増大するにしたがつて、一方の指令実行
中に発生する他方の指令に対する実行が待たされ
る時間が長くなるという欠点がある。 In other words, the figure shows that the data amount of the reception request generated inside CPU1 is
Since this data is larger than the R capacity, an example is shown in which this data is divided into three blocks, BL1, BL2, and BL3, as shown in FIG. The reception process for block BL1 is to order the block data BL1 of reception buffer 1R in the CPU as shown in the figure (b).
Together with the reception buffer 21R of the transmission/reception control unit TR
This is done by sending the data to the MPU 22 via the MPU 22. (See the shaded area of MPU22). The MPU 22 recognizes the total amount of data sent from the CPU (see A in the same figure) by interpreting (decoding) the order ORDER at the beginning of the data BL1. When the reception of BL3 is completed, the processing of the received data is executed for the first time. Therefore, even if an urgent transmission request occurs on the CPU side while receiving data block BL2, for example, the MPU side of μ-CON will not process the data block BL.
It is not possible to accept a transmission command from the CPU until the amount of data recognized by the reception of step 1 has been sent. Therefore, the block transmission process shown in Figure 1 (h) has to wait until the reception process is completed. It will be. In other words, in general, in the half-dyad communication system, μ−
While CON is executing one command given from the CPU, it is in a busy state and cannot accept the other command from the CPU until the series of operations according to that command is completed. This other command request may occur from within the CPU, or
In addition, interrupts may be caused by hardware lines from the μ-CON side, but in any case, as the amount of data increases, the execution of one command that occurs while the other command is being executed is delayed. The disadvantage is that it takes a long time.
この発明はかかる欠点を除去すべくなされたも
ので、半二重方式によるブロツクデータ送受信方
式において、一方の指令実行中に他方の指令を受
け付けて実行しうるようにして送、受信処理の効
率化を図ることを目的とするものである。 The present invention has been made to eliminate such drawbacks, and in a half-duplex block data transmission/reception system, it is possible to receive and execute one command while the other command is being executed, thereby improving the efficiency of transmission and reception processing. The purpose is to achieve this goal.
その特徴は、中央処理装置と周辺処理装置との
間で半二重通信方式によりデータを所定数のブロ
ツクに分割して送受信する場合に、分割される各
データブロツクの先頭にそれが一連のブロツクの
先頭ブロツクであるか後続ブロツクであるかを示
すフラグを付ける機能を両装置に与えるととも
に、専用の制御線または信号線を介して送られて
くる送信要求に対しては該要求を指令コードに変
換して解読する機能を周辺処理装置に持たせ、周
辺処理装置は中央処理装置から送られてくる情報
が先頭ブロツクであるときは引き続き送られてく
る指令コードを解読し、該指令コードにて指定さ
れる動作が現在実行中の動作と異なるときは実行
中の動作を中断し、該指令によつて指定される動
作へ移行するようにした点にある。 Its feature is that when data is divided into a predetermined number of blocks and transmitted and received between the central processing unit and peripheral processing units using the half-duplex communication method, a series of blocks is placed at the beginning of each divided data block. In addition to providing both devices with the function of attaching a flag indicating whether the block is the first block or the succeeding block, when a transmission request is sent via a dedicated control line or signal line, the request is converted into a command code. The peripheral processing unit is equipped with the function of converting and decoding, and when the information sent from the central processing unit is the first block, the peripheral processing unit decodes the command code that is subsequently sent, and uses the command code. If the specified action is different from the action currently being executed, the action being executed is interrupted and the process moves to the action specified by the command.
以下、この発明による送受信方式の実施例につ
いて説明する。なお、システム構成は第1図と同
様である。 Examples of the transmission/reception system according to the present invention will be described below. Note that the system configuration is the same as that in FIG.
まず、その概略について、再び第1図を参照し
て説明する。受信動作については上述の如く、制
御線LRを介してCPU1からTR21へRCV指令
が与えられるので、TR21にはCPU受信バツフ
ア1Rからのデータを自分の受信バツフア21R
で受信し、これをMPU22へ送ることにより受
信処理が行なわれる。一方、送信時においては、
TR21はCPU1からのSND指令を制御線LSを
介して受信する。このとき、制御線LSには、その
旨を表わすハイレベルまたはローレベルの信号が
送られて来るだけであるので、TR21はこれを
受けてSND指令オーダを作成し、MPU22へ受
信データとして送出する。MPU22は受信デー
タとして受けたSND指令オーダをインタプリタ
機能によつて解読し、CPU1から要求された所
定の送信データをTR21の送信バツフア21S
にセツトするので、TR21は該データをCPU送
信バツフア1Sに送出する。なお、複数のブロツ
クからなる1連のデータの受信処理における終結
は、制御線LS上のRCV指令がオフとなつた時点
を送受信制御部TRの内部で識別することとし、
同じく送信処理の終結は、制御線LTを介してμ
−CON内のTRからCPUへ送信終了要求信号を
送出することにより行なうものとする。 First, its outline will be explained with reference to FIG. 1 again. Regarding the reception operation, as mentioned above, the RCV command is given from CPU1 to TR21 via the control line L R , so TR21 transfers the data from CPU reception buffer 1R to its own reception buffer 21R.
The receiving process is performed by receiving the received data and sending it to the MPU 22. On the other hand, when sending,
TR21 receives the SND command from CPU1 via control line L S. At this time, only a high level or low level signal indicating this is sent to the control line L S , so the TR 21 receives this, creates an SND command order, and sends it to the MPU 22 as received data. do. The MPU 22 decodes the SND command order received as received data using the interpreter function, and transmits the specified transmission data requested from the CPU 1 to the transmission buffer 21S of the TR 21.
Therefore, the TR 21 sends the data to the CPU transmission buffer 1S. In addition, the end of the reception process of a series of data consisting of a plurality of blocks is determined by identifying within the transmission/reception control unit TR the time when the RCV command on the control line L S is turned off.
Similarly, the end of the transmission process is transmitted via the control line L T
- This shall be done by sending a transmission end request signal from the TR in CON to the CPU.
第4A〜4C図は送受信情報形式とそのヘツダ
部を説明するための説明図である。 4A to 4C are explanatory diagrams for explaining the transmission/reception information format and its header section.
すなわち、この発明の送受信動作時には、送受
信データSD,RDの各先頭に図の如きヘツダH1
〜H3が付されて伝送される。なお、第4A図イ
はCPUからTRへ送られる情報の形式を示すもの
であり、第4B図イはTRからMPUへ、また第
4C図イはMPUからTRおよびTRからCPUへそ
れぞれ転送される情報の形式を示すものである。
ヘツダH1は第4A図ロに示される如く、受信ブ
ロツクフラグRBCFから構成され、該フラグが
“0”ならば受信データRDのブロツクは先頭ブ
ロツクであり、このヘツダの次には必ず所定のオ
ーダがあることを示している。一方、該フラグ
RBCFが“1”ならば該受信データRDのブロツ
クは継続ブロツクであり、そのすぐ後には前の受
信ブロツクに続く後続のデータがあることを示し
ている。ところで、CPU1の受信バツフア1R
の容量は、送受信制御部TRの受信バツフア21
Rの容量よりも大きいのが一般的であるので、
CPU1からの1回のRCV指令によるブロツク転
送において、TRからMPUへの受信処理は複数
回に分割される。そこで、TRからMPUへ送出
される受信データRDは、4B図イの如く、TR
の受信バツフアの大きさを考慮した適当な大きさ
に決められるとともに、同図ロの如きヘツダH2
が付されて転送される。このヘツダH2は、受信
継続フラグRCFと受信データ長からなり、該フ
ラグRCFは先のフラグRBCFと同様に、“0”で
先頭ブロツクを、また“1”で継続ブロツクであ
ることを示す。また、受信データ長は上述の如
く、CPUから1回のRCV指令にて送られる受信
データがTRの受信バツフアの容量よりも多い場
合は、TRにおいて複数回に分割されてMPUへ
送られるため、最大でTRの受信バツフア容量値
と一致するが、このデータ長はTR内部にある図
示されないカウンタによつてカウントされ、付与
される。さらに、ヘツダH3は第4C図ロの如
く、送信ブロツク継続フラグSBCFと、送信デー
タ長情報とから構成される。すなわち、送信動作
はμ−CONによる終結処理(送信終了要求信号
の送出)によつて終了するので、CPUからの1
回のSND指令に対して送受信制御部TR内送信バ
ツフア単位の送信がMPUからTRを介してCPU
へと行なわれる。したがつて、MPUによつて
TRにセツトされたヘツダH3およびデータSD
は、そのまゝCPUへ送信される。なお、フラグ
SBCFが“0”ならば送信データブロツクは終了
ブロツクであることを示し、自己のブロツクで送
信データは終結する。一方、フラグSBCFが
“1”ならば、送信データブロツクは継続ブロツ
クであり、自己のブロツクでは送信データは終結
せず、後続の送信データが存在することを示して
いる。また、送信データ長は、最大でTR内送信
バツフア容量値と等しく、その値(データ長)は
MPU内のプログラムによつて決められる。 That is, during the transmission/reception operation of the present invention, a header H1 as shown in the figure is placed at the beginning of each transmission/reception data SD, RD.
~H3 is attached and transmitted. Note that Figure 4A (a) shows the format of information sent from the CPU to the TR, Figure 4B (a) shows the format of information sent from the TR to the MPU, and Figure 4C (a) shows the format of information sent from the MPU to the TR and from the TR to the CPU. It indicates the format of the information.
As shown in FIG. 4A, the header H1 is composed of a reception block flag RBCF. If this flag is "0", the block of reception data RD is the first block, and a predetermined order is sure to follow this header. It shows that there is. On the other hand, the flag
If RBCF is "1", this indicates that the block of received data RD is a continuation block, and that there is subsequent data immediately following the previous received block. By the way, the reception buffer 1R of CPU1
The capacity of the reception buffer 21 of the transmission/reception control unit TR is
Since it is generally larger than the capacity of R,
In a block transfer based on one RCV command from the CPU 1, the reception processing from the TR to the MPU is divided into multiple steps. Therefore, the received data RD sent from TR to MPU is
The size of the header H2 is determined to be appropriate considering the size of the receiving buffer of the header H2 as shown in the figure B.
is attached and transferred. This header H2 consists of a reception continuation flag RCF and a reception data length. Similar to the previous flag RBCF, the flag RCF is "0" to indicate a first block, and "1" to indicate a continuation block. In addition, as mentioned above, if the receive data sent from the CPU in one RCV command is larger than the capacity of the TR's receive buffer, the receive data length is divided into multiple times in the TR and sent to the MPU. The maximum data length matches the reception buffer capacity value of the TR, but this data length is counted and assigned by a counter (not shown) inside the TR. Furthermore, the header H3 is composed of a transmission block continuation flag SBCF and transmission data length information, as shown in FIG. 4C (b). In other words, since the transmission operation is terminated by the final processing by μ-CON (sending of the transmission termination request signal), one
In response to the SND command, the sending buffer unit in the sending/receiving control unit TR is sent from the MPU to the CPU via the TR.
to be carried out. Therefore, depending on the MPU
Header H3 and data SD set in TR
is sent as is to the CPU. In addition, the flag
If SBCF is "0", it indicates that the transmission data block is an end block, and the transmission data ends with its own block. On the other hand, if the flag SBCF is "1", the transmitted data block is a continuous block, indicating that the transmitted data does not end in its own block and that subsequent transmitted data exists. In addition, the maximum transmission data length is equal to the TR transmission buffer capacity value, and the value (data length) is
Determined by the program in the MPU.
第5図はこの発明の全体的な送受信動作を説明
するための説明図、第6図、第7図および第8図
はそれぞれCPU、TRおよびMPUの送受信動作
を説明するためのフローチヤートである。なお、
第6,7,8図のAはいずれも受信動作を、また
同じくBは送信動作を示すものである。 FIG. 5 is an explanatory diagram for explaining the overall transmission and reception operation of the present invention, and FIGS. 6, 7, and 8 are flowcharts for explaining the transmission and reception operations of the CPU, TR, and MPU, respectively. . In addition,
A in FIGS. 6, 7, and 8 all indicate a receiving operation, and similarly, B indicates a transmitting operation.
以下、第5図の如く、2回のRCV指令(RCV
1、RCV2)の間に2回のSND指令SND1、
SND2が割り込まれる場合の動作について、第
5〜8図を参照して説明する。なお、CPUから
μ−CONへ送られる情報の形式およびデータ量
は第5図イの如くであるとする。 Below, as shown in Figure 5, the two RCV directives (RCV
1, SND command twice during RCV2) SND1,
The operation when SND2 is interrupted will be explained with reference to FIGS. 5 to 8. It is assumed that the format and amount of information sent from the CPU to μ-CON are as shown in FIG. 5A.
まず、CPUでは第5図ロの如く受信データに
ヘツダH1(先頭ブロツクであることから、フラ
グRBCFは“0”である。)が付与され(第6図
Aの○ロ参照)、第5図イの如きデータがTRへ転
送される。TRでは、ヘツダH1を受信すると、
第7図○ハの如くフラグRCFにフラグRBCFの内容
である“0”を入れるとともに、RCV指令がオ
ンか否かを判別し(第7図Aの○ニ参照)、イエス
(YES)ならばデータをTR内受信バツフアにて
受信する(第7図Aの○ホ参照)。このTR内受信
バツフアの容量はCPU内受信バツフアの容量よ
りも小さいので、CPUから送られてくるデータ
ブロツクBL1のうち、ブロツクBL11を受信し
終つたところでバツフアは満杯(フル)となり
(第7図Aの○ヘ参照)、このためTRは、第5図ハ
の如くヘツダH2(フラグRCFを“0”とし、
データ長をセツトする。)を作成してMPUへ送
る。続いて、残りのブロツクBL12を受信し、
上記と同様にして第5図ニの如きヘツダH2を作
成して(このときフラグRCFは“1”となつて
いる。)、MPUへ送る。CPUからの1回のRCV指
令においては、データBL12が最後であるので、
CPUは、該データの受信動作が終了するとRCV
指令1をオフにする。一方、MPUは上述の如く
して受信したデータ(第5図ホ参照)にもとづい
て、第8図の如く、まず、そのフラグRCFが
“0”か否かを判別する(第8図Aの○ハ参照)。こ
の場合は、先頭ブロツクであることからフラグは
“0”であるので、引き続きオーダを解読し(第
8図Aの○ニ参照)、SND指令か否かを判別する
(第8図Aの○ホ参照)。その結果、SND指令なら
ば送信処理へ移行するが、SND指令でなければ、
上記オーダによる全受信データ量を認識し(第8
図Aの○ヘ参照)、全データを受信完了する迄は該
受信データの処理には移行しないようにする。こ
こで、RCV指令1による受信動作が行なわれて
いるときに、CPUにおいて緊急を要する送信要
求が発生すると、CPUは第6図Aの○チ,○リを経
て送信処理へ移行し、同図Bの○ロの如くSND指
令をオンにすることにより、TRへSND指令1を
与える。前述したように、このSND指令1は制
御線LS(第1図参照)にハイまたはローレベルの
信号として与えられるので、TRでは第5図ヘの
如く、この信号からSND指令を示す所定のオー
ダに変換するとともに、フラグRCF=0、デー
タ長=1なるヘツダH2を付けてMPUへ送出す
る。MPUは該指令を第5図トの如く受信すると、
そのフラグRCFが“0”であることから先頭ブ
ロツクであること、またオーダがSND指令であ
ることをそれぞれ確認した後、第8図Bの○ロの如
くCPUの要求するデータを把握する。このとき、
送信すべきデータ量がTRの送信バツフアよりも
多いときは、第8図Bの○ハにおける判断結果が
YESとなるので、同じく○ニの如くフラグSBCF=
1とし、データ長も付けて第5図チの如きデータ
ブロツクBL3をTRにセツトし(第5図リ,
リ′参照)、TRから該データをCPUへ送信する。
TRでは、第7図Bの○ホの如く、送信データ数が
MPUからのデータ長に一致した時点で、同図B
の○ヘの如く送信終了要求をCPUに送り、SND指
令1がオフとなるのを待つ。CPUは第5図ヌの
如くブロツクデータBL3を受信し、TRからの
送信終了要求を確認した後、SND指令1をオフ
にする。また、送信データのヘツダにおけるフラ
グSBCFが“1”であることから継続するデータ
があることがわかるので、引き続いてSND指令
2をオンにし、TRに送信を促す。TRは、この
オン信号から、上記と同様にしてSNDオーダを
作成するとともに、ヘツダを付与してMPUに送
出するので(第5図ル,オ参照)、MPUは第5図
チに示される残りのブロツクデータBL4をTR
経由でCPUへ送出する(第5図ワ,ワ′,カ参
照)。なお、このとき、ヘツダにおけるフラグ
SBCFは第5図ワ′の如く“0”であるので、
CPUはこれにより送信処理の終了を知り、中断
した受信処理の続きを実行する。なお、この一連
の処理は、第6図Bの○ニ〜○ト,○リを経て同図Aの
へ進むことにより行なわれる。CPUは、第5
図イに示されるデータブロツクBL2を送出すべ
く、第6図Aの○ヌの如くヘツダを作成し、RCV
指令2をオンにして(第6図Aの○ハ参照)、受信
データBL2をTRに送出するので、TRではRCV
指令1の場合と同じように、MPUへRCF=1と
し、データ長をつけてデータBL2を送出する
(第5図ヨ,タ,レ参照)。MPUは、データBL2
を受信すると、始めのオーダによる全データ量を
受信したことがわかるので、この時点で始めて受
信したデータの処理を開始する。 First, the CPU adds a header H1 (since it is the first block, the flag RBCF is "0") to the received data as shown in Figure 5B (see ○B in Figure 6A). Data such as A is transferred to the TR. In TR, when header H1 is received,
As shown in ○C in Figure 7, "0", which is the content of flag RBCF, is set in flag RCF, and it is determined whether the RCV command is on or not (see ○D in Figure 7A), and if YES, then The data is received by the TR reception buffer (see ○ho in Figure 7A). Since the capacity of this TR reception buffer is smaller than the capacity of the CPU reception buffer, the buffer becomes full when it finishes receiving block BL11 of data block BL1 sent from the CPU (Fig. 7). For this reason, TR is set to header H2 (with the flag RCF set to "0", as shown in Figure 5C).
Set data length. ) and send it to the MPU. Next, receive the remaining block BL12,
In the same manner as above, a header H2 as shown in FIG. 5D is created (at this time, the flag RCF is set to "1") and sent to the MPU. In one RCV command from the CPU, data BL12 is the last, so
When the CPU finishes receiving the data, the RCV
Turn off command 1. On the other hand, the MPU first determines whether the flag RCF is "0" or not, as shown in FIG. 8, based on the data received as described above (see E in FIG. 5) (see A in FIG. 8). ○Refer to C). In this case, since it is the first block, the flag is "0", so the order is continued to be decoded (see ○ in Figure 8A), and it is determined whether it is an SND command (see ○ in Figure 8A). (see e). As a result, if it is an SND command, the process moves to transmission processing, but if it is not an SND command,
Recognizes the total amount of received data due to the above order (8th
(See circle in Figure A), processing of the received data is not started until all data has been received. Here, when an urgent transmission request occurs in the CPU while receiving operation according to RCV command 1 is being performed, the CPU shifts to transmission processing via ○chi and ○ri in Figure 6A, and By turning on the SND command as shown in B, SND command 1 is given to TR. As mentioned above, this SND command 1 is given to the control line L S (see Figure 1) as a high or low level signal, so in TR, a predetermined signal indicating the SND command is output from this signal as shown in Figure 5. It is converted into an order and sent to the MPU with a header H2 with flag RCF=0 and data length=1. When the MPU receives the command as shown in Figure 5,
After confirming that the flag RCF is "0", it is the first block, and that the order is an SND command, the data requested by the CPU is grasped, as shown by ○ in FIG. 8B. At this time,
When the amount of data to be transmitted is larger than the TR transmission buffer, the judgment result at ○C in Figure 8B is
Since it is YES, the flag SBCF=
1, add the data length, and set the data block BL3 as shown in Figure 5, to TR (Figure 5,
), the data is sent from the TR to the CPU.
In TR, as shown in Figure 7B, the number of transmitted data is
When the data length matches the data length from the MPU,
Send a transmission end request to the CPU as shown in ○, and wait for SND command 1 to turn off. The CPU receives the block data BL3 as shown in FIG. 5, confirms the transmission end request from the TR, and then turns off the SND command 1. Furthermore, since the flag SBCF in the header of the transmission data is "1", it is known that there is continuing data, so the SND command 2 is subsequently turned on to prompt the TR to transmit. From this ON signal, the TR creates an SND order in the same manner as above, adds a header, and sends it to the MPU (see Figure 5 L and O). TR the block data BL4 of
(See wa, wa', and ka in Figure 5). At this time, the flag in the header
Since SBCF is “0” as shown in Figure 5,
The CPU then knows that the transmission process has ended and continues the interrupted reception process. Note that this series of processing is performed by proceeding to A in FIG. 6 through steps ◯ 2 to ◯ and ○ in FIG. 6B. The CPU is the fifth
In order to send the data block BL2 shown in Figure A, create a header as shown in Figure 6A, and
Since command 2 is turned on (see ○C in Figure 6A) and the received data BL2 is sent to TR, TR receives RCV.
As in the case of command 1, set RCF=1 to the MPU, add the data length, and send data BL2 (see Fig. 5, y, t, y). MPU is data BL2
When this is received, it is known that the entire amount of data for the first order has been received, so at this point the processing of the received data is started.
上記は、RCV指令およびSND指令が、それぞ
れ専用の制御線を介して送出される場合であつた
が、これらの指令をデータ線を介してコード形式
で送出することが可能である。その場合には、第
4A図で説明したヘツダH1にも受信データ長を
示す情報を付与し、CPUによる指令出力処理を
受信動作で行なうことにより、簡単に実現するこ
とができる。また、TRにRCV指令、SND指令
オーダを検出する機能を付与することにより、
MPUとTR間にも専用の制御線とデータ線とを
設けてデータの送受信処理を行なうことが可能で
ある。また、上記では受信処理時に送信処理を割
り込ませる例について説明したが、送信処理時に
受信処理を割り込ませることも、上記と同様にし
て可能である。すなわち、送信処理時にはCPU
がSND指令を送出しないと次のブロツクが送ら
れてこないので、CPUは通常の動作と同様に
RCV指令を送出したのち受信データを送出する
ことができるのである。 In the above case, the RCV command and the SND command are sent out through dedicated control lines, but these commands can be sent out in code form through a data line. In that case, it can be easily realized by adding information indicating the received data length to the header H1 described in FIG. 4A and performing the command output processing by the CPU in the receiving operation. In addition, by adding the function of detecting RCV command and SND command orders to TR,
It is also possible to provide dedicated control lines and data lines between the MPU and TR to perform data transmission and reception processing. Moreover, although an example in which transmission processing is interrupted during reception processing has been described above, it is also possible to interrupt reception processing during transmission processing in the same manner as described above. In other words, during transmission processing, the CPU
The next block will not be sent unless the CPU sends an SND command, so the CPU will operate as usual.
After sending the RCV command, the received data can be sent.
以上のように、この発明によれば、送受信デー
タの先頭に、少なくとも送(受)信ブロツク継続
フラグを持つヘツダを作成する機能と、該ヘツダ
の検出機能をCPU、TRおよびMPUの各々に付
与するとともに、受信データブロツクが先頭ブロ
ツクであるときはそれに続くオーダを必ず参照し
て如何なる処理を実行すればよいかをMPUに判
断させるようにしているので、CPUとμ−CON
との間で半二重通信方式によりブロツクデータを
送受信する場合において、一方の指令実行中に他
方の指令を割り込ませることができ、したがつ
て、要求に合つた適切な送受信処理が可能になる
という利点を有するものである。 As described above, according to the present invention, each of the CPU, TR, and MPU is provided with the function of creating a header having at least the transmission (reception) block continuation flag at the beginning of the transmission/reception data, and the function of detecting the header. At the same time, when the received data block is the first block, the MPU always refers to the following order to determine what processing should be executed, so the CPU and μ-CON
When transmitting/receiving block data using half-duplex communication method, it is possible to interrupt the execution of one command while the other command is being executed, thus making it possible to perform appropriate transmission/reception processing according to the request. This has the advantage that.
なお、上記では上位計算機(CPU)と周辺処
理装置の如き下位の処理装置(μ−CON)との
間で半二重方式によりブロツクデータを送受信す
る場合について説明したが、マイクロコンピユー
タレベルのマイクロコントローラ相互間で、相互
に送、受信指令を出し合つて通信を行なう場合に
も適用することができる。 In addition, although the case where block data is sent and received using the half-duplex method between a host computer (CPU) and a lower-order processing unit (μ-CON) such as a peripheral processing unit has been explained above, It can also be applied to cases where communication is performed by mutually issuing sending and receiving commands.
第1図は上位計算機(CPU)と周辺処理装置
(μ−CON)からなるシステムの一般的な構成を
示すブロツク図、第2図は伝送データの構成を示
す構成図、第3図は従来の送受信方式を説明する
ための説明図、第4A,4B,4C図はこの発明
において伝送される情報形式を説明するための説
明図、第5図はこの発明による送受信方式を説明
するための説明図、第6図は中央処理装置
(CPU)における送受信動作を示すフローチヤー
ト、第7図は送受信制御部(TR)における送受
信動作を示すフローチヤート、第8図はマイクロ
プロセツサ(MPU)の送受信動作を示すフロー
チヤートである。
符号説明、1……上位計算機(CPU)、1R,
21R……受信バツフア、1S,21S……送信
バツフア、2……周辺処理装置(μ−CON)、2
1……送受信制御部(TR)、22……マイクロ
プロセツサ(MPU)、LD……データ線、LR……
受信制御線、LS……送信制御線、LT……終了要
求信号線。
Figure 1 is a block diagram showing the general configuration of a system consisting of a host computer (CPU) and a peripheral processing unit (μ-CON), Figure 2 is a block diagram showing the configuration of transmitted data, and Figure 3 is a block diagram showing the conventional system configuration. FIGS. 4A, 4B, and 4C are explanatory diagrams for explaining the format of information transmitted in the present invention. FIG. 5 is an explanatory diagram for explaining the transmitting and receiving system according to the present invention. , Figure 6 is a flowchart showing the transmission and reception operations in the central processing unit (CPU), Figure 7 is a flowchart showing the transmission and reception operations in the transmission and reception control unit (TR), and Figure 8 is the transmission and reception operation in the microprocessor (MPU). This is a flowchart showing the following. Code explanation, 1... Upper computer (CPU), 1R,
21R...Reception buffer, 1S, 21S...Transmission buffer, 2...Peripheral processing device (μ-CON), 2
1... Transmission/reception control unit (TR), 22... Microprocessor (MPU), L D ... Data line, L R ...
Reception control line, L S ...Transmission control line, L T ... Termination request signal line.
Claims (1)
理部からなる周辺処理装置との間でデータの送信
および受信を行うものにおいて、 前記中央処理装置は、 専用の制御線を介してあるいはコード形式でデ
ータ線を介して前記送受信制御部に対して受信指
令あるいは送信指令を送出し、 受信指令を送出した場合には続けて先頭ブロツ
クか継続ブロツクかのフラグ情報を含むヘツダ部
を付与した受信データを前記送受信制御部に送出
し、 送信指令を送出した場合には送信されてくるブ
ロツクに付与されたヘツダ部のフラグ情報により
終了ブロツクでないことを判別すると再度送信指
令を送出し、 前記送受信制御部は、 前記中央処理装置からの受信指令を受信した場
合には続けて受信する受信データを自己の受信可
能なデータ長に応じてブロツク分解し、分割され
た各ブロツクにそれが先頭ブロツクか継続ブロツ
クかのフラグ情報を含むヘツダ部を付与して前記
周辺処理部に送出し、 前記中央処理装置からの送信指令を受信した場
合には該送信指令をそれに対応する所定のオーダ
ーに変換して先頭ブロツクを示すフラグ情報を含
むヘツダ部を付与して前記周辺処理部に送出した
のち該オーダーを解読した周辺処理部からブロツ
ク分割され、各ブロツクにヘツダが付与されて送
出されてくる送信データを前記中央処理装置に送
出し、 前記周辺処理部は、 前記中央処理装置からの受信データを受信する
場合には該受信データの先頭部に設けられたオー
ダーに書き込まれた全受信データ量のデータの受
信を行うことにより受信終了を判別し、 前記送受信制御部からの所定のオーダーに変換
された送信指令を受信して解読した場合には、前
記中央処理装置の送出される送信データを前記送
受信制御部の受信可能なデータ長に応じてブロツ
ク分割し、分割された各ブロツクにそれが継続ブ
ロツクか終了ブロツクかのフラグ情報を含むヘツ
ダ部を付与して前記送受信制御部に送出し、 さらに前記中央処理装置は、 前記周辺処理部が受信動作中に送信指令または
送信動作中に受信指令を発すると、受信または送
信の継続を示す継続情報を記憶するとともに継続
ブロツクの受信または送信を中断させ、該送信指
令または受信指令を前記送受信制御部に送出して
該送信指令または受信指令に基づく送信動作また
は受信動作を行わせ、該送信動作または受信動作
の終了後に前記継続情報に基づいて中断されてい
た継続ブロツクの受信動作または送信動作を再開
することを特徴とするブロツクデータ送受信方
法。[Scope of Claims] 1. In a device that transmits and receives data between a central processing unit and a peripheral processing unit consisting of a transmission/reception control unit and a peripheral processing unit, the central processing unit: A receive command or a transmit command is sent to the transmission/reception control unit via the data line or in code form, and when the receive command is sent, a header section containing flag information indicating whether the block is the first block or a continuation block is subsequently sent. Sends the attached reception data to the transmission/reception control section, and when a transmission command is sent, if it is determined that it is not an end block based on the flag information in the header section attached to the transmitted block, it sends the transmission command again, When the transmission/reception control unit receives a reception command from the central processing unit, the transmission/reception control unit divides the continuously received reception data into blocks according to its own receivable data length, and divides each divided block into blocks with the beginning of the received data. A header section containing flag information indicating whether it is a block or a continuation block is attached and sent to the peripheral processing section, and when a transmission command is received from the central processing unit, the transmission command is converted into a corresponding predetermined order. The order is then sent to the peripheral processing unit with a header section containing flag information indicating the first block, and then the peripheral processing unit that decodes the order divides the order into blocks, adds a header to each block, and sends out the order. The peripheral processing unit sends the data to the central processing unit, and when receiving the received data from the central processing unit, the peripheral processing unit calculates the amount of the total received data written in the order provided at the head of the received data. The end of reception is determined by receiving data, and when a transmission command converted into a predetermined order from the transmission/reception control unit is received and decoded, the transmission data sent out from the central processing unit is Divide the block into blocks according to the data length that can be received by the transmission/reception control unit, give each divided block a header section containing flag information indicating whether it is a continuation block or an end block, and send it to the transmission/reception control unit; When the peripheral processing unit issues a transmission command during a reception operation or a reception command during a transmission operation, the central processing unit stores continuation information indicating continuation of reception or transmission and interrupts reception or transmission of the continuation block. , transmitting the transmission command or reception command to the transmission/reception control unit to cause the transmission operation or reception operation to be performed based on the transmission command or reception command, and interrupting the transmission operation or reception operation based on the continuation information after the transmission operation or reception operation is completed. A method for transmitting and receiving block data characterized by restarting a receiving operation or transmitting operation of a continuation block that has been in progress.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP58047223A JPS59174055A (en) | 1983-03-23 | 1983-03-23 | Transmitting and receiving system of block data |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP58047223A JPS59174055A (en) | 1983-03-23 | 1983-03-23 | Transmitting and receiving system of block data |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS59174055A JPS59174055A (en) | 1984-10-02 |
| JPH0210627B2 true JPH0210627B2 (en) | 1990-03-08 |
Family
ID=12769185
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP58047223A Granted JPS59174055A (en) | 1983-03-23 | 1983-03-23 | Transmitting and receiving system of block data |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS59174055A (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS61103345A (en) * | 1984-10-26 | 1986-05-21 | Fuji Xerox Co Ltd | Controller of electronic copying machine |
| US5054019A (en) * | 1989-01-13 | 1991-10-01 | International Business Machines Corporation | Transfer direction turnaround in network data communications |
-
1983
- 1983-03-23 JP JP58047223A patent/JPS59174055A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS59174055A (en) | 1984-10-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5948060A (en) | Speeding-up communication rates on links transferring data structures by a method of handing scatter/gather of storage blocks in commanded computer systems | |
| JP2729016B2 (en) | Communication adapter | |
| JPS6278659A (en) | channel system | |
| US7613785B2 (en) | Decreased response time for peer-to-peer remote copy write operation | |
| JPH0210627B2 (en) | ||
| US7080189B1 (en) | USB device communication | |
| JP3453585B2 (en) | Input / output interface extension control method, and channel side device, channel side extension device, and input / output side extension device therefor | |
| JPS5833970B2 (en) | Inter-processor communication method | |
| JPS6223905B2 (en) | ||
| JPS62172840A (en) | Transferring system for data | |
| JP2502932B2 (en) | Data transfer method and data processing system | |
| JP3483738B2 (en) | Data communication device | |
| US5692218A (en) | System for transferring data between input/output devices having separate address spaces in accordance with initializing information in address packages | |
| JPS6127791B2 (en) | ||
| JP2707770B2 (en) | Data chain control method for remote channel system | |
| JP2636206B2 (en) | Information processing system | |
| JPH02244245A (en) | Informing system for interruption circuit number | |
| JPH0126102B2 (en) | ||
| JPS581256A (en) | Memroy access control system | |
| JPH04248735A (en) | Communication control processing method | |
| JPS61264459A (en) | Data transfer system | |
| JPH06274440A (en) | Save data point processing method in scsi bus control | |
| JPS6265172A (en) | Control system for data coding and decoding | |
| JPH0795312B2 (en) | Remote display terminal control system | |
| JPS61139860A (en) | Communication controller |