JPH08171510A - Memory access system - Google Patents

Memory access system

Info

Publication number
JPH08171510A
JPH08171510A JP31515494A JP31515494A JPH08171510A JP H08171510 A JPH08171510 A JP H08171510A JP 31515494 A JP31515494 A JP 31515494A JP 31515494 A JP31515494 A JP 31515494A JP H08171510 A JPH08171510 A JP H08171510A
Authority
JP
Japan
Prior art keywords
address
read
data
control unit
loaded
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.)
Withdrawn
Application number
JP31515494A
Other languages
Japanese (ja)
Inventor
Hidetoshi Shirasawa
英俊 白沢
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP31515494A priority Critical patent/JPH08171510A/en
Publication of JPH08171510A publication Critical patent/JPH08171510A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PURPOSE: To access a relatively low-speed memory at a high speed. CONSTITUTION: This system is equipped with plural memories 21 and 22 where respective data corresponding to the continuous memory space of a control part 1 are allocated and stored, address by address, a preread control part 3 which loads a read address of the control part 1 at a certain point of time to access and read the memories 21 and 22 and updates its read address PA individually to preread data, and a data selection part 4 which outputs read data D1 and D2 of the memories 21 and 22 according to the read address of the control part 1. This system is preferably equipped with an address comparison part 5 which compares the read address A of the control part with the read address PA of the preread control part and when they do not match each other, the read address A of the control part 1 is loaded to the preread control part 3. Further, the system is equipped with an operand code processing part 6 which detects a branch instruction code from the preread data and when an unconditional branch instruction code is detected, preread data at the jump destination of the operand part are loaded to the preread control part 3.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はメモリアクセス方式に関
し、更に詳しくは制御部(CPU等)が相対的に低速な
メモリをアクセスする場合のメモリアクセス方式に関す
る。CPUの動作速度は年々高速になっており、1バス
サイクルのクロックステート数も減少の傾向にある。ま
た、近年は低消費電力化の傾向が強く、3V動作のCP
Uが登場している。これに対してメインプログラムやデ
ータ等を格納しているROMの動作速度はCPUに追い
つかない状況にある。この状況はROMを低消費電力化
するほど顕著に表れる。そこで、相対的に低速なメモリ
を高速にアクセスできるメモリアクセス方式の提供が望
まれる。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory access method, and more particularly to a memory access method when a control unit (CPU or the like) accesses a relatively low speed memory. The operating speed of the CPU has been increasing year by year, and the number of clock states in one bus cycle has been decreasing. In recent years, there has been a strong tendency toward lower power consumption, and CP with 3V operation
U has appeared. On the other hand, the operating speed of the ROM storing the main program, data, etc. is in a situation where it cannot keep up with the CPU. This situation becomes more remarkable as the power consumption of the ROM is reduced. Therefore, it is desired to provide a memory access method capable of accessing a relatively slow memory at high speed.

【0002】[0002]

【従来の技術】図19は従来のメモリアクセス方式を説
明する図である。図19(A)は従来のメモリアクセス
方式のブロック図で、図において300は汎用のCP
U、301は64Kbyte のROM、310はチップセレ
クト生成部、307はWAIT制御部である。
2. Description of the Related Art FIG. 19 is a diagram for explaining a conventional memory access method. FIG. 19A is a block diagram of a conventional memory access method, in which 300 is a general-purpose CP.
U, 301 is a 64 Kbyte ROM, 310 is a chip select generation unit, and 307 is a WAIT control unit.

【0003】このCPU300は、例えば不図示の高速
RAMにアクセスする時は、2つのクロックステートT
1,T2でメモリアクセスを終了する。しかし、低速の
ROM301をアクセスする時は、以下のようになる。
図19(B)は従来のメモリアクセス方式のタイミング
チャートである。チップセレクト生成部310は、CP
U300のメモリアクセス要求信号XMRQ=L(アク
ティブ)の時に、そのアドレス信号A[15:0]がR
OMアドレス空間(例えば0000H 〜CFFFH )を
指す時は、ROMチップセレクト信号ROMCS=L
(アクティブ)を出力する。WAIT制御部307は、
ROM301が低速であることにより、この例では2ク
ロックステート分のWAIT(RDY)信号を生成す
る。
The CPU 300 has two clock states T when accessing a high-speed RAM (not shown), for example.
The memory access ends at 1 and T2. However, when accessing the low-speed ROM 301, the procedure is as follows.
FIG. 19B is a timing chart of the conventional memory access method. The chip select generation unit 310 uses the CP
When the memory access request signal XMRQ of the U300 is L (active), the address signal A [15: 0] is R
When referring to OM address space (e.g., 0000 H ~CFFF H) is, ROM chip select signal ROMCS = L
Outputs (active). The WAIT control unit 307
Due to the low speed of the ROM 301, a WAIT (RDY) signal for two clock states is generated in this example.

【0004】[0004]

【発明が解決しようとする課題】従って、ROM301
のアクセス時間はRAMの場合の2倍になってしまう。
このため、従来はCPUのパフォーマンスを活かせない
という欠点があった。なお、高速ROMを使用すること
も考えられるが、非常に高価となり、現実的とは言えな
い。
Therefore, the ROM 301
Access time is twice as long as that of RAM.
For this reason, there has been a drawback that the performance of the CPU cannot be utilized conventionally. Although it is possible to use a high-speed ROM, it is very expensive and unrealistic.

【0005】本発明の目的は、相対的に低速なメモリを
高速にアクセス可能なメモリアクセス方式を提供するこ
とにある。
An object of the present invention is to provide a memory access method capable of accessing a relatively slow memory at high speed.

【0006】[0006]

【課題を解決するための手段】上記の課題は図1の構成
により解決される。即ち、本発明のメモリアクセス方式
は、制御部の連続したメモリ空間に対応する各データを
1アドレス毎に振り分けて記憶している複数のメモリ
と、制御部のある時点の読出アドレスをロードして前記
複数のメモリに読出アクセスを行うと共に、以後は独自
に自己の読出アドレスを更新して先行するデータの先読
を行う先読制御部と、複数のメモリの読出データを制御
部の読出アドレスに従って選択し、該制御部に出力する
データ選択部とを備えるものである。
The above-mentioned problems can be solved by the structure shown in FIG. That is, according to the memory access method of the present invention, a plurality of memories in which each data corresponding to a continuous memory space of the control unit is sorted and stored for each address and a read address at a certain time of the control unit is loaded. A read-ahead controller that performs read-access to the plurality of memories and then updates its own read-out address independently to read ahead the preceding data, and read-out data of the plurality of memories according to the read-out addresses of the controller. And a data selection unit for selecting and outputting to the control unit.

【0007】[0007]

【作用】説明の簡単のため制御部(例えばCPU)1と
2つのメモリ21 ,22 の場合について説明する。メモ
リ21 ,22 は制御部1の連続したメモリ空間(アドレ
ス0,1,2,3,…)に対応する各データを1アドレ
ス毎に交互に振り分けて記憶している。
In order to simplify the explanation, the case of the control unit (eg CPU) 1 and the two memories 2 1 and 2 2 will be explained. The memories 2 1 and 2 2 store the data corresponding to the continuous memory space (addresses 0, 1, 2, 3, ...) Of the control unit 1 alternately for each address.

【0008】即ち、例えば制御部1の0番地のデータは
メモリ21 の0番地に、制御部1の1番地のデータはメ
モリ22 の0番地に、制御部1の2番地のデータはメモ
リ2 1 の1番地に、制御部1の3番地のデータはメモリ
2 の1番地に、夫々記憶している。先読制御部3は、
制御部1のある時点の読出アドレスAをロードしてその
出力アドレスPA(例えばPA=A/2)によりメモリ
1 ,22 に同時に読出アクセスを行うと共に、以後は
独自に自己の読出アドレスPAを更新して先行するデー
タの先読を行う。そして、データ選択部4はメモリ
1 ,22 の読出データD 1 ,D2 を制御部1の読出ア
ドレスA(例えば、その最下位ビットLSBの0/1)
に従って選択し、該制御部1に出力する。
That is, for example, the data at address 0 of the control unit 1 is
Memory 21The data of address 1 of control unit 1
Mori 22The data at address 2 of control unit 1 is recorded at address 0
Ri 2 1The data at address 3 of control unit 1 is stored in memory
22Each of them is stored in the No. 1 area. The prefetch control unit 3
The read address A at a certain time of the control unit 1 is loaded and
Memory by output address PA (eg PA = A / 2)
21, 22Read access to
The data that precedes by updating its own read address PA
Read ahead of data. Then, the data selection unit 4 is a memory
21, 22Read data D 1, D2Read the control unit 1
Dress A (for example, 0/1 of the least significant bit LSB)
, And outputs to the control unit 1.

【0009】具体的に言うと、例えば制御部1のある時
点の読出アドレスA=0番地とする。先読制御部3は、
そのロードアドレスPA=0を使用してメモリ21 ,2
2 の0番地から制御部1の0,1番地のデータD1 ,D
2 を同時に読み出す。メモリ21 ,22 は相対的に低速
なので、制御部1は最初に要求した0番地のデータD 1
を受け取るまでに、例えば制御部1の定格の待ち時間T
の2倍の時間2Tを待つことになる。
Specifically, for example, when the control unit 1 is present
It is assumed that the point read address A = 0. The prefetch control unit 3
Memory 2 using its load address PA = 01, 2
2From address 0 to address 0 and 1 of control unit 11, D
2Are read at the same time. Memory 21, 22Is relatively slow
Therefore, the control unit 1 requests the data D at the 0th address which is requested first. 1
Waiting time of the rated value of the control unit 1 before receiving
It will have to wait for 2T, which is twice as long as

【0010】最初の待ち時間2Tを経過すると、制御部
1は読出アドレスA=0に従ってデータ選択部4より0
番地のデータD1 を受け取る。次いで、制御部1は読出
アドレスA=1により次のメモリアクセスを行う。しか
るに、この時点では制御部1の1番地のデータD2 は既
に先読されているので、制御部1は引き続きアドレスA
=1に従ってデータ選択部4より1番地のデータD2
待ち時間Tで受け取れる。
After the first waiting time 2T has elapsed, the control unit 1 sets the read address A = 0 to 0 from the data selection unit 4.
Address data D 1 is received. Next, the control unit 1 performs the next memory access with the read address A = 1. However, at this point, the data D 2 at the first address of the control unit 1 has already been read in advance, so the control unit 1 continues to use the address A.
In accordance with = 1, the data D 2 at the first address can be received from the data selection unit 4 in the waiting time T.

【0011】一方、先読制御部3は最初のPA=0の読
出アクセスを完了したことにより、その後は独自に自己
の読出アドレスPAを更新(例えば+1)して先行する
PA=1番地のデータの先読を行う。従って、次の時間
2Tを経過した時は、メモリ21 ,22 の1番地から制
御部1の2,3番地のデータD1 ,D2 が同時に読み出
される。これにより、制御部1は引き続き2番地のデー
タD1 を時間Tで受け取り、更に3番地のデータD2
時間Tで受け取れる。
On the other hand, the read-ahead control unit 3 completes the first read access of PA = 0, and thereafter, independently updates (for example, +1) its own read address PA, and the preceding data of address PA = 1. Read ahead. Therefore, when the next time 2T has elapsed, the data D 1 and D 2 at addresses 2 and 3 of the control unit 1 are simultaneously read from the address 1 of the memories 2 1 and 2 2 . As a result, the control unit 1 can continue to receive the data D 1 at the address 2 at the time T and the data D 2 at the address 3 at the time T.

【0012】以下、同様にしてこの先読関係が継続し、
よって制御部1は最初の読出アクセスの場合のみ時間2
Tを待たされるが、以後は定格の待ち時間Tで連続して
データを受け取れる。好ましくは、制御部1の読出アド
レスAと先読制御部3の読出アドレスPAとを比較する
アドレス比較部5を備え、該アドレス比較部5がアドレ
ス不一致を検出した場合は、制御部1の読出アドレスA
を先読制御部3にロードする。
In the same manner, this read-ahead relationship continues in the same manner,
Therefore, the control unit 1 takes time 2 only for the first read access.
After waiting for T, the data can be continuously received at the rated waiting time T thereafter. Preferably, an address comparison unit 5 for comparing the read address A of the control unit 1 and the read address PA of the prefetch control unit 3 is provided, and when the address comparison unit 5 detects an address mismatch, the read of the control unit 1 is performed. Address A
Is loaded into the prefetch control unit 3.

【0013】例えば制御部1がCPUである場合は、ジ
ャンプ命令等の実行によりCPU1の読出アドレスAが
ジャンプする場合がある。また、それ以外の理由でも、
A≠PAと成り得る場合がある。係る場合でも、制御部
1の読出アドレスAを先読制御部3に再ロードすれば、
新たな先読関係が再開される。また好ましくは、任意の
先読データD1 ,D2 の中よりジャンプ又はサブルーチ
ンコールの命令コードを検出するオペコード処理部6を
備え、該オペコード処理部6がジャンプ又はサブルーチ
ンコールの命令コードを検出した場合は、そのオペラン
ド部にあるジャンプ先の先読データD1 ,D2 を先読制
御部3にロードする。
For example, when the control unit 1 is a CPU, the read address A of the CPU 1 may jump by executing a jump instruction or the like. Also, for other reasons,
In some cases, A ≠ PA. Even in such a case, if the read address A of the control unit 1 is reloaded to the prefetch control unit 3,
A new read ahead relationship is resumed. Further, preferably, the operation code processing unit 6 for detecting the instruction code of the jump or the subroutine call from the arbitrary read-ahead data D 1 , D 2 is provided, and the operation code processing unit 6 detects the instruction code of the jump or the subroutine call. In this case, the pre-read data D 1 and D 2 of the jump destination in the operand part are loaded into the pre-read control unit 3.

【0014】例えば、CPU1の10〜13番地の連続
する先読データD1 〜D4 が、D1=ジャンプオペコー
ド、D2 =1stオペランド(ジャンプ先アドレスの上位
ビット=10H )、D3 =2ndオペランド(ジャンプ先
アドレスの下位ビット=00 H )、D4 =他のオペコー
ドとする。これに対するCPU1の動きは、10番地の
ジャンプオペコードをフェッチ・実行したことにより、
続く11,12番地のオペランド=1000H を内部に
取り込み、1000H 番地のオペコードのフェッチ・実
行に移行する。
For example, a series of addresses 10 to 13 of the CPU 1
Read-ahead data D1~ DFourBut D1= Jump Opco
Do, D2= 1stOperand (Higher jump address
Bit = 10H), D3= 2ndOperand (jump destination
Lower bits of address = 00 H), DFour= Other Opecaux
Do The movement of CPU1 in response to this is
By fetching and executing the jump opcode,
Operand at addresses 11 and 12 that follow = 1000HInside
Capture, 1000HFetch / actual operation of address code
Go to line.

【0015】かかる場合でも、本発明によれば、オペコ
ード処理部6が先読データD1 の中よりジャンプオペコ
ードを検出した場合は、続く11,12番地の先読オペ
ランドデータD2 ,D3 =1000H をCPU1に提供
後、該先読オペランドデータD2 ,D3 =1000H
独自に先読制御部3にロードするので、既に成立してい
る先読関係はそのまま継続される。なお、サブルーチン
コールの場合も同様である。
Even in such a case, according to the present invention, when the operation code processing section 6 detects a jump operation code in the pre-read data D 1 , the pre-read operand data D 2 , D 3 of the following addresses 11 and 12 = After providing 1000 H to the CPU 1, the read-ahead operand data D 2 , D 3 = 1000 H is independently loaded into the read-ahead control unit 3, so that the read-ahead relationship that has already been established is continued. The same applies to the case of a subroutine call.

【0016】また好ましくは、任意の先読データD1
2 の中より条件分岐の命令コードを検出するオペコー
ド処理部6を備え、該オペコード処理部6が条件分岐の
命令コードを検出した場合は、前記条件分岐の飛び先が
確定した時点の制御部1の読出アドレスAを先読制御部
3にロードする。例えば、CPU1の10〜13番地の
連続する先読データD1 〜D4 が、D1=条件分岐オペ
コード、D2 =1stオペランド(条件マッチした場合の
ジャンプ先アドレスの上位ビット=10H )、D3 =2
ndオペランド(条件マッチした場合のジャンプ先アドレ
スの下位ビット=00H )、D4 =条件マッチしない場
合にフェッチ・実行される他のオペコードとする。
Also preferably, any preread data D 1 ,
An operation code processing unit 6 for detecting the instruction code of the conditional branch from D 2 is provided, and when the operation code processing unit 6 detects the instruction code of the conditional branch, the control unit at the time when the jump destination of the conditional branch is determined. The read address A of 1 is loaded into the prefetch control unit 3. For example, the preliminary read-out data D 1 to D 4 of consecutive 10-13 address the CPU1 is, D 1 = conditional branch opcode, (upper bit = 10 H jump destination address if you have a condition matched) D 2 = 1 st operand , D 3 = 2
nd operand (lower bits = 00 H jump destination address if you have conditions match), and other opcode fetched and executed when D 4 = no conditions match.

【0017】これに対するCPU1の動きは、10番地
の条件分岐オペコードをフェッチ・実行したことによ
り、条件マッチした場合は続く11,12番地のオペラ
ンド=1000H を内部に取り込み、1000H 番地の
オペコードのフェッチ・実行に移行する。また、条件マ
ッチしない場合は13番地のオペコードのフェッチ・実
行に移行する。
In response to this, the CPU 1 fetches and executes the conditional branch opcode at address 10. When a condition is matched, the subsequent operands at addresses 11 and 12 = 1000 H are fetched internally, and the opcode at address 1000 H is read. Move to fetch / execute. When the conditions are not matched, the operation shifts to fetching and executing the operation code at the address 13.

【0018】係る場合でも、本発明によれば、オペコー
ド処理部6が先読データD1 の中より条件分岐の命令コ
ードを検出した場合は、条件分岐の飛び先が確定した時
点(この例ではCPU1が条件分岐オペコードをフェッ
チ・実行した次の時点)の制御部1の読出アドレスAを
先読制御部3にロードするので、既に成立している先読
関係を効率良く利用できる。
Even in such a case, according to the present invention, when the operation code processing unit 6 detects the instruction code of the conditional branch from the prefetch data D 1 , the jump destination of the conditional branch is determined (in this example, Since the read address A of the control unit 1 at the time point after the CPU 1 fetches and executes the conditional branch opcode) is loaded into the prefetch control unit 3, it is possible to efficiently use the prefetch relationship that has already been established.

【0019】即ち、条件マッチした場合はCPU1の次
アドレスAをロードしても、A=PAとなるので、上記
無条件ジャンプの場合と同様にすることで、既に成立し
ている先読関係をそのまま継続できる。また、条件マッ
チしなかった場合はA≠PAとなるので、新たな先読関
係を形成する。また好ましくは、制御部1による割込許
可信号IAKの発生によりその時点の制御部1の読出ア
ドレスAをアドレス記憶部7に記憶すると共に、制御部
1の次の読出アドレスAを先読制御部3にロードする。
That is, when the condition is matched, even if the next address A of the CPU 1 is loaded, A = PA. Therefore, the prefetch relationship already established can be established by the same procedure as in the case of the unconditional jump. You can continue as it is. If the conditions are not matched, A ≠ PA, so a new prefetch relationship is formed. Preferably, the read address A of the control unit 1 at that time is stored in the address storage unit 7 by the generation of the interrupt permission signal IAK by the control unit 1, and the next read address A of the control unit 1 is read ahead. Load to 3.

【0020】また好ましくは、任意の先読データD1
2 の中から割込リターンの命令コードを検出するオペ
コード処理部6を備え、該オペコード処理部6が割込リ
ターン命令を検出した場合は、アドレス記憶部7のアド
レスに所定数(例えば1)を加えたものを先読制御部1
にロードする。
Also preferably, the arbitrary read-ahead data D 1 ,
An operation code processing unit 6 for detecting an instruction code of an interrupt return from D 2 is provided, and when the operation code processing unit 6 detects an interrupt return instruction, a predetermined number (for example, 1) is stored in the address of the address storage unit 7. Read-ahead control unit 1
To load.

【0021】[0021]

【実施例】以下、添付図面に従って本発明による実施例
を詳細に説明する。なお、全図を通して同一符号は同一
又は相当部分を示すものとする。図2,図3は実施例の
メモリアクセス方式のブロック図(1),(2)で、図
2において、200は汎用のCPU、201,202は
ROM、204はラッチ回路(LTH)、205は外部
アドレスカウンタ(図1の先読制御部3に相当)、20
6はROMアウトプットイネーブル(OE)タイミング
生成部、207はWAIT制御部、209はアドレス比
較部、210はチップセレクト生成部、211はデータ
セレクタ(SEL)、214はデータマルチプレクサ
(MUX)部、217〜219はラッチ回路(LTH)
である。
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Note that the same reference numerals indicate the same or corresponding parts throughout the drawings. 2 and 3 are block diagrams (1) and (2) of the memory access method of the embodiment. In FIG. 2, 200 is a general-purpose CPU, 201 and 202 are ROMs, 204 is a latch circuit (LTH), and 205 is External address counter (corresponding to the prefetch control unit 3 in FIG. 1), 20
6 is a ROM output enable (OE) timing generation unit, 207 is a WAIT control unit, 209 is an address comparison unit, 210 is a chip select generation unit, 211 is a data selector (SEL), 214 is a data multiplexer (MUX) unit, 217. ~ 219 is a latch circuit (LTH)
Is.

【0022】また図3において、208はオペコード処
理部、215は16ビット幅のレジスタ(REG)、2
16はANDゲート回路(A)、224はラッチ回路
(LTH)、225は加算器(ADD)、223はデー
タセレクタ(SEL)、228はアドレスカウンタイネ
ーブル生成部、229はアドレスカウンタロード生成
部、230は遅延回路(D)である。
In FIG. 3, 208 is an operation code processing unit, 215 is a 16-bit wide register (REG), and 2 is a register.
16 is an AND gate circuit (A), 224 is a latch circuit (LTH), 225 is an adder (ADD), 223 is a data selector (SEL), 228 is an address counter enable generator, 229 is an address counter load generator, 230 Is a delay circuit (D).

【0023】図2において、CPU200の連続したメ
モリ空間に対応する各データの内、ROM201は偶数
アドレスのデータを記憶し、ROM202は奇数アドレ
スのデータを記憶している。チップセレクト生成部21
0は、CPU200のメモリアクセス要求信号XMRQ
=L(アクティブ)の時に、そのアドレス信号A[1
5:0]がROM201,202のメモリ空間(例えば
0000H 〜DFFFH )を指す時は、ROMチップセ
レクト信号ROMCS=L(アクティブ)を出力する。
In FIG. 2, among the data corresponding to the continuous memory space of the CPU 200, the ROM 201 stores the data of even addresses and the ROM 202 stores the data of odd addresses. Chip select generator 21
0 is the memory access request signal XMRQ of the CPU 200
= L (active), the address signal A [1
5: 0] when referring to a memory space of ROM201,202 (e.g. 0000 H ~DFFF H) outputs a ROM chip select signal ROMCS = L (active).

【0024】ラッチ回路204は、CPUのアドレス信
号A[15:0]をアドレススタート信号ADSの各立
ち下がりでラッチし、CPUアドレスラッチ信号AL
[15:1]を形成する。外部アドレスカウンタ205
は、最初はCPUアドレスラッチ信号AL[15:1]
をロードしてROM201,202のリードアクセスを
行う。しかし、その後はCPU200のプログラムカウ
ンタ(不図示)が通常は+1されること予測して、独自
に自己のアドレスカウント信号AC[15:1]を+1
し、ROMデータの先読を行う。またCPU200の読
出アドレスAが不連続に変化した場合は、新たなCPU
アドレスラッチ信号AL[15:1]がロードされる。
The latch circuit 204 latches the address signal A [15: 0] of the CPU at each falling edge of the address start signal ADS, and outputs the CPU address latch signal AL.
[15: 1] is formed. External address counter 205
Is the CPU address latch signal AL [15: 1] at first.
Is loaded and the ROM 201 and 202 are read-accessed. However, after that, it is predicted that the program counter (not shown) of the CPU 200 will normally be incremented by +1 and the address count signal AC [15: 1] of its own is incremented by +1 independently.
Then, the ROM data is pre-read. If the read address A of the CPU 200 changes discontinuously, a new CPU
The address latch signal AL [15: 1] is loaded.

【0025】図4に外部アドレスカウンタ205の回路
図を示す。データセレクタSELはアドレスカウンタC
TRにロードするアドレスデータを選択する。即ち、カ
ウンタイネーブル信号CNEN=L(ノンアクティブ)
の時はCPUアドレスラッチ信号AL[15:1]の側
を選択し、またCNEN=H(アクティブ)の時は後述
のロードアドレス信号LDAD[15:1]の側を選択
する。
FIG. 4 shows a circuit diagram of the external address counter 205. The data selector SEL is an address counter C
Select the address data to be loaded into TR. That is, the counter enable signal CNEN = L (non-active)
In the case of, the side of the CPU address latch signal AL [15: 1] is selected, and in the case of CNEN = H (active), the side of the load address signal LDAD [15: 1] described later is selected.

【0026】アドレスカウンタCTRは、非同期ロード
型のカウンタであり、カウンタロード信号CNLD=L
(アクティブ)の時は入力端子Dのアドレスデータをロ
ードする。またCNLD=H(ノンアクティブ)で、か
つCNEN=H(アクティブ)の時は、アドレススター
ト信号ADSの2回に1回の割合で発生するクロック信
号CKによりアドレスカウント信号AC[15:1]を
+1する。
The address counter CTR is an asynchronous load type counter and has a counter load signal CNLD = L.
When it is (active), the address data of the input terminal D is loaded. When CNLD = H (non-active) and CNEN = H (active), the address count signal AC [15: 1] is generated by the clock signal CK generated once every two times the address start signal ADS. +1.

【0027】図2に戻り、データセレクタ211は、C
NEN=L(ノンアクティブ)の時はCPUアドレスラ
ッチ信号AL[15:1]の側を選択してROMアドレ
ス信号RA[15:1]となし、またCNEN=H(ア
クティブ)の時はアドレスカウント信号AC[15:
1]の側を選択してROMアドレス信号RA[15:
1]となす。なお、このデータセレクタ211を削除
し、RA[15:1]=AC[15:1]としても良
い。
Returning to FIG. 2, the data selector 211 has a C
When NEN = L (non-active), the CPU address latch signal AL [15: 1] is selected and the ROM address signal RA [15: 1] is not output. When CNEN = H (active), the address count is performed. Signal AC [15:
1] side to select the ROM address signal RA [15:
1]. Note that this data selector 211 may be deleted and RA [15: 1] = AC [15: 1].

【0028】このROMアドレス信号RA[15:1]
は実際にROM201及び202に供給され、各ROM
よりROM読出データ信号ROM1D[7:0],RO
M2D[7:0]が同時に読み出される。ラッチ回路2
18,219はROM出力イネーブル信号XROMOE
=L(アクティブ)の区間に発生したROM読出データ
信号ROM1D[7:0],ROM2D[7:0]をラ
ッチし、ROMデータラッチ信号ROM1LD[7:
0],ROM2LD[7:0]を形成する。
This ROM address signal RA [15: 1]
Is actually supplied to the ROMs 201 and 202, and each ROM
ROM read data signal ROM1D [7: 0], RO
M2D [7: 0] are read simultaneously. Latch circuit 2
18, 219 are ROM output enable signals XROMOE
The ROM read data signals ROM1D [7: 0] and ROM2D [7: 0] generated in the section of = L (active), and the ROM data latch signal ROM1LD [7:
0], and ROM2LD [7: 0] are formed.

【0029】このROMアドレス信号RA[15:1]
は、通常はアドレスカウント信号AC[15:1]に従
ってROMデータの先読制御に使用される。しかし、何
らかの理由でCPU200の読出アドレスAが不連続な
値に飛ぶと、先読データを提供できなくなる。そこで、
ラッチ回路217を設け、ROMアドレス信号RA[1
5:1]を後述のタイミング信号DTIMの各立ち上が
りでラッチすると共に、その出力のROMアドレスラッ
チ信号RAL[15:1]をアドレス比較部209に提
供する。
This ROM address signal RA [15: 1]
Is normally used for read-ahead control of ROM data according to the address count signal AC [15: 1]. However, if the read address A of the CPU 200 jumps to a discontinuous value for some reason, the pre-read data cannot be provided. Therefore,
A latch circuit 217 is provided, and the ROM address signal RA [1
5: 1] is latched at each rising edge of the timing signal DTIM described later, and the output ROM address latch signal RAL [15: 1] is provided to the address comparison unit 209.

【0030】アドレス比較部209は、CPUアドレス
ラッチ信号AL[15:1]とROMアドレスラッチ信
号RAL[15:1]とを比較し、一致する場合はCP
Uアドレスラッチ信号のLSBビットAL[0]の0又
は1(偶数又は奇数)に応じてROMデータ選択信号R
OM1EN又はROM2ENを生成する。また、CPU
アドレスラッチ信号AL[15:1]とROMアドレス
信号RA[15:1]とを比較し、不一致の場合はRO
Mディセーブル信号ROMDS=H(アクティブ)を出
力する。
The address comparison unit 209 compares the CPU address latch signal AL [15: 1] with the ROM address latch signal RAL [15: 1], and if they match, CP
ROM data selection signal R according to 0 or 1 (even or odd) of LSB bit AL [0] of U address latch signal
Generate OM1EN or ROM2EN. Also, CPU
The address latch signal AL [15: 1] is compared with the ROM address signal RA [15: 1], and if they do not match, RO
The M disable signal ROMDS = H (active) is output.

【0031】図5にアドレス比較部209の回路図を示
す。コンパレータCMP1 はXROMCS=L(アクテ
ィブ)の時に付勢され、AL[15:1]とRAL[1
5:1]とを比較する。AL[15:1]=RAL[1
5:1]の時は比較結果信号A=BがH(アクティブ)
となり、ANDゲート回路A1 ,A2 を付勢する。そし
て、AL[0]=0(偶数)の場合はROM1EN=1
(アクティブ)となり、またAL[1]=1(奇数)の
場合はROM2EN=1(アクティブ)となる。
FIG. 5 shows a circuit diagram of the address comparison unit 209. Comparator CMP 1 is activated when XROMCS = L (active), and AL [15: 1] and RAL [1
5: 1]. AL [15: 1] = RAL [1
5: 1], the comparison result signal A = B is H (active)
Then, the AND gate circuits A 1 and A 2 are energized. If AL [0] = 0 (even number), ROM1EN = 1
(Active), and when AL [1] = 1 (odd number), ROM2EN = 1 (active).

【0032】コンパレータCMP2 は、XROMCS=
L(アクティブ)で、かつCPU200のROM出力イ
ネーブル信号XOE=L(アクティブ)の時に付勢さ
れ、AL[15:1]とRA[15:1]とを比較す
る。AL[15:1]≠RA[15:1]の時はROM
ディセーブル信号ROMDS=H(アクティブ)を出力
する。この信号の発生は、外部アドレスカウンタ205
にAL[15:1]を強制ロードする原因となる。
Comparator CMP 2 has XROMCS =
It is activated when L (active) and the ROM output enable signal XOE of the CPU 200 = L (active), and AL [15: 1] and RA [15: 1] are compared. ROM when AL [15: 1] ≠ RA [15: 1]
The disable signal ROMDS = H (active) is output. This signal is generated by the external address counter 205.
This will cause AL [15: 1] to be forcibly loaded.

【0033】図2に戻り、OEタイミング生成部206
は、ROMアウトプットイネーブル信号XROMOE及
びタイミング信号DTIMを生成する。図6にOEタイ
ミング生成部206の回路図を示す。また図11にOE
タイミング生成部206の動作タイミングチャートを示
す。図2に戻り、WAIT制御部207は、CPU20
0へのROMデータの提供に4クロックステート分が必
要となるような時に2クロックステート分のレディー信
号RDYを生成する。
Returning to FIG. 2, the OE timing generator 206
Generates a ROM output enable signal XROMOE and a timing signal DTIM. FIG. 6 shows a circuit diagram of the OE timing generation unit 206. Also, in FIG.
7 shows an operation timing chart of the timing generation unit 206. Returning to FIG. 2, the WAIT control unit 207 has the CPU 20.
A ready signal RDY for two clock states is generated when four clock states are needed to provide ROM data to 0.

【0034】図7にWAIT制御部207の回路図を示
す。XROMCS=L(アクティブ)の時に、CNLD
=L(アクティブ)で、かつCNEN=L(ノンアクテ
ィブ)の状態になると、2クロックステート分のレディ
ー信号RDY(即ち、WAIT信号)=H(アクティ
ブ)を生成する。図2に戻り、データMUX部214
は、ROM1EN=1(アクティブ)の時にROMラッ
チデータ信号ROM1LD[7:0]を選択してCPU
200に提供し、またROM2EN=1(アクティブ)
の時にROMラッチデータ信号ROM2LD[7:0]
を選択してCPU200に提供する。
FIG. 7 shows a circuit diagram of the WAIT control section 207. CNLD when XROMCS = L (active)
= L (active) and CNEN = L (non-active), a ready signal RDY (that is, WAIT signal) = H (active) for two clock states is generated. Returning to FIG. 2, the data MUX unit 214
Selects the ROM latch data signal ROM1LD [7: 0] when ROM1EN = 1 (active) to select the CPU
200, and ROM2EN = 1 (active)
ROM latch data signal ROM2LD [7: 0]
Is provided to the CPU 200.

【0035】本来、ROMデータの読出には4クロック
ステート分の時間を要するのであるが、1回のROMア
クセスでCPU200の2アドレス分のROMデータを
読み出すことで、見かけ上のROM高速読出を可能にし
ている。更に、本実施例においては、CPU200がジ
ャンプ、サブルーチンコール、条件分岐、割込処理等を
行うことを考慮し、これらの場合でもCPU200がR
OMアクセスを迅速、有効に行えるように、各種回路が
設けられている。
Originally, it takes time for four clock states to read the ROM data, but by reading the ROM data for two addresses of the CPU 200 with one ROM access, an apparent ROM high-speed reading is possible. I have to. Further, in the present embodiment, considering that the CPU 200 performs a jump, a subroutine call, a conditional branch, an interrupt process, etc., even in these cases, the CPU 200 performs the R
Various circuits are provided so that OM access can be performed quickly and effectively.

【0036】図3において、ラッチ回路224は、CP
U200への割込要求信号IRQ=H(アクティブ)に
なって後、割込許可信号IAK=H(アクティブ)にな
った時のCPUアドレスラッチ信号AL[15:0]を
ラッチする。このラッチしたアドレスに加算器225で
+1したアドレスが、割込処理からの戻り先アドレス信
号RETADである。
In FIG. 3, the latch circuit 224 has a CP
After the interrupt request signal IRQ = H (active) to the U200, the CPU address latch signal AL [15: 0] when the interrupt enable signal IAK = H (active) is latched. The address obtained by adding +1 to the latched address by the adder 225 is the return destination address signal RETAD from the interrupt processing.

【0037】オペコード処理部208は、先読されたR
OMデータラッチ信号ROM1LD[7:0],ROM
2LD[7:0]に基づきジャンプ、サブルーチンコー
ル、条件分岐及び割込リターンの各オペコードの検出を
行うと共に、該オペコードを検出した時はジャンプ・サ
ブルーチンコール検出信号JPCALOP、条件分岐検
出信号IFOP又は割込リターン検出信号RETIOP
を出力する。
The operation code processing unit 208 uses the preread R
OM data latch signal ROM1LD [7: 0], ROM
Based on 2LD [7: 0], each operation code of jump, subroutine call, conditional branch and interrupt return is detected, and when the operation code is detected, jump / subroutine call detection signal JPCALOP, conditional branch detection signal IFOP or interrupt is detected. Included return detection signal RETIOP
Is output.

【0038】図8にオペコード処理部208の回路図を
示す。例えばROM201の0番地に最初のオペコード
が格納されているとする。最初は、CPU200のリセ
ット信号XRESET=L(アクティブ)によりFF 5
が強制セットされ、OPコード検出イネーブル信号OP
1=H(アクティブ)となる。これにより、図の上半分
の側のデコーダDEC1 〜DEC3 がイネーブルされ、
夫々は分岐命令、ジャンプ・コール命令及びそのオペラ
ンド数の検出を行う。
FIG. 8 is a circuit diagram of the operation code processing unit 208.
Show. For example, the first opcode at address 0 in ROM 201
Is stored. First, the CPU 200 reset
FF by input signal XRESET = L (active) Five
Is forcibly set and the OP code detection enable signal OP
1 = H (active). This allows the upper half of the figure
Side decoder DEC1~ DEC3Is enabled,
Each is a branch instruction, jump call instruction and its opera
The number of hands.

【0039】例えばROM201の0番地のオペコード
がジャンプ(又はサブルーチンコール)のオペコードと
すると、これはデコーダDEC2 を満足し、XROMO
Eの立ち上がりでFF2 がセットされる。即ち、JPC
AL1 =H(アクティブ)になる。また、同時に該ジャ
ンプオペコードの一部に格納されているオペランド数
(バイト数)のデータがデコーダDEC3 で対応するカ
ウント値X1 に変換され、更にその上位ビットの内容が
ダウンカウンタDCTR1 にロードされる。
For example, if the operation code at address 0 of the ROM 201 is a jump (or subroutine call) operation code, this satisfies the decoder DEC 2 and XROMO
FF 2 is set at the rising edge of E. That is, JPC
AL 1 = H (active). At the same time, the data of the number of operands (the number of bytes) stored in a part of the jump operation code is converted into the corresponding count value X 1 by the decoder DEC 3 , and the contents of the upper bits are loaded into the down counter DCTR 1 . To be done.

【0040】カウント値X1 の上位ビットの内容は、例
えばオペランド数=1,2の場合は「0」であり、これ
は次のROM読出サイクルで次のオペコードが読み出さ
れることを表す。またオペランド数=3,4の場合は
「1」であり、これは次の次のROM読出サイクルで次
のオペコードが読み出されることを表す。また、カウン
ト値X1 の下位ビットLSBはANDゲート回路A2
3 に加えられる。この下位ビットLSBの内容は、オ
ペランド数が奇数の時は「H」で、偶数の時は「L」で
ある。また通常はDEC4 の出力は「L」である。
The content of the high-order bit of the count value X 1 is “0” when the number of operands is 1, 2 for example, which means that the next operation code is read in the next ROM read cycle. When the number of operands is 3 and 4, it is "1", which means that the next operation code is read in the next next ROM read cycle. Further, the lower bit LSB of the count value X 1 is the AND gate circuit A 2 ,
Added to A 3 . The content of the lower bit LSB is "H" when the number of operands is odd, and "L" when the number of operands is even. Also, the output of DEC 4 is normally "L".

【0041】例えば上記ジャンプオペコードに続くオペ
ランド数=2とする。この場合はDCTR1 にロードさ
れるカウント値は「0」であり、X1 の下位ビットの内
容は「L」である。DCTR1 はカウント値=0により
そのボロー信号BO=H(アクティブ)を出力し、これ
により次のROM読出サイクルでもカウント値のロード
がイネーブルされる。即ち、次のROM読出サイクルで
もオペコードの検出が行われる。但し、前のROM読出
サイクルにおけるX1 の下位ビットの内容=Lにより、
ANDゲート回路A3 を満足し、これにより次のROM
読出サイクルではOP2=H(アクティブ)である。
For example, the number of operands following the jump operation code = 2. In this case, the count value loaded into DCTR 1 is "0", and the contents of the lower bits of X 1 are "L". The DCTR 1 outputs its borrow signal BO = H (active) when the count value = 0, so that the loading of the count value is enabled also in the next ROM read cycle. That is, the operation code is detected also in the next ROM read cycle. However, due to the content of the lower bit of X 1 = L in the previous ROM read cycle,
The AND gate circuit A 3 is satisfied, and the next ROM
In the read cycle, OP2 = H (active).

【0042】一方、図3において、上記ジャンプオペコ
ードに引き続きROM201,202から読み出される
各オペランドデータROM2LD[7:0],ROM1
LD[7:0]は、JPCALOP=H(アクティブ)
により、レジスタ215に所定の方法でセットされる。
即ち、CPU200の若い側の1番地に対応する1st
ペランドデータROM2LD[7:0]はレジスタ21
5のMSB側にセットされ、CPU200の2番地に対
応する2ndオペランドデータROM1LD[7:0]は
LSB側にセットされる。
On the other hand, in FIG. 3, operand data ROM2LD [7: 0] and ROM1 read from the ROMs 201 and 202 subsequent to the jump opcode are read.
LD [7: 0] has JPCALOP = H (active)
Is set in the register 215 by a predetermined method.
That is, 1 corresponds to the first address of the young side of CPU 200 st operand data ROM2LD [7: 0] register 21
5 is set to the MSB side of the two corresponding to the second address of the CPU 200 nd operand data ROM1LD [7: 0] is set to the LSB side.

【0043】図8に戻り、デコーダDEC3 は、OP1
=L(ノンアクティブ)の時には、通常ではあり得ない
特定のカウント値X1 を出力する。この場合は、デコー
ダDEC4 の出力=H(ノンアクティブ)となり、図8
の上半分の回路の動作は消勢される。同様にして、OP
2=H(アクティブ)の場合は、図8の下半分の回路が
付勢され、上記と同様の動作を行う。かくして、ROM
201,202のいずれにオペコードが含まれていて
も、正しくオペコードの検出が行われる。
Returning to FIG. 8, the decoder DEC 3 operates at OP1.
= L (non-active), it outputs a specific count value X 1 that cannot be normally obtained. In this case, the output of the decoder DEC 4 is H (non-active), as shown in FIG.
The operation of the upper half circuit is deactivated. Similarly, OP
When 2 = H (active), the circuit in the lower half of FIG. 8 is activated and the same operation as above is performed. Thus, ROM
Whether the operation code is included in either 201 or 202, the operation code is correctly detected.

【0044】なお、図示しないが、オペコード処理部2
08には割込リターン命令RETIOPの検出回路も含
まれる。図3に戻り、アドレスカウンタイネーブル生成
部228はカウンタイネーブル信号CNENの生成を行
う。またアドレスカウンタロード生成部229はカウン
タロード信号CNLDの生成を行う。図9にアドレスカ
ウンタイネーブル生成部228の回路図を示す。また図
10にアドレスカウンタロード生成部229の回路図を
示す。いずれも、所定の入力信号により付勢され、必要
なタイミングに必要な時間幅の信号CNEN又はCNL
Dを出力するものである。
Although not shown, the operation code processing unit 2
08 also includes a detection circuit for the interrupt return instruction RETIOP. Returning to FIG. 3, the address counter enable generator 228 generates the counter enable signal CNEN. Further, the address counter load generator 229 generates a counter load signal CNLD. FIG. 9 shows a circuit diagram of the address counter enable generator 228. FIG. 10 shows a circuit diagram of the address counter load generator 229. Each of them is energized by a predetermined input signal and has a signal width CNEN or CNL of a time width necessary for a necessary timing.
It outputs D.

【0045】図12は実施例の基本アクセス時のタイミ
ングチャートである。この例のCPU200は、最初に
0番地のROMリードアクセス要求を発生している。そ
こで、外部アドレスカウンタ205に0番地をロード
し、ROM201,202の0番地にROMリードアク
セスをかける。この最初のROMリードアクセスには4
クロックステート分の時間がかかるので、RDY信号に
よりCPU200に2クロック分のウエイトサイクルT
Wを挿入する。やがて、最初の4クロックステート分の
時間を経過すると、ROM201,202からCPU2
00の0,1番地のデータが同時に読み出される。この
うちの1番地のデータは先読データである。
FIG. 12 is a timing chart at the time of basic access according to the embodiment. The CPU 200 in this example first issues a ROM read access request at address 0. Therefore, the address 0 is loaded into the external address counter 205, and the ROM read access is applied to the addresses 0 of the ROMs 201 and 202. 4 for this first ROM read access
Since it takes a time corresponding to the clock state, the RDY signal causes the CPU 200 to wait for two clock cycles T.
Insert W. Eventually, when the time corresponding to the first four clock states has elapsed, the ROM 201 and the CPU 202
Data at addresses 0 and 1 of 00 are simultaneously read. The data at address 1 is preread data.

【0046】従って、CPU200の最初の0番地のR
OMリードアクセス要求に対しては4クロックステート
目に0番地のデータを提供できる。そして、CPU20
0の続く1番地のROMリードアクセス要求に対しては
その2クロックステート目に1番地のデータを提供でき
る。更に、この区間では外部アドレスカウンタ205は
独自に+1を行い、ROM201,202の1番地に引
き続きROMリードアクセスをかけている。従って、C
PU200が引き続き2番地のROMリードアクセス要
求をかけた場合はその2クロックステート目に2番地の
データを提供できる。更にCPU200が3番地のRO
Mリードアクセス要求をかけた場合はその2クロックス
テート目に3番地のデータを提供できる。以下同様であ
り、かくして、最初の4クロックステートの後は、常に
2クロックステートでCPU200にデータを提供で
き、相対的に低速なROMの高速アクセスが実現され
る。
Therefore, R at the first address 0 of the CPU 200
In response to the OM read access request, data at address 0 can be provided at the 4th clock state. And the CPU 20
For a ROM read access request at address 1 following 0, data at address 1 can be provided at the second clock state. Further, in this section, the external address counter 205 independently performs +1 and continues ROM read access to the first addresses of the ROMs 201 and 202. Therefore, C
When the PU 200 continues to issue the ROM read access request for the address 2, the data for the address 2 can be provided at the second clock state. Further, the CPU 200 is the RO at address 3.
When the M read access request is issued, the data at the third address can be provided in the second clock state. The same applies to the following. Thus, after the first four clock states, data can be always provided to the CPU 200 in two clock states, and high-speed access to the relatively slow ROM is realized.

【0047】図13は実施例のROM以外にアクセス時
のタイミングチャートである。この例のCPU200
は、例えば0,1番地のROMリードアクセス要求を行
った後、RAM領域(又はI/O空間領域)に対するア
クセスを行っている。これに対して、図9のアドレスカ
ウンタイネーブル生成部228では、XROMCS=H
(ノンアクティブ)により、ADSで2クロックステー
ト分の間CNEN=H(ノンアクティブ)とする。これ
により、外部アドレスカウンタ205はカウントディセ
ーブルとされ、その時点のカウント値を保持する。従っ
て、その後にCPU200のROMリードアクセス要求
が再開された時は、引き続き2クロックステート分の待
ち時間で2,3番地のデータを提供できる。
FIG. 13 is a timing chart when accessing other than the ROM of the embodiment. CPU 200 of this example
Performs a ROM read access request at addresses 0 and 1, for example, and then accesses the RAM area (or I / O space area). On the other hand, in the address counter enable generator 228 of FIG. 9, XROMCS = H
By (non-active), ADS is set to CNEN = H (non-active) for two clock states. As a result, the external address counter 205 is disabled and holds the count value at that time. Therefore, when the ROM read access request of the CPU 200 is resumed thereafter, the data at addresses 2 and 3 can be continuously provided with the waiting time of 2 clock states.

【0048】図14は実施例のアドレス不一致検出時の
タイミングチャートである。この例のCPU200は、
例えば5番地のジャンプオペコードのフェッチ・実行、
及び続く6,7番地のオペランドデータ(ジャンプ先ア
ドレス=1000)の読出により、無条件で1000番
地にある次のオペコードの読出に移行している。その結
果、CPU200のアドレスラッチ信号AL[15:
1]とROM先読アドレス信号RA[15:1]との間
に不一致が生じる。
FIG. 14 is a timing chart at the time of detecting an address mismatch according to the embodiment. The CPU 200 of this example is
For example, fetch and execute the jump opcode at address 5,
Then, by reading the operand data of addresses 6 and 7 (jump destination address = 1000), the operation is unconditionally moved to read the next opcode at address 1000. As a result, the address latch signal AL [15:
1] and the ROM pre-reading address signal RA [15: 1] do not match.

【0049】これに対して、図5のアドレス比較部20
9では、XROMCS=L(アクティブ)で、かつXO
E=L(アクティブ)の時に、AL[15:1]≠RA
[15:1]を検出したことにより、ROMDS=H
(アクティブ)を出力する。更に、図8のアドレスカウ
ンタイネーブル生成部228では、ROMDS=Hによ
り3クロックステート分のCNEN=L(ノンアクティ
ブ)が形成され、また図10のアドレスカウンタロード
生成部229では、3クロックステート分のROMDS
F=Lにより、同じ時間幅のCNLD=L(アクティ
ブ)が形成される。これらにより、外部アドレスカウン
タ205にはAL[15:1]=「800」がロードさ
れ、新たな先読サイクルが起動される。これはCPU2
00のアドレスで言うと「1000」,「1001」に
対応する。
On the other hand, the address comparison unit 20 shown in FIG.
In 9, XROMCS = L (active) and XO
When E = L (active), AL [15: 1] ≠ RA
By detecting [15: 1], ROMDS = H
Outputs (active). Further, in the address counter enable generation unit 228 of FIG. 8, CNEN = L (non-active) for 3 clock states is formed by ROMDS = H, and in the address counter load generation unit 229 of FIG. ROMDS
With F = L, CNLD = L (active) of the same time width is formed. As a result, the external address counter 205 is loaded with AL [15: 1] = “800”, and a new prefetch cycle is activated. This is CPU2
An address of 00 corresponds to "1000" and "1001".

【0050】一方、図7のWAIT制御部207では、
ROMDSの立ち下がりによってウエイト信号RDYが
付勢され、これによりCPU200の1000番地に対
するROMリードアクセス要求は4クロックステート分
待たされる。しかし、1001番地以降の各アクセス要
求は2クロックステート分で満たされる。なお、以上の
処理は、図3のオペコード処理部208を備えない場
合、又は不測の事態でAL[15:1]≠RA[15:
1]が発生した場合等に、先読処理の一致化が図れ、有
効である。
On the other hand, in the WAIT control section 207 of FIG.
The wait signal RDY is activated by the fall of ROMDS, whereby the ROM read access request to the address 1000 of the CPU 200 is made to wait for 4 clock states. However, each access request after the address 1001 is satisfied in two clock states. It should be noted that the above processing is performed when the operation code processing unit 208 of FIG. 3 is not provided or in an unexpected situation, AL [15: 1] ≠ RA [15:
1] occurs, the prefetching process can be matched and is effective.

【0051】但し、本実施例ではオペコード処理部20
8を備えるので、CPU200がJMP,CALL等の
分岐処理を行っても、これに対する先読制御を一層能率
良く行える。図15は実施例のJMP,CALL処理の
タイミングチャートである。この例のCPU200は、
例えば7番地のJPオペオペコードの読出、及び続く
8,9番地のオペランドデータ(ジャンプ先アドレス=
100)の読出により、100番地にある次のオペコー
ドの読出に移行する。
However, in this embodiment, the operation code processing section 20
8 is provided, even if the CPU 200 performs branch processing such as JMP and CALL, prefetch control for the branch processing can be performed more efficiently. FIG. 15 is a timing chart of JMP and CALL processing of the embodiment. The CPU 200 of this example is
For example, the JP operation code at address 7 is read, and the operand data at addresses 8 and 9 (jump destination address =
By reading 100), the process moves to the reading of the next opcode at the address 100.

【0052】これに対して、図8のオペコード処理部2
08では、OP2=H(アクティブ)の時に先読データ
ROM2LD[7:0]のJPオペコードを検出するこ
とにより、JPCAL2 =H(アクティブ)を出力す
る。これにより、図3のレジスタ215には、続く8,
9番地の先読(オペランド)データROM1LD[7:
0],ROM2LD[7:0]が夫々MSB側、LSB
側にセットされる。
On the other hand, the operation code processing unit 2 of FIG.
In 08, OP2 = H look-ahead data ROM2LD when (active) [7: 0] by detecting the JP opcode, outputs the JPCAL 2 = H (active). As a result, the register 215 of FIG.
Lookahead (operand) data ROM 1LD [7: at address 9]
0] and ROM2LD [7: 0] are on the MSB side and the LSB, respectively.
Set to the side.

【0053】一方、図10のアドレスカウンタロード生
成部229では、JPCALOP=H(アクティブ)の
立ち下がりエッジを検出して1クロックステート分のC
NLD=L(アクティブ)を発生する。これにより、外
部アドレスカウンタ205には図3のセレクタ223の
出力のLDAD[15:1]=「80」がロードされ、
これによりCPUアドレスの100,101番地の先読
サイクルが継続される。このように、CPU200の飛
び先アドレスが事前に検出できるので、RDY信号は発
生せず、CPU200は2クロックステートで処理を継
続できる。
On the other hand, the address counter load generator 229 of FIG. 10 detects the falling edge of JPCALOP = H (active) and detects C for one clock state.
Generate NLD = L (active). As a result, the external address counter 205 is loaded with LDAD [15: 1] = “80” output from the selector 223 of FIG.
As a result, the read-ahead cycle of CPU addresses 100 and 101 is continued. In this way, since the jump destination address of the CPU 200 can be detected in advance, the RDY signal is not generated and the CPU 200 can continue the processing in the 2 clock state.

【0054】なお、図3の遅延回路230は、JPCA
LOP=L(ノンアクティブ)となった時の時間を引き
延ばし、これによりレジスタ215の側のデータ選択を
可能にしている。図16は実施例の条件分岐処理のタイ
ミングチャートである。この例のCPU200は、例え
ば7番地の条件分岐オペコードのフェッチ・実行によ
り、分岐条件を判定する。分岐条件を満足した場合の飛
び先アドレスは続く8,9番地のオペランドデータ(条
件マッチの場合のジャンプ先アドレス=100)にあ
り、この場合は100番地にある次のオペコードの読出
に移行する。しかし、この例は条件を満足しない場合を
示しており、この場合は続く10番地にある次のオペコ
ードの読出に移行する。
The delay circuit 230 shown in FIG.
The time when LOP = L (non-active) is extended, thereby enabling the data selection on the register 215 side. FIG. 16 is a timing chart of the conditional branch process of the embodiment. The CPU 200 in this example determines the branch condition by fetching and executing the conditional branch opcode at address 7, for example. The jump destination address when the branch condition is satisfied is in the operand data of the following addresses 8 and 9 (jump destination address in case of condition match = 100), and in this case, the process proceeds to the reading of the next opcode at the address 100. However, this example shows a case where the condition is not satisfied, and in this case, the process proceeds to the reading of the next operation code at the subsequent address 10.

【0055】これに対して、図8のオペコード処理部2
08では、OP2=H(アクティブ)の時に先読データ
ROM2LD[7:0]の条件分岐オペコードを検出す
ることにより、IF2 =H(アクティブ)を出力する。
一方、図9のアドレスカウンタイネーブル生成部228
では、IFOP=H(アクティブ)により、その立ち上
がりエッジを検出して所定時間経過後に所定クロックス
テート分の間CNEN=L(ノンアクティブ)とする。
また図10のアドレスカウンタロード生成部229で
は、IFOP=H(アクティブ)の立ち上がりエッジを
検出して所定時間経過後に所定クロックステート分のC
NLD=L(アクティブ)を発生する。
On the other hand, the operation code processing unit 2 of FIG.
In 08, OP2 = H (active) look-ahead data ROM2LD when the [7: 0] by detecting a conditional branch opcode, and outputs the IF 2 = H (active).
On the other hand, the address counter enable generator 228 of FIG.
Then, when IFOP = H (active), its rising edge is detected and CNEN = L (non-active) for a predetermined clock state after a predetermined time has elapsed.
Further, the address counter load generator 229 in FIG. 10 detects the rising edge of IFOP = H (active) and after a lapse of a predetermined time, C for a predetermined clock state.
Generate NLD = L (active).

【0056】この時点では、CPU200は既に条件判
定を終了しており、該判定結果に応じて、続く8,9番
地のオペランドデータの読出、又は10番地の次のオペ
コードの読出に移行する。もし、条件マッチし、CPU
200が続く8,9番地のオペランドデータの読出に移
行した場合は、該8,9番地のアクセスに関しては引き
続きAL[15:1]=RA[15:1]の関係を満足
できるので、図示しないが、この関係を検出することで
上記無条件ジャンプの場合と同様の処理を行い、先読関
係をそのまま継続できる。
At this point of time, the CPU 200 has already finished the condition determination, and according to the result of the determination, the process proceeds to the reading of the operand data at addresses 8 and 9 or the reading of the next opcode at the address 10. If the condition matches, CPU
When the operation proceeds to read the operand data of the 8th and 9th addresses followed by 200, the relation of AL [15: 1] = RA [15: 1] can still be satisfied for the access of the 8th and 9th addresses, so it is not shown. However, by detecting this relationship, the same processing as in the case of the unconditional jump is performed, and the prefetch relationship can be continued as it is.

【0057】また、条件マッチせず、CPU200が1
0番地の次のオペコードの読出に移行した場合は、引き
続きAL[15:1]=RA[15:1]の関係を満足
できないので、この関係を検出することで、図示の如く
ロードされたRA[15:1]に従って、新たに先読関
係を確立する。なお、上記条件分岐命令を検出した場合
は、その後の所定区間のROMアクセス制御をCPU2
00からの制御下に置くように構成しても良い。この場
合は、例えば条件分岐命令検出後のCPU200の3ア
ドレス区間分はROMアクセスをAL[15:1]のル
ートで行い、その後の、飛び先アドレスが確定した時点
のAL[15:1]を外部アドレスカウンタ205にロ
ードする。
Further, the condition is not matched, and the CPU 200 sets 1
When the next operation code at address 0 is read, the relation AL [15: 1] = RA [15: 1] cannot be satisfied. Therefore, by detecting this relation, the RA loaded as shown in FIG. According to [15: 1], a prefetch relationship is newly established. When the conditional branch instruction is detected, the CPU 2 executes the ROM access control in a predetermined section thereafter.
You may comprise so that it may be put under control from 00. In this case, for example, the ROM access is performed through the AL [15: 1] route for the three address sections of the CPU 200 after the detection of the conditional branch instruction, and then the AL [15: 1] at the time when the jump destination address is fixed is set. The external address counter 205 is loaded.

【0058】図17は実施例の割込処理のタイミングチ
ャートである。この例のCPU200は、7番地の処理
実行中に外部からの割込要求IRQを受け、そのマシン
ステートT2の終わりに該割込要求IRQを受け付けた
ことにより割込許可信号IAKを発生している。ハード
ウエアにより決められた割込ジャンプ先は例えば6FE
番地であり、CPU200は割込許可信号IAKの出力
と同時に6FE番地のデータ読出を行うことになる。
FIG. 17 is a timing chart of the interrupt processing of the embodiment. The CPU 200 in this example receives an interrupt request IRQ from the outside during execution of processing at address 7, and receives the interrupt request IRQ at the end of the machine state T2, thereby generating an interrupt permission signal IAK. . The interrupt jump destination determined by the hardware is, for example, 6FE
This is the address, and the CPU 200 will read the data of the 6FE address at the same time as the output of the interrupt permission signal IAK.

【0059】これに対して、図3では、IRQ=H、か
つIAK=Hにより、ラッチ回路224にその時点のA
L[15:0]=「7」をラッチする。これに加算器2
25で+1したものが割込処理からの戻り先番地RET
AD[15:0]=「8」である。また図9のアドレス
カウンタイネーブル生成部228では、IAKの発生に
より、その後の4クロックステート分の間、CNEN=
L(ノンアクティブ)とする。また図10のアドレスカ
ウンタロード生成部229でも、IAKF=Lにより、
CNLD=L(アクティブ)を発生する。これにより、
外部アドレスカウンタ205にはAL[15:1]=
「37F」がロードされ、これによりCPUアドレスの
6FE,6FF番地からの先読サイクルが起動される。
On the other hand, in FIG. 3, when IRQ = H and IAK = H, the A at that time is stored in the latch circuit 224.
L [15: 0] = “7” is latched. Adder 2
+1 in 25 is the return address RET from interrupt processing
AD [15: 0] = “8”. Further, in the address counter enable generation unit 228 of FIG. 9, CNEN =
L (non-active). Also in the address counter load generation unit 229 of FIG. 10, IAKF = L
CNLD = L (active) is generated. This allows
The external address counter 205 has AL [15: 1] =
"37F" is loaded, and this starts a pre-read cycle from the CPU addresses 6FE and 6FF.

【0060】図18は実施例の割込リターン処理のタイ
ミングチャートである。この例のCPU200は、70
3番地で割込リターンオペコードRETIのフェッチ・
実行を行い、割込前の次の処理番地8の読出に移行す
る。これに対して、同様にしてオペコード処理部208
はRETIOP=Hを生成し、これに基づきアドレスカ
ウンタロード生成部229はCNLD=L(アクティ
ブ)を生成する。そして、これによりラッチ回路224
にラッチされていた戻り先アドレスRETADが外部ア
ドレスカウンタ205にロードされ、新たな先読サイク
ルが起動される。
FIG. 18 is a timing chart of the interrupt return process of the embodiment. In this example, the CPU 200 is 70
Fetch of interrupt return opcode RETI at address 3
Execution is performed, and the process proceeds to the reading of the next processing address 8 before interruption. On the other hand, in the same manner, the operation code processing unit 208
Generates RETIOP = H, and based on this, the address counter load generation unit 229 generates CNLD = L (active). Then, by this, the latch circuit 224
The return destination address RETAD latched in is loaded into the external address counter 205, and a new prefetch cycle is activated.

【0061】なお、上記実施例ではCPU200による
メモリアクセス方式を述べたが、本方式はCPU以外の
各種ハードウエア制御部によるメモリアクセスにも適用
できる。例えば相対的に低速なメモリ(ROM,RAM
等)からデータをシーケンシャルに読み出すような場合
でも、本発明方式によりデータを先読すれば、見かけ上
データを高速に読み出せる。
Although the memory access method by the CPU 200 is described in the above embodiment, this method can be applied to the memory access by various hardware control units other than the CPU. For example, relatively slow memory (ROM, RAM
Even if the data is sequentially read out from (for example), the data can be apparently read at high speed by pre-reading the data by the method of the present invention.

【0062】また、上記実施例は2つのメモリの場合を
述べたが、3つ以上のメモリに適用しても良いことは明
らかである。また、上記本発明に好適なる実施例を述べ
たが、本発明思想を逸脱しない範囲内で、構成及び制御
の様々な変更が行えることは言うまでも無い。
Further, although the above embodiment has described the case of two memories, it is obvious that it may be applied to three or more memories. Although the preferred embodiments of the present invention have been described above, it goes without saying that various changes in configuration and control can be made without departing from the spirit of the present invention.

【0063】[0063]

【発明の効果】以上述べた如く本発明のメモリアクセス
方式は、上記構成であるので、制御部は相対的に低速な
メモリを見かけ上高速にアクセスできる。
As described above, since the memory access system of the present invention has the above-mentioned configuration, the control unit can apparently access the memory at a relatively low speed at a high speed.

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

【図1】図1は本発明の原理を説明する図である。FIG. 1 is a diagram illustrating the principle of the present invention.

【図2】図2は実施例のメモリアクセス方式のブロック
図(1)である。
FIG. 2 is a block diagram (1) of a memory access method according to an embodiment.

【図3】図3は実施例のメモリアクセス方式のブロック
図(2)である。
FIG. 3 is a block diagram (2) of the memory access method according to the embodiment.

【図4】図4は外部アドレスカウンタ205の回路図で
ある。
FIG. 4 is a circuit diagram of an external address counter 205.

【図5】図5はアドレス比較部209の回路図である。FIG. 5 is a circuit diagram of an address comparison unit 209.

【図6】図6はOEタイミング生成部206の回路図で
ある。
FIG. 6 is a circuit diagram of an OE timing generation unit 206.

【図7】図7はWAIT制御部207の回路図である。FIG. 7 is a circuit diagram of a WAIT control unit 207.

【図8】図8はオペコード処理部208の回路図であ
る。
FIG. 8 is a circuit diagram of an operation code processing unit 208.

【図9】図9はアドレスカウンタイネーブル生成部22
8の回路図である。
FIG. 9 shows an address counter enable generator 22.
8 is a circuit diagram of FIG.

【図10】図10はアドレスカウンタロード生成部22
9の回路図である。
FIG. 10 shows an address counter load generation unit 22.
9 is a circuit diagram of FIG.

【図11】図11はOEタイミング生成部のタイミング
チャートである。
FIG. 11 is a timing chart of the OE timing generation unit.

【図12】図12は実施例の基本アクセス時のタイミン
グチャートである。
FIG. 12 is a timing chart at the time of basic access according to the embodiment.

【図13】図13は実施例のROM以外にアクセス時の
タイミングチャートである。
FIG. 13 is a timing chart at the time of accessing other than the ROM of the embodiment.

【図14】図14は実施例のアドレス不一致検出時のタ
イミングチャートである。
FIG. 14 is a timing chart at the time of detecting an address mismatch according to the embodiment.

【図15】図15は実施例のJMP,CALL処理のタ
イミングチャートである。
FIG. 15 is a timing chart of JMP and CALL processing according to the embodiment.

【図16】図16は実施例の条件分岐処理のタイミング
チャートである。
FIG. 16 is a timing chart of conditional branching processing according to the embodiment.

【図17】図17は実施例の割込処理のタイミングチャ
ートである。
FIG. 17 is a timing chart of interrupt processing according to the embodiment.

【図18】図18は実施例の割込リターン処理のタイミ
ングチャートである。
FIG. 18 is a timing chart of interrupt return processing according to the embodiment.

【図19】図19は従来のメモリアクセス方式を説明す
る図である。
FIG. 19 is a diagram illustrating a conventional memory access method.

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

1 制御部 21 ,22 メモリ 3 先読制御部 4 データ選択部 5 アドレス比較部 6 オペコード処理部 7 アドレス記憶部1 control unit 2 1 , 2 2 memory 3 prefetch control unit 4 data selection unit 5 address comparison unit 6 opcode processing unit 7 address storage unit

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 制御部の連続したメモリ空間に対応する
各データを1アドレス毎に振り分けて記憶している複数
のメモリと、 制御部のある時点の読出アドレスをロードして前記複数
のメモリに読出アクセスを行うと共に、以後は独自に自
己の読出アドレスを更新して先行するデータの先読を行
う先読制御部と、 複数のメモリの読出データを制御部の読出アドレスに従
って選択し、該制御部に出力するデータ選択部とを備え
ることを特徴とするメモリアクセス方式。
1. A plurality of memories in which each data corresponding to a continuous memory space of a control unit is sorted by address and stored, and a read address at a certain time of the control unit is loaded to the plurality of memories. The read access is performed, and thereafter, the read-ahead control unit that independently updates its own read address to read ahead the preceding data, and the read data of a plurality of memories are selected according to the read address of the control unit and the control is performed. A memory access method, comprising: a data selection unit that outputs the data to a unit.
【請求項2】 制御部の読出アドレスと先読制御部の読
出アドレスとを比較するアドレス比較部を備え、該アド
レス比較部がアドレス不一致を検出した場合は、制御部
の読出アドレスを先読制御部にロードすることを特徴と
する請求項1のメモリアクセス方式。
2. An address comparison unit for comparing a read address of the control unit and a read address of the prefetch control unit, and when the address comparison unit detects an address mismatch, the read address of the control unit is preread controlled. 2. The memory access system according to claim 1, wherein the memory access system is loaded in the memory.
【請求項3】 先読データの中よりジャンプ又はサブル
ーチンコールの命令コードを検出するオペコード処理部
を備え、該オペコード処理部がジャンプ又はサブルーチ
ンコールの命令コードを検出した場合は、そのオペラン
ド部にあるジャンプ先の先読データを先読制御部にロー
ドすることを特徴とする請求項1のメモリアクセス方
式。
3. An operation code processing unit for detecting an instruction code of a jump or a subroutine call from the preread data, and when the operation code processing unit detects an instruction code of the jump or a subroutine call, the operation code exists in the operand portion. The memory access method according to claim 1, wherein the prefetch data of the jump destination is loaded into the prefetch control unit.
【請求項4】 先読データの中より条件分岐の命令コー
ドを検出するオペコード処理部を備え、該オペコード処
理部が条件分岐の命令コードを検出した場合は、前記条
件分岐の飛び先が確定した時点の制御部の読出アドレス
を先読制御部にロードすることを特徴とする請求項1の
メモリアクセス方式。
4. An operation code processing unit for detecting an instruction code of a conditional branch from the prefetch data is provided, and when the operation code processing unit detects an instruction code of the conditional branch, the jump destination of the conditional branch is determined. 2. The memory access method according to claim 1, wherein the read address of the control unit at the time point is loaded into the prefetch control unit.
【請求項5】 制御部による割込許可信号の発生により
その時点の制御部の読出アドレスをアドレス記憶部に記
憶すると共に、制御部の次の読出アドレスを先読制御部
にロードすることを特徴とする請求項1のメモリアクセ
ス方式。
5. A read address of the control unit at that time is stored in the address storage unit by generation of an interrupt permission signal by the control unit, and a read address next to the control unit is loaded into the prefetch control unit. The memory access method according to claim 1.
【請求項6】 先読データの中から割込リターンの命令
コードを検出するオペコード処理部を備え、該オペコー
ド処理部が割込リターン命令を検出した場合は、アドレ
ス記憶部のアドレスに所定数を加えたものを先読制御部
にロードすることを特徴とする請求項5のメモリアクセ
ス方式。
6. An operation code processing unit for detecting an instruction code of an interrupt return from the prefetch data, and when the operation code processing unit detects an interrupt return instruction, a predetermined number is set to an address of the address storage unit. The memory access method according to claim 5, wherein the added one is loaded into the prefetch control unit.
JP31515494A 1994-12-19 1994-12-19 Memory access system Withdrawn JPH08171510A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP31515494A JPH08171510A (en) 1994-12-19 1994-12-19 Memory access system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31515494A JPH08171510A (en) 1994-12-19 1994-12-19 Memory access system

Publications (1)

Publication Number Publication Date
JPH08171510A true JPH08171510A (en) 1996-07-02

Family

ID=18062073

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31515494A Withdrawn JPH08171510A (en) 1994-12-19 1994-12-19 Memory access system

Country Status (1)

Country Link
JP (1) JPH08171510A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020025793A (en) * 2000-09-29 2002-04-04 이데이 노부유끼 Memory device and memory access control method
JP2008117414A (en) * 2007-12-13 2008-05-22 Denso Corp Memory interface circuit device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020025793A (en) * 2000-09-29 2002-04-04 이데이 노부유끼 Memory device and memory access control method
JP2008117414A (en) * 2007-12-13 2008-05-22 Denso Corp Memory interface circuit device

Similar Documents

Publication Publication Date Title
US5461722A (en) Parallel processing apparatus suitable for executing in parallel a plurality of instructions including at least two branch instructions
US5027270A (en) Processor controlled interface with instruction streaming
US5509137A (en) Store processing method in a pipelined cache memory
JP3242508B2 (en) Microcomputer
JPH02130634A (en) Device and method for processing data
JP2834292B2 (en) Data processor
JP2001092662A (en) Processor core and processor using the same
US5710914A (en) Digital signal processing method and system implementing pipelined read and write operations
JPH0527971A (en) Information processor
US5434986A (en) Interdependency control of pipelined instruction processor using comparing result of two index registers of skip instruction and next sequential instruction
US20060095746A1 (en) Branch predictor, processor and branch prediction method
JP3790626B2 (en) Method and apparatus for fetching and issuing dual word or multiple instructions
US20120173850A1 (en) Information processing apparatus
JPH07239780A (en) One-clock variable length instruction execution process type instruction read computer
JP4110137B2 (en) Method and apparatus for swapping the contents of an address register
JP4613168B2 (en) Instruction alignment method and apparatus
JPH08171510A (en) Memory access system
US5724548A (en) System including processor and cache memory and method of controlling the cache memory
US20080065870A1 (en) Information processing apparatus
KR100457478B1 (en) Memory access method and data processing system
JP3462245B2 (en) Central processing unit
US5421026A (en) Data processor for processing instruction after conditional branch instruction at high speed
US6425047B1 (en) Process containing address decoders suited to improvements in clock speed
US20030172259A1 (en) Branch prediction circuit of instruction
JPH02235289A (en) Self clocking resister file

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20020305