JP2003178020A - Bus control device - Google Patents

Bus control device

Info

Publication number
JP2003178020A
JP2003178020A JP2001374062A JP2001374062A JP2003178020A JP 2003178020 A JP2003178020 A JP 2003178020A JP 2001374062 A JP2001374062 A JP 2001374062A JP 2001374062 A JP2001374062 A JP 2001374062A JP 2003178020 A JP2003178020 A JP 2003178020A
Authority
JP
Japan
Prior art keywords
access
internal
bus
cpu
external
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
JP2001374062A
Other languages
Japanese (ja)
Inventor
Tetsuya Kagemoto
哲哉 影本
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2001374062A priority Critical patent/JP2003178020A/en
Publication of JP2003178020A publication Critical patent/JP2003178020A/en
Pending legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a bus control device capable of effectively using the cycle of an internal bus without hindrance to operation. <P>SOLUTION: A CPU inside access determining part 61 in a bus control part 51 recognizes a DMA transfer system when starting DMA on the basis of a preset value of a transfer system register 13, and makes determination for allowing a CPU inside access request for requiring access to the internal bus by a CPU in external bus access of DMA operation executed in order of the external bus access and internal bus access when DMA transfer is a normal transfer system, and prohibiting the CPU inside access request even in the external bus access when the DMA transfer is a burst transfer system. <P>COPYRIGHT: (C)2003,JPO

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、CPU、内部バ
ス、及び外部バスそれぞれと信号接続され、DMA転送
を実行可能なバス制御装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a bus control device which is signal-connected to a CPU, an internal bus, and an external bus and is capable of executing DMA transfer.

【0002】[0002]

【従来の技術】バス制御装置は、CPU、内部バス、及
び外部バスそれぞれと信号接続され、DMA要求に応じ
て、内部バスアクセスの実行または外部バスインターフ
ェースに対する外部バスアクセスの要求を行い、DMA
転送を実行する。
2. Description of the Related Art A bus controller is signal-connected to a CPU, an internal bus, and an external bus, and executes an internal bus access or makes an external bus access request to an external bus interface in response to a DMA request.
Perform the transfer.

【0003】(従来技術の構成)図11は、従来技術に
よるバス制御装置の構成を示すブロック図である。同図
に示すように、バス制御装置5は、レジスタ群2、バス
制御部50及びDMA要求検出部60から構成され、シ
ステムクロックCLKを動作クロックとしている。
(Construction of Prior Art) FIG. 11 is a block diagram showing the construction of a bus controller according to the prior art. As shown in the figure, the bus control device 5 includes a register group 2, a bus control unit 50, and a DMA request detection unit 60, and uses a system clock CLK as an operation clock.

【0004】レジスタ群2は、転送元アドレスレジスタ
10、転送先アドレスレジスタ11、DMA転送カウン
タ12、転送方式レジスタ13及びDMA要求選択レジ
スタ14を有している。
The register group 2 has a transfer source address register 10, a transfer destination address register 11, a DMA transfer counter 12, a transfer method register 13, and a DMA request selection register 14.

【0005】転送元アドレスレジスタ10はDMAの転
送元アドレスを格納し、転送先アドレスレジスタ11は
DMAの転送先アドレスを格納し、DMA転送カウンタ
12はDMAで転送するデータ数を格納するDMA転送
カウンタ、13はDMAの転送方式(バースト転送また
はノーマル転送)を選択するための転送方式情報を格納
し、DMA要求選択レジスタ14はDMAを起動する要
求信号を選択するため選択情報を格納する。すなわち、
レジスタ群2はDMA転送情報を格納している情報格納
部である。
The transfer source address register 10 stores the DMA transfer source address, the transfer destination address register 11 stores the DMA transfer destination address, and the DMA transfer counter 12 stores the number of data to be transferred by DMA. , 13 store transfer method information for selecting a DMA transfer method (burst transfer or normal transfer), and a DMA request selection register 14 stores selection information for selecting a request signal for activating DMA. That is,
The register group 2 is an information storage unit that stores DMA transfer information.

【0006】なお、ノーマル転送方式はデータを1単位
毎に転送する方式であり、バースト転送方式は複数単位
のデータを一括転送する方式を意味する。
The normal transfer system is a system for transferring data in units of one unit, and the burst transfer system is a system for collectively transferring a plurality of units of data.

【0007】バス制御部50はCPU(図示せず)から
のアクセス要求およびDMA要求を調停してバスアクセ
スを実行し、DMA要求検出部60はDMA要求選択レ
ジスタ14の設定値(選択情報)に従い外部からのDM
A要求を検出する。
The bus control unit 50 arbitrates access requests and DMA requests from a CPU (not shown) to execute bus access, and the DMA request detection unit 60 follows the set value (selection information) of the DMA request selection register 14. DM from outside
Detect A request.

【0008】バス制御部50は、CPU・I/F信号群
7、内部バスアクセス信号群8及び外部バスアクセス信
号群9の授受によって、CPU、外部及び内部に対する
アクセス制御を行う。
The bus control unit 50 controls access to the CPU, the outside and the inside by sending and receiving the CPU / I / F signal group 7, the internal bus access signal group 8 and the external bus access signal group 9.

【0009】CPU・I/F信号群7は、CPUとのI
/F(インタフェース)用信号群であり、CPUアクセ
ス要求信号CREQはCPUがバスアクセスを要求する
ための信号であり、CPUアクセス応答信号CACKは
CPUに対してバスアクセスを受付けたことを示す信号
であり、CPUアクセス完了信号CDCは受付けたアク
セスが完了したことを示す信号であり、CPUアドレス
信号CADDR(CADDR[31:0])はアクセス先
のアドレスを示す信号であり、CPUリード/ライト制
御信号CRWはアクセスがリードアクセスであるかライ
トアクセスであるかを指示する制御信号であり、CPU
ライトデータ信号CWDATA(CWDATA[31:
0])はライトアクセスのためのデータを転送する信号
であり、CPUリードデータ信号CRDATA(CRD
ATA[31:0])はリードアクセスのためのデータを
転送する信号である。
The CPU / I / F signal group 7 is I / F with the CPU.
/ F (interface) signal group, the CPU access request signal CREQ is a signal for the CPU to request the bus access, and the CPU access response signal CACK is a signal indicating that the CPU has accepted the bus access. Yes, the CPU access completion signal CDC is a signal indicating that the received access is completed, the CPU address signal CADDDR (CADDDR [31: 0]) is a signal indicating the address of the access destination, and the CPU read / write control signal. CRW is a control signal for instructing whether the access is a read access or a write access, and the CPU
Write data signal CWDATA (CWDATA [31:
0]) is a signal for transferring data for write access, and is a CPU read data signal CRDATA (CRD
ATA [31: 0]) is a signal for transferring data for read access.

【0010】内部バスアクセス信号群8はバス制御装置
5が内蔵されているチップ内部のバスをアクセスするた
めの信号群であり、内部アドレス信号IADDR(IA
DDR[31:0])は内部のアドレスを示す信号であ
り、内部リード/ライト制御信号IRWはアクセスがリ
ードアクセスであるかライトアクセスであるかを指示す
る信号であり、内部ライトデータ信号IWDATA(I
WDATA[31:0])はライトアクセスのためのデー
タを転送する信号であり、内部リードデータ信号IRD
ATA(IRDATA[31:0])はリードアクセスの
ためのデータを転送する信号であり、内部アクセス完了
信号IDCはバスアクセスが完了したことを示す信号で
あり、内部アクセス要求信号IREQは内部からのアク
セス要求を示す信号である。
The internal bus access signal group 8 is a group of signals for accessing the bus inside the chip in which the bus controller 5 is built, and the internal address signal IADDR (IAD
DDR [31: 0]) is a signal indicating an internal address, the internal read / write control signal IRW is a signal indicating whether the access is a read access or a write access, and the internal write data signal IWDATA ( I
WDATA [31: 0]) is a signal for transferring data for write access, and is an internal read data signal IRD.
ATA (IRDATA [31: 0]) is a signal for transferring data for read access, an internal access completion signal IDC is a signal indicating that bus access is completed, and an internal access request signal IREQ from the inside. This is a signal indicating an access request.

【0011】外部バスアクセス信号群9は上記チップ外
部のバスアクセスを、外部バスインターフェース(図示
せず)に要求するための信号群であり、外部アドレス信
号EADDR(EADDR[31:0])は外部へのアド
レスを示す信号であり、外部リード/ライト制御信号E
RWはアクセスがリードアクセスであるかライトアクセ
スであるかを指示する制御信号であり、外部ライトデー
タ信号EWDATA(EWDATA[31:0])はライ
トアクセスのためのデータを転送する信号であり、外部
リードデータ信号ERDATA(ERDATA[31:
0])はリードアクセスのためのデータを転送する信号
であり、外部アクセス完了信号EDCはバスアクセスが
完了したことを示す信号であり、外部アクセス要求信号
EREQは外部からのアクセス要求を示す信号であり、
外部アクセスバースト要求信号EBURSTは外部バス
インターフェースにバーストアクセスを要求する信号で
ある。
The external bus access signal group 9 is a signal group for requesting an external bus interface (not shown) for bus access outside the chip, and the external address signal EADDR (EADDR [31: 0]) is external. To the external read / write control signal E.
RW is a control signal that indicates whether the access is a read access or a write access, and the external write data signal EWDATA (EWDATA [31: 0]) is a signal that transfers data for write access. Read data signal ERDATA (ERDATA [31:
0]) is a signal for transferring data for read access, an external access completion signal EDC is a signal indicating that bus access is completed, and an external access request signal EREQ is a signal indicating an access request from the outside. Yes,
The external access burst request signal EBURST is a signal for requesting burst access to the external bus interface.

【0012】DMA要求検出部60は、外部からのDM
A要求を受付けるためのDMA要求信号DMAREQを
受け、DMA要求選択レジスタ14に格納された選択情
報に基づき、選択されたDMA要求をバス制御部50に
伝達する。
The DMA request detection unit 60 uses a DM from the outside.
The DMA request signal DMAREQ for accepting the A request is received, and the selected DMA request is transmitted to the bus control unit 50 based on the selection information stored in the DMA request selection register 14.

【0013】(従来技術の動作)以下に、従来技術によ
るバス制御装置の動作について説明する。
(Operation of Prior Art) The operation of the bus controller according to the prior art will be described below.

【0014】(1)DMAの設定 DMAの設定は、CPUからバス制御装置内部のレジス
タ群2(転送元アドレスレジスタ10、転送先アドレス
レジスタ11、DMA転送カウンタ12、転送方式レジ
スタ13、DMA要求選択レジスタ14)に値を書き込
むことによって行う。
(1) DMA setting DMA setting is performed by the CPU from the register group 2 (transfer source address register 10, transfer destination address register 11, DMA transfer counter 12, transfer method register 13, DMA request selection) inside the bus controller. This is done by writing a value to register 14).

【0015】図12は、バス制御装置内のレジスタ書き
込み動作を示すタイミング図である。ここで、転送元ア
ドレスレジスタ10、転送先アドレスレジスタ11、D
MA転送カウンタ12、転送方式レジスタ13、及びD
MA要求選択レジスタ14のアドレスは、それぞれ、0
x00700000、0x00700004、0x00
700008、0x0070000c、及び0x007
00010に割当てられているとする。
FIG. 12 is a timing diagram showing a register write operation within the bus controller. Here, the transfer source address register 10, the transfer destination address register 11, D
MA transfer counter 12, transfer method register 13, and D
The address of the MA request selection register 14 is 0, respectively.
x00700000, 0x00700004, 0x00
700008, 0x0070000c, and 0x007
It is assumed to be assigned to 00010.

【0016】CPUアクセス要求信号CREQが“H”
となったサイクルで、アクセス受付け可であれば、バス
制御部50はCPUアクセス応答信号CACKを“H”
にする。このときのCPUアドレス信号CADDRの値
がバス制御装置5の内部のレジスタに割当てられた値
で、CPUリード/ライト制御信号CRWが“L”(ラ
イトアクセスを表す)であった場合、次のシステムクロ
ックCLKの立ち上がりでCPUライトデータ信号CW
DATAの値を対応するレジスタに書き込む。
The CPU access request signal CREQ is "H".
In this cycle, if the access can be accepted, the bus control unit 50 sets the CPU access response signal CACK to “H”.
To If the value of the CPU address signal CADDDR at this time is the value assigned to the internal register of the bus controller 5 and the CPU read / write control signal CRW is "L" (indicating a write access), the next system CPU write data signal CW at the rising edge of clock CLK
Write the DATA value to the corresponding register.

【0017】このアクセスはシステムクロックCLKの
1サイクルで完了するため、バス制御部50は、CPU
アクセス応答信号CACKと同じサイクルでCPUアク
セス完了信号CDCを“H”にする。
Since this access is completed in one cycle of the system clock CLK, the bus control unit 50
The CPU access completion signal CDC is set to "H" in the same cycle as the access response signal CACK.

【0018】図12で示す例は、サイクルT2でCPU
アドレス信号CADDRで指定された0x007000
00でアドレス指定された転送元アドレスレジスタ10
に対してデータD1の書き込みが行われ、サイクルT3
でCPUアドレス信号CADDRで指定された0x00
700004でアドレス指定された転送先アドレスレジ
スタ11に対してデータD2の書き込みが行われ、サイ
クルT5でCPUアドレス信号CADDRで指定された
0x00700008でアドレス指定されたDMA転送
カウンタ12に対してデータD3の書き込みが行われて
いる。
In the example shown in FIG. 12, the CPU is used in the cycle T2.
0x007000 specified by the address signal CADDDR
Source address register 10 addressed by 00
Data D1 is written to the cycle T3
0x00 specified by CPU address signal CADDDR
The data D2 is written to the transfer destination address register 11 addressed in 700004, and the data D3 is written to the DMA transfer counter 12 addressed by 0x00700008 specified by the CPU address signal CADDDR in cycle T5. Is being done.

【0019】DMA要求選択レジスタ14の各ビット
は、DMA要求信号130に含まれる32本の信号にそ
れぞれ対応しており、DMAを起動する信号に対応する
ビットを“1”に設定しておく。
Each bit of the DMA request selection register 14 corresponds to 32 signals included in the DMA request signal 130, and the bit corresponding to the signal for starting the DMA is set to "1".

【0020】(2)CPUから内部バスへのアクセス 図13は、CPUからの内部バスアクセス動作を示すタ
イミング図である。ここで、アドレスは、0x0000
0000〜0x005fffffが外部バスに、0x0
0600000〜0x006fffffが内部バスに割
当てられているとする。
(2) Access from CPU to Internal Bus FIG. 13 is a timing chart showing an internal bus access operation from the CPU. Here, the address is 0x0000
0000 to 0x005fffff to the external bus, 0x0
It is assumed that 0600000 to 0x006fffff is assigned to the internal bus.

【0021】サイクルT2でCPUはCPUアクセス要
求信号CREQを“H”にして、アクセスを要求する。
同時にCPUアドレス信号CADDRにアドレス0x0
0600000を出力する。このとき、CPUリード/
ライト制御信号CRWは“H”のためリード指定であ
る。
In cycle T2, the CPU sets the CPU access request signal CREQ to "H" to request access.
At the same time, the address 0x0 is added to the CPU address signal CADDDR.
It outputs 0600000. At this time, CPU read /
Since the write control signal CRW is "H", it is a read designation.

【0022】サイクルT3でバス制御部50はアクセス
を受付け、CPUアクセス応答信号CACKを“H”に
する。同時に内部アクセス要求信号IREQを“H”に
して、CPUアドレス信号CADDRで指定したアドレ
ス0x00600000を内部アドレス信号IADDR
としてアドレスを出力する。
In cycle T3, the bus control unit 50 accepts the access and sets the CPU access response signal CACK to "H". At the same time, the internal access request signal IREQ is set to "H", and the address 0x00600000 designated by the CPU address signal CADDDR is set to the internal address signal IADDR.
To output the address.

【0023】サイクルT4から、CPUは、連続してC
PUアクセス要求信号CREQを“H”にして次のアク
セス要求を出力する。同時にCPUアドレス信号CAD
DRに内部アドレス0x0060004を出力する。こ
のとき、CPUリード/ライト制御信号CRWは“L”
のためライト指定となる。
From the cycle T4, the CPU continuously outputs C
The PU access request signal CREQ is set to "H" and the next access request is output. At the same time CPU address signal CAD
The internal address 0x0060004 is output to DR. At this time, the CPU read / write control signal CRW is "L".
Therefore, the light is designated.

【0024】サイクルT5で内部アクセス完了信号ID
Cが“H”になり、バス制御部50は内部リードデータ
信号IRDATAのデータD1をCPUリードデータ信
号CRDATAとして出力し、CPUアクセス完了信号
CDCを“H”にする。すなわち、CPUよりサイクル
T2に要求された内部リードアクセスがサイクルT5で
完了する。
Internal access completion signal ID in cycle T5
C becomes "H", the bus control unit 50 outputs the data D1 of the internal read data signal IRDATA as the CPU read data signal CRDATA, and sets the CPU access completion signal CDC to "H". That is, the internal read access requested by the CPU in cycle T2 is completed in cycle T5.

【0025】サイクルT6でバス制御部50はCPUア
クセス応答信号CACKを“H”にしてCPUよりサイ
クルT4に要求されたライトアクセスを受け付ける。同
時に内部アクセス要求信号IREQを“H”にし、CP
Uアドレス信号CADDRの値0x0060004を内
部アドレス信号IADDRに、CPUライトデータ信号
CWDATAのデータD2を内部ライトデータ信号IW
DATAに、それぞれ出力する。その結果、内部アドレ
ス0x0060004にデータD2が書き込まれる。
In cycle T6, the bus control unit 50 sets the CPU access response signal CACK to "H" and accepts the write access requested by the CPU in cycle T4. At the same time, the internal access request signal IREQ is set to "H", and CP
The value 0x0060004 of the U address signal CADDDR is used as the internal address signal IADDR, and the data D2 of the CPU write data signal CWDATA is used as the internal write data signal IW.
Output to DATA respectively. As a result, the data D2 is written to the internal address 0x0060004.

【0026】そして、サイクルT7で内部アクセス完了
信号IDCがアサートされ、バス制御部50はCPUア
クセス完了信号CDCを“H”にする。すなわち、CP
UよりサイクルT4に要求された内部ライトアクセスが
サイクルT7で完了する。
Then, in cycle T7, the internal access completion signal IDC is asserted, and the bus controller 50 sets the CPU access completion signal CDC to "H". That is, CP
The internal write access requested by U in cycle T4 is completed in cycle T7.

【0027】(3)DMAの起動 DMAは、DMA要求信号DMAREQに含まれる信号
のうち、DMA要求選択レジスタ14に格納された選択
情報に基づき選択された信号の立ち上がりによって起動
される。DMA要求検出部60は、DMA要求信号DM
AREQ[31:0]のうち、選択情報に基づき選択され
た信号(ビット)の立ち上がりを検出すると、DMA起
動を指示するDMA起動要求信号dma_reqをバス
制御部50に伝える。
(3) Activation of DMA The DMA is activated by the rising edge of the signal selected from the signals included in the DMA request signal DMAREQ based on the selection information stored in the DMA request selection register 14. The DMA request detection unit 60 uses the DMA request signal DM
When the rising edge of the signal (bit) selected based on the selection information in AREQ [31: 0] is detected, a DMA activation request signal dma_req instructing DMA activation is transmitted to the bus control unit 50.

【0028】(4)DMAの実行 DMA要求検出部60がDMA要求が検出し、DMA起
動を指示する“H”のDMA起動要求信号dma_re
qをバス制御部50に与えると、バス制御部50はDM
A転送を実行する。
(4) DMA execution The DMA request detection unit 60 detects a DMA request and issues an "H" DMA start request signal dma_re for instructing DMA start.
When q is given to the bus control unit 50, the bus control unit 50 sends DM
Execute A transfer.

【0029】(ノーマルDMA転送例)図14は従来技
術によるノーマルDMA転送動作を示すタイミング図で
ある。ここで、転送元アドレスレジスタ10の設定値は
0x00400000(外部バス)、転送先アドレスレ
ジスタ11の設定値は0x00600000(内部バ
ス)、DMA転送カウンタ12の値は0x2、転送方式
レジスタ13の値は0x0(ノーマル転送)に設定され
ていたとする。
(Example of Normal DMA Transfer) FIG. 14 is a timing chart showing a normal DMA transfer operation according to the prior art. Here, the setting value of the transfer source address register 10 is 0x00400000 (external bus), the setting value of the transfer destination address register 11 is 0x00600000 (internal bus), the value of the DMA transfer counter 12 is 0x2, and the value of the transfer method register 13 is 0x0. It is assumed that it is set to (Normal transfer).

【0030】サイクルT2でDMA起動要求信号dma
_reqが“H”となり、DMA要求が発生する。転送
元アドレスが外部アドレスであるので、サイクルT3か
らバス制御部50は外部アクセス要求信号EREQを
“H”にして(外部リード/ライト制御信号ERWは
“H”を維持)、外部リードアクセスを開始する。
In cycle T2, the DMA start request signal dma
_Req becomes "H" and a DMA request is generated. Since the transfer source address is the external address, the bus control unit 50 sets the external access request signal EREQ to "H" (the external read / write control signal ERW maintains "H") from cycle T3, and starts the external read access. To do.

【0031】図14の例示では、サイクルT4でCPU
からのDMA転送とは無関係の内部バスアクセス要求が
発生するが、すでにDMA転送を開始しているため、バ
ス制御部50はこの要求を受付けない。
In the example shown in FIG. 14, the CPU is used in the cycle T4.
Although an internal bus access request irrelevant to the DMA transfer from the device is generated, the bus control unit 50 does not accept this request because the DMA transfer has already started.

【0032】サイクルT5で、外部アドレス0x004
00000のデータD1が外部リードデータ信号ERD
ATAとして出力され、外部アクセス完了信号EDCが
“H”になり、外部リードアクセスが完了する。このサ
イクルT5の最後で、バス制御部50は外部リードデー
タ信号ERDATAのデータD1を内部のバッファ(図
示せず)に取り込む。
At cycle T5, the external address 0x004
The data D1 of 00000 is the external read data signal ERD
It is output as ATA, the external access completion signal EDC becomes "H", and the external read access is completed. At the end of this cycle T5, the bus control unit 50 fetches the data D1 of the external read data signal ERDATA into an internal buffer (not shown).

【0033】転送先アドレスが内部アドレスであるの
で、サイクルT6から、バス制御部50は、内部アクセ
ス要求信号IREQを“H”、内部リード/ライト制御
信号IRWを“L”にして内部ライトアクセスを開始す
る。
Since the transfer destination address is the internal address, the bus control unit 50 sets the internal access request signal IREQ to "H" and the internal read / write control signal IRW to "L" from the cycle T6 to perform the internal write access. Start.

【0034】内部ライトデータ信号IWDATAには、
バス制御部50内部のバッファに取り込んでいたデータ
D1を出力する。その結果、内部アドレス0x0060
0000にデータD1が書き込まれる。そして、サイク
ルT7で内部アクセス完了信号IDCが“H”になり、
内部ライトアクセスが完了する。
The internal write data signal IWDATA includes
The data D1 stored in the buffer inside the bus control unit 50 is output. As a result, the internal address 0x0060
The data D1 is written in 0000. Then, in cycle T7, the internal access completion signal IDC becomes "H",
Internal write access is completed.

【0035】DMA転送カウンタ12の値が0x2であ
るので、サイクルT8でバス制御部50は2回目の外部
リードアクセスを開始する。同時に、CPUアクセス応
答信号CACKを“H”にしてCPUアクセス(リード
アクセス)を受付け、CPUからの内部バスアクセスを
開始する。すなわち、DMA転送による2回目の外部リ
ードアクセスとCPUによる内部リードアクセスが並行
して実行される。
Since the value of the DMA transfer counter 12 is 0x2, the bus control unit 50 starts the second external read access at cycle T8. At the same time, the CPU access response signal CACK is set to "H" to accept the CPU access (read access), and the internal bus access from the CPU is started. That is, the second external read access by the DMA transfer and the internal read access by the CPU are executed in parallel.

【0036】サイクルT9で、CPUアドレス信号CA
DDRで指定された内部アドレス0x00610000
のデータD10が内部リードデータ信号IRDATAと
して読み出された後、CPUリードデータ信号CRDA
TAとしてCPUに付与することにより、CPUからの
内部バスアクセスは完了する。
In the cycle T9, the CPU address signal CA
Internal address 0x00610000 specified by DDR
Data D10 of the CPU is read as the internal read data signal IRDATA, and then the CPU read data signal CRDA
The internal bus access from the CPU is completed by giving it to the CPU as TA.

【0037】サイクルT10で、外部アドレス0x00
400004のデータD2が外部リードデータ信号ER
DATAとして出力され、DMAの2回目の外部リード
アクセスが完了する。
At cycle T10, external address 0x00
The data D2 of 400004 is the external read data signal ER.
The data is output as DATA, and the second external read access of DMA is completed.

【0038】サイクルT11から、バス制御部50は2
回目の内部ライトアクセスを開始する。サイクルT12
で、内部アドレス0x00600004にデータD2が
書き込まれる内部ライトアクセスが完了し、DMA転送
が終了する。
From the cycle T11, the bus control unit 50 becomes 2
Start the internal write access for the second time. Cycle T12
Then, the internal write access for writing the data D2 to the internal address 0x00600004 is completed, and the DMA transfer is completed.

【0039】(バーストDMA転送例)図15は従来技
術によるバーストDMA転送動作を示すタイミング図で
ある。ここで、転送元アドレスレジスタ10の設定値は
0x00400000、転送先アドレスレジスタ11の
設定値は0x00600000(内部バス)、DMA転
送カウンタ12の値は0x4、転送方式レジスタ13の
値は0x1(バースト転送)とする。
(Burst DMA Transfer Example) FIG. 15 is a timing chart showing a burst DMA transfer operation according to the prior art. Here, the set value of the transfer source address register 10 is 0x00400000, the set value of the transfer destination address register 11 is 0x00600000 (internal bus), the value of the DMA transfer counter 12 is 0x4, and the value of the transfer method register 13 is 0x1 (burst transfer). And

【0040】サイクルT2でDMA起動要求信号dma
_reqが“H”となり、DMA要求が発生する。転送
元アドレスが外部アドレスであるので、サイクルT3か
らバス制御部50は外部アクセス要求信号EREQを
“H”(外部リード/ライト制御信号ERWは“H”を
維持)にして、外部リードアクセスを開始する。同時に
転送方式レジスタ13の値が0x1(バースト転送)で
あるので、バス制御部50は外部アクセスバースト要求
信号EBURSTを“H”にする。
In cycle T2, the DMA start request signal dma
_Req becomes "H" and a DMA request is generated. Since the transfer source address is an external address, the bus control unit 50 sets the external access request signal EREQ to "H" (the external read / write control signal ERW maintains "H") from cycle T3 to start the external read access. To do. At the same time, since the value of the transfer method register 13 is 0x1 (burst transfer), the bus control unit 50 sets the external access burst request signal EBURST to "H".

【0041】サイクルT4でCPUからのDMA転送と
は関係のない内部バスアクセス要求が発生するが、すで
にDMA転送を開始しているため、バス制御部50はこ
の要求を受付けない。
In cycle T4, an internal bus access request irrelevant to the DMA transfer from the CPU is generated, but since the DMA transfer has already started, the bus control unit 50 does not accept this request.

【0042】サイクルT5からサイクルT8まで連続的
に外部バスから0x00400000,0x00400
004,0x00400008,及び0x004000
0cの順で当該外部アドレスのデータD1,D2,D3
及びD4が読み出される。DMA転送カウンタ12の値
が0x4であるので、4回目の外部リードアクセスが完
了した次のサイクルT9で外部アクセス要求信号ERE
Qおよび外部アクセスバースト要求信号EBURSTを
“L”にする。
From cycle T5 to cycle T8, 0x00400000 and 0x00400 are continuously output from the external bus.
004, 0x00400008, and 0x004000
Data D1, D2, D3 of the external address in the order of 0c
And D4 are read. Since the value of the DMA transfer counter 12 is 0x4, the external access request signal ERE is generated in the next cycle T9 after the completion of the fourth external read access.
Q and external access burst request signal EBURST are set to "L".

【0043】一方、内部バスへのライトアクセスは、外
部バスから最初のリードデータD1が読み出された次の
サイクルT6から、0x00600000,0x006
00004,0x00600008,及び0x0060
000cの順でデータD1,D2,D3及びD4の書き
込みが実行され、サイクルT9でライトアクセスが完了
する。
On the other hand, the write access to the internal bus is 0x00600000, 0x006 from the next cycle T6 when the first read data D1 is read from the external bus.
00004, 0x00600008, and 0x0060
The data D1, D2, D3 and D4 are written in the order of 000c, and the write access is completed in cycle T9.

【0044】サイクルT10でバス制御部50はCPU
アクセス応答信号CACKを“H”にしてCPUアクセ
スを受付け、CPUからの内部バスアクセスを開始す
る。サイクルT12でCPUからの内部アドレス0x0
0610000のデータD10を良い出す内部バスアク
セスは完了する。
In cycle T10, the bus control unit 50 is the CPU
The access response signal CACK is set to "H" to accept the CPU access, and the internal bus access from the CPU is started. Internal address 0x0 from CPU in cycle T12
The internal bus access that outputs 06100000 data D10 is completed.

【0045】図14及び図15に示すように、外部バス
アクセス,内部バスアクセスの順で実行されるDMA転
送を開始した時点で、CPUからの内部バスアクセスを
禁止している。これは、DMA転送がバースト転送方式
であった場合、CPUからの内部バスアクセスの完了が
遅いと、外部バスからバーストアクセスで読み出したデ
ータが失われるためである。
As shown in FIGS. 14 and 15, the internal bus access from the CPU is prohibited at the time when the DMA transfer executed in the order of external bus access and internal bus access is started. This is because if the DMA transfer is a burst transfer method and the completion of internal bus access from the CPU is slow, the data read by the burst access from the external bus is lost.

【0046】[0046]

【発明が解決しようとする課題】従来のバス制御装置5
によるDMA転送動作は以上のように行われており、外
部バスアクセス,内部バスアクセスの順で実行されるD
MA転送を開始した時点でCPUからの内部バスアクセ
スをロックしてしまうため、内部バスのサイクルが有効
に利用できないという問題点があった。
Conventional bus controller 5
The DMA transfer operation by D is performed as described above, and D is executed in the order of external bus access and internal bus access.
Since the internal bus access from the CPU is locked when the MA transfer is started, there is a problem that the cycle of the internal bus cannot be effectively used.

【0047】この発明は、上記問題点を解決するために
なされたもので、DMA転送動作に支障なく内部バスの
サイクルを有効に利用できるバス制御装置を得ることを
目的とする。
The present invention has been made to solve the above problems, and an object of the present invention is to obtain a bus control device which can effectively use the cycle of the internal bus without hindering the DMA transfer operation.

【0048】[0048]

【課題を解決するための手段】この発明に係る請求項1
記載のバス制御装置は、DMA転送方式が、データを1
単位毎に転送するノーマル転送方式であるか複数単位の
データを一括転送するバースト転送方式であるかを指示
する転送方式指示部と、CPU、内部バス、及び外部バ
スそれぞれと信号接続され、これらのバス接続制御を行
うバス制御部とを備え、前記バス制御部は、外部バスア
クセス,内部バスアクセスの順で実行されるDMA転送
実行時に、前記転送方式指示部が前記ノーマル転送方式
を指示するとき、前記外部バスアクセス中において、前
記CPUによる前記内部バスへのアクセスを要求するC
PU内部アクセス要求を許可するCPU内部アクセス判
定部を有している。
[Means for Solving the Problems] Claim 1 according to the present invention
The bus control device described above uses the DMA transfer method to transfer data to 1
A transfer method instructing unit for instructing whether it is a normal transfer method for transferring each unit or a burst transfer method for collectively transferring a plurality of units of data, and a signal connection to each of the CPU, the internal bus, and the external bus, and A bus control unit for performing bus connection control, wherein the bus control unit instructs the normal transfer method by the transfer method instruction unit at the time of executing DMA transfer executed in the order of external bus access and internal bus access. , C requesting access to the internal bus by the CPU during the external bus access
It has a CPU internal access determination unit that permits a PU internal access request.

【0049】また、請求項2の発明は、請求項1記載の
バス制御装置であって、前記CPU内部アクセス判定部
は、前記転送方式指示部が前記ノーマル転送方式を指示
するとき、無条件に前記外部バスアクセス中における前
記CPU内部アクセス要求を許可し、前記転送方式指示
部が前記バースト転送方式を指示するとき、無条件に前
記外部バスアクセス中における前記CPU内部アクセス
要求を禁止する。
According to a second aspect of the present invention, in the bus control device according to the first aspect, the CPU internal access determining section unconditionally operates when the transfer method instructing section instructs the normal transfer method. When the CPU internal access request during the external bus access is permitted and the transfer method instruction unit indicates the burst transfer method, the CPU internal access request is unconditionally prohibited during the external bus access.

【0050】また、請求項3の発明は、請求項1記載の
バス制御装置であって、前記DMA転送時の前記外部バ
スアクセスにおける外部バスアクセス残りサイクル数を
動作クロックに従い計測する外部バスアクセス残りサイ
クル数計測部と、前記CPU内部アクセス要求の対象と
なるCPU内部アドレスとCPU内部バス実行サイクル
数を対応づけて記憶される内部アドレステーブルとをさ
らに備え、前記CPU内部アクセス判定部は、前記転送
方式指示部が前記ノーマル転送方式を指示するとき、少
なくとも前記CPU内部アドレスに基づき前記内部アド
レステーブルを参照して前記CPU内部アドレスのCP
U内部バス実行サイクル数を取得し、該CPU内部バス
実行サイクル数が前記外部バスアクセス残りサイクル数
以下という条件成立時に、前記外部バスアクセス中にお
ける前記CPU内部アクセス要求を許可する。
The invention according to claim 3 is the bus control device according to claim 1, wherein the external bus access remaining for measuring the number of external bus access remaining cycles in the external bus access during the DMA transfer according to an operation clock. The CPU internal access determining unit further includes a cycle number measuring unit, and an internal address table that stores the CPU internal address that is the target of the CPU internal access request and the CPU internal bus execution cycle number in association with each other. When the method instructing section gives an instruction for the normal transfer method, at least the CP of the CPU internal address is referred to by referring to the internal address table based on the CPU internal address.
The U internal bus execution cycle number is acquired, and when the condition that the CPU internal bus execution cycle number is equal to or less than the external bus access remaining cycle number is satisfied, the CPU internal access request during the external bus access is permitted.

【0051】また、請求項4の発明は、請求項3記載の
バス制御装置であって、前記CPU内部アクセス判定部
は、前記転送方式指示部が前記バースト転送方式を指示
するとき、少なくとも前記CPU内部アドレスに基づき
前記内部アドレステーブルを参照して前記CPU内部ア
ドレスのCPU内部バス実行サイクル数を取得し、該C
PU内部バス実行サイクル数が前記外部バスアクセス残
りサイクル数以下という条件成立時に、前記外部バスア
クセスが最初の1単位データに対するアクセス中におけ
る前記CPU内部アクセス要求を許可する。
According to a fourth aspect of the present invention, in the bus control device according to the third aspect, the CPU internal access determination section is at least the CPU when the transfer method instruction section instructs the burst transfer method. The CPU internal bus execution cycle number of the CPU internal address is acquired by referring to the internal address table based on the internal address, and the C
When the condition that the number of PU internal bus execution cycles is equal to or less than the number of external bus access remaining cycles is satisfied, the external bus access permits the CPU internal access request during access to the first unit data.

【0052】また、請求項5の発明は、請求項3あるい
は請求項4記載のバス制御装置であって、前記内部アド
レステーブルは、前記CPU内部アドレスに加え前記C
PU内部アクセス要求のリードモード及びライトモード
を含むアクセスモードを、前記CPU内部バス実行サイ
クル数に対応づけて記憶され、前記CPU内部アクセス
判定部は、前記CPU内部アドレス及び前記アクセスモ
ードに基づき前記内部アドレステーブルを参照して前記
CPU内部アドレスの前記CPU内部バス実行サイクル
数を取得する。
The invention according to claim 5 is the bus control device according to claim 3 or 4, wherein the internal address table includes the C internal address in addition to the CPU internal address.
An access mode including a read mode and a write mode of a PU internal access request is stored in association with the number of CPU internal bus execution cycles, and the CPU internal access determination unit is configured to execute the internal operation based on the CPU internal address and the access mode. The number of the CPU internal bus execution cycles of the CPU internal address is acquired by referring to the address table.

【0053】また、請求項6の発明は、請求項3ないし
請求項5のうち、いずれか1項に記載のバス制御装置で
あって、前記外部バスは前記外部バスアクセスの外部バ
ス実行サイクル数を指示する外部アクセスサイクル信号
を伝搬し、前記バス制御部は、前記外部バスアクセス開
始時に前記外部バス実行サイクル数を前記外部バスアク
セス残りサイクル数として初期設定する外部バスアクセ
ス残りサイクル数初期値設定部をさらに含む。
The invention of claim 6 is the bus control device according to any one of claims 3 to 5, wherein the external bus is the number of external bus execution cycles of the external bus access. An external access cycle signal indicating that the external bus access remaining cycle number is initialized, and the bus control unit initializes the external bus execution cycle number as the external bus access remaining cycle number at the start of the external bus access. Further includes a section.

【0054】また、請求項7の発明は、請求項3ないし
請求項6のうち、いずれか1項に記載のバス制御装置で
あって、CPU内部バスアクセス残りサイクル数を前記
動作クロックに従い計測するCPU内部バスアクセス残
りサイクル数計測部をさらに備え、前記バス制御部は、
前記CPU内部バスアクセス開始時に、少なくとも前記
CPU内部アドレスに基づき前記内部アドレステーブル
を参照して前記CPU内部アドレスのCPU内部バス実
行サイクル数を取得し、取得した前記CPU内部バス実
行サイクル数を前記CPU内部バスアクセス残りサイク
ル数として初期設定するCPU内部バスアクセス残りサ
イクル数初期値設定部と、前記CPU内部アクセス実行
中に、外部バスアクセスから内部バスアクセスの順で実
行されるDMA要求を受けた場合、所定の外部バスアク
セス予測実行サイクル数が前記CPU内部バスアクセス
残りサイクル数以下という条件成立時に、前記CPU内
部バスアクセス中における前記DMA転送の外部アクセ
スを許可するDMAアクセス判定部とをさらに含む。
According to a seventh aspect of the present invention, in the bus control device according to any one of the third to sixth aspects, the CPU internal bus access remaining cycle number is measured in accordance with the operation clock. A CPU internal bus access remaining cycle count measuring unit is further provided, and the bus control unit is
At the start of the CPU internal bus access, the CPU internal bus execution cycle number of the CPU internal address is acquired by referring to the internal address table based on at least the CPU internal address, and the acquired CPU internal bus execution cycle number is acquired by the CPU. When a CPU internal bus access remaining cycle number initial value setting unit which is initially set as the internal bus access remaining cycle number and a DMA request executed from the external bus access in the order of the internal bus access during execution of the CPU internal access are performed. And a DMA access determination unit that permits external access of the DMA transfer during the CPU internal bus access when the condition that the predetermined external bus access predicted execution cycle number is equal to or less than the CPU internal bus access remaining cycle number is satisfied.

【0055】また、請求項8の発明は、請求項7記載の
バス制御装置であって、前記所定の外部バスアクセス予
測実行サイクル数は最短の外部バスアクセス実行サイク
ル数を含む。
The invention of claim 8 is the bus control device according to claim 7, wherein the predetermined number of predicted external bus access execution cycles includes the shortest number of external bus access execution cycles.

【0056】また、請求項9の発明は、請求項1ないし
請求項8のうち、いずれか1項に記載のバス制御装置で
あって、前記転送方式指示部は、前記ノーマル転送方式
あるいは前記バースト転送を指示する転送方式情報を含
むDMA転送情報を前記バス制御部に付与するDMA転
送情報格納部を含む。
A ninth aspect of the present invention is the bus control device according to any one of the first to eighth aspects, wherein the transfer method instruction unit is the normal transfer method or the burst method. It includes a DMA transfer information storage unit for giving DMA transfer information including transfer method information for instructing transfer to the bus control unit.

【0057】[0057]

【発明の実施の形態】<実施の形態1>図1は、この発
明の実施の形態1であるバス制御装置の構成を示すブロ
ック図である。同図に示すように、バス制御装置1は、
レジスタ群2、バス制御部51及びDMA要求検出部6
0から構成され、システムクロックCLKを動作クロッ
クとしている。
DESCRIPTION OF THE PREFERRED EMBODIMENTS <First Preferred Embodiment> FIG. 1 is a block diagram showing a configuration of a bus control device according to a first preferred embodiment of the present invention. As shown in the figure, the bus control device 1
Register group 2, bus control unit 51, and DMA request detection unit 6
0, and uses the system clock CLK as the operating clock.

【0058】バス制御部51は、CPU・I/F信号群
7、内部バスアクセス信号群8及び外部バスアクセス信
号群9の授受によって、CPU、外部及び内部に対する
アクセス制御を行う。なお、CPU・I/F信号群7、
内部バスアクセス信号群8及び外部バスアクセス信号群
9並びにレジスタ群2及びDMA要求検出部60は、図
11で示した従来構成と同様であるため説明を省略す
る。
The bus controller 51 controls access to the CPU, the outside and the inside by sending and receiving the CPU / I / F signal group 7, the internal bus access signal group 8 and the external bus access signal group 9. The CPU / I / F signal group 7,
The internal bus access signal group 8, the external bus access signal group 9, the register group 2, and the DMA request detection unit 60 are the same as those in the conventional configuration shown in FIG.

【0059】バス制御部51は内部にCPU内部アクセ
ス判定部61を有している。CPU内部アクセス判定部
61は転送方式レジスタ13の設定値(転送方式情報)
に基づき、DMA起動時にDMA転送方式を認識し、D
MA転送がノーマル転送方式の場合に、外部バスアクセ
ス,内部バスアクセスの順で実行されるDMA動作の外
部バスアクセス中において、CPUによる内部バスへの
アクセスを要求するCPU内部アクセス要求を許可し、
DMA転送がバースト転送の場合は上記外部バスアクセ
ス中においても上記CPU内部アクセス要求を禁止する
判定を行う。
The bus control unit 51 has a CPU internal access determination unit 61 inside. The CPU internal access determination unit 61 sets the transfer method register 13 setting value (transfer method information).
On the basis of the
When the MA transfer is the normal transfer method, the CPU internal access request for requesting access to the internal bus by the CPU is permitted during the external bus access of the DMA operation executed in the order of external bus access and internal bus access,
If the DMA transfer is a burst transfer, it is determined that the CPU internal access request is prohibited even during the external bus access.

【0060】図2は実施の形態1によるノーマルDMA
転送動作を示すタイミング図である。ここで、転送元ア
ドレスレジスタ10の設定値は0x00400000
(外部バス)、転送先アドレスレジスタ11の設定値は
0x00600000(内部バス)、DMA転送カウン
タ12の値は0x2、転送方式レジスタ13の値は0x
0(ノーマル転送)に設定されていたとする。
FIG. 2 shows a normal DMA according to the first embodiment.
It is a timing diagram which shows a transfer operation. Here, the setting value of the transfer source address register 10 is 0x00400000.
(External bus), set value of transfer destination address register 11 is 0x00600000 (internal bus), value of DMA transfer counter 12 is 0x2, value of transfer method register 13 is 0x
It is assumed that it is set to 0 (normal transfer).

【0061】サイクルT2でDMA起動要求信号dma
_reqが“H”となり、DMA要求が発生する。転送
元アドレスが外部アドレスであるので、サイクルT3か
らバス制御部51は外部アクセス要求信号EREQを
“H”(外部リード/ライト制御信号ERWは“H”を
維持)にして、外部バスアクセスである外部リードアク
セスを開始する。
In cycle T2, the DMA start request signal dma
_Req becomes "H" and a DMA request is generated. Since the transfer source address is the external address, the bus control unit 51 sets the external access request signal EREQ to "H" (the external read / write control signal ERW maintains "H") from the cycle T3 to perform the external bus access. Start external read access.

【0062】図2の例示では、サイクルT4でCPUか
らのDMA転送とは無関係の内部リードアクセス要求
(CPUアクセス要求信号CREQが“H”、CPUリ
ード/ライト制御信号CRWが“H”)が発生する。
In the example of FIG. 2, an internal read access request (the CPU access request signal CREQ is "H" and the CPU read / write control signal CRW is "H") unrelated to the DMA transfer from the CPU is generated in the cycle T4. To do.

【0063】このとき、CPU内部アクセス判定部61
はDMA転送方式がノーマルであり、DMA転送は開始
しているが現在外部アクセス実行中であることから、C
PUアクセス応答信号CACKを“H”にしてサイクル
T4でのCPU内部アクセス要求を受け付けることを判
定する。その結果、DMA転送による外部リードアクセ
スとCPUによる内部リードアクセスが並行して実行さ
れる。
At this time, the CPU internal access judging section 61
Indicates that the DMA transfer method is normal, DMA transfer has started, but external access is currently being performed.
The PU access response signal CACK is set to "H", and it is determined that the CPU internal access request in the cycle T4 is accepted. As a result, external read access by DMA transfer and internal read access by CPU are executed in parallel.

【0064】サイクルT5で、外部アドレス0x004
00000のデータD1が外部リードデータ信号ERD
ATAとして出力され、外部アクセス完了信号EDCが
“H”になり、外部リードアクセスが完了する。このサ
イクルT5の最後で、バス制御部51は外部リードデー
タ信号ERDATAのデータD1を内部のバッファ(図
示せず)に取り込む。
At cycle T5, external address 0x004
The data D1 of 00000 is the external read data signal ERD
It is output as ATA, the external access completion signal EDC becomes "H", and the external read access is completed. At the end of this cycle T5, the bus control unit 51 fetches the data D1 of the external read data signal ERDATA into an internal buffer (not shown).

【0065】サイクルT6では、CPUアドレス信号C
ADDRで指定された内部アドレス0x0061000
0のデータD10が内部リードデータ信号IRDATA
として読み出され、さらにCPUリードデータ信号CR
DATAとしてCPUに付与されることにより、CPU
による内部リードアクセスが完了する。
In the cycle T6, the CPU address signal C
Internal address specified by ADDR 0x0061000
The data D10 of 0 is the internal read data signal IRDATA.
Read as the CPU read data signal CR
By being given to the CPU as DATA, the CPU
The internal read access by is completed.

【0066】したがって、バス制御部51はサイクルT
5でDMA転送による外部リードアクセスが完了後、サ
イクルT6の間は、CPUによる内部リードアクセスの
完了まで、DMA転送による内部バスアクセスである内
部ライトアクセスの開始を待機する。
Therefore, the bus control unit 51 uses the cycle T
After the external read access by the DMA transfer is completed in 5, the start of the internal write access which is the internal bus access by the DMA transfer is waited until the completion of the internal read access by the CPU during the cycle T6.

【0067】そして、CPUによる内部リードアクセス
完了後のサイクルT7から、バス制御部51は、内部ア
クセス要求信号IREQを“H”、内部リード/ライト
制御信号IRWを“L”にしてDMA転送の内部ライト
アクセスを開始する。
Then, from the cycle T7 after the completion of the internal read access by the CPU, the bus control section 51 sets the internal access request signal IREQ to "H" and the internal read / write control signal IRW to "L" to perform the internal DMA transfer. Start write access.

【0068】内部ライトデータ信号IWDATAには、
バス制御部51内部のバッファに取り込んでいたデータ
D1を出力する。その結果、内部アドレス0x0060
0000にデータD1が書き込まれる。そして、サイク
ルT8で内部アクセス完了信号IDCが“H”になり、
内部ライトアクセスが完了する。
The internal write data signal IWDATA includes
The data D1 stored in the buffer inside the bus control unit 51 is output. As a result, the internal address 0x0060
The data D1 is written in 0000. Then, in cycle T8, the internal access completion signal IDC becomes "H",
Internal write access is completed.

【0069】図2の例示では、サイクルT7でCPUか
ら別の内部バスアクセス要求がさらに発生するが、すで
にDMA転送の内部バスアクセスを実行中であるため、
バス制御部51はこの要求を受付けない。
In the example of FIG. 2, another internal bus access request is further issued from the CPU in cycle T7, but since the internal bus access for DMA transfer is already being executed,
The bus control unit 51 does not accept this request.

【0070】DMA転送カウンタ12の値が0x2であ
るので、サイクルT9でバス制御部51は2回目の外部
リードアクセスを開始する。同時に、CPUアクセス応
答信号CACKを“H”にしてCPU内部アクセス要求
を受付け、CPUからの内部リードアクセスを開始す
る。すなわち、DMA転送による2回目の外部リードア
クセスとCPUによる2回目の内部リードアクセスが並
行に実行される。
Since the value of the DMA transfer counter 12 is 0x2, the bus controller 51 starts the second external read access in cycle T9. At the same time, the CPU access response signal CACK is set to "H" to accept the CPU internal access request, and the internal read access from the CPU is started. That is, the second external read access by the DMA transfer and the second internal read access by the CPU are executed in parallel.

【0071】サイクルT10で、CPUアドレス信号C
ADDRで指定された内部アドレス0x0062000
0のデータD20が内部リードデータ信号IRDATA
として読み出された後、CPUリードデータ信号CRD
ATAとしてCPUに付与されることにより、CPUか
らの内部バスアクセスは完了する。
In cycle T10, CPU address signal C
Internal address specified by ADDR 0x0062000
The data D20 of 0 is the internal read data signal IRDATA.
CPU read data signal CRD after being read as
By being given to the CPU as ATA, the internal bus access from the CPU is completed.

【0072】サイクルT11で、外部アドレス0x00
400004のデータD2が外部リードデータ信号ER
DATAとして出力され、DMAの2回目の外部リード
アクセスが完了する。
In cycle T11, the external address 0x00
The data D2 of 400004 is the external read data signal ER.
The data is output as DATA, and the second external read access of DMA is completed.

【0073】サイクルT12から、バス制御部51は2
回目の内部ライトアクセスを開始する。サイクルT13
で、内部アドレス0x00600004にデータD2が
書き込まれる内部ライトアクセスが完了し、DMA転送
が終了する。
From the cycle T12, the bus control unit 51 becomes 2
Start the internal write access for the second time. Cycle T13
Then, the internal write access for writing the data D2 to the internal address 0x00600004 is completed, and the DMA transfer is completed.

【0074】一方、転送方式レジスタ13の設定値が0
x1(バースト転送)の場合は、CPU内部アクセス判
定部61によって、DMA転送開始号は、図15で示し
た従来動作同様にCPU内部アクセス要求を禁止する。
On the other hand, the set value of the transfer method register 13 is 0.
In the case of x1 (burst transfer), the CPU internal access determination unit 61 prohibits the CPU internal access request for the DMA transfer start number as in the conventional operation shown in FIG.

【0075】このように、実施の形態1のバス制御装置
は、DMA転送がノーマル転送動作の場合は、外部バス
アクセス,内部バスアクセスの順で実行されるDMA転
送動作の実行中であっても外部バスアクセス動作実行中
の場合はCPUからの内部バスアクセス要求を許可する
ため、内部バスのサイクルを有効に利用でき、オーバー
ヘッド小さいバス制御装置1を得ることができる。
As described above, in the bus controller of the first embodiment, when the DMA transfer is the normal transfer operation, the external bus access and the internal bus access are executed in this order even during the execution of the DMA transfer operation. Since the internal bus access request from the CPU is permitted when the external bus access operation is being executed, the cycle of the internal bus can be effectively used and the bus control device 1 with a small overhead can be obtained.

【0076】<実施の形態2>図3は、この発明の実施
の形態2であるバス制御装置の構成を示すブロック図で
ある。同図に示すように、バス制御装置1は、レジスタ
群2、バス制御部52、DMA要求検出部60、内部ア
ドレステーブル70、及び外部アクセスカウンタ80か
ら構成され、システムクロックCLKを動作クロックと
している。
<Second Embodiment> FIG. 3 is a block diagram showing a structure of a bus control device according to a second embodiment of the present invention. As shown in the figure, the bus control device 1 is composed of a register group 2, a bus control unit 52, a DMA request detection unit 60, an internal address table 70, and an external access counter 80, and uses a system clock CLK as an operation clock. .

【0077】図4は内部アドレステーブル70の内部構
成を示す説明図である。同図に示すように、参照用内部
アドレスstart_addr1[31:0]〜star
t_addr4[31:0]に対応してマスクビットma
sk_bit1[31:0]〜mask_bit4[3
1:0]、リードアクセスサイクル数r1〜r4及びラ
イトアクセスサイクル数w1〜w4がそれぞれ設定され
る。
FIG. 4 is an explanatory diagram showing the internal structure of the internal address table 70. As shown in the figure, the reference internal addresses start_addr1 [31: 0] to start.
Mask bit ma corresponding to t_addr4 [31: 0]
sk_bit1 [31: 0] to mask_bit4 [3
1: 0], read access cycle numbers r1 to r4, and write access cycle numbers w1 to w4 are set, respectively.

【0078】この内部アドレステーブル70を利用する
ことにより、内部アドレス値及びアクセスモード(リー
ド,ライト)によってCPU内部バスアクセスの正確な
実行サイクル数を認識することができる。
By using this internal address table 70, it is possible to recognize the correct number of execution cycles of the CPU internal bus access according to the internal address value and the access mode (read, write).

【0079】外部アクセスカウンタ80はバス制御部5
2の外部アクセスカウント値初期値設定部72により所
定の初期値が、外部バスアクセス残りサイクル数である
外部アクセスカウント値ext_cunterとして設
定され、システムクロックCLKの1サイクル毎に外部
アクセスカウント値ext_cunterを1デクリメ
ントする。
The external access counter 80 is the bus controller 5
The external access count value initial value setting unit 72 of 2 sets a predetermined initial value as the external access count value ext_counter, which is the number of cycles remaining in the external bus access, and sets the external access count value ext_counter to 1 for each cycle of the system clock CLK. Decrement.

【0080】バス制御部52は、CPU・I/F信号群
7、内部バスアクセス信号群8及び外部バスアクセス信
号群9の授受によって、CPU、外部及び内部に対する
アクセス制御を行う。なお、CPU・I/F信号群7、
内部バスアクセス信号群8及び外部バスアクセス信号群
9並びにレジスタ群2及びDMA要求検出部60は、図
11で示した従来構成と同様であるため説明を省略す
る。
The bus control unit 52 controls access to the CPU, the outside and the inside by sending and receiving the CPU / I / F signal group 7, the internal bus access signal group 8 and the external bus access signal group 9. The CPU / I / F signal group 7,
The internal bus access signal group 8, the external bus access signal group 9, the register group 2, and the DMA request detection unit 60 are the same as those in the conventional configuration shown in FIG.

【0081】バス制御部52は内部にCPU内部アクセ
ス判定部62を有している。CPU内部アクセス判定部
62は転送方式レジスタ13の設定値に基づき、DMA
起動時にDMA転送方式を認識し、DMA転送がノーマ
ル転送の場合に以下の動作を実行する。
The bus control unit 52 has a CPU internal access determination unit 62 inside. The CPU internal access determination unit 62 determines whether the DMA based on the set value of the transfer method register 13
The DMA transfer method is recognized at startup, and the following operation is executed when the DMA transfer is normal transfer.

【0082】CPU内部アクセス判定部62は、アクセ
スモード(リード,ライト)、内部アドレス値に基づき
内部アドレステーブル70を参照して、CPU内部バス
実行サイクル数である内部アクセスサイクル数icを認
識した後、内部アクセスサイクル数icと外部アクセス
カウント値ext_cunterとを比較し、内部アク
セスサイクル数icが外部アクセスカウント値ext_
cunter以下であればCPU内部アクセス要求を受
け付けると判定する。
After the CPU internal access judging unit 62 recognizes the internal access cycle number ic which is the CPU internal bus execution cycle number by referring to the internal address table 70 based on the access mode (read, write) and the internal address value. , The internal access cycle number ic is compared with the external access count value ext_counter, and the internal access cycle number ic is compared with the external access count value ext_counter.
If it is less than or equal to the counter, it is determined that the CPU internal access request is accepted.

【0083】以下、図4で示した内部アドレステーブル
70を用いた内部アクセスサイクル数icの認識方法に
ついて詳述する。
Hereinafter, a method of recognizing the internal access cycle number ic using the internal address table 70 shown in FIG. 4 will be described in detail.

【0084】CPU内部アクセス要求があった場合、C
PUアドレス信号CADDR[31:0]とマスクビット
mask_bitn[31:0](n=1〜4)との論理
積ANDn={CADDR[31:0]&(〜(mask
_bitn[31:0]))}(「&」は論理積、「〜」
は反転値)を得る。
When there is a CPU internal access request, C
A logical product ANDn = {CADDDR [31: 0] & (~ (mask) of the PU address signal CADDDR [31: 0] and the mask bits mask_bitn [31: 0] (n = 1 to 4).
_Bitn [31: 0]))} ("&" is a logical product, "~"
Is the inversion value).

【0085】そして、論理積AND1〜AND4と参照
用スタートアドレスstart_addr1〜star
t_addr4とを比較して、両者が一致した参照用ス
タートアドレスに対応するアクセスモードのサイクル数
を内部アクセスサイクル数icとする。
Then, the logical products AND1 to AND4 and the reference start addresses start_addr1 to star.
By comparing with t_addr4, the number of cycles of the access mode corresponding to the matched reference start address is set as the internal access cycle number ic.

【0086】例えば、AND2とstart_addr
2[31:0]とが一致し、リードモードである場合に、
サイクル数r2が内部アクセスサイクル数icとして、
CPU内部アクセス判定部62によって認識される。
For example, AND2 and start_addr
When 2 [31: 0] matches and is in read mode,
The cycle number r2 is the internal access cycle number ic,
It is recognized by the CPU internal access determination unit 62.

【0087】図5は実施の形態2によるノーマルDMA
転送動作を示すタイミング図である。ここで、転送元ア
ドレスレジスタ10の設定値は0x00400000
(外部バス)、転送先アドレスレジスタ11の設定値は
0x00600000(内部バス)、DMA転送カウン
タ12の値は0x2、転送方式レジスタ13の値は0x
0(ノーマル転送)に設定されていたとする。
FIG. 5 shows a normal DMA according to the second embodiment.
It is a timing diagram which shows a transfer operation. Here, the setting value of the transfer source address register 10 is 0x00400000.
(External bus), set value of transfer destination address register 11 is 0x00600000 (internal bus), value of DMA transfer counter 12 is 0x2, value of transfer method register 13 is 0x
It is assumed that it is set to 0 (normal transfer).

【0088】また、バス制御部52内で外部リードアク
セスの最短サイクル数は“4”に設定される。内部アド
レス0x006100000への内部リードアクセス数
は“3”、内部アドレス0x00620000への内部
リードアクセス数は“2”となるように、内部アドレス
テーブル70は設定されているとする。
Further, the shortest cycle number of external read access is set to "4" in the bus control unit 52. It is assumed that the internal address table 70 is set so that the number of internal read accesses to the internal address 0x00610000 is “3” and the number of internal read accesses to the internal address 0x00620000 is “2”.

【0089】サイクルT2でDMA起動要求信号dma
_reqが“H”となり、DMA要求が発生する。転送
元アドレスが外部アドレスであるので、サイクルT3か
らバス制御部52は外部アクセス要求信号EREQを
“H”にして(外部リード/ライト制御信号ERWを
“H”を維持)、外部リードアクセスを開始する。
In cycle T2, the DMA start request signal dma
_Req becomes "H" and a DMA request is generated. Since the transfer source address is the external address, the bus control unit 52 sets the external access request signal EREQ to "H" (maintains the external read / write control signal ERW to "H") from cycle T3 to start the external read access. To do.

【0090】このとき、外部アクセスカウント値初期値
設定部72は外部リードアクセスの最短サイクル数であ
る“4”を外部アクセスカウント値ext_cunte
rとして初期設定する。
At this time, the external access count value initial value setting section 72 sets the external access count value ext_counte to "4" which is the shortest cycle number of the external read access.
Initialize as r.

【0091】図5の例示では、サイクルT3でCPUか
らのDMA転送とは無関係の内部リードアクセス要求
(CPUアクセス要求信号CREQが“H”、CPUリ
ード/ライト制御信号CRWが“H”)が発生する。
In the example of FIG. 5, an internal read access request (CPU access request signal CREQ is "H", CPU read / write control signal CRW is "H") unrelated to the DMA transfer from the CPU is generated in cycle T3. To do.

【0092】このとき、CPU内部アクセス判定部62
は、内部アドレステーブル70を参照して、内部アクセ
スサイクル数icが“3”となることを認識し、内部ア
クセスサイクル数icと外部アクセスカウント値ext
_cunterとを比較する。その結果、CPU内部ア
クセス判定部62は、両者が等しく、CPU内部アクセ
ス受付条件「ic≦ext_cunter」を満足する
ため、CPUの内部リードアクセスを受け付ける判定を
行う。
At this time, the CPU internal access judging section 62
Recognizes that the internal access cycle number ic becomes “3” by referring to the internal address table 70, and the internal access cycle number ic and the external access count value ext.
Compare with _counter. As a result, the CPU internal access determination unit 62 determines that the internal read access of the CPU is accepted because the two are the same and satisfy the CPU internal access acceptance condition “ic ≦ ext_counter”.

【0093】したがって、バス制御部52は、サイクル
T3でCPUアクセス応答信号CACKを“H”にして
サイクルT3でのCPUによる内部アクセスを受け付け
る。その結果、DMA転送による外部リードアクセスと
CPUによる内部リードアクセスが並行して実行され
る。
Therefore, the bus control unit 52 sets the CPU access response signal CACK to "H" in the cycle T3 and accepts the internal access by the CPU in the cycle T3. As a result, external read access by DMA transfer and internal read access by CPU are executed in parallel.

【0094】その後、サイクルT6で、外部アドレス0
x00400000のデータD1が外部リードデータ信
号ERDATAとして出力され、DMA転送の外部アク
セス完了信号EDCが“H”になり、外部リードアクセ
スが完了する。このサイクルT6の最後で、バス制御部
52は外部リードデータ信号ERDATAのデータD1
を内部のバッファに取り込む。
Thereafter, in cycle T6, the external address 0
The data D1 of x00400000 is output as the external read data signal ERDATA, the external access completion signal EDC of the DMA transfer becomes "H", and the external read access is completed. At the end of this cycle T6, the bus control unit 52 outputs the data D1 of the external read data signal ERDATA.
To the internal buffer.

【0095】一方、CPUによる内部リードアクセス
は、サイクルT5で、CPUアドレス信号CADDRで
指定された内部アドレス0x00610000のデータ
D10が内部リードデータ信号IRDATAとして読み
出され、さらにCPUリードデータ信号CRDATAと
してCPUに付与されることにより、CPUによる内部
リードアクセスが完了する。
On the other hand, in the internal read access by the CPU, in cycle T5, the data D10 of the internal address 0x00610000 designated by the CPU address signal CADDDR is read as the internal read data signal IRDATA, and is further read to the CPU as the CPU read data signal CRDATA. By being granted, the internal read access by the CPU is completed.

【0096】したがって、バス制御部52はサイクルT
6でDMA転送による外部リードアクセスが完了後、次
のサイクルT7で、内部アクセス要求信号IREQを
“H”、内部リード/ライト制御信号IRWを“L”に
して内部ライトアクセスを開始する。
Therefore, the bus control unit 52 uses the cycle T
After the external read access by DMA transfer is completed in 6, the internal access request signal IREQ is set to "H" and the internal read / write control signal IRW is set to "L" in the next cycle T7 to start the internal write access.

【0097】内部ライトデータ信号IWDATAには、
バス制御部52内部のバッファに取り込んでいたデータ
D1を出力する。その結果、内部アドレス0x0060
0000にデータD1が書き込まれる。そして、サイク
ルT8で内部アクセス完了信号IDCが“H”になり、
内部ライトアクセスが完了する。
The internal write data signal IWDATA includes
The data D1 stored in the buffer inside the bus control unit 52 is output. As a result, the internal address 0x0060
The data D1 is written in 0000. Then, in cycle T8, the internal access completion signal IDC becomes "H",
Internal write access is completed.

【0098】DMA転送カウンタ12の値が0x2であ
るので、サイクルT9でバス制御部52は2回目の外部
リードアクセスを開始する。同時に、外部アクセスカウ
ント値初期値設定部72は外部リードアクセスの最短サ
イクル数である“4”を外部アクセスカウント値ext
_cunterとして再び初期設定する。
Since the value of the DMA transfer counter 12 is 0x2, the bus controller 52 starts the second external read access in cycle T9. At the same time, the external access count value initial value setting unit 72 sets “4”, which is the shortest cycle number of external read access, to the external access count value ext.
Initialize again as _counter.

【0099】図5の例示では、サイクルT12でCPU
から別の内部バスアクセス要求がさらに発生される。
In the example shown in FIG. 5, in cycle T12, the CPU
Another internal bus access request is generated from.

【0100】このとき、CPU内部アクセス判定部62
は、内部アドレステーブル70を参照して、内部アドレ
ス0x00620000へのリード時の内部アクセスサ
イクル数icが“2”となることを認識し、内部アクセ
スサイクル数icとサイクルT11における外部アクセ
スカウント値ext_cunterとを比較する。その
結果、CPU内部アクセス判定部62は、「ic(=
2)>ext_cunter(=1)」であり、CPU
内部アクセス受付条件「ic≦ext_cunter」
を満足しないため、CPU内部バスアクセス要求を受け
付けない判定を行う。
At this time, the CPU internal access judging section 62
Recognizes that the internal access cycle number ic when reading to the internal address 0x00620000 is “2” by referring to the internal address table 70, and determines the internal access cycle number ic and the external access count value ext_counter in the cycle T11. To compare. As a result, the CPU internal access determination unit 62 determines that “ic (=
2)> ext_counter (= 1) ”, and the CPU
Internal access acceptance condition “ic ≦ ext_counter”
Therefore, it is determined that the CPU internal bus access request is not accepted.

【0101】サイクルT12で、外部アドレス0x00
400004のデータD2が外部リードデータ信号ER
DATAとして出力され、DMAの2回目の外部リード
アクセスが完了する。
At cycle T12, the external address 0x00
The data D2 of 400004 is the external read data signal ER.
The data is output as DATA, and the second external read access of DMA is completed.

【0102】サイクルT13から、バス制御部52は2
回目の内部ライトアクセスを開始する。サイクルT14
で、内部アドレス0x00600004にデータD2が
書き込まれる内部ライトアクセスが完了し、DMA転送
が終了する。
From cycle T13, the bus control unit 52 outputs 2
Start the internal write access for the second time. Cycle T14
Then, the internal write access for writing the data D2 to the internal address 0x00600004 is completed, and the DMA transfer is completed.

【0103】その後、サイクルT15で、CPUアクセ
ス応答信号CACKを“H”にしてCPUアクセス(リ
ードアクセス)を受付け、CPUからの内部バスアクセ
スを開始する。
Then, in cycle T15, the CPU access response signal CACK is set to "H" to accept the CPU access (read access), and the internal bus access from the CPU is started.

【0104】サイクルT16で、CPUアドレス信号C
ADDRで指定された内部アドレス0x0062000
0のデータD20が内部リードデータ信号IRDATA
として読み出された後、CPUリードデータ信号CRD
ATAとしてCPUに付与されることにより、CPUか
らの内部バスアクセスは完了する。
In cycle T16, the CPU address signal C
Internal address specified by ADDR 0x0062000
The data D20 of 0 is the internal read data signal IRDATA.
CPU read data signal CRD after being read as
By being given to the CPU as ATA, the internal bus access from the CPU is completed.

【0105】図3に戻って、CPU内部アクセス判定部
62は、転送方式レジスタ13の設定値が0x1(バー
スト転送)の場合は以下のように判定を行う。
Returning to FIG. 3, the CPU internal access judging section 62 judges as follows when the set value of the transfer method register 13 is 0x1 (burst transfer).

【0106】CPU内部アクセス判定部62は、最初の
データ(図15のデータD1に相当)の外部リードアク
セス時に、CPU内部アクセス要求があった場合は、上
述したように、内部アクセスサイクル数icと外部アク
セスカウント値ext_cunterとの比較結果によ
って、CPU内部アクセス判定部62がCPUからの内
部アクセス要求を受け付けるか否かの判定を行う。
When there is a CPU internal access request at the time of external read access of the first data (corresponding to the data D1 in FIG. 15), the CPU internal access determination unit 62 determines the internal access cycle number ic as described above. Based on the result of comparison with the external access count value ext_counter, the CPU internal access determination unit 62 determines whether to accept an internal access request from the CPU.

【0107】また、CPU内部アクセス判定部62は、
2回目以降のデータ(図15のデータD2〜D4に相
当)の外部リードアクセス時に、CPUから内部アクセ
ス要求があった場合は、外部アクセスカウンタ80に関
係なく外部アクセスカウント値ext_cunterを
“0”とみなし無条件にCPUからの内部アクセス要求
は受け付けないとする判定を行う。
Further, the CPU internal access judging section 62
When an internal access request is issued from the CPU during the external read access of the second and subsequent data (corresponding to the data D2 to D4 in FIG. 15), the external access count value ext_counter is set to “0” regardless of the external access counter 80. It is determined that the internal access request from the CPU is not accepted unconditionally.

【0108】図6は実施の形態2によるバーストDMA
転送動作を示すタイミング図である。ここで、転送元ア
ドレスレジスタ10の設定値は0x00400000、
転送先アドレスレジスタ11の設定値は0x00600
000(内部バス)、DMA転送カウンタ12の値は0
x4、転送方式レジスタ13の値は0x1(バースト転
送)とする。
FIG. 6 shows burst DMA according to the second embodiment.
It is a timing diagram which shows a transfer operation. Here, the setting value of the transfer source address register 10 is 0x00400000,
The setting value of the transfer destination address register 11 is 0x00600
000 (internal bus), the value of the DMA transfer counter 12 is 0
x4, the value of the transfer method register 13 is 0x1 (burst transfer).

【0109】また、バス制御部52内で最初のデータに
対する外部リードアクセスの最短サイクル数は“4”に
設定される。内部アドレス0x006100000への
内部リードアクセス数は“3”、内部アドレス0x00
620000への内部リードアクセス数は“3”となる
ように、内部アドレステーブル70は設定されていると
する。
The shortest cycle number of external read access to the first data in the bus control unit 52 is set to "4". The number of internal read accesses to internal address 0x006100000 is "3", internal address 0x00
It is assumed that the internal address table 70 is set so that the number of internal read accesses to 620000 is “3”.

【0110】サイクルT2でDMA起動要求信号dma
_reqが“H”となり、DMA要求が発生する。転送
元アドレスが外部アドレスであるので、サイクルT3か
らバス制御部50は外部アクセス要求信号EREQを
“H”(外部リード/ライト制御信号ERWは“H”を
維持)にして、外部リードアクセスを開始する。同時に
転送方式レジスタ13の値が0x1(バースト転送)で
あるので、バス制御部50は外部アクセスバースト要求
信号EBURSTを“H”にする。
In cycle T2, the DMA start request signal dma
_Req becomes "H" and a DMA request is generated. Since the transfer source address is an external address, the bus control unit 50 sets the external access request signal EREQ to "H" (the external read / write control signal ERW maintains "H") from cycle T3 to start the external read access. To do. At the same time, since the value of the transfer method register 13 is 0x1 (burst transfer), the bus control unit 50 sets the external access burst request signal EBURST to "H".

【0111】図6の例示では、サイクルT3でCPUか
らのDMA転送とは無関係の内部リードアクセス要求
(CPUアクセス要求信号CREQが“H”、CPUリ
ード/ライト制御信号CRWが“H”)が発生する。
In the example of FIG. 6, an internal read access request (CPU access request signal CREQ is "H", CPU read / write control signal CRW is "H") unrelated to the DMA transfer from the CPU is generated in cycle T3. To do.

【0112】このとき、CPU内部アクセス判定部62
は、サイクルT3において、バースト転送は外部バスの
最初のデータに対するアクセス帰還であるため、ノーマ
ル転送時と同様、内部アドレステーブル70を参照し
て、内部アクセスサイクル数icが“3”となることを
認識し、内部アクセスサイクル数icと外部アクセスカ
ウント値ext_cunterとを比較する。その結
果、CPU内部アクセス判定部62は、両者が等しく、
CPU内部アクセス受付条件「ic≦ext_cunt
er」を満足するため、CPU内部リードアクセス要求
を受け付ける判定を行う。
At this time, the CPU internal access judging section 62
In the cycle T3, since the burst transfer is the access feedback for the first data of the external bus, the internal access cycle number ic becomes "3" by referring to the internal address table 70 as in the normal transfer. It recognizes and compares the internal access cycle number ic with the external access count value ext_counter. As a result, the CPU internal access determination unit 62 is
CPU internal access acceptance condition “ic ≦ ext_count
er ”is satisfied, it is determined that the CPU internal read access request is accepted.

【0113】したがって、バス制御部52は、サイクル
T3でCPUアクセス応答信号CACKを“H”にして
サイクルT3でのCPUによる内部アクセスを受け付け
る。その結果、DMA転送による外部リードアクセスと
CPUによる内部リードアクセスが並行して実行され
る。
Therefore, the bus control unit 52 sets the CPU access response signal CACK to "H" in cycle T3 and accepts the internal access by the CPU in cycle T3. As a result, external read access by DMA transfer and internal read access by CPU are executed in parallel.

【0114】CPUによる内部リードアクセスは、サイ
クルT5で、CPUアドレス信号CADDRで指定され
た内部アドレス0x00610000のデータD10が
内部リードデータ信号IRDATAとして読み出され、
さらにCPUリードデータ信号CRDATAとしてCP
Uに付与されることにより、CPUによる内部リードア
クセスが完了する。
In the internal read access by the CPU, the data D10 of the internal address 0x00610000 designated by the CPU address signal CADDDR is read as the internal read data signal IRDATA in the cycle T5.
In addition, CP as CPU read data signal CRDATA
By being added to U, the internal read access by the CPU is completed.

【0115】一方、サイクルT6で、外部アドレス0x
00400000のデータD1が外部リードデータ信号
ERDATAとして出力され、外部アクセス完了信号E
DCが“H”になり、データD1に対する外部リードア
クセスが完了する。このサイクルT6の最後で、バス制
御部52は外部リードデータ信号ERDATAのデータ
D1を内部のバッファに取り込む。
On the other hand, in cycle T6, the external address 0x
The data D1 of 00400000 is output as the external read data signal ERDATA, and the external access completion signal E
DC becomes "H", and the external read access to the data D1 is completed. At the end of this cycle T6, the bus controller 52 fetches the data D1 of the external read data signal ERDATA into the internal buffer.

【0116】サイクルT6からサイクルT9まで連続的
に外部バスから0x00400000,0x00400
004,0x00400008,及び0x004000
0cの順で当該外部アドレスのデータD1,D2,D3
及びD4が読み出される。DMA転送カウンタ12の値
が0x4であるので、4回目の外部リードアクセスが完
了した次のサイクルT10で外部アクセス要求信号ER
EQおよび外部アクセスバースト要求信号EBURST
を“L”にする。
From cycle T6 to cycle T9, 0x00400000 and 0x00400 are continuously output from the external bus.
004, 0x00400008, and 0x004000
Data D1, D2, D3 of the external address in the order of 0c
And D4 are read. Since the value of the DMA transfer counter 12 is 0x4, the external access request signal ER is generated in the next cycle T10 after the completion of the fourth external read access.
EQ and external access burst request signal EBURST
To "L".

【0117】一方、内部バスへのライトアクセスは、外
部バスから最初のリードデータD1が読み出された次の
サイクルT7から、0x00600000,0x006
00004,0x00600008,及び0x0060
000cの順でデータD1,D2,D3及びD4の書き
込みが実行され、サイクルT10でライトアクセスが完
了する。
On the other hand, the write access to the internal bus is 0x00600000, 0x006 from the cycle T7 following the first read data D1 read from the external bus.
00004, 0x00600008, and 0x0060
The data D1, D2, D3 and D4 are written in the order of 000c, and the write access is completed in cycle T10.

【0118】図6の例示では、サイクルT8でCPUか
ら別の内部バスアクセス要求がさらに発生される。
In the example of FIG. 6, another internal bus access request is further issued from the CPU in cycle T8.

【0119】このとき、CPU内部アクセス判定部62
は、バースト転送は外部バスの最初のデータのアクセス
時ではないため、無条件にCPUの内部リードアクセス
を受け付けない判定を行う。
At this time, the CPU internal access judging section 62
Since the burst transfer is not at the time of accessing the first data of the external bus, it is judged unconditionally that the internal read access of the CPU is not accepted.

【0120】したがって、バースト転送時におけるライ
トアクセス完了後のサイクルT11でバス制御部50は
CPUアクセス応答信号CACKを“H”にしてCPU
アクセスを受付け、CPUからの内部バスアクセスを開
始する。サイクルT13でCPUからの内部アドレス0
x00610000のデータD20を読み出すCPU内
部バスアクセスは完了する。
Therefore, in the cycle T11 after the completion of the write access during the burst transfer, the bus control unit 50 sets the CPU access response signal CACK to "H".
The access is accepted and the internal bus access from the CPU is started. Internal address 0 from CPU in cycle T13
The CPU internal bus access for reading the data D20 of x00610000 is completed.

【0121】このように、CPU内部アクセス判定部6
2によって、CPUか内部バスアクセス要求を許可ある
いは禁止しながら、DMAバースト転送動作を実行す
る。
In this way, the CPU internal access judging section 6
2, the DMA burst transfer operation is executed while permitting or prohibiting the CPU or the internal bus access request.

【0122】以上のように、実施の形態2のバス制御装
置は、DMA転送がノーマル転送方式の際、DMA転送
動作開始中であっても外部バスアクセス動作実行中の場
合は、CPUからの内部バスアクセスのサイクル数と外
部アクセスカウント値ext_cunterとの比較に
基づき、CPU内部バスアクセス要求を許可/禁止をC
PU内部アクセス判定部62によって判定するため、内
部バスアクセス種別(アドレスの違い、アクセスモード
種別(リード,ライト))を考慮して、動作に支障を生
じさせることなく内部バスのサイクルを有効に利用でき
ることができる。
As described above, in the bus control device according to the second embodiment, when the DMA transfer is the normal transfer method and the external bus access operation is being executed even if the DMA transfer operation is being started, the internal operation from the CPU is performed. Based on the comparison between the number of bus access cycles and the external access count value ext_counter, the CPU internal bus access request is permitted / prohibited by C.
Since the PU internal access determination unit 62 makes a determination, the internal bus access type (difference in address, access mode type (read, write)) is taken into consideration, and the cycle of the internal bus is effectively used without causing any trouble in operation. You can do it.

【0123】加えて、実施の形態2のバス制御装置は、
DMA転送がバースト転送方式の際、DMA転送動作開
始中であっても最初の1単位のデータに対する外部バス
アクセス動作実行中の場合は、CPUからの内部バスア
クセスのサイクル数と外部アクセスカウント値ext_
cunterとの比較に基づき、CPU内部バスアクセ
ス要求を許可/禁止をCPU内部アクセス判定部62に
よって判定するため、内部バスアクセス種別を考慮し
て、動作に支障を生じさせることなく内部バスのサイク
ルを有効に利用できることができる。
In addition, the bus control device according to the second embodiment is
When the DMA transfer is a burst transfer method and the external bus access operation for the first unit of data is being executed even when the DMA transfer operation is started, the number of cycles of the internal bus access from the CPU and the external access count value ext_
Based on the comparison with the counter, the CPU internal bus access request is permitted / prohibited is determined by the CPU internal access determination unit 62. Therefore, in consideration of the internal bus access type, the cycle of the internal bus is determined without causing any trouble in the operation. It can be effectively used.

【0124】<実施の形態3>図7は、この発明の実施
の形態3であるバス制御装置の構成を示すブロック図で
ある。同図に示すように、バス制御装置1は、レジスタ
群2、バス制御部53、DMA要求検出部60、内部ア
ドレステーブル70、及び外部アクセスカウンタ80か
ら構成され、システムクロックCLKを動作クロックと
している。
<Third Embodiment> FIG. 7 is a block diagram showing a structure of a bus control device according to a third embodiment of the present invention. As shown in the figure, the bus control device 1 is composed of a register group 2, a bus control unit 53, a DMA request detection unit 60, an internal address table 70, and an external access counter 80, and uses a system clock CLK as an operation clock. .

【0125】バス制御部53は、CPU・I/F信号群
7、内部バスアクセス信号群8及び外部バスアクセス信
号群9aの授受によって、CPU、外部及び内部に対す
るアクセス制御を行う。なお、CPU・I/F信号群
7、及び内部バスアクセス信号群8並びにレジスタ群
2、DMA要求検出部60、内部アドレステーブル70
及び外部アクセスカウンタ80は、図3で示した実施の
形態2と同様であるため説明を省略する。
The bus controller 53 controls access to the CPU, the outside and the inside by sending and receiving the CPU / I / F signal group 7, the internal bus access signal group 8 and the external bus access signal group 9a. The CPU / I / F signal group 7, the internal bus access signal group 8, the register group 2, the DMA request detecting unit 60, and the internal address table 70.
The external access counter 80 and the external access counter 80 are the same as those in the second embodiment shown in FIG.

【0126】外部バスアクセス信号群9aは外部バスア
クセス信号群9と同様の信号に加え、さらに外部アクセ
スサイクル信号ECYCLE(CYCLE[31:0])
を入力している。外部アクセスサイクル信号ECYCL
Eは外部アクセスカウンタ80の外部アクセスカウント
値ext_cunter設定用の外部アクセス実行サイ
クル数を指示する信号である。
The external bus access signal group 9a has the same signals as the external bus access signal group 9, and further has an external access cycle signal ECYCLE (CYCLE [31: 0]).
You are typing. External access cycle signal ECYCL
E is a signal indicating the number of external access execution cycles for setting the external access count value ext_counter of the external access counter 80.

【0127】バス制御部53の外部アクセスカウント値
初期値設定部73は外部アクセスサイクル信号ECYC
LEの指示する外部アクセス実行サイクル数を外部アク
セスカウンタ80の外部アクセスカウント値ext_c
unterとして初期設定する。
The external access count value initial value setting unit 73 of the bus control unit 53 uses the external access cycle signal ECYC.
The number of external access execution cycles instructed by LE is the external access count value ext_c of the external access counter 80.
Initialize as unter.

【0128】バス制御部53は内部にCPU内部アクセ
ス判定部63を有している。CPU内部アクセス判定部
63は転送方式レジスタ13の設定値に基づき、DMA
起動時にDMA転送方式を認識し、DMA転送がノーマ
ル転送の場合に以下の動作を実行する。
The bus control unit 53 has a CPU internal access determination unit 63 inside. The CPU internal access determination unit 63 determines whether the DMA based on the set value of the transfer method register 13
The DMA transfer method is recognized at startup, and the following operation is executed when the DMA transfer is normal transfer.

【0129】CPU内部アクセス判定部63は、実施の
形態2のCPU内部アクセス判定部62と同様、DMA
転送動作の外部バスアクセス中においてCPU内部アク
セス要求があった場合、アクセスモード(リード,ライ
ト)、内部アドレス値に基づき内部アドレステーブル7
0を参照して内部アクセスサイクル数icを認識した
後、内部アクセスサイクル数icと外部アクセスカウン
ト値ext_cunterとを比較し、内部アクセスサ
イクル数icが外部アクセスカウント値ext_cun
ter以下であればCPUからの内部アクセスを受け付
けると判定する。
The CPU internal access judging section 63 is similar to the CPU internal access judging section 62 of the second embodiment in that the DMA
When there is a CPU internal access request during the external bus access of the transfer operation, the internal address table 7 is based on the access mode (read, write) and the internal address value.
After recognizing the internal access cycle number ic by referring to 0, the internal access cycle number ic is compared with the external access count value ext_counter, and the internal access cycle number ic is determined to be the external access count value ext_cun.
If ter or less, it is determined that the internal access from the CPU is accepted.

【0130】図8は実施の形態3によるノーマルDMA
転送動作を示すタイミング図である。ここで、転送元ア
ドレスレジスタ10の設定値は0x00400000
(外部バス)、転送先アドレスレジスタ11の設定値は
0x00600000(内部バス)、DMA転送カウン
タ12の値は0x2、転送方式レジスタ13の値は0x
0(ノーマル転送)に設定されていたとする。
FIG. 8 shows a normal DMA according to the third embodiment.
It is a timing diagram which shows a transfer operation. Here, the setting value of the transfer source address register 10 is 0x00400000.
(External bus), set value of transfer destination address register 11 is 0x00600000 (internal bus), value of DMA transfer counter 12 is 0x2, value of transfer method register 13 is 0x
It is assumed that it is set to 0 (normal transfer).

【0131】また、内部アドレス0x00610000
0への内部リードアクセス数は“3”、内部アドレス0
x00620000への内部リードアクセス数は“2”
となるように、内部アドレステーブル70は設定されて
いるとする。
Further, the internal address 0x00610000
The number of internal read accesses to 0 is “3”, internal address 0
The number of internal read accesses to x00620000 is "2"
It is assumed that the internal address table 70 is set so that

【0132】サイクルT2でDMA起動要求信号dma
_reqが“H”となり、DMA要求が発生する。転送
元アドレスが外部アドレスであるので、サイクルT3か
らバス制御部53は外部アクセス要求信号EREQを
“H”にして(外部リード/ライト制御信号ERWを
“H”を維持)、外部リードアクセスを開始する。
In cycle T2, the DMA start request signal dma
_Req becomes "H" and a DMA request is generated. Since the transfer source address is the external address, the bus control unit 53 sets the external access request signal EREQ to "H" (maintains the external read / write control signal ERW to "H") from cycle T3 to start the external read access. To do.

【0133】同時に、外部アクセスカウント値初期値設
定部73は、“4”を指示する外部アクセスサイクル信
号ECYCLEに基づき、外部アクセスカウント値ex
t_cunterとして“4”を外部アクセスカウンタ
80に初期設定する。
At the same time, the external access count value initial value setting unit 73 sets the external access count value ex based on the external access cycle signal ECYCLE instructing "4".
“4” is initially set in the external access counter 80 as t_counter.

【0134】図8の例示では、サイクルT3でCPUか
らのDMA転送とは無関係の内部リードアクセス要求
(CPUアクセス要求信号CREQが“H”、CPUリ
ード/ライト制御信号CRWが“H”)が発生する。
In the example of FIG. 8, an internal read access request (CPU access request signal CREQ is "H", CPU read / write control signal CRW is "H") unrelated to DMA transfer from the CPU is generated in cycle T3. To do.

【0135】このとき、CPU内部アクセス判定部63
は、内部アドレステーブル70を参照して、内部アクセ
スサイクル数icが“3”となることを認識し、内部ア
クセスサイクル数icと外部アクセスカウント値ext
_cunterとを比較する。その結果、CPU内部ア
クセス判定部63は、「ic(=3)<xt_cunt
er(=4)」であり、CPU内部アクセス受付条件
「ic≦ext_cunter」を満足するため、CP
Uの内部リードアクセスを受け付ける判定を行う。
At this time, the CPU internal access judging section 63
Recognizes that the internal access cycle number ic becomes “3” by referring to the internal address table 70, and the internal access cycle number ic and the external access count value ext.
Compare with _counter. As a result, the CPU internal access determination unit 63 determines that “ic (= 3) <xt_count.
er (= 4) ”and the CPU internal access acceptance condition“ ic ≦ ext_counter ”is satisfied, CP
It is determined whether the internal read access of U is accepted.

【0136】したがって、バス制御部53は、サイクル
T3でCPUアクセス応答信号CACKを“H”にして
サイクルT3でのCPUによる内部アクセスを受け付け
る。その結果、DMA転送による外部リードアクセスと
CPUによる内部リードアクセスが並行して実行され
る。
Therefore, bus control unit 53 sets CPU access response signal CACK to "H" in cycle T3 and accepts internal access by the CPU in cycle T3. As a result, external read access by DMA transfer and internal read access by CPU are executed in parallel.

【0137】その後、サイクルT6で、外部アドレス0
x00400000のデータD1が外部リードデータ信
号ERDATAとして出力され、外部アクセス完了信号
EDCが“H”になり、外部リードアクセスが完了す
る。このサイクルT6の最後で、バス制御部53は外部
リードデータ信号ERDATAのデータD1を内部のバ
ッファに取り込む。
Thereafter, in cycle T6, the external address 0
The data D1 of x00400000 is output as the external read data signal ERDATA, the external access completion signal EDC becomes "H", and the external read access is completed. At the end of this cycle T6, the bus controller 53 fetches the data D1 of the external read data signal ERDATA into the internal buffer.

【0138】一方、CPUによる内部リードアクセス
は、サイクルT5で、CPUアドレス信号CADDRで
指定された内部アドレス0x00610000のデータ
D10が内部リードデータ信号IRDATAとして読み
出され、さらにCPUリードデータ信号CRDATAと
してCPUに付与されることにより、CPUによる内部
リードアクセスが完了する。
On the other hand, in the internal read access by the CPU, in cycle T5, the data D10 of the internal address 0x00610000 designated by the CPU address signal CADDDR is read as the internal read data signal IRDATA, and further as the CPU read data signal CRDATA to the CPU. By being granted, the internal read access by the CPU is completed.

【0139】したがって、バス制御部53はサイクルT
6でDMA転送による外部リードアクセスが完了後、速
やかに次のサイクルT7で、内部アクセス要求信号IR
EQを“H”、内部リード/ライト制御信号IRWを
“L”にして内部ライトアクセスを開始する。
Therefore, the bus control unit 53 uses the cycle T
After the external read access by the DMA transfer is completed in 6, the internal access request signal IR is immediately sent in the next cycle T7.
The EQ is set to "H" and the internal read / write control signal IRW is set to "L" to start the internal write access.

【0140】内部ライトデータ信号IWDATAには、
バス制御部53内部のバッファに取り込んでいたデータ
D1を出力する。その結果、内部アドレス0x0060
0000にデータD1が書き込まれる。そして、サイク
ルT8で内部アクセス完了信号IDCが“H”になり、
内部ライトアクセスが完了する。
The internal write data signal IWDATA includes
The data D1 stored in the buffer inside the bus control unit 53 is output. As a result, the internal address 0x0060
The data D1 is written in 0000. Then, in cycle T8, the internal access completion signal IDC becomes "H",
Internal write access is completed.

【0141】DMA転送カウンタ12の値が0x2であ
るので、サイクルT9でバス制御部53は2回目の外部
リードアクセスを開始する。同時に、外部アクセスカウ
ント値初期値設定部73は、外部アクセスサイクル信号
ECYCLEに基づき外部アクセスカウント値ext_
cunterとして“4”を外部アクセスカウンタ80
に初期設定する。
Since the value of the DMA transfer counter 12 is 0x2, the bus controller 53 starts the second external read access in cycle T9. At the same time, the external access count value initial value setting unit 73 sets the external access count value ext_ based on the external access cycle signal ECYCLE.
The external access counter 80 is "4" as a counter.
Initialize to.

【0142】図8の例示では、サイクルT12でCPU
から別の内部バスアクセス要求がさらに発生される。
In the example shown in FIG. 8, the CPU is used in the cycle T12.
Another internal bus access request is generated from.

【0143】このとき、CPU内部アクセス判定部63
は、内部アドレステーブル70を参照して、内部アドレ
ス0x00620000へのリード時の内部アクセスサ
イクル数icが“2”となることを認識し、内部アクセ
スサイクル数icとサイクルT12における外部アクセ
スカウント値ext_cunterとを比較する。その
結果、CPU内部アクセス判定部63は、「ic(=
2)>ext_cunter(=1)」であり、CPU
内部アクセス受付条件「ic≦ext_cunter」
を満足しないため、CPU内部バスアクセス要求を受け
付けない判定を行う。
At this time, the CPU internal access judging section 63
Recognizes that the internal access cycle number ic when reading to the internal address 0x00620000 is “2” by referring to the internal address table 70, and determines the internal access cycle number ic and the external access count value ext_counter in the cycle T12. To compare. As a result, the CPU internal access determination unit 63 determines that “ic (=
2)> ext_counter (= 1) ”, and the CPU
Internal access acceptance condition “ic ≦ ext_counter”
Therefore, it is determined that the CPU internal bus access request is not accepted.

【0144】サイクルT12で、外部アドレス0x00
400004のデータD2が外部リードデータ信号ER
DATAとして出力され、DMAの2回目の外部リード
アクセスが完了する。
At cycle T12, external address 0x00
The data D2 of 400004 is the external read data signal ER.
The data is output as DATA, and the second external read access of DMA is completed.

【0145】サイクルT13から、バス制御部53は2
回目の内部ライトアクセスを開始する。サイクルT14
で、内部アドレス0x00600004にデータD2が
書き込まれる内部ライトアクセスが完了し、DMA転送
が終了する。
From the cycle T13, the bus control unit 53 becomes 2
Start the internal write access for the second time. Cycle T14
Then, the internal write access for writing the data D2 to the internal address 0x00600004 is completed, and the DMA transfer is completed.

【0146】その後、サイクルT15で、CPUアクセ
ス応答信号CACKを“H”にしてCPUアクセス(リ
ードアクセス)を受付け、CPUからの内部バスアクセ
スを開始する。
Thereafter, in cycle T15, the CPU access response signal CACK is set to "H" to accept the CPU access (read access), and the internal bus access from the CPU is started.

【0147】サイクルT16で、CPUアドレス信号C
ADDRで指定された内部アドレス0x0062000
0のデータD20が内部リードデータ信号IRDATA
として読み出された後、CPUリードデータ信号CRD
ATAとしてCPUに付与されることにより、CPUか
らの内部バスアクセスは完了する。
In the cycle T16, the CPU address signal C
Internal address specified by ADDR 0x0062000
The data D20 of 0 is the internal read data signal IRDATA.
CPU read data signal CRD after being read as
By being given to the CPU as ATA, the internal bus access from the CPU is completed.

【0148】図7に戻って、CPU内部アクセス判定部
62は、転送方式レジスタ13の設定値が0x1(バー
スト転送)の場合は以下のように判定を行う。
Returning to FIG. 7, the CPU internal access judging section 62 judges as follows when the set value of the transfer method register 13 is 0x1 (burst transfer).

【0149】CPU内部アクセス判定部63は、最初の
データ(図6のデータD1に相当)の外部リードアクセ
ス時に、CPU内部アクセス要求があった場合は、図6
で示したバーストDMA転送動作のように、内部アクセ
スサイクル数icと外部アクセスカウント値ext_c
unterとの比較結果によって、CPU内部アクセス
判定部62がCPU内部アクセス要求を受け付けるか否
かの判定を行う。
If there is a CPU internal access request at the time of external read access of the first data (corresponding to the data D1 in FIG. 6), the CPU internal access determination unit 63 executes the processing shown in FIG.
As in the burst DMA transfer operation shown by, the internal access cycle number ic and the external access count value ext_c
The CPU internal access determination unit 62 determines whether or not to accept the CPU internal access request based on the result of the comparison with the unter.

【0150】また、CPU内部アクセス判定部63は、
2回目以降のデータ(図6のデータD2〜D4に相当)
の外部リードアクセス時に、CPUから内部アクセス要
求があった場合は、外部アクセスカウント値ext_c
unterを“0”とみなし無条件にCPU内部アクセ
ス要求は受け付けないとする判定を行う。
Further, the CPU internal access judging section 63 is
Data after the second time (corresponding to data D2 to D4 in FIG. 6)
If there is an internal access request from the CPU during the external read access of the external access count value ext_c
Unter is regarded as “0”, and it is judged unconditionally that the CPU internal access request is not accepted.

【0151】このように、CPU内部アクセス判定部6
3によって、CPUからの内部バスアクセス要求を許可
あるいは禁止しながら、DMAバースト転送動作を実行
する。
In this way, the CPU internal access determination unit 6
3, the DMA burst transfer operation is executed while permitting or prohibiting the internal bus access request from the CPU.

【0152】以上のように、実施の形態3のバス制御装
置は、DMA転送がノーマル転送動作の場合は、DMA
転送動作開始中であっても外部バスアクセス動作実行中
の場合は、CPUからの内部バスアクセスのサイクル数
と外部アクセスカウント値ext_cunterとの比
較に基づき、CPUの内部バスアクセス要求を許可/禁
止をCPU内部アクセス判定部63によって判定するた
め、内部バスアクセス種別を考慮して、動作に支障を生
じさせることなく内部バスのサイクルを有効に利用でき
ることができる。
As described above, the bus control device according to the third embodiment performs the DMA transfer when the DMA transfer is the normal transfer operation.
If the external bus access operation is being executed even though the transfer operation is started, the CPU internal bus access request is permitted / prohibited based on the comparison between the number of cycles of the internal bus access from the CPU and the external access count value ext_counter. Since the determination is performed by the CPU internal access determination unit 63, it is possible to effectively use the cycle of the internal bus in consideration of the internal bus access type without causing a hindrance to the operation.

【0153】加えて、実施の形態3のバス制御装置は、
DMA転送がバースト転送方式の際、DMA転送動作開
始中であっても最初の1単位のデータに対する外部バス
アクセス動作実行中の場合は、CPUからの内部バスア
クセスのサイクル数と外部アクセスカウント値ext_
cunterとの比較に基づき、CPU内部バスアクセ
ス要求を許可/禁止をCPU内部アクセス判定部63に
よって判定するため、内部バスアクセス種別を考慮し
て、動作に支障を生じさせることなく内部バスのサイク
ルを有効に利用できることができる。
In addition, the bus control device according to the third embodiment is
When the DMA transfer is a burst transfer method and the external bus access operation for the first unit of data is being executed even when the DMA transfer operation is started, the number of cycles of the internal bus access from the CPU and the external access count value ext_
Based on the comparison with the counter, whether the CPU internal bus access request is permitted or prohibited is determined by the CPU internal access determination unit 63. Therefore, in consideration of the internal bus access type, the cycle of the internal bus can be determined without causing any trouble in the operation. It can be effectively used.

【0154】さらに、CPU内部アクセス判定部63
は、外部アクセスカウント値ext_cunterを外
部アクセスサイクル信号ECYCLEに基づき設定こと
により、外部バスアクセス残りサイクル数を正確に認識
した判定を行うことができる。
Further, the CPU internal access judging section 63.
By setting the external access count value ext_counter based on the external access cycle signal ECYCLE, it is possible to make a determination by accurately recognizing the number of cycles remaining in the external bus access.

【0155】<実施の形態4>図9は、この発明の実施
の形態4であるバス制御装置の構成を示すブロック図で
ある。同図に示すように、バス制御装置1は、レジスタ
群2、バス制御部54、DMA要求検出部60、内部ア
ドレステーブル70、外部アクセスカウンタ80及び内
部アクセスカウンタ90から構成され、システムクロッ
クCLKを動作クロックとしている。
<Fourth Preferred Embodiment> FIG. 9 is a block diagram showing a structure of a bus control device according to a fourth preferred embodiment of the present invention. As shown in the figure, the bus control device 1 is composed of a register group 2, a bus control unit 54, a DMA request detection unit 60, an internal address table 70, an external access counter 80, and an internal access counter 90. It is used as an operating clock.

【0156】バス制御部54は、CPU・I/F信号群
7、内部バスアクセス信号群8及び外部バスアクセス信
号群9aの授受によって、CPU、外部及び内部に対す
るアクセス制御を行う。なお、CPU・I/F信号群
7、内部バスアクセス信号群8、及び外部バスアクセス
信号群9並びにレジスタ群2、DMA要求検出部60、
内部アドレステーブル70及び外部アクセスカウンタ8
0は、図7で示した実施の形態3と同様であるため説明
を省略する。
The bus control section 54 controls access to the CPU, the outside and the inside by transmitting and receiving the CPU / I / F signal group 7, the internal bus access signal group 8 and the external bus access signal group 9a. The CPU / I / F signal group 7, the internal bus access signal group 8, the external bus access signal group 9, the register group 2, the DMA request detection unit 60,
Internal address table 70 and external access counter 8
Since 0 is the same as that of the third embodiment shown in FIG. 7, description thereof will be omitted.

【0157】バス制御部54はCPU内部アクセス判定
部64、外部アクセスカウント値初期値設定部74、内
部アクセスカウント値初期値設定部84及びDMAアク
セス判定部94を内部に有している。
The bus control unit 54 has a CPU internal access determination unit 64, an external access count value initial value setting unit 74, an internal access count value initial value setting unit 84, and a DMA access determination unit 94 inside.

【0158】外部アクセスカウント値初期値設定部74
は、外部アクセスサイクル信号ECYCLEの指示する
外部アクセス実行サイクル数を外部アクセスカウンタ8
0の外部アクセスカウント値ext_cunterとし
て初期設定する。
External access count value initial value setting unit 74
Indicates the number of external access execution cycles designated by the external access cycle signal ECYCLE.
The external access count value ext_counter of 0 is initialized.

【0159】CPU内部アクセス判定部64は転送方式
レジスタ13の設定値に基づき、DMA起動時にDMA
転送方式を認識し、DMA転送がノーマル転送の場合に
以下の動作を実行する。
The CPU internal access judging section 64 determines the DMA at the time of starting the DMA based on the set value of the transfer method register 13.
The transfer system is recognized, and the following operation is executed when the DMA transfer is the normal transfer.

【0160】CPU内部アクセス判定部64は、DMA
転送の外部バスアクセス中において、実施の形態2のC
PU内部アクセス判定部62と同様、アクセスモード
(リード,ライト)、内部アドレス値に基づき内部アド
レステーブル70を参照して内部アクセスサイクル数i
cを認識した後、内部アクセスサイクル数icと外部ア
クセスカウント値ext_cunterとを比較し、内
部アクセスサイクル数icが外部アクセスカウント値e
xt_cunter以下であればCPU内部アクセス要
求を受け付けると判定する。
The CPU internal access determination unit 64 uses the DMA
During the external bus access for transfer, C of the second embodiment
Similar to the PU internal access determining unit 62, the internal access cycle number i is referred to by referring to the internal address table 70 based on the access mode (read, write) and the internal address value.
After recognizing c, the internal access cycle number ic is compared with the external access count value ext_counter, and the internal access cycle number ic is compared with the external access count value e.
If xt_counter or less, it is determined that the CPU internal access request is accepted.

【0161】また、内部アクセスカウント値初期値設定
部84は、CPU内部アクセス判定部64と同様にし
て、アクセスモード、内部アドレス値に基づき内部アド
レステーブル70を参照して内部アクセスサイクル数i
cを認識し、内部アクセスサイクル数icを内部アクセ
スカウンタ90の内部アクセスカウント値in_cun
ter(CPU内部バスアクセス残りサイクル数)とし
て初期設定する。なお、内部アクセスカウント値初期値
設定部84はCPU内部アクセス判定部64と重複する
機能が多いため、内部アクセスカウント値初期値設定部
84の機能をCPU内部アクセス判定部64に持たせる
ように構成してもよい。
Further, the internal access count value initial value setting unit 84 refers to the internal address table 70 based on the access mode and the internal address value in the same manner as the CPU internal access determination unit 64, and the internal access cycle number i
c is recognized and the internal access cycle number ic is set to the internal access count value in_cun of the internal access counter 90.
Initially set as ter (the number of remaining cycles of CPU internal bus access). Since the internal access count value initial value setting unit 84 has many functions that overlap with the CPU internal access determination unit 64, the internal access count value initial value setting unit 84 is configured to have the function of the CPU internal access determination unit 64. You may.

【0162】DMAアクセス判定部94は、CPUによ
る内部バスアクセス実行中に外部バスアクセス,内部バ
スアクセスの順で実行されるDMA要求があった場合、
予め定められた外部バスアクセス予測実行サイクル数
(例えば、外部バスアクセスの最短サイクル数)と内部
アクセスカウント値in_cunterとを比較し、
「外部バスアクセス予測実行サイクル数≦in_cun
ter」のとき、DMA要求を受け付ける判定を行う。
If there is a DMA request executed in the order of external bus access and internal bus access during execution of internal bus access by the CPU, the DMA access determination unit 94
A predetermined external bus access predicted execution cycle number (for example, the shortest external bus access cycle number) is compared with the internal access count value in_counter,
"External bus access prediction execution cycle number ≤ in_cun
When it is “ter”, it is determined to accept the DMA request.

【0163】内部アクセスカウンタ90は内部アクセス
カウント値in_cunterを1バスサイクル毎に1
デクリメントする。
The internal access counter 90 sets the internal access count value in_counter to 1 every bus cycle.
Decrement.

【0164】図10は実施の形態4によるノーマルDM
A転送動作を示すタイミング図である。ここで、転送元
アドレスレジスタ10の設定値は0x00400000
(外部バス)、転送先アドレスレジスタ11の設定値は
0x00600000(内部バス)、DMA転送カウン
タ12の値は0x2、転送方式レジスタ13の値は0x
0(ノーマル転送)に設定されていたとする。
FIG. 10 shows a normal DM according to the fourth embodiment.
FIG. 7 is a timing diagram showing an A transfer operation. Here, the setting value of the transfer source address register 10 is 0x00400000.
(External bus), set value of transfer destination address register 11 is 0x00600000 (internal bus), value of DMA transfer counter 12 is 0x2, value of transfer method register 13 is 0x
It is assumed that it is set to 0 (normal transfer).

【0165】また、内部アドレス0x00610000
0への内部リードアクセス数は“5”、内部アドレス0
x00620000への内部リードアクセス数は“2”
となるように、内部アドレステーブル70は設定され、
DMAアクセス判定部94に予め設定されている外部バ
スアクセス予測実行サイクル数は“2”と設定されてい
るとする。
Also, the internal address 0x00610000
Number of internal read accesses to 0 is "5", internal address 0
The number of internal read accesses to x00620000 is "2"
The internal address table 70 is set so that
It is assumed that the number of external bus access prediction execution cycles preset in the DMA access determination unit 94 is set to "2".

【0166】図10の例示では、サイクルT1でCPU
からの内部リードアクセス要求(CPUアクセス要求信
号CREQが“H”、CPUリード/ライト制御信号C
RWが“H”)が発生する。
In the example shown in FIG. 10, the CPU is used in the cycle T1.
Internal read access request from CPU (CPU access request signal CREQ is “H”, CPU read / write control signal C
RW is “H”).

【0167】したがって、バス制御部54は、サイクル
T1ではDMA要求が発生しいないため、サイクルT1
でCPUアクセス応答信号CACKを“H”にしてサイ
クルT1でのCPUによる内部アクセスを受け付ける。
このとき、内部アクセスカウント値初期値設定部84は
内部アクセスサイクル数ic(=“5”)を内部アクセ
スカウント値in_cunterとして内部アクセスカ
ウンタ90に初期設定する。
Therefore, the bus control unit 54 does not issue a DMA request in cycle T1, so
Then, the CPU access response signal CACK is set to "H" to accept the internal access by the CPU in the cycle T1.
At this time, the internal access count value initial value setting unit 84 initializes the internal access cycle number ic (= “5”) in the internal access counter 90 as the internal access count value in_counter.

【0168】その後、サイクルT5で、CPUアドレス
信号CADDRで指定された内部アドレス0x0061
0000のデータD10が内部リードデータ信号IRD
ATAとして読み出され、さらにCPUリードデータ信
号CRDATAとしてCPUに付与されることにより、
CPUによる内部リードアクセスが完了する。
After that, in cycle T5, the internal address 0x0061 designated by the CPU address signal CADDDR is set.
The data D10 of 0000 is the internal read data signal IRD
By being read as ATA and further given to the CPU as the CPU read data signal CRDATA,
The internal read access by the CPU is completed.

【0169】一方、サイクルT2でDMA起動要求信号
dma_reqが“H”となり、DMA要求が発生す
る。このとき、DMAアクセス判定部94は、内部アク
セスカウント値in_cunterと外部バスアクセス
予測実行サイクル数とを比較し、内部アクセスカウント
値in_cunterは“4”、外部バスアクセス予測
実行サイクル数は“2”のため、受付条件「外部バスア
クセス予測実行サイクル数≦in_cunter」を満
足しないため、DMA要求を受け付けないという判定を
行う。
On the other hand, in cycle T2, the DMA start request signal dma_req becomes "H" and a DMA request is generated. At this time, the DMA access determination unit 94 compares the internal access count value in_counter with the external bus access prediction execution cycle number, and the internal access count value in_counter is “4” and the external bus access prediction execution cycle number is “2”. Therefore, since the acceptance condition “external bus access prediction execution cycle number ≦ in_counter” is not satisfied, it is determined that the DMA request is not accepted.

【0170】その後、サイクルT4で、内部アクセスカ
ウント値in_cunterが“2”となり、受付条件
「外部バスアクセス予測実行サイクル数≦in_cun
ter」が満足されるため、DMAアクセス判定部94
はDMA要求を受け付ける。
Thereafter, in cycle T4, the internal access count value in_counter becomes "2", and the acceptance condition "external bus access predicted execution cycle number≤in_cun" is reached.
ter ”is satisfied, the DMA access determination unit 94
Accepts a DMA request.

【0171】転送元アドレスが外部アドレスであるの
で、サイクルT4からバス制御部54は外部アクセス要
求信号EREQを“H”にして(外部リード/ライト制
御信号ERWを“H”を維持)、外部リードアクセスを
開始する。
Since the transfer source address is the external address, the bus control unit 54 sets the external access request signal EREQ to "H" from the cycle T4 (maintains the external read / write control signal ERW to "H"), and the external read Start access.

【0172】同時に、外部アクセスカウント値初期値設
定部74は、“3”を指示する外部アクセスサイクル信
号ECYCLEに基づき、外部アクセスカウント値ex
t_cunterとして“3”を外部アクセスカウンタ
80に初期設定する。
At the same time, the external access count value initial value setting unit 74 determines the external access count value ex based on the external access cycle signal ECYCLE instructing "3".
Initialize "3" in the external access counter 80 as t_counter.

【0173】したがって、サイクルT4〜T5におい
て、DMA転送による外部リードアクセスとCPUによ
る内部リードアクセスが並行して実行される。
Therefore, in cycles T4 to T5, external read access by DMA transfer and internal read access by CPU are executed in parallel.

【0174】その後、サイクルT6で、外部アドレス0
x00400000のデータD1が外部リードデータ信
号ERDATAとして出力され、外部アクセス完了信号
EDCが“H”になり、外部リードアクセスが完了す
る。このサイクルT6の最後で、バス制御部54は外部
リードデータ信号ERDATAのデータD1を内部のバ
ッファに取り込む。
Then, in cycle T6, the external address 0
The data D1 of x00400000 is output as the external read data signal ERDATA, the external access completion signal EDC becomes "H", and the external read access is completed. At the end of this cycle T6, the bus controller 54 fetches the data D1 of the external read data signal ERDATA into the internal buffer.

【0175】バス制御部54はサイクルT6でDMA転
送による外部リードアクセスが完了後、次のサイクルT
7で、内部アクセス要求信号IREQを“H”、内部リ
ード/ライト制御信号IRWを“L”にして内部ライト
アクセスを開始する。
After the external read access by the DMA transfer is completed in the cycle T6, the bus control unit 54 completes the next cycle T.
At 7, the internal access request signal IREQ is set to "H" and the internal read / write control signal IRW is set to "L" to start the internal write access.

【0176】内部ライトデータ信号IWDATAには、
バス制御部54内部のバッファに取り込んでいたデータ
D1を出力する。その結果、内部アドレス0x0060
0000にデータD1が書き込まれる。そして、サイク
ルT8で内部アクセス完了信号IDCが“H”になり、
内部ライトアクセスが完了する。
The internal write data signal IWDATA includes
The data D1 stored in the buffer inside the bus control unit 54 is output. As a result, the internal address 0x0060
The data D1 is written in 0000. Then, in cycle T8, the internal access completion signal IDC becomes "H",
Internal write access is completed.

【0177】DMA転送カウンタ12の値が0x2であ
るので、サイクルT9でバス制御部54は2回目の外部
リードアクセスを開始する。同時に、外部アクセスカウ
ント値初期値設定部74は、外部アクセスサイクル信号
ECYCLEに基づき外部アクセスカウント値ext_
cunterとして“4”を外部アクセスカウンタ80
に初期設定する。
Since the value of the DMA transfer counter 12 is 0x2, the bus controller 54 starts the second external read access in cycle T9. At the same time, the external access count value initial value setting unit 74 sets the external access count value ext_ based on the external access cycle signal ECYCLE.
The external access counter 80 is "4" as a counter.
Initialize to.

【0178】図10の例示では、サイクルT12でCP
Uから別の内部バスアクセス要求がさらに発生される。
In the example of FIG. 10, CP is included in cycle T12.
Another internal bus access request is issued from U.

【0179】このとき、CPU内部アクセス判定部64
は、内部アドレステーブル70を参照して、内部アドレ
ス0x00620000へのリード時の内部アクセスサ
イクル数icが“2”となることを認識し、内部アクセ
スサイクル数icとサイクルT12における外部アクセ
スカウント値ext_cunterとを比較する。その
結果、CPU内部アクセス判定部64は、「ic(=
2)>ext_cunter(=1)」であり、CPU
内部アクセス受付条件「ic≦ext_cunter」
を満足しないため、CPUの内部リードアクセスを受け
付けない判定を行う。
At this time, the CPU internal access judging section 64
Recognizes that the internal access cycle number ic when reading to the internal address 0x00620000 is “2” by referring to the internal address table 70, and determines the internal access cycle number ic and the external access count value ext_counter in the cycle T12. To compare. As a result, the CPU internal access determination unit 64 determines that “ic (=
2)> ext_counter (= 1) ”, and the CPU
Internal access acceptance condition “ic ≦ ext_counter”
Therefore, it is determined that the internal read access of the CPU is not accepted.

【0180】サイクルT12で、外部アドレス0x00
400004のデータD2が外部リードデータ信号ER
DATAとして出力され、DMAの2回目の外部リード
アクセスが完了する。
At cycle T12, the external address 0x00
The data D2 of 400004 is the external read data signal ER.
The data is output as DATA, and the second external read access of DMA is completed.

【0181】サイクルT13から、バス制御部54は2
回目の内部ライトアクセスを開始する。サイクルT14
で、内部アドレス0x00600004にデータD2が
書き込まれる内部ライトアクセスが完了し、DMA転送
が終了する。
From the cycle T13, the bus control unit 54 becomes 2
Start the internal write access for the second time. Cycle T14
Then, the internal write access for writing the data D2 to the internal address 0x00600004 is completed, and the DMA transfer is completed.

【0182】その後、サイクルT15で、CPUアクセ
ス応答信号CACKを“H”にしてCPUアクセス(リ
ードアクセス)を受付け、CPUからの内部バスアクセ
スを開始する。このとき、内部アクセスカウント値初期
値設定部84は内部アクセスサイクル数ic(=
“2”)を内部アクセスカウント値in_cunter
として内部アクセスカウンタ90に初期設定する。
Thereafter, in cycle T15, the CPU access response signal CACK is set to "H" to accept the CPU access (read access), and the internal bus access from the CPU is started. At this time, the internal access count value initial value setting unit 84 sets the internal access cycle number ic (=
"2") as the internal access count value in_counter
Is initialized in the internal access counter 90.

【0183】サイクルT16で、CPUアドレス信号C
ADDRで指定された内部アドレス0x0062000
0のデータD20が内部リードデータ信号IRDATA
として読み出された後、CPUリードデータ信号CRD
ATAとしてCPUに付与されることにより、CPUか
らの内部バスアクセスは完了する。
In cycle T16, the CPU address signal C
Internal address specified by ADDR 0x0062000
The data D20 of 0 is the internal read data signal IRDATA.
CPU read data signal CRD after being read as
By being given to the CPU as ATA, the internal bus access from the CPU is completed.

【0184】また、DMAアクセス判定部94は、転送
方式レジスタ13の設定値を考慮することなく、CPU
による内部バスアクセス中でのDMA要求の許可、禁止
を判定しているため、DMA要求がバースト転送の場合
も、外部バスアクセス予測実行サイクル数が内部アクセ
スカウント値in_cunterを以下になったとき、
許可される。
Further, the DMA access judgment unit 94 does not take the setting value of the transfer method register 13 into consideration,
Even if the DMA request is a burst transfer, when the number of predicted external bus access execution cycles falls below the internal access count value in_counter because the DMA request is determined to be permitted or prohibited during the internal bus access by
Allowed

【0185】図9に戻って、CPU内部アクセス判定部
64は、転送方式レジスタ13の設定値が0x0(ノー
マル転送)時は、実施の形態3と同様に判定する。
Returning to FIG. 9, the CPU internal access judging section 64 judges in the same manner as in the third embodiment when the set value of the transfer method register 13 is 0x0 (normal transfer).

【0186】また、転送方式レジスタ13の設定値が0
x1(バースト転送)の場合も、実施の形態3と同様に
以下のように判定を行う。
The set value of the transfer method register 13 is 0.
Also in the case of x1 (burst transfer), determination is performed as follows, as in the third embodiment.

【0187】CPU内部アクセス判定部64は、最初の
データ(図6のデータD1に相当)の外部バスアクセス
中において、CPU内部アクセス要求があった場合は、
図6にで示したように、内部アクセスサイクル数icと
外部アクセスカウント値ext_cunterとの比較
結果によって、CPU内部アクセス判定部62がCPU
からの内部アクセス要求を受け付けるか否かの判定を行
う。
When the CPU internal access request is made during the external bus access of the first data (corresponding to the data D1 of FIG. 6),
As shown in FIG. 6, the CPU internal access determination unit 62 determines that the CPU internal access determination unit 62 determines whether the CPU internal access cycle count ic is compared with the external access count value ext_counter.
It is determined whether or not to accept the internal access request from.

【0188】また、CPU内部アクセス判定部64は、
2回目以降のデータ(図6のデータD2〜D4に相当)
の外部リードアクセス時に、CPUから内部アクセス要
求があった場合は、外部アクセスカウント値ext_c
unterを“0”とみなし無条件にCPUからの内部
アクセス要求は受け付けないとする判定を行う。
Further, the CPU internal access judging section 64 is
Data after the second time (corresponding to data D2 to D4 in FIG. 6)
If there is an internal access request from the CPU during the external read access of the external access count value ext_c
Unter is regarded as “0”, and it is judged unconditionally that the internal access request from the CPU is not accepted.

【0189】このように、CPU内部アクセス判定部6
4によって、CPUからの内部バスアクセス要求を許可
あるいは禁止しながら、DMAバースト転送動作を実行
する。
As described above, the CPU internal access determination unit 6
4, the DMA burst transfer operation is executed while permitting or prohibiting the internal bus access request from the CPU.

【0190】以上のように、実施の形態4のバス制御装
置は、DMA転送がノーマル転送動作の場合は、DMA
転送動作開始中であっても外部バスアクセス動作実行中
の場合は、CPUからの内部バスアクセスのサイクル数
と外部アクセスカウント値ext_cunter(残存
する外部バスアクセスサイクル数)との比較に基づき、
CPUからの内部バスアクセス要求を許可/禁止をCP
U内部アクセス判定部64によって判定するため、内部
バスアクセス種別)を考慮して、動作に支障を生じさせ
ることなく内部バスのサイクルを有効に利用できること
ができる。
As described above, the bus control device according to the fourth embodiment performs the DMA transfer when the DMA transfer is the normal transfer operation.
If the external bus access operation is being executed even if the transfer operation is started, based on the comparison between the number of cycles of the internal bus access from the CPU and the external access count value ext_counter (the number of remaining external bus access cycles),
CP for permitting / prohibiting internal bus access request from CPU
Since the determination is made by the U internal access determination unit 64, it is possible to effectively use the cycle of the internal bus in consideration of the internal bus access type) without causing a hindrance to the operation.

【0191】また、実施の形態4のバス制御装置は、D
MA転送がバースト転送方式の際、DMA転送動作開始
中であっても最初の1単位のデータに対する外部バスア
クセス動作実行中の場合は、CPUからの内部バスアク
セスのサイクル数と外部アクセスカウント値ext_c
unterとの比較に基づき、CPU内部バスアクセス
要求を許可/禁止をCPU内部アクセス判定部62によ
って判定するため、内部バスアクセス種別を考慮して、
動作に支障を生じさせることなく内部バスのサイクルを
有効に利用できることができる。
The bus control device according to the fourth embodiment is D
When the MA transfer is a burst transfer method and the external bus access operation for the first unit of data is being executed even when the DMA transfer operation is started, the cycle number of the internal bus access from the CPU and the external access count value ext_c
Since the CPU internal access determination unit 62 determines whether to permit / prohibit the CPU internal bus access request based on the comparison with the unter, in consideration of the internal bus access type,
The cycle of the internal bus can be effectively used without causing any trouble in the operation.

【0192】また、CPU内部アクセス判定部64は、
外部アクセスカウント値ext_cunterを外部ア
クセスサイクル信号ECYCLEに基づき設定ことによ
り、外部バスアクセス残りサイクル数を正確に認識した
判定を行うことができる。
Further, the CPU internal access judging section 64 is
By setting the external access count value ext_counter based on the external access cycle signal ECYCLE, it is possible to make a determination by accurately recognizing the number of remaining cycles of external bus access.

【0193】加えて、実施の形態4は、CPU内部アク
セス実行中に、外部バスアクセス,内部バスアクセスの
順で実行されるDMA要求がなされた場合、内部アクセ
スカウント値in_cunterと外部バスアクセス予
測実行サイクル数とを比較することにより、DMA要求
発生時にCPU内部バスアクセスの完了を待たずにDM
A転送動作を実行可能にしたため、内部バスの利用度を
さらに向上させることができる。
In addition, according to the fourth embodiment, when a DMA request is executed in the order of external bus access and internal bus access during execution of CPU internal access, internal access count value in_counter and external bus access prediction execution. By comparing with the number of cycles, DM is generated without waiting for completion of CPU internal bus access when a DMA request occurs.
Since the A transfer operation can be executed, the utilization of the internal bus can be further improved.

【0194】さらに、外部バスアクセス予測実行サイク
ル数として最短の外部バスアクセス実行サイクル数を用
いれば、CPU内部バスアクセス後に必ずDMA転送の
内部バスアクセスが実行されるため、CPU内部バスア
クセス中にDMA転送を実行しても動作に支障は全く生
じない。
Furthermore, if the shortest number of external bus access execution cycles is used as the number of predicted external bus access execution cycles, the internal bus access for DMA transfer is always executed after the CPU internal bus access. Even if the transfer is executed, there is no problem in the operation.

【0195】[0195]

【発明の効果】以上説明したように、この発明における
請求項1記載のバス制御装置のCPU内部アクセス判定
部は、外部バスアクセスから内部バスアクセスの順で実
行されるノーマル転送方式のDMA転送実行時に、従来
は禁止されていた外部バスアクセス中におけるCPU内
部アクセス要求を許可することにより、動作に支障なく
内部バスを有効に利用することができる。
As described above, the CPU internal access determination unit of the bus controller according to the first aspect of the present invention executes the normal transfer type DMA transfer executed in the order of external bus access to internal bus access. At times, by permitting the CPU internal access request during the external bus access, which has been conventionally prohibited, the internal bus can be effectively used without hindering the operation.

【0196】請求項2記載のバス制御装置は、DMA転
送がバースト転送方式の場合は無条件に外部バスアクセ
ス中におけるCPU内部アクセス要求を禁止することに
より、CPU内部アクセス要求が生じた場合でもバース
ト転送方式のDMA転送動作に支障が生じることはな
い。
In the bus control device according to the second aspect, when the DMA transfer is the burst transfer method, the CPU internal access request is unconditionally prohibited during the external bus access, so that the burst is generated even when the CPU internal access request is generated. There is no problem in the DMA transfer operation of the transfer method.

【0197】請求項3記載のバス制御装置におけるCP
U内部アクセス判定部は、ノーマル転送方式のDMA転
送時に、内部アドレステーブルを参照して得られるCP
U内部バス実行サイクル数が外部バスアクセス残りサイ
クル数以下という条件成立時に、外部バスアクセス中に
おけるCPU内部アクセス要求を許可するため、ノーマ
ル転送方式のDMA転送動作に待ち状態を生じさせるこ
となく、内部バスを有効に利用することができる。
CP in the bus controller according to claim 3
The U internal access determining unit refers to the CP obtained by referring to the internal address table during the normal transfer DMA transfer.
When the condition that the number of U internal bus execution cycles is less than or equal to the number of external bus access remaining cycles is satisfied, the CPU internal access request during the external bus access is permitted, so that the internal transfer can be performed without causing a wait state in the normal transfer method DMA transfer operation. The bus can be used effectively.

【0198】請求項4記載のバス制御装置におけるCP
U内部アクセス判定部は、バースト転送方式のDMA転
送における外部バスアクセスが最初の1単位データに対
するアクセス中において、内部アドレステーブルを参照
して得られるCPU内部バス実行サイクル数が外部バス
アクセス残りサイクル数以下という条件成立時に、CP
U内部アクセス要求を許可するため、バースト転送方式
のDMA転送に待ち状態を生じさせることなく、内部バ
スを有効に利用することができる。
CP in the bus controller according to claim 4
The U internal access determining unit determines the CPU internal bus execution cycle number obtained by referring to the internal address table during the external bus access in the DMA transfer of the burst transfer method while the first external bus access is accessing the unit data. When the following conditions are met, CP
Since the U internal access request is permitted, the internal bus can be effectively used without causing a wait state in the DMA transfer of the burst transfer method.

【0199】請求項5記載のバス制御装置のCPU内部
アクセス判定部は、CPU内部アドレスに加えアクセス
モードに基づきことにより、より正確なCPU内部バス
実行サイクル数を取得することができる。
The CPU internal access determination unit of the bus control device according to the fifth aspect can acquire a more accurate number of CPU internal bus execution cycles based on the access mode in addition to the CPU internal address.

【0200】請求項6記載のバス制御装置の外部バスア
クセス残りサイクル数初期値設定部は、外部バスアクセ
ス開始時に外部アクセスサイクル信号で指示される外部
バス実行サイクル数を外部バスアクセス残りサイクル数
として初期設定するため、より正確な外部バスアクセス
残りサイクル数を得ることができる。
The external bus access remaining cycle number initial value setting unit of the bus controller according to claim 6 sets the external bus execution cycle number designated by the external access cycle signal at the start of the external bus access as the external bus access remaining cycle number. Since the initialization is performed, a more accurate external bus access remaining cycle number can be obtained.

【0201】請求項7記載のバス制御装置におけるDM
Aアクセス判定部は、CPU内部アクセス実行中に、外
部バスアクセスから内部バスアクセスの順で実行される
DMA要求を受けた場合、所定の外部バスアクセス予測
実行サイクル数がCPU内部バスアクセス残りサイクル
数以下という条件成立時に、CPU内部バスアクセス中
におけるDMA転送の外部アクセスを許可するため、上
記DMA転送を早期に開始することができる。
DM in the bus control device according to claim 7
When the A access determination unit receives a DMA request executed from the external bus access in the order of the internal bus access during execution of the CPU internal access, the predetermined external bus access predicted execution cycle number is the CPU internal bus access remaining cycle number. When the following conditions are satisfied, the external access of the DMA transfer during the CPU internal bus access is permitted, so that the DMA transfer can be started early.

【0202】請求項8記載のバス制御装置は、所定の外
部バスアクセス予測実行サイクル数として最短の外部バ
スアクセス実行サイクル数を用いることにより、CPU
内部バスアクセス終了後に必ずDMA転送の内部バスア
クセスが実行されるため、CPU内部バスアクセス中に
DMA転送を実行しても動作に支障は生じない。
According to another aspect of the bus controller of the present invention, by using the shortest external bus access execution cycle number as the predetermined external bus access prediction execution cycle number, the CPU
Since the internal bus access for DMA transfer is always executed after the internal bus access is completed, there is no problem in the operation even if the DMA transfer is executed during the CPU internal bus access.

【0203】請求項9記載のバス制御装置の転送方式指
示部は転送方式情報を含むDMA転送情報を格納する情
報格納部を含むため、DMA転送方式を転送方式情報と
して予め設定しておくことができる。
Since the transfer method instruction section of the bus control device according to the ninth aspect includes the information storage section for storing the DMA transfer information including the transfer method information, the DMA transfer method can be preset as the transfer method information. it can.

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

【図1】 この発明の実施の形態1であるバス制御装置
の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a bus control device according to a first embodiment of the present invention.

【図2】 実施の形態1によるノーマルDMA転送動作
を示すタイミング図である。
FIG. 2 is a timing diagram showing a normal DMA transfer operation according to the first embodiment.

【図3】 この発明の実施の形態2であるバス制御装置
の構成を示すブロック図である。
FIG. 3 is a block diagram showing a configuration of a bus control device according to a second embodiment of the present invention.

【図4】 図3の内部アドレステーブルの内部構成を示
す説明図である。
FIG. 4 is an explanatory diagram showing an internal configuration of an internal address table of FIG.

【図5】 実施の形態2によるノーマルDMA転送動作
を示すタイミング図である。
FIG. 5 is a timing diagram showing a normal DMA transfer operation according to the second embodiment.

【図6】 実施の形態2によるバーストDMA転送動作
を示すタイミング図である。
FIG. 6 is a timing diagram showing a burst DMA transfer operation according to the second embodiment.

【図7】 この発明の実施の形態3であるバス制御装置
の構成を示すブロック図である。
FIG. 7 is a block diagram showing a configuration of a bus control device according to a third embodiment of the present invention.

【図8】 実施の形態3によるノーマルDMA転送動作
を示すタイミング図である。
FIG. 8 is a timing diagram showing a normal DMA transfer operation according to the third embodiment.

【図9】 この発明の実施の形態4であるバス制御装置
の構成を示すブロック図である。
FIG. 9 is a block diagram showing a configuration of a bus control device according to a fourth embodiment of the present invention.

【図10】 実施の形態4によるノーマルDMA転送動
作を示すタイミング図である。
FIG. 10 is a timing diagram showing a normal DMA transfer operation according to the fourth embodiment.

【図11】 従来技術によるバス制御装置の構成を示す
ブロック図である。
FIG. 11 is a block diagram showing a configuration of a bus control device according to a conventional technique.

【図12】 バス制御装置内のレジスタ書き込み動作を
示すタイミング図である。
FIG. 12 is a timing diagram showing a register write operation in the bus control device.

【図13】 CPUからの内部バスアクセス動作を示す
タイミング図である。
FIG. 13 is a timing diagram showing an internal bus access operation from the CPU.

【図14】 従来技術によるノーマルDMA転送動作を
示すタイミング図である。
FIG. 14 is a timing diagram showing a normal DMA transfer operation according to the prior art.

【図15】 従来技術によるバーストDMA転送動作を
示すタイミング図である。
FIG. 15 is a timing diagram showing a burst DMA transfer operation according to a conventional technique.

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

1 バス制御装置、2 レジスタ群、7 CPU・I/
F信号群、8 内部バスアクセス信号群、9,9a 外
部バスアクセス信号群、51〜54 バス制御部、61
〜64 CPU内部アクセス判定部、70 内部アドレ
ステーブル、72〜74 外部アクセスカウント値初期
値設定部、80 外部アクセスカウンタ、84 内部ア
クセスカウント値初期値設定部、90 内部アクセスカ
ウンタ、94 DMAアクセス判定部。
1 bus control device, 2 register groups, 7 CPU / I /
F signal group, 8 internal bus access signal group, 9, 9a external bus access signal group, 51-54 bus control unit, 61
To 64 CPU internal access determination unit, 70 internal address table, 72 to 74 external access count value initial value setting unit, 80 external access counter, 84 internal access count value initial value setting unit, 90 internal access counter, 94 DMA access determination unit .

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 DMA転送方式が、データを1単位毎に
転送するノーマル転送方式であるか複数単位のデータを
一括転送するバースト転送方式であるかを指示する転送
方式指示部と、 CPU、内部バス、及び外部バスそれぞれと信号接続さ
れ、これらのバス接続制御を行うバス制御部とを備え、 前記バス制御部は、 外部バスアクセス,内部バスアクセスの順で実行される
DMA転送実行時に、前記転送方式指示部が前記ノーマ
ル転送方式を指示するとき、前記外部バスアクセス中に
おいて、前記CPUによる前記内部バスへのアクセスを
要求するCPU内部アクセス要求を許可するCPU内部
アクセス判定部を有することを特徴とする、バス制御装
置。
1. A transfer method instructing unit for instructing whether the DMA transfer method is a normal transfer method for transferring data in units of one unit or a burst transfer method for collectively transferring data in a plurality of units, a CPU, and an internal unit. A bus control unit that is signal-connected to each of a bus and an external bus and controls these bus connections, and the bus control unit is configured to execute the DMA transfer executed in the order of external bus access and internal bus access. When the transfer method instructing section instructs the normal transfer method, it has a CPU internal access judging section which permits a CPU internal access request for requesting access to the internal bus by the CPU during the external bus access. The bus control device.
【請求項2】 請求項1記載のバス制御装置であって、 前記CPU内部アクセス判定部は、 前記転送方式指示部が前記ノーマル転送方式を指示する
とき、無条件に前記外部バスアクセス中における前記C
PU内部アクセス要求を許可し、 前記転送方式指示部が前記バースト転送方式を指示する
とき、無条件に前記外部バスアクセス中における前記C
PU内部アクセス要求を禁止する、バス制御装置。
2. The bus control device according to claim 1, wherein the CPU internal access determining unit unconditionally performs the external bus access during the external bus access when the transfer system instructing unit instructs the normal transfer system. C
When the PU internal access request is permitted and the transfer method instructing section instructs the burst transfer method, the C is unconditionally accessed during the external bus access.
A bus controller that prohibits PU internal access requests.
【請求項3】 請求項1記載のバス制御装置であって、 前記DMA転送時の前記外部バスアクセスにおける外部
バスアクセス残りサイクル数を動作クロックに従い計測
する外部バスアクセス残りサイクル数計測部と、 前記CPU内部アクセス要求の対象となるCPU内部ア
ドレスとCPU内部バス実行サイクル数を対応づけて記
憶される内部アドレステーブルとをさらに備え、 前記CPU内部アクセス判定部は、 前記転送方式指示部が前記ノーマル転送方式を指示する
とき、少なくとも前記CPU内部アドレスに基づき前記
内部アドレステーブルを参照して前記CPU内部アドレ
スのCPU内部バス実行サイクル数を取得し、該CPU
内部バス実行サイクル数が前記外部バスアクセス残りサ
イクル数以下という条件成立時に、前記外部バスアクセ
ス中における前記CPU内部アクセス要求を許可する、
バス制御装置。
3. The bus control device according to claim 1, further comprising: an external bus access remaining cycle number measuring unit for measuring an external bus access remaining cycle number in the external bus access during the DMA transfer according to an operation clock. The CPU internal access determination unit further includes an internal address table in which a CPU internal address that is a target of a CPU internal access request and a CPU internal bus execution cycle number are stored in association with each other. When instructing a system, the CPU internal bus execution cycle number of the CPU internal address is acquired by referring to the internal address table based on at least the CPU internal address.
When the condition that the number of internal bus execution cycles is equal to or less than the number of external bus access remaining cycles is satisfied, the CPU internal access request during the external bus access is permitted.
Bus controller.
【請求項4】 請求項3記載のバス制御装置であって、 前記CPU内部アクセス判定部は、 前記転送方式指示部が前記バースト転送方式を指示する
とき、少なくとも前記CPU内部アドレスに基づき前記
内部アドレステーブルを参照して前記CPU内部アドレ
スのCPU内部バス実行サイクル数を取得し、該CPU
内部バス実行サイクル数が前記外部バスアクセス残りサ
イクル数以下という条件成立時に、前記外部バスアクセ
スが最初の1単位データに対するアクセス中における前
記CPU内部アクセス要求を許可する、バス制御装置。
4. The bus control device according to claim 3, wherein the CPU internal access determination unit is configured to, based on at least the CPU internal address, generate the internal address when the transfer system instruction unit instructs the burst transfer system. The CPU internal bus execution cycle number of the CPU internal address is acquired by referring to the table, and the CPU
A bus controller that permits the CPU internal access request during access to the first unit data when the external bus access cycle is equal to or less than the external bus access remaining cycle number.
【請求項5】 請求項3あるいは請求項4記載のバス制
御装置であって、 前記内部アドレステーブルは、 前記CPU内部アドレスに加え前記CPU内部アクセス
要求のリードモード及びライトモードを含むアクセスモ
ードを、前記CPU内部バス実行サイクル数に対応づけ
て記憶され、 前記CPU内部アクセス判定部は、 前記CPU内部アドレス及び前記アクセスモードに基づ
き前記内部アドレステーブルを参照して前記CPU内部
アドレスの前記CPU内部バス実行サイクル数を取得す
る、バス制御装置。
5. The bus control device according to claim 3, wherein the internal address table includes an access mode including a read mode and a write mode of the CPU internal access request in addition to the CPU internal address. Stored in association with the number of CPU internal bus execution cycles, the CPU internal access determination unit refers to the internal address table based on the CPU internal address and the access mode, and executes the CPU internal bus at the CPU internal address. Bus controller that gets the number of cycles.
【請求項6】 請求項3ないし請求項5のうち、いずれ
か1項に記載のバス制御装置であって、 前記外部バスは前記外部バスアクセスの外部バス実行サ
イクル数を指示する外部アクセスサイクル信号を伝搬
し、 前記バス制御部は、 前記外部バスアクセス開始時に前記外部バス実行サイク
ル数を前記外部バスアクセス残りサイクル数として初期
設定する外部バスアクセス残りサイクル数初期値設定部
をさらに含む、バス制御装置。
6. The bus control device according to any one of claims 3 to 5, wherein the external bus is an external access cycle signal indicating a number of external bus execution cycles of the external bus access. The bus control unit further includes an external bus access remaining cycle number initial value setting unit that initializes the external bus execution cycle number as the external bus access remaining cycle number when the external bus access starts. apparatus.
【請求項7】 請求項3ないし請求項6のうち、いずれ
か1項に記載のバス制御装置であって、 CPU内部バスアクセス残りサイクル数を前記動作クロ
ックに従い計測するCPU内部バスアクセス残りサイク
ル数計測部をさらに備え、 前記バス制御部は、 前記CPU内部バスアクセス開始時に、少なくとも前記
CPU内部アドレスに基づき前記内部アドレステーブル
を参照して前記CPU内部アドレスのCPU内部バス実
行サイクル数を取得し、取得した前記CPU内部バス実
行サイクル数を前記CPU内部バスアクセス残りサイク
ル数として初期設定するCPU内部バスアクセス残りサ
イクル数初期値設定部と、 前記CPU内部アクセス実行中に、外部バスアクセスか
ら内部バスアクセスの順で実行されるDMA要求を受け
た場合、所定の外部バスアクセス予測実行サイクル数が
前記CPU内部バスアクセス残りサイクル数以下という
条件成立時に、前記CPU内部バスアクセス中における
前記DMA転送の外部アクセスを許可するDMAアクセ
ス判定部とをさらに含む、バス制御装置。
7. The bus control device according to claim 3, wherein the CPU internal bus access remaining cycle number is measured according to the operation clock. Further comprising a measuring unit, wherein the bus control unit acquires the number of CPU internal bus execution cycles of the CPU internal address by referring to the internal address table based on at least the CPU internal address at the start of the CPU internal bus access, A CPU internal bus access remaining cycle number initial value setting unit for initializing the acquired CPU internal bus execution cycle number as the CPU internal bus access remaining cycle number; and an external bus access from an internal bus access during execution of the CPU internal access. When a DMA request executed in the order of A bus control device further comprising a DMA access determination unit that permits external access of the DMA transfer during the CPU internal bus access when the condition that the number of predicted external bus access execution cycles is equal to or less than the number of remaining cycles of the CPU internal bus access is satisfied. .
【請求項8】 請求項7記載のバス制御装置であって、 前記所定の外部バスアクセス予測実行サイクル数は最短
の外部バスアクセス実行サイクル数を含む、バス制御装
置。
8. The bus control device according to claim 7, wherein the predetermined number of predicted external bus access execution cycles includes the shortest number of external bus access execution cycles.
【請求項9】 請求項1ないし請求項8のうち、いずれ
か1項に記載のバス制御装置であって、 前記転送方式指示部は、前記ノーマル転送方式あるいは
前記バースト転送を指示する転送方式情報を含むDMA
転送情報を前記バス制御部に付与するDMA転送情報格
納部を含む、バス制御装置。
9. The bus control device according to claim 1, wherein the transfer method instructing unit transfers the transfer method information for instructing the normal transfer method or the burst transfer. DMA including
A bus control device including a DMA transfer information storage unit for giving transfer information to the bus control unit.
JP2001374062A 2001-12-07 2001-12-07 Bus control device Pending JP2003178020A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001374062A JP2003178020A (en) 2001-12-07 2001-12-07 Bus control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001374062A JP2003178020A (en) 2001-12-07 2001-12-07 Bus control device

Publications (1)

Publication Number Publication Date
JP2003178020A true JP2003178020A (en) 2003-06-27

Family

ID=19182681

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001374062A Pending JP2003178020A (en) 2001-12-07 2001-12-07 Bus control device

Country Status (1)

Country Link
JP (1) JP2003178020A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006031426A (en) * 2004-07-16 2006-02-02 Rohm Co Ltd Shared bus mediation system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006031426A (en) * 2004-07-16 2006-02-02 Rohm Co Ltd Shared bus mediation system
JP4642398B2 (en) * 2004-07-16 2011-03-02 ローム株式会社 Shared bus arbitration system

Similar Documents

Publication Publication Date Title
US7958298B2 (en) System and method for providing address decode and virtual function (VF) migration support in a peripheral component interconnect express (PCIE) multi-root input/output virtualization (IOV) environment
US5524268A (en) Flexible processor-driven control of SCSI buses utilizing tags appended to data bytes to determine SCSI-protocol phases
US8396994B1 (en) Command queue for peripheral component
JP4737438B2 (en) Information processing apparatus that shares resources among multiple processing units
KR20070058561A (en) Data processing system with bus access retraction
JPH0954746A (en) Computer system
JP2003296267A (en) Bus system and information processing system including bus system
US7934043B2 (en) Data processing apparatus for controlling access to a memory based upon detection of completion of a DMA bus cycle
JP4642531B2 (en) Arbitration of data requests
KR20070053310A (en) Data processing system with bus access retraction
JP2854474B2 (en) Bus use request arbitration device
JP2002366428A (en) Memory controller
JP2003178020A (en) Bus control device
JP2011070372A (en) Dma transmission control device
JP2001256179A (en) Processor system
JP2002366509A (en) Direct memory access controller and its access control method
KR20060081440A (en) Apparatus and method for controlling data
JPH11212903A (en) Data processing system, peripheral device and microcomputer
JPH0512185A (en) Address predicting and verifying circuit for reading burst cycle data
JP2000047930A (en) Data processor
JP2000250852A (en) Bus arbitrating device, bus system and bus arbitrating method
JP2001256169A (en) Data transfer control system and device
JP5621747B2 (en) Multitask system
JP4538054B2 (en) Data transfer apparatus and method
JPH10247150A (en) Data processing system

Legal Events

Date Code Title Description
A621 Written request for application examination

Effective date: 20041202

Free format text: JAPANESE INTERMEDIATE CODE: A621

A977 Report on retrieval

Effective date: 20070516

Free format text: JAPANESE INTERMEDIATE CODE: A971007

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070619

A02 Decision of refusal

Effective date: 20071211

Free format text: JAPANESE INTERMEDIATE CODE: A02