JPH06214941A - Dma control circuit - Google Patents

Dma control circuit

Info

Publication number
JPH06214941A
JPH06214941A JP2197393A JP2197393A JPH06214941A JP H06214941 A JPH06214941 A JP H06214941A JP 2197393 A JP2197393 A JP 2197393A JP 2197393 A JP2197393 A JP 2197393A JP H06214941 A JPH06214941 A JP H06214941A
Authority
JP
Japan
Prior art keywords
data
dma
synchronization
cpu
signal
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
JP2197393A
Other languages
Japanese (ja)
Inventor
Motoatsu Yoshikawa
元淳 吉川
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2197393A priority Critical patent/JPH06214941A/en
Publication of JPH06214941A publication Critical patent/JPH06214941A/en
Pending legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)

Abstract

PURPOSE:To provide an excellent DMA control circuit which does not generate the synchronism deviation and the data skip of data in a next block even when the detection of DMA finish interruption by CPU is delayed. CONSTITUTION:In a system where SIO 4 receives serial data by a COP mode executing byte synchronization by an external synchronizing signal by bit synchronization by an external synchronization clock from an external device and DMAC 3 DMA-transfers the piece of reception data onto RAM 6, at the time of finishing the DMA transfer of one block, the DMAC control circuit 2 holds CPU 1 so as to write a hunt phase command for retaking synchronization into SIO 4 without the interposition of CPU 1.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、DMA(ダイレクト・
メモリ・アクセス)制御回路に関し、特に外部からのデ
ータ受信を外部同期信号に同期して行い、かつ1ブロッ
クのデータ受信毎に同期を取り直すためのコマンドを書
き込む必要のある入出力回路を備えたコンピュータ装置
におけるDMA制御回路に関するものである。
BACKGROUND OF THE INVENTION The present invention relates to a DMA (Direct
Memory access) control circuit, especially a computer equipped with an input / output circuit for receiving data from the outside in synchronization with an external synchronization signal and writing a command for resynchronization every time one block of data is received The present invention relates to a DMA control circuit in an apparatus.

【0002】[0002]

【従来の技術】従来、この種の回路では、その一例とし
て、図3に示すような回路構成を採っていた。すなわ
ち、システムの制御を行うCPU1と、外部の装置から
外部同期クロックによるビット同期で、外部同期信号に
よるバイト同期を行うCOPモードによるシリアルデー
タを受け取るシリアル転送用I/Oデバイス(以下、S
IOと称する)4との間に、SIO4からのデータをR
AM(ランダム・アクセス・メモリ)6にDMA転送を
行うDMAコントローラ(以下、DMACと称する)3
が設けられ、CPU1に対してDMAC3、SIO4、
ROM(リード・オンリ・メモリ)5及びRAM6がコ
ントロールバス11、アドレスバス12及びデータバス
13を介して接続されている。
2. Description of the Related Art Conventionally, in this type of circuit, as an example thereof, a circuit configuration as shown in FIG. 3 has been adopted. That is, a CPU 1 that controls the system and an I / O device for serial transfer (hereinafter referred to as an S / S device) that receives serial data in a COP mode that performs byte synchronization by an external synchronization signal from an external device in bit synchronization by an external synchronization clock.
(Referred to as IO) 4 and the data from SIO 4
A DMA controller (hereinafter, referred to as a DMAC) 3 that performs a DMA transfer to an AM (random access memory) 6
Is provided for the CPU 1, DMAC3, SIO4,
A ROM (Read Only Memory) 5 and a RAM 6 are connected via a control bus 11, an address bus 12 and a data bus 13.

【0003】SIO4には、信号線21によってビット
同期用の同期クロックが、信号線22によってデータ入
力信号が、信号線23によってフレーム同期用の外部同
期信号がそれぞれ外部装置から供給される。また、SI
O4からDMAC3へは、信号線24によってDMA要
求信号DMAReq が伝送され、逆にDMAC3からSIO
4へは、DMAアクノレッジ信号DMA Ack が伝送され
る。さらに、DMAC3からCPU1へは、信号線29
によってシステムバスの使用権を要求するホールド要求
信号Hold Reqが伝送され、逆にCPU1からDMAC3
へは、信号線30によってシステムバスの使用許可を示
すホールドアクノレッジ信号Hold Ack信号が伝送され
る。
To the SIO 4, a synchronizing clock for bit synchronization is supplied through a signal line 21, a data input signal is supplied through a signal line 22, and an external synchronizing signal for frame synchronization is supplied through a signal line 23 from an external device. Also, SI
The DMA request signal DMAReq is transmitted from the O4 to the DMAC3 through the signal line 24, and conversely, from the DMAC3 to the SIO.
4, a DMA acknowledge signal DMA Ack is transmitted. Further, the signal line 29 is connected from the DMAC3 to the CPU1.
The hold request signal Hold Req requesting the right to use the system bus is transmitted by the CPU 1, and conversely the CPU 1 to the DMAC 3
A hold acknowledge signal Hold Ack signal indicating permission to use the system bus is transmitted to the signal line.

【0004】上記構成の従来のシステムでは、システム
が立ち上がると、CPU1はROM5内のプログラムに
従ってRAM6、DMAC3及びSIO4の初期化、さ
らには図示せぬシステムタイマーや割込みコントローラ
の初期化を行う。SIO4の初期化には、外部クロック
によるビット同期、外部同期によるバイト同期、COP
のビット長等の設定と、1ブロックのデータ受信毎に同
期を取り直すためのハントフェーズのコマンド書込みが
含まれる。
In the conventional system having the above configuration, when the system is started up, the CPU 1 initializes the RAM 6, DMAC 3 and SIO 4 according to the program in the ROM 5, and further initializes the system timer and interrupt controller (not shown). Initialization of SIO4 includes bit synchronization by external clock, byte synchronization by external synchronization, COP
The setting of the bit length and the like and the writing of a command in the hunt phase for resynchronizing each time one block of data is received are included.

【0005】初期化が終了し、外部からのデータの受信
待ち状態において、SIO4は、フレーム同期用の外部
同期信号がアクティブになると、同期クロックに従って
データ信号上のデータを1ビットずつサンプリングす
る。8ビット分のデータが揃うと、DMAC3に対しD
MA要求信号DMA Req をアクティブにしてDMA転送す
るデータが準備できたことを通知する。これを受けて、
DMAC3はCPU1に対してホールド要求信号Hold R
eqをアクティブにしてシステムバスの使用権の要求を出
す。
When the initialization is completed and the external data reception signal is in a standby state, the SIO 4 samples the data on the data signal bit by bit when the external synchronization signal for frame synchronization becomes active. When 8 bits of data are available, D is sent to the DMAC3.
The MA request signal DMA Req is activated to notify that the data for DMA transfer is ready. In response to this,
The DMAC3 sends a hold request signal Hold R to the CPU1.
Activate eq to issue a request for system bus usage rights.

【0006】CPU1は、プログラムの命令の区切りの
良いところで、ホールドアクノレッジ信号Hold Ackをア
クティブにしてシステムバスの使用権を渡したことをD
MAC3に通知する。DMAC3は、システムバスの使
用権を受けると、データをDMA転送するRAM6上の
格納アドレスをアドレスバス12上に出力し、SIO4
に対してDMAアクノレッジ信号DMA Ack をアクティブ
にしてデータバス13上に外部から受信したデータを出
力させ、さらにコントロールバス11のメモリライト信
号をアクティブにすることにより、RAM6上の指定さ
れたアドレスに対してデータを書き込む。
When the CPU 1 activates the hold acknowledge signal Hold Ack and passes the right to use the system bus at a point where the instruction of the program is well separated, D
Notify MAC3. When receiving the right to use the system bus, the DMAC 3 outputs the storage address on the RAM 6 for DMA-transferring the data onto the address bus 12, and the SIO 4
, The DMA acknowledge signal DMA Ack is activated to output the data received from the outside on the data bus 13, and the memory write signal of the control bus 11 is activated, so that the specified address on the RAM 6 is addressed. And write the data.

【0007】データ書込みまでの動作が終了すると、上
記の順番で信号をインアクティブとして一巡させ、1バ
イト或いは1ワードについてのDMA転送を終了する。
CPU1は、DMAC3にあらかじめセットしたDMA
転送データ数のDMA転送が終了することによる割込み
により、DMA転送の終了を検出する。DMA転送終了
を検出したCPU1は、次のDMA転送要求がいつSI
O4から上がっても良いように、次のDMA転送先アド
レス及び転送データ数をDMAC3にセットし、SIO
4に対してハントフェーズコマンドを書き込む。
When the operation up to data writing is completed, the signals are made inactive for one cycle in the above order to complete the DMA transfer for one byte or one word.
The CPU1 is the DMA preset in the DMAC3.
The end of the DMA transfer is detected by the interrupt caused by the end of the DMA transfer of the transfer data number. The CPU 1, which has detected the end of the DMA transfer, sends SI when the next DMA transfer request is issued.
The next DMA transfer destination address and the number of transfer data are set in the DMAC3 so that it may rise from O4.
Write the hunt phase command to 4.

【0008】図4は、従来例の動作を説明するためのタ
イミング図である。図4において、(a)はフレーム同
期のための外部同期信号、(b)はビット同期のための
外部クロック、(c)は入力データ信号、(d)はDM
AC3からCPU1に対するホールド要求信号、(e)
はDMAC3から1ブロックDMA転送終了時に出力さ
れる図3に示されていないDMA終了信号、(f)はデ
ータバス13上にDMAC3の制御によって出力される
データである。
FIG. 4 is a timing chart for explaining the operation of the conventional example. In FIG. 4, (a) is an external synchronization signal for frame synchronization, (b) is an external clock for bit synchronization, (c) is an input data signal, and (d) is DM.
Hold request signal from AC3 to CPU1, (e)
Is a DMA end signal (not shown in FIG. 3) output from the DMAC 3 at the end of one-block DMA transfer, and (f) is data output to the data bus 13 under the control of the DMAC 3.

【0009】先ず、フレーム同期用の外部同期信号
(a)がアクティブ(Lowレベル)になると、ビット
同期用の外部クロック(b)の立上がりに同期して、入
力データ(c)を1ビットずつサンプリングする。8ビ
ット分揃うと、DMAC3は、CPU1に対してホール
ド要求信号(d)をアクティブにする。そして、CPU
1からのホールドアクノレッジ信号Hold Ackがアクティ
ブになった時点で、データバス13上のデータA1
(f)をRAM6に書き込む。
First, when the external synchronizing signal (a) for frame synchronization becomes active (Low level), the input data (c) is sampled bit by bit in synchronization with the rise of the external clock (b) for bit synchronization. To do. When 8 bits have been prepared, the DMAC 3 activates the hold request signal (d) for the CPU 1. And CPU
When the hold acknowledge signal Hold Ack from 1 becomes active, the data A1 on the data bus 13
Write (f) in RAM 6.

【0010】この動作を繰り返して実行し、指定したサ
イズのDMAが終了すると、最終データAn(f)をR
AM6に書き込んだときに、DMAC3はCPU1に対
してDMA終了信号(e)を発生し、1ブロックのDM
A転送が終了したことを知らせる。このDMA終了信号
(e)による割込みにより、CPU1は、次のデータ転
送に備えてDMAC3に対するアドレス及びデータ数を
セットし、SIO4に対してハントフェーズコマンドを
書き込む。
When this operation is repeatedly executed and the DMA of the specified size is completed, the final data An (f) is transferred to R
When writing to the AM6, the DMAC3 generates a DMA end signal (e) to the CPU1 and DM of one block
Notify that the transfer is completed. By the interruption by the DMA end signal (e), the CPU 1 sets the address and the number of data for the DMAC 3 in preparation for the next data transfer, and writes the hunt phase command to the SIO 4.

【0011】[0011]

【発明が解決しようとする課題】ところで、上記構成の
システムでは、DMA転送の終了を割込みによって検出
し、次のDMA転送のためのアドレスのセット、データ
数のセット及びSIO4に対するハントフェーズコマン
ドの書込みを、次のDMA転送が開始される前に終了し
なければならない。DMA転送のアドレスとデータ数に
関しては、DMACのオートロードモードを使用するこ
とにより、次のDMA転送に使用するアドレスとデータ
数をベースアドレス及びベースデータ数にセットしてお
くことで、DMA終了時に自動的にベースアドレス及び
ベースデータ数からロードして次のDMA転送が開始さ
れるため回避することができる。
By the way, in the system having the above-mentioned configuration, the end of the DMA transfer is detected by the interrupt, and the set of the address for the next DMA transfer, the set of the number of data and the writing of the hunt phase command to the SIO 4 are performed. Must be completed before the next DMA transfer is started. Regarding the address and the number of data of the DMA transfer, by using the auto load mode of the DMAC, the address and the number of data to be used for the next DMA transfer are set to the base address and the number of base data. This can be avoided because the next DMA transfer is started by automatically loading from the base address and the number of base data.

【0012】しかしながら、SIO4に対するハントフ
ェーズコマンドの書込み動作を行う必要があるために、
次のデータ受信を自動的に開始させることができず、頻
繁に割込みが入るシステムや、他の割込み処理に時間の
かかるようなシステムにあっては、DMA転送終了割込
みが受け付けられるまでに時間がかかり、次のデータ受
信のためのハントフェーズコマンドの書込みが遅れ、デ
ータ抜けが発生してしまうという不具合がある。
However, since it is necessary to write the hunt phase command to the SIO 4,
In a system in which the next data reception cannot be automatically started and interrupts occur frequently, or in other systems where it takes time to process other interrupts, it takes time until the DMA transfer end interrupt is accepted. Therefore, there is a problem that the writing of the hunt phase command for receiving the next data is delayed and data loss occurs.

【0013】本発明は、上記課題に鑑みてなされたもの
であり、その目的とするところは、CPUのDMA終了
割込みの検出が遅れても、次のブロックのデータの同期
ズレやデータ抜けの発生しない優れたDMA制御回路を
提供することにある。
The present invention has been made in view of the above problems, and an object of the present invention is to generate a data synchronization deviation or a data loss of the data of the next block even if the detection of the DMA end interrupt of the CPU is delayed. Not to provide an excellent DMA control circuit.

【0014】[0014]

【課題を解決するための手段】上記目的を達成するため
に、本発明によるDMA制御回路は、外部からのデータ
受信を外部同期信号に同期して行い、かつ1ブロックの
データ受信毎に同期を取り直すためのコマンドを書き込
む必要のある入出力回路を備えたコンピュータ装置にお
いて、入出力回路で受信したデータをシステム内のメモ
リ上に転送しかつ1ブロックの転送終了時にDMA終了
信号を発生する第1制御部と、DMA終了信号に応答し
てCPUをホールドさせ、かつシステムバスを制御して
入出力回路に対して上記コマンドを直接書き込む第2制
御部とから構成されている。
In order to achieve the above object, the DMA control circuit according to the present invention performs data reception from the outside in synchronization with an external synchronization signal, and performs synchronization every time one block of data is received. In a computer device equipped with an input / output circuit that needs to write a command for re-taking, transfers the data received by the input / output circuit to a memory in the system and generates a DMA end signal at the end of transfer of one block. It comprises a control unit and a second control unit for holding the CPU in response to the DMA end signal and controlling the system bus to directly write the above command to the input / output circuit.

【0015】[0015]

【作用】外部の装置から、外部クロックによるビット同
期で外部同期信号によるバイト同期を行うCOPモード
によるシリアルデータを受信し、この受信データをシス
テム内のメモリ上にDMA転送するシステムにおいて、
1ブロックのDMA転送終了時に、CPUをホールドさ
せることで、CPUの介在無しに、SIOに対し同期を
取り直すためのハントフェーズコマンドを書き込む。こ
れにより、1ブロックのDMA転送終了後、次のブロッ
クのDMA転送を同期ズレなく開始できる。その結果、
CPUのDMA終了割込みの検出が遅れても、次のブロ
ックのデータの同期ズレやデータ抜けが発生しない。
In a system for receiving serial data in the COP mode in which byte synchronization is performed by an external synchronization signal by bit synchronization by an external clock from an external device, and the received data is DMA-transferred to a memory in the system,
By holding the CPU at the end of the DMA transfer of one block, a hunt phase command for resynchronization is written to the SIO without intervention of the CPU. As a result, after the DMA transfer of one block is completed, the DMA transfer of the next block can be started without synchronization deviation. as a result,
Even if the detection of the DMA end interrupt of the CPU is delayed, the data in the next block is not out of sync or missing.

【0016】[0016]

【実施例】以下、本発明の実施例を図面に基づいて詳細
に説明する。図1は、本発明の一実施例を示すシステム
の回路ブロック図である。図1において、システムの制
御を行うCPU1と、外部の装置から同期クロックによ
るビット同期で、外部同期信号によるフレーム同期をC
OPモードにより受信し、パラレルデータに変換するS
IO(シリアル転送用I/Oデバイス)4との間に、D
MA転送終了時にCPU1をシステムバスから切り離
し、SIO4に対してハントフェーズコマンドを書き込
む機能を持つ第2制御部であるDMAC制御回路2と、
オートロードモードを持つ第1制御部であるDMAC3
とが設けられている。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 is a circuit block diagram of a system showing an embodiment of the present invention. In FIG. 1, the CPU 1 for controlling the system and the frame synchronization by an external synchronization signal are bit-synchronized by an external device by a bit synchronization by a synchronization clock.
S received in OP mode and converted to parallel data
D between IO (serial transfer I / O device) 4
A DMAC control circuit 2 which is a second control unit having a function of disconnecting the CPU 1 from the system bus at the end of MA transfer and writing a hunt phase command to the SIO 4.
DMAC3, which is the first controller having an autoload mode
And are provided.

【0017】ROM5には、CPU1のプログラムやデ
ータが記録されている。また、DMA転送されるRAM
6には、CPU1が使用するデータが記録される。DM
AC3、DMAC制御回路2、SIO4、ROM5及び
RAM6は、CPU1に対してコントロールバス11、
アドレスバス12及びデータバス13を介して接続され
ている。
The ROM 5 stores programs and data for the CPU 1. Also, the RAM to be DMA transferred
In 6, data used by the CPU 1 is recorded. DM
The AC3, the DMAC control circuit 2, the SIO 4, the ROM 5 and the RAM 6 are connected to the CPU 1 via the control bus 11,
It is connected via an address bus 12 and a data bus 13.

【0018】SIO4には、信号線21によってビット
同期用の同期クロックが、信号線22によってデータ入
力信号が、信号線23によってフレーム同期用の外部同
期信号がそれぞれ外部装置から供給される。また、SI
O4からDMAC3へは、信号線24によってDMA要
求信号DMAReq が伝送され、逆にDMAC3からSIO
4へは、DMAアクノレッジ信号DMA Ack が伝送され
る。
The SIO 4 is supplied with a synchronization clock for bit synchronization by a signal line 21, a data input signal by a signal line 22 and an external synchronization signal for frame synchronization by a signal line 23 from an external device. Also, SI
The DMA request signal DMAReq is transmitted from the O4 to the DMAC3 through the signal line 24, and conversely, from the DMAC3 to the SIO.
4, a DMA acknowledge signal DMA Ack is transmitted.

【0019】DMAC3からは、DMAC制御回路2に
対するDMA終了信号DMA End 及びホールド要求信号Ho
ld Req信号が信号線26,27によって伝送され、逆に
DMAC制御回路2からは、DMAC3に対するホール
ドアクノレッジ信号Hold Ackが信号線28によって伝送
される。DMAC制御回路2からは、CPU1に対する
システムバスの使用権を要求するホールド要求信号Hold
Reqが信号線29によって伝送され、逆にCPU1から
は、DMAC制御回路2に対するシステムバスの使用権
許可を示すホールドアクノレッジ信号Hold Ackが信号線
30によって伝送される。
From the DMAC 3, the DMA end signal DMA End and the hold request signal Ho for the DMAC control circuit 2 are sent.
The ld Req signal is transmitted via the signal lines 26 and 27, and conversely, the hold acknowledge signal Hold Ack for the DMAC 3 is transmitted from the DMAC control circuit 2 via the signal line 28. From the DMAC control circuit 2, a hold request signal Hold for requesting the right to use the system bus to the CPU 1
Req is transmitted via the signal line 29, and conversely, the CPU 1 transmits a hold acknowledge signal Hold Ack indicating permission to use the system bus to the DMAC control circuit 2 via the signal line 30.

【0020】次に、上記構成のシステムの動作について
説明する。先ず、システムの電源が入ると、CPU1は
ROM5内に記録されているプログラムに従ってRAM
6のクリア、SIO4、DMAC制御回路2及びDMA
C3の初期設定、さらには図示せぬシステムタイマーや
割込みコントローラの初期設定を行う。具体的には、S
IO4は、外部同期クロックによるビット同期、外部同
期信号によるフレーム同期、COPについてのモード設
定、データ受信時のDMA要求についてのモード設定を
行う。
Next, the operation of the system having the above configuration will be described. First, when the power of the system is turned on, the CPU 1 executes the RAM according to the program recorded in the ROM 5.
6 clear, SIO4, DMAC control circuit 2 and DMA
Initialization of C3, and further initialization of a system timer (not shown) and an interrupt controller are performed. Specifically, S
The IO4 performs bit synchronization by an external synchronization clock, frame synchronization by an external synchronization signal, mode setting for COP, and mode setting for DMA request at the time of data reception.

【0021】DMAC制御回路2は、DMAC3からの
DMA終了信号DMA End がアクティブになった場合のS
IO4に対するハントフェーズコマンドを書き込むアド
レスや、ハントフェーズコマンドのデータについての設
定を行う。DMAC3は、最初に受信するデータブロッ
クのアドレス及びデータ数を自身の該当チャンネルに対
してセットし、次に受信したときに格納するアドレス及
びデータ数をベースアドレス及びベースデータ数にセッ
トする。これらの初期設定が終わった時点で、SIO4
に対し、ハントフェーズコマンドを書き込み、受信イネ
ーブルとして外部からのデータ受信待ち状態にする。
The DMAC control circuit 2 executes S when the DMA end signal DMA End from the DMAC 3 becomes active.
The address for writing the hunt phase command to IO4 and the hunt phase command data are set. The DMAC 3 sets the address and the number of data of the data block to be received first for its corresponding channel, and sets the address and the number of data to be stored when it is received next to the base address and the number of base data. When these initial settings are completed, SIO4
On the other hand, a hunt phase command is written to enable reception, and the external data reception waiting state is set.

【0022】初期化が終了し、外部からのデータの受信
待ち状態において、フレーム同期のための外部同期信号
がアクティブになると、SIO4は、外部からの同期ク
ロックに従ってデータ信号上のデータを1ビットずつサ
ンプリングする。8ビット分のデータが揃うと、SIO
4は、DMAC3に対してDMA要求信号DMA Req をア
クティブとし、DMA転送するデータの準備ができたこ
とを通知する。これを受けて、DMAC3は、DMAC
制御回路2に対してホールド要求信号Hold Reqをアクテ
ィブにしてシステムバスの使用権を要求していることを
通知する。
When initialization is completed and the external synchronization signal for frame synchronization becomes active in the state of waiting for reception of external data, the SIO 4 makes the data on the data signal bit by bit according to the external synchronization clock. To sample. When 8 bits of data are available, SIO
4 activates the DMA request signal DMA Req to the DMAC 3 to notify that the data for DMA transfer is ready. In response to this, the DMAC3
The hold request signal Hold Req is activated to notify the control circuit 2 that the right to use the system bus is requested.

【0023】DMAC制御回路2は、このときの信号を
そのままCPU1に対してホールド要求信号Hold Reqと
して出力する。CPU1は、プログラムの命令の区切り
の良いところで、ホールドアクノレッジ信号Hold Ackを
アクティブにし、システムバスの使用権を渡したことを
DMAC制御回路2に通知する。DMAC制御回路2
は、このホールドアクノレッジ信号Hold Ackをそのまま
DMAC3に対するホールドアクノレッジ信号Hold Ack
として出力する。
The DMAC control circuit 2 outputs the signal at this time as it is to the CPU 1 as a hold request signal Hold Req. The CPU 1 activates the hold acknowledge signal Hold Ack at a position where the instruction of the program is well separated, and notifies the DMAC control circuit 2 that the right to use the system bus has been passed. DMAC control circuit 2
Holds the hold acknowledge signal Hold Ack for the DMAC 3 as it is.
Output as.

【0024】DMAC3は、システムバスの使用権を受
けると、データをDMA転送する先のRAM6のアドレ
スをアドレスバス12上に出力し、SIO4に対しDM
Aアクノレッジ信号DMA Ack をアクティブにしてデータ
バス13上に外部からの受信データを出力させ、コント
ロールバス11のメモリライト信号をアクティブにする
ことにより、RAM6上の指定されたアドレスに対して
データを書き込む。データ書込みまでの動作が終わる
と、上記の順番で信号をインアクティブとして一巡さ
せ、1バイトのDMA転送を終了する。
When receiving the right to use the system bus, the DMAC 3 outputs the address of the RAM 6 to which the data is DMA-transferred onto the address bus 12 to DM the SIO 4.
A Acknowledge signal DMA Ack is activated to output externally received data on the data bus 13 and the memory write signal of the control bus 11 is activated to write data to a specified address on the RAM 6. . When the operation up to the data writing is completed, the signals are made inactive one cycle in the above order to complete the 1-byte DMA transfer.

【0025】1ブロックのDMA転送終了時には、DM
AC制御回路2は、DMAC3の処理が終了した直後に
CPU1に対してホールド要求信号Hold Reqをアクティ
ブにし、システムバスの使用権を要求する。CPU1か
らのホールドアクノレッジ信号Hold Ackがアクティブに
なると、DMAC制御回路2は、あらかじめ設定されて
いたSIO4のデバイスアドレスに対し、同じく、初期
設定時に設定されたハントフェーズコマンドを書き込
む。書込み後は速やかに、ホールド要求信号Hold Reqを
インアクティブにし、システムバス使用権をCPU1に
返す。
At the end of DMA transfer of one block, DM
The AC control circuit 2 activates the hold request signal Hold Req to the CPU 1 immediately after the processing of the DMAC 3 is completed, and requests the right to use the system bus. When the hold acknowledge signal Hold Ack from the CPU 1 becomes active, the DMAC control circuit 2 similarly writes the hunt phase command set at the time of initialization to the preset device address of the SIO 4. Immediately after writing, the hold request signal Hold Req is made inactive and the system bus use right is returned to the CPU 1.

【0026】CPU1は、DMAC3にあらかじめセッ
トしたDMA転送データ数のDMA転送が終了すること
による割込みにより、DMA転送の終了を検出する。D
MA転送終了を検出したCPU1は、SIO4に対する
DMAC制御回路2によるハントフェーズコマンドの書
込み、及び次のDMA転送するアドレス及びデータ数の
設定が完了していることから、その次に受信したときの
DMA転送先のアドレスとデータ数を、ベースアドレス
とベースデータ数にセットするのみの動作を行う。
The CPU 1 detects the end of the DMA transfer by an interrupt due to the end of the DMA transfer of the number of DMA transfer data set in the DMAC 3 in advance. D
Upon detecting the end of the MA transfer, the CPU 1 has completed writing the hunt phase command to the SIO 4 by the DMAC control circuit 2 and setting the address and the number of data for the next DMA transfer. Only the operation of setting the transfer destination address and the number of data to the base address and the number of base data is performed.

【0027】図2は、本発明の動作を説明するためのタ
イミング図である。図2において、(a)はフレーム同
期のための外部同期信号、(b)はビット同期のための
外部クロック、(c)は入力データ信号、(d)はDM
AC制御回路2からCPU1に対するホールド要求信
号、(e)はDMAC3から1ブロックDMA転送終了
時に出力されるDMA終了信号、(f)はデータバス1
3上にDMAC3の制御によって出力されるデータであ
る。
FIG. 2 is a timing diagram for explaining the operation of the present invention. In FIG. 2, (a) is an external synchronization signal for frame synchronization, (b) is an external clock for bit synchronization, (c) is an input data signal, and (d) is DM.
A hold request signal from the AC control circuit 2 to the CPU 1, (e) is a DMA end signal output from the DMAC 3 at the end of one block DMA transfer, and (f) is a data bus 1
3 is data output by the control of the DMAC3.

【0028】先ず、フレーム同期用の外部同期信号
(a)がアクティブ(Lowレベル)になると、ビット
同期用の外部クロック(b)の立上がりに同期して、入
力データ(c)を1ビットずつサンプリングする。8ビ
ット分揃うと、DMAC3は、DMAC制御回路2に対
してホールド要求信号Hold Reqをアクティブにし、DM
A転送のためにシステムバスの使用権を要求しているこ
とを通知する。DMAC制御回路2は、CPU1に対し
てホールド要求信号(d)をアクティブにし、CPU1
からのホールドアクノレッジ信号Hold Ackがアクティブ
になった時点で、データバス13上のデータA1(f)
をRAM6に書き込む。
First, when the external synchronizing signal (a) for frame synchronization becomes active (Low level), the input data (c) is sampled bit by bit in synchronization with the rise of the external clock (b) for bit synchronization. To do. When 8 bits are prepared, the DMAC 3 activates the hold request signal Hold Req to the DMAC control circuit 2, and DM
Notify that the right to use the system bus is requested for the A transfer. The DMAC control circuit 2 activates the hold request signal (d) to the CPU 1,
When the hold acknowledge signal Hold Ack from is activated, the data A1 (f) on the data bus 13
Is written in the RAM 6.

【0029】この動作を繰り返し、指定したサイズのD
MAが終了すると、最終データAn(f)をRAM6に
書き込んだときにDMA終了信号(e)が発生する。D
MAC制御回路2は、このDMA終了信号(e)によ
り、1ブロックのDMA転送が終了したことを検出し、
DMAC3についてのDMA処理が終了した時点で、C
PU1に対してホールド要求信号(d)をアクティブに
してシステムバスの使用権を要求する。
By repeating this operation, D of the specified size
When MA ends, the DMA end signal (e) is generated when the final data An (f) is written in the RAM 6. D
The MAC control circuit 2 detects that the DMA transfer of one block is completed by the DMA end signal (e),
When the DMA process for the DMAC3 is completed, C
The hold request signal (d) is activated to PU1 to request the right to use the system bus.

【0030】CPU1からのホールドアクノレッジ信号
Hold Ackにより、システムバスの使用権を受けると、D
MAC制御回路2は、あらかじめ設定されていたSIO
4のデバイスアドレスに対し、同じく、初期設定時に設
定されたハントフェーズコマンドを書き込む。書込み後
は、速やかにホールド要求信号(d)をインアクティブ
にし、システムバスの使用権をCPU1に返す。
Hold acknowledge signal from CPU 1
When the right to use the system bus is received by Hold Ack, D
The MAC control circuit 2 has a preset SIO
Similarly, the hunt phase command set at the time of initial setting is written to the device address of 4. After writing, the hold request signal (d) is promptly deactivated and the right to use the system bus is returned to the CPU 1.

【0031】1ブロックのDMA転送終了時には、DM
AC制御回路2は、DMAC3の処理が終了した直後
に、CPU1に対してホールド要求信号(d)をアクテ
ィブにしてシステムバスの使用権を要求する。CPU1
からのホールドアクノレッジ信号Hold Ackがアクティブ
になると、DMAC制御回路2は、あらかじめ設定され
ていたSIO4のデバイスアドレスに対し、同じく、初
期設定時に設定されハントフェーズコマンドを書き込
む。書込み後は、速やかにホールド要求信号(d)をイ
ンアクティブにし、システムバスの使用権をCPU1に
返す(図2の部)。
At the end of DMA transfer of one block, DM
Immediately after the processing of the DMAC 3 is completed, the AC control circuit 2 activates the hold request signal (d) and requests the right to use the system bus to the CPU 1. CPU1
When the hold acknowledge signal Hold Ack from 1 is activated, the DMAC control circuit 2 similarly writes the hunt phase command set at the initial setting to the device address of the SIO 4 which is set in advance. After writing, the hold request signal (d) is promptly deactivated, and the right to use the system bus is returned to the CPU 1 (part in FIG. 2).

【0032】[0032]

【発明の効果】以上詳細に説明したように、本発明によ
れば、外部の装置から、外部同期クロックによるビット
同期で、外部同期信号によるバイト同期を行うCOPモ
ードによるシリアルデータを受信し、この受信データを
システム内のメモリ上にDMA転送するシステムにおい
て、1ブロックのDMA転送終了時に、CPUをホール
ドさせることによってCPUの介在無しに、SIOに対
し同期を取り直すためのハントフェーズコマンドを書き
込む構成としたことにより、1ブロックのDMA転送終
了後、次のブロックのDMA転送を同期ズレなく開始で
きるので、CPUのDMA終了割込みの検出が遅れて
も、次のブロックのデータの同期ズレやデータ抜けが発
生しなくなり、信頼性の高い優れたシステムを提供でき
る。
As described above in detail, according to the present invention, the serial data in the COP mode for performing the byte synchronization by the external synchronization signal is received from the external device by the bit synchronization by the external synchronization clock. In a system in which received data is DMA-transferred to a memory in the system, a hunt-phase command for resynchronizing SIO is written to the SIO without CPU intervention by holding the CPU at the end of one-block DMA transfer. As a result, after the DMA transfer of one block is completed, the DMA transfer of the next block can be started without any synchronization deviation. Therefore, even if the detection of the DMA end interrupt of the CPU is delayed, the synchronization deviation or the data loss of the data of the next block will occur. An excellent system with high reliability can be provided.

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

【図1】本発明の一実施例を示すシステムの回路ブロッ
ク図である。
FIG. 1 is a circuit block diagram of a system showing an embodiment of the present invention.

【図2】本発明の動作を説明するためのタイミング図で
ある。
FIG. 2 is a timing diagram for explaining the operation of the present invention.

【図3】従来例のシステムの回路ブロック図である。FIG. 3 is a circuit block diagram of a conventional system.

【図4】従来例の動作を説明するためのタイミング図で
ある。
FIG. 4 is a timing chart for explaining the operation of the conventional example.

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

1 CPU 2 DMAC制御回路 3 DMAC 4 シリアル転送用I/Oデバイス(SIO) 5 ROM 6 RAM 11 コントロールバス 12 アドレスバス 13 データバス 1 CPU 2 DMAC Control Circuit 3 DMAC 4 Serial Transfer I / O Device (SIO) 5 ROM 6 RAM 11 Control Bus 12 Address Bus 13 Data Bus

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 外部からのデータ受信を外部同期信号に
同期して行い、かつ1ブロックのデータ受信毎に同期を
取り直すためのコマンドを書き込む必要のある入出力回
路を備えたコンピュータ装置におけるDMA制御回路で
あって、 前記入出力回路で受信したデータをシステム内のメモリ
上に転送しかつ1ブロックの転送終了時にDMA終了信
号を発生する第1制御部と、 前記DMA終了信号に応答してCPUをホールドさせ、
かつシステムバスを制御して前記入出力回路に対して前
記コマンドを直接書き込む第2制御部とからなることを
特徴とするDMA制御回路。
1. A DMA control in a computer device including an input / output circuit for receiving data from the outside in synchronization with an external synchronization signal and writing a command for resynchronization every time one block of data is received. A first control unit for transferring data received by the input / output circuit to a memory in the system and generating a DMA end signal at the end of transfer of one block; and a CPU in response to the DMA end signal. Hold
And a second control unit for controlling the system bus to directly write the command to the input / output circuit.
JP2197393A 1993-01-14 1993-01-14 Dma control circuit Pending JPH06214941A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2197393A JPH06214941A (en) 1993-01-14 1993-01-14 Dma control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2197393A JPH06214941A (en) 1993-01-14 1993-01-14 Dma control circuit

Publications (1)

Publication Number Publication Date
JPH06214941A true JPH06214941A (en) 1994-08-05

Family

ID=12069985

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2197393A Pending JPH06214941A (en) 1993-01-14 1993-01-14 Dma control circuit

Country Status (1)

Country Link
JP (1) JPH06214941A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013124915A1 (en) * 2012-02-24 2013-08-29 パナソニック株式会社 Slave device, master device, communication system, and communication method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013124915A1 (en) * 2012-02-24 2013-08-29 パナソニック株式会社 Slave device, master device, communication system, and communication method
US9378166B2 (en) 2012-02-24 2016-06-28 Panasonic Intellectual Property Management Co., Ltd. Slave device, master device, communication system, and communication method

Similar Documents

Publication Publication Date Title
JPH05165762A (en) Dma controller
JP2001282704A (en) Device, method and system for processing data
JPH06214941A (en) Dma control circuit
JP3061106B2 (en) Bus bridge and computer system having the same
US5931932A (en) Dynamic retry mechanism to prevent corrupted data based on posted transactions on the PCI bus
JPH10307788A (en) Bus bridge
JPH0140432B2 (en)
JPS5936773B2 (en) Local burst transfer control method
JP2595808B2 (en) Memory device for distributed processing
JP2679440B2 (en) Information processing device
JPH05173936A (en) Data transfer processing device
JPH10105488A (en) Communication controller
JPH10116245A (en) Dma controller
JPH0589027A (en) Write buffer provided with monitoring function
JPH04306754A (en) Dma controller
JP2000010909A (en) Data transfer controller
JPH04326144A (en) Memory bus error detection system
JP2990960B2 (en) Direct memory access controller
JPS6294042A (en) Communication control equipment
JP2000305878A (en) Function extension system and data transfer method used for the same
JP2007072685A (en) Data transfer device and information processor
JPH0668020A (en) Memory controller
JPH10228418A (en) Memory controller and memory controlling method
JPH0646103A (en) Data transmitter/receiver
KR19980051899A (en) Interrupt Generator on the I²C Bus