JP2003114796A - Computer control circuit - Google Patents

Computer control circuit

Info

Publication number
JP2003114796A
JP2003114796A JP2001310335A JP2001310335A JP2003114796A JP 2003114796 A JP2003114796 A JP 2003114796A JP 2001310335 A JP2001310335 A JP 2001310335A JP 2001310335 A JP2001310335 A JP 2001310335A JP 2003114796 A JP2003114796 A JP 2003114796A
Authority
JP
Japan
Prior art keywords
instruction
register
output
instruction code
selector
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.)
Granted
Application number
JP2001310335A
Other languages
Japanese (ja)
Other versions
JP3716320B2 (en
Inventor
Koichi Kawano
光一 川野
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.)
New Japan Radio Co Ltd
Original Assignee
New Japan Radio Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New Japan Radio Co Ltd filed Critical New Japan Radio Co Ltd
Priority to JP2001310335A priority Critical patent/JP3716320B2/en
Publication of JP2003114796A publication Critical patent/JP2003114796A/en
Application granted granted Critical
Publication of JP3716320B2 publication Critical patent/JP3716320B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To make a program developed for an asynchronous type memory be usable for a synchronous type memory without being corrected. SOLUTION: This computer control circuit is provided with a selector 41 to select one of an output of a latch 50 holding an output instruction code, an instruction code outputted from the synchronous type memory, a Nop instruction code, and an instruction code generated at a breakpoint, and a register 55 to control selecting action of the selector 41. The selector 41 selects the Nop instruction code to be outputted when the instruction code outputted from the synchronous type memory is a jump instruction, selects the output of the latch to be outputted when it is a wait instruction, and selects the instruction code at the break point to be outputted when break point conditions are satisfied.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、マイクロコード等
のプログラムで動作するコンピュータ制御回路に係り、
特に非同期式メモリを同期式メモリに変更する際に、非
同期式メモリ用に開発されたプログラムを変更せずにそ
のまま使用することができるようにしたコンピュータ制
御回路に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer control circuit operated by a program such as microcode,
In particular, the present invention relates to a computer control circuit that allows a program developed for an asynchronous memory to be used as it is without changing when the asynchronous memory is changed to a synchronous memory.

【0002】[0002]

【従来の技術】[第1の従来技術]図7に非同期式メモ
リを使用した従来のコンピュータ制御回路の構成を示
す。11は非同期式メモリであり、アドレスを入力する
とアクセスタイム後にデータが出力される。この非同期
式メモリ11にはプログラムが格納される。21はデー
タレジスタ、22はアドレスレジスタ、23はアドレス
切替セレクタである。非同期式メモリ11がRAMの場
合には、制御回路20から非同期式メモリ11にプログ
ラムをダウンロードするときに、アドレス切替セレクタ
23をアドレスレジスタ22側に切り替えて、アドレス
レジスタ22に非同期式メモリ11のアドレスをセット
し、データレジスタ21にそのアドレスのプログラムデ
ータをセットして、制御回路20から非同期式メモリ1
1に書き込み信号を入力し、プログラムを書き込む。な
お、非同期式メモリ11がROMの場合には、データレ
ジスタ21、アドレスレジスタ22、セレクタ23は不
要となる。
2. Description of the Related Art [First Prior Art] FIG. 7 shows the configuration of a conventional computer control circuit using an asynchronous memory. Reference numeral 11 is an asynchronous memory, and when an address is input, data is output after the access time. A program is stored in the asynchronous memory 11. Reference numeral 21 is a data register, 22 is an address register, and 23 is an address switching selector. When the asynchronous memory 11 is a RAM, when the program is downloaded from the control circuit 20 to the asynchronous memory 11, the address switching selector 23 is switched to the address register 22 side and the address register 22 stores the address of the asynchronous memory 11. Is set, the program data of the address is set in the data register 21, and the asynchronous memory 1 is set from the control circuit 20.
A write signal is input to 1 to write a program. If the asynchronous memory 11 is a ROM, the data register 21, the address register 22, and the selector 23 are unnecessary.

【0003】25はスタート制御レジスタであり、非同
期式メモリ11に格納されたプログラムを実行するとき
に、制御回路20から‘1’を書き込む(ST=1)こ
とによりプログラムがスタートする。
Reference numeral 25 is a start control register. When the program stored in the asynchronous memory 11 is executed, the control circuit 20 writes "1" (ST = 1) to start the program.

【0004】26はブレークポイント用レジスタ群であ
り、非同期式メモリ11に格納されたプログラムの実行
中に、特定のアドレスで非同期式メモリ11に記述され
た命令コードと異なる命令コードを実行させたい場合
に、該特定のアドレスと命令コードを制御回路20から
セットする。このブレークポイント用レジスタ群26は
主にプログラムのデバッグ時に用いる。
Reference numeral 26 is a breakpoint register group for executing an instruction code different from the instruction code written in the asynchronous memory 11 at a specific address during execution of a program stored in the asynchronous memory 11. Then, the specific address and instruction code are set from the control circuit 20. The breakpoint register group 26 is mainly used during program debugging.

【0005】30はプログラムカウンタであり、非同期
式メモリ11のアドレスを生成するために使用される。
32は非同期式メモリ11のアドレス用セレクタであ
り、このセレクタ32の選択条件とその出力を図9に示
す。33はプログラムカウンタ30用のセレクタであ
る。図9において、スタート制御レジスタ25の値がS
T=0のときは、プログラムカウンタ30の値PCが
‘000’にセットされ、非同期式メモリ11のアドレ
スaddr(RAM)が‘000’にセットされる。ま
た、スタートレジスタ25の値がST=1のときは、後
記するプログラム制御命令non、wait、jum
p、push、popに応じて、非同期式メモリ11の
アドレスaddr(RAM)やプログラムカウンタ30
の値PCがセットされる。
A program counter 30 is used to generate an address of the asynchronous memory 11.
Reference numeral 32 denotes an address selector of the asynchronous memory 11, and the selection conditions of the selector 32 and its output are shown in FIG. 33 is a selector for the program counter 30. In FIG. 9, the value of the start control register 25 is S
When T = 0, the value PC of the program counter 30 is set to "000", and the address addr (RAM) of the asynchronous memory 11 is set to "000". Further, when the value of the start register 25 is ST = 1, the program control instructions non, wait, and jump which will be described later are given.
The address addr (RAM) of the asynchronous memory 11 and the program counter 30 according to p, push, and pop.
The value PC of is set.

【0006】28はスタック命令用レジスタ群であり、
プログラムの命令コードがPush命令の場合はプログ
ラムカウンタ30の値PCを待避し、Pop命令の場合
はSTK1レジスタの値STK1をセレクタ32を介し
て非同期式メモリ11のアドレスに出力すると共に、加
算器39でSTK1レジスタの値に1加算して、セレク
タ33を介してプログラムカウンタ30にセットする。
スタック命令用レジスタ群28は、プログラムのスタッ
クの深さ分だけ準備する。図4にスタックが6段の場合
の命令コードと動作を示した。
28 is a stack instruction register group,
When the instruction code of the program is the Push instruction, the value PC of the program counter 30 is saved. When the instruction code is the Pop instruction, the value STK1 of the STK1 register is output to the address of the asynchronous memory 11 via the selector 32, and the adder 39 is also used. Then, 1 is added to the value of the STK1 register, and the value is set in the program counter 30 via the selector 33.
The stack instruction register group 28 is prepared for the depth of the program stack. FIG. 4 shows the instruction code and the operation when the stack has 6 stages.

【0007】40は命令コードレジスタ、42は命令コ
ードレジスタ用セレクタ、45はブレークポインタ用レ
ジスタ群26のアドレスBP1〜BP6とプログラムカ
ウンタ30の値PCとの一致を検出する比較器である。
Reference numeral 40 is an instruction code register, 42 is an instruction code register selector, and 45 is a comparator for detecting a match between the addresses BP1 to BP6 of the break pointer register group 26 and the value PC of the program counter 30.

【0008】46は組合せ回路であり、命令コードレジ
スタ40にセットされた命令コードIRをデコードし
て、ALU等の演算処理を行うと共に、次のプログラム
の順番を制御するプログラム制御命令の生成を行う。
Reference numeral 46 is a combinational circuit, which decodes the instruction code IR set in the instruction code register 40 to perform arithmetic processing such as ALU and to generate a program control instruction for controlling the order of the next program. .

【0009】このプログラム制御命令には、non命
令、push命令、pop命令、jump命令、wai
t命令等がある。non命令はプログラムカウンタ30
の値PCを+1して、順番にプログラム実行する命令で
ある。push命令はサブルーチン命令等で現在実行中
のプログラムカウンタ30の値PCをスタック群28に
待避させて、別のアドレスの命令を実行する命令であ
る。pop命令はリターン命令等でスタック群28に待
避されていたプログラムカウンタ30の値PCを復活し
て、サブルーチンから戻る命令である。jump命令は
ジャンプ命令等でジャンプ条件が成立したときに、命令
コードレジスタ40に書かれたアドレスにジャンプする
命令である。waitはWait命令等のある条件が成
立するまで同じアドレスのプログラムを実行する命令で
ある。
This program control instruction includes a non instruction, a push instruction, a pop instruction, a jump instruction, and a wai.
There are t commands and the like. The non instruction is the program counter 30.
Is an instruction to sequentially execute the program by incrementing the value PC of. The push instruction is an instruction that causes the stack group 28 to save the value PC of the program counter 30 currently being executed, such as a subroutine instruction, and execute an instruction at another address. The pop instruction is an instruction that restores the value PC of the program counter 30 saved in the stack group 28 by a return instruction or the like and returns from the subroutine. The jump instruction is an instruction to jump to the address written in the instruction code register 40 when the jump condition is satisfied by a jump instruction or the like. The wait is an instruction to execute the program of the same address until a certain condition such as the Wait instruction is satisfied.

【0010】組合せ回路48は、組合せ回路46のプロ
グラム制御命令の成立やブレークポイントの成立(PC
=BP1、BP2,BP3,BP4,BP5,又はBP
6)時に、命令コードレジスタ用セレクタ42の選択条
件を生成する回路であり、図8にこのセレクタ42の選
択条件と出力の関係を示した。セレクタ42の選択結果
により、命令コードレジスタ40に新しい命令コードI
Rがセットされる。図8において、スタート制御レジス
タ25の値がST=0のときはNop命令が選択され
る。ST=1のときは、組合せ回路46の出力と比較器
45の出力に応じて、IR、BP1〜BP6のいずれ
か、RAM等が選択される。IRは命令コードレジスタ
40の値、BP1〜BP6はブレークポイントレジスタ
群26の特定の出力、RAMは非同期式メモリ11の出
力である。
The combination circuit 48 establishes a program control instruction of the combination circuit 46 and a breakpoint (PC).
= BP1, BP2, BP3, BP4, BP5, or BP
6) At the time, it is a circuit that generates the selection condition of the instruction code register selector 42, and FIG. 8 shows the relationship between the selection condition of the selector 42 and the output. Depending on the selection result of the selector 42, a new instruction code I is stored in the instruction code register 40.
R is set. In FIG. 8, when the value of the start control register 25 is ST = 0, the Nop instruction is selected. When ST = 1, depending on the output of the combination circuit 46 and the output of the comparator 45, one of IR, BP1 to BP6, RAM or the like is selected. IR is the value of the instruction code register 40, BP1 to BP6 are specific outputs of the breakpoint register group 26, and RAM is the output of the asynchronous memory 11.

【0011】図12は非同期式メモリ11に書き込まれ
たプログラムの例であり、図10、図11は非同期式メ
モリ11を使用したコンピュータ制御回路において、図
12のプログラムを実行した場合のタイミング図であ
る。このタイミングは、図10の右端に図11の左端が
連続する。
FIG. 12 shows an example of a program written in the asynchronous memory 11, and FIGS. 10 and 11 are timing charts when the program of FIG. 12 is executed in the computer control circuit using the asynchronous memory 11. is there. At this timing, the right end of FIG. 10 and the left end of FIG. 11 continue.

【0012】図10、図11において、CLKはクロッ
ク、STはスタート制御レジスタ25の値、PCはプロ
グラムカウンタ30の値、addrは非同期式メモリ1
1のアドレス、doは非同期式メモリ11の出力、IR
は命令コードレジスタ40の値、Decodeは組合せ
回路46から生成されるプログラム制御命令、STKl
はスタック群28のSTK1レジスタの値、BPnはプ
レークポイントの値である。
In FIGS. 10 and 11, CLK is a clock, ST is the value of the start control register 25, PC is the value of the program counter 30, and addr is the asynchronous memory 1.
1 address, do is output of asynchronous memory 11, IR
Is a value of the instruction code register 40, Decode is a program control instruction generated from the combination circuit 46, STKl
Is the value of the STK1 register of the stack group 28, and BPn is the value of the break point.

【0013】ここで、ST、PC、IR、STK1はク
ロックCLKの立ち上がりに同期して動作するが、ad
dr、do、DecodeはクロックCLKとは非同期
で動作する。
Here, ST, PC, IR and STK1 operate in synchronization with the rising edge of the clock CLK.
dr, do, and Decode operate asynchronously with the clock CLK.

【0014】さて、制御回路20からスタート制御レジ
スタ25にST=1をセットすると、非同期式メモリ1
1に格納されたプログラムが‘000’からスタートす
る(図10の71)。その後、プログラム制御命令De
codeがnon命令の場合は、プログラムカウンタ3
0の値PCが順次インクリメントされて、非同期式メモ
リ11のアドレスに入力され、新しい命令コードが非同
期式メモリ11から出力されて、命令コードレジスタ4
0にIRとしてセットされる。新しい命令コードが命令
コードレジスタ40にセットされると、組合せ回路46
の処理結果により、新しいプログラム制御命令が決定さ
れる。図10、図11におけるIR0〜Pop(IR8
1)は、図12に示すように、非同期式メモリ11の各
アドレスに記述された命令コードを示す。
Now, when ST = 1 is set in the start control register 25 from the control circuit 20, the asynchronous memory 1
The program stored in 1 starts from '000' (71 in FIG. 10). After that, the program control instruction De
If the code is a non instruction, the program counter 3
The value PC of 0 is sequentially incremented and input to the address of the asynchronous memory 11, a new instruction code is output from the asynchronous memory 11, and the instruction code register 4
Set to 0 as IR. When a new instruction code is set in the instruction code register 40, the combination circuit 46
A new program control instruction is determined according to the processing result of. IR0-Pop (IR8 in FIGS. 10 and 11)
As shown in FIG. 12, 1) indicates an instruction code written in each address of the asynchronous memory 11.

【0015】図10、図11において、72のJMP0
は、条件ジャンプで条件が成立しない場合を示す。この
ときはプログラム制御命令はnon命令となり、プログ
ラムカウンタ30の値PCは+1加算される。
In FIGS. 10 and 11, 72 JMP0
Indicates the case where the condition is not satisfied in the conditional jump. At this time, the program control instruction becomes a non instruction, and the value PC of the program counter 30 is incremented by +1.

【0016】73のJMP1は、条件ジャンプで、条件
が成立した場合を示す。このときはプログラム制御命令
がjump命令となり、命令コードレジスタ40にセッ
トされたアドレスがセレクタ32を介して非同期式メモ
リ11のアドレスに入力され、非同期式メモリ11の出
力がセレクタ42を介して出力し、ジャンプ先の命令が
命令コードレジスタ40にセットされる。
JMP1 at 73 is a conditional jump and indicates a case where the condition is satisfied. At this time, the program control instruction becomes a jump instruction, the address set in the instruction code register 40 is input to the address of the asynchronous memory 11 via the selector 32, and the output of the asynchronous memory 11 is output via the selector 42. , The jump destination instruction is set in the instruction code register 40.

【0017】74のWait1は、Wait命令で、W
ait条件が成立した場合を示す。このときは、プログ
ラム制御命令はwait命令となり、PC、IRともに
変化しない。
Wait 1 of 74 is a Wait instruction, which is W
The case where the ait condition is satisfied is shown. At this time, the program control instruction is a wait instruction, and neither PC nor IR changes.

【0018】75のWait0は、Wait命令で、W
ait条件が成立しない場合を示す。このとき、プログ
ラム制御命令はnon命令となり、プログラムカウンタ
30の値PCは+1加算される。
Wait0 of 75 is a Wait instruction and is W
The case where the ait condition is not satisfied is shown. At this time, the program control instruction becomes a non instruction, and the value PC of the program counter 30 is incremented by +1.

【0019】76のPushは、サブルーチン命令で、
プログラムカウンタ30の値PCをSTK1レジスタに
セットすると共に、命令コードレジスタ40にセットさ
れた新しいジャンプ先のアドレスが、セレクタ32を介
して非同期式メモリ11のアドレスに入力され、非同期
式メモリ11の出力がセレクタ42を介して出力し、ジ
ャンプ先の命令が命令コードレジスタ40にセットされ
る。
Push of 76 is a subroutine instruction,
The value PC of the program counter 30 is set in the STK1 register, the new jump destination address set in the instruction code register 40 is input to the address of the asynchronous memory 11 via the selector 32, and the output of the asynchronous memory 11 is output. Output via the selector 42, and the instruction of the jump destination is set in the instruction code register 40.

【0020】77のPopは、リターン命令で、STK
1レジスタに待避されていたプログラムカウンタ30の
値PCが、セレクタ32を介して非同期式メモリ11の
アドレスに入力され、非同期式メモリ11の出力がセレ
クタ42を介して出力し、リターン先の命令が命令コー
ドレジスタ40にセットされる。
The Pop of 77 is a return instruction, and STK
The value PC of the program counter 30 saved in the 1 register is input to the address of the asynchronous memory 11 via the selector 32, the output of the asynchronous memory 11 is output via the selector 42, and the instruction of the return destination is It is set in the instruction code register 40.

【0021】78のBP1は、ブレークポイントが成立
したときの動作を示す。このとき、ブレークポイントレ
ジスタ群26にセットされている命令コードBP1が、
IR17と置換されて、命令コードレジスタ40にセッ
トされる。このときのプログラム制御命令はnop命令
である。
BP1 at 78 indicates the operation when the break point is established. At this time, the instruction code BP1 set in the breakpoint register group 26 is
It is replaced with IR17 and set in the instruction code register 40. The program control instruction at this time is a nop instruction.

【0022】79のBP2は、ブレークポイントが成立
したときの動作を示す。このとき、プレークポイントレ
ジスタ群26にセットされている命令コードBP2が、
IR20と置換されて、命令コードレジスタ40にセッ
トされる。このときのプログラム制御命令がjump命
令である場合には、命令コードレジスタ40にセットさ
れた新しいジャンプ先のアドレスが、セレクタ32を介
して非同期式メモリ11のアドレスに入力され、非同期
式メモリ11の出力がセレクタ42を介して出力し、ジ
ャンプ先の命令が命令コードレジスタ40にセットされ
る。
BP2 79 indicates the operation when the break point is established. At this time, the instruction code BP2 set in the break point register group 26 is
It is replaced with the IR 20 and set in the instruction code register 40. If the program control instruction at this time is a jump instruction, the address of the new jump destination set in the instruction code register 40 is input to the address of the asynchronous memory 11 via the selector 32, The output is output via the selector 42, and the instruction of the jump destination is set in the instruction code register 40.

【0023】このように、非同期式メモリ11を使用し
たコンピュータ制御回路では、命令コードが命令コード
レジスタ40にセットされてから、組合せ回路46でデ
コードを行ってプログラム制御命令を生成し、非同期式
メモリ11のアドレスが確定し、そのアドレスに対応し
た命令コードが出力され、再び命令コードレジスタ40
にセットされるまで、1クロックで行われる。そのた
め、組合せ回路46による遅延時間、非同期式メモリ1
1の遅延時間、セレクタ32、33、42の遅延時間、
命令コードレジスタ40のセットアップ時間と遅延時間
の総計がクロックの1周期以内に収まる必要がある。よ
って、非同期式メモリ11を使ったコンピュータ制御回
路では、動作スピードが回路の遅延時間により制約され
る。
As described above, in the computer control circuit using the asynchronous memory 11, after the instruction code is set in the instruction code register 40, the combination circuit 46 decodes the instruction code to generate the program control instruction, and the asynchronous memory The address of 11 is fixed, the instruction code corresponding to the address is output, and the instruction code register 40 is again output.
It is performed in 1 clock until it is set to. Therefore, the delay time by the combination circuit 46, the asynchronous memory 1
1 delay time, selector 32, 33, 42 delay time,
The total setup time and delay time of the instruction code register 40 must be within one clock cycle. Therefore, in the computer control circuit using the asynchronous memory 11, the operation speed is limited by the delay time of the circuit.

【0024】[第2の従来技術]図13に従来の同期式
アクセス方式のコンピュータ制御回路の構成を示す。図
7に示したものと同じものには同じ符号を付けた。3
4、35はプログラムカウンタ30用のセレクタであ
り、セレクタ34の選択条件とその出力を図14に示
す。ST=0のときは、セレクタ34の出力nextP
Cは‘000’であり、ST=1のときは、組合せ回路
46から出力するプログラム制御命令push、po
p、jump、wait,nonに応じた動作を行う。
例えば、プログラム制御命令がnon命令の場合は、加
算器39により+1インクリメントされる(PC+
1)。
[Second Prior Art] FIG. 13 shows the configuration of a conventional synchronous access type computer control circuit. The same parts as those shown in FIG. 7 are designated by the same reference numerals. Three
Reference numerals 4 and 35 are selectors for the program counter 30. The selection conditions of the selector 34 and their outputs are shown in FIG. When ST = 0, the output nextP of the selector 34
C is '000', and when ST = 1, program control instructions push and po output from the combinational circuit 46 are output.
The operation corresponding to p, jump, wait, and non is performed.
For example, when the program control instruction is a non instruction, the adder 39 increments it by +1 (PC +
1).

【0025】スタック命令用レジスタ群28は、プログ
ラムの命令コードがPush命令の場合は、プログラム
カウンタ30の値PCを待避し、pop命令の場合はS
TK1レジスタの値STK1を加算器39で+1を加算
してプログラムカウンタ30にセットする。スタックレ
ジスタ群28は、図7のコンピュータ制御回路と同様に
プログラムのスタックの深さ分だけ準備する。
The stack instruction register group 28 saves the value PC of the program counter 30 when the instruction code of the program is the Push instruction and S when it is the pop instruction.
The value STK1 of the TK1 register is incremented by +1 by the adder 39 and set in the program counter 30. Similar to the computer control circuit of FIG. 7, the stack register group 28 is prepared by the depth of the program stack.

【0026】図13の同期アクセス方式のコンピュータ
制御回路の構成が図7で説明した非同期式メモリのコン
ピュータ制御回路の構成と違うところは、非同期式メモ
リ11のアドレスが、セレクタ23を介してプログラム
カウンタ30に直接接続されているためクロックの途中
で変化しない、つまりクロックに同期する点である。
The structure of the computer control circuit of the synchronous access system shown in FIG. 13 is different from the structure of the computer control circuit of the asynchronous memory explained in FIG. 7, except that the address of the asynchronous memory 11 is transferred to the program counter via the selector 23. Since it is directly connected to 30, it does not change in the middle of the clock, that is, it synchronizes with the clock.

【0027】図17は同期式アクセス方式を使用した場
合のプログラムの例、図15、図16は同期式アクセス
方式を使用したコンピュータ制御回路において、図17
のプログラムを実行した場合のタイミング図である。こ
のタイミングは、図15の右端が図16の左端に連続す
る。
FIG. 17 shows an example of a program when the synchronous access method is used, and FIGS. 15 and 16 show a computer control circuit which uses the synchronous access method.
It is a timing diagram when the program of is executed. At this timing, the right end of FIG. 15 continues to the left end of FIG.

【0028】図15、図16において、CLKはクロッ
ク、STはスタート制御レジスタ25の値、nextP
Cはセレクタ34の出力、PCはプログラムカウンタ3
0の値、doは非同期式メモリ11の出力、IRは命令
コードレジスタ40の値、Decodeは組合せ回路4
6によって生成されるプログラム制御命令、STK1は
スタック群28のSTK1レジスタの値、BPnはブレ
ークポイントの値である。
In FIGS. 15 and 16, CLK is a clock, ST is the value of the start control register 25, and nextP.
C is the output of the selector 34, PC is the program counter 3
The value of 0, do is the output of the asynchronous memory 11, IR is the value of the instruction code register 40, and Decode is the combinational circuit 4
6, STK1 is the value of the STK1 register of the stack group 28, and BPn is the value of the breakpoint.

【0029】ここで、ST、PC、IR、STK1はク
ロックCLKの立ち上がりに同期して動作するが、ne
xtPC、do、DecodeはクロックCLKとは非
同期で動作する。
Here, ST, PC, IR and STK1 operate in synchronization with the rising edge of the clock CLK, but ne
xtPC, do, and Decode operate asynchronously with the clock CLK.

【0030】さて、制御回路20からスタート制御レジ
スタ25にST=1をセットすると、非同期式メモリ1
1に格納されたプログラムが‘000’からスタートす
る(図15の81)。その後、プログラム制御命令がn
on命令の場合はプログラムカウンタ30の値PCが順
次インクリメントされて非同期式メモリ11のアドレス
に入力され、新しい命令コードが非同期式メモリ11か
ら出力され、命令コードレジスタ40にセットされる。
新しい命令コードが命令コードレジスタ40にセットさ
れると、組合せ回路46により新しいプログラム制御命
令が決定される。ここで、IR0からIR81(Po
p)は、図12で説明した命令コードに対応している。
When ST = 1 is set in the start control register 25 from the control circuit 20, the asynchronous memory 1
The program stored in 1 starts from '000' (81 in FIG. 15). After that, the program control instruction is n
In the case of an on instruction, the value PC of the program counter 30 is sequentially incremented and input to the address of the asynchronous memory 11, a new instruction code is output from the asynchronous memory 11, and set in the instruction code register 40.
When a new instruction code is set in the instruction code register 40, the combination circuit 46 determines a new program control instruction. Here, IR0 to IR81 (Po
p) corresponds to the instruction code described in FIG.

【0031】82のJMP0は条件ジャンプで条件が成
立しない場合を示す。このときは、プログラム制御命令
はnon命令となり、プログラムカウンタ30の値PC
は+1加算される。
JMP0 of 82 indicates the case where the condition is not satisfied in the conditional jump. At this time, the program control instruction becomes a non instruction, and the value PC of the program counter 30
Is incremented by +1.

【0032】83のJMPlは条件ジャンプで条件が成
立した場合を示す。このときは、プログラム制御命令が
jump命令となり、命令コードレジスタ40にセット
されたアドレスがプログラムカウンタ30にセットされ
る。次のクロックでプログラムカウンタ30の値PCが
非同期式メモリ11のアドレスに入力され、非同期式メ
モリ11の出力がセレクタ42を介して出力し、ジャン
プ先の命令が命令コードレジスタ40にセットされる。
JMPl of 83 indicates the case where the condition is satisfied by the conditional jump. At this time, the program control instruction becomes a jump instruction, and the address set in the instruction code register 40 is set in the program counter 30. At the next clock, the value PC of the program counter 30 is input to the address of the asynchronous memory 11, the output of the asynchronous memory 11 is output via the selector 42, and the instruction of the jump destination is set in the instruction code register 40.

【0033】84のWait1は、Wait命令で、W
ait条件が成立した場合を示す。このときは、プログ
ラム制御命令はwait命令となり、PC、IRとも変
化しない。
Wait 1 at 84 is a Wait instruction
The case where the ait condition is satisfied is shown. At this time, the program control instruction is a wait instruction, and neither PC nor IR changes.

【0034】85のWait0は、Wait命令で、W
ait条件が成立しない場合を示す。このとき、プログ
ラム制御命令はnon命令となり、プログラムカウンタ
30の値PCは+1加算される。
Wait 0 of 85 is a Wait instruction,
The case where the ait condition is not satisfied is shown. At this time, the program control instruction becomes a non instruction, and the value PC of the program counter 30 is incremented by +1.

【0035】86のPushは、サブルーチン命令で、
プログラムカウンタ30の値PCをSTK1レジスタに
セットすると共に、命令コードレジスタ40にセットさ
れた新しいジャンプ先のアドレスがプログラムカウンタ
30にセットされる。次のクロックでプログラムカウン
タ30の値PCが非同期式メモリ11のアドレスに入力
され、非同期式メモリ11の出力がセレクタ42を介し
て出力し、ジャンプ先の命令が命令コードレジスタ40
にセットされる。
Push of 86 is a subroutine instruction,
The value PC of the program counter 30 is set in the STK1 register, and the new jump destination address set in the instruction code register 40 is set in the program counter 30. At the next clock, the value PC of the program counter 30 is input to the address of the asynchronous memory 11, the output of the asynchronous memory 11 is output via the selector 42, and the instruction of the jump destination is the instruction code register 40.
Is set to.

【0036】87のPopは、リターン命令で、STK
1レジスタに待避されていたプログラムカウンタ30の
値PCが、加算器39で+1インクリメントされてプロ
グラムカウンタ30にセットされる。次のクロックでプ
ログラムカウンタ30の値が非同期式メモリ11のアド
レスに入力され、非同期式メモリ11の出力がセレクタ
42を介して出力し、ジャンプ先の命令が命令コードレ
ジスタ40にセットされる。
Pop of 87 is a return instruction and STK
The value PC of the program counter 30 saved in the 1 register is incremented by +1 in the adder 39 and set in the program counter 30. At the next clock, the value of the program counter 30 is input to the address of the asynchronous memory 11, the output of the asynchronous memory 11 is output via the selector 42, and the instruction of the jump destination is set in the instruction code register 40.

【0037】88のBPlは、ブレークポイントが成立
したときの動作を示す。このとき、ブレークポイントレ
ジスタ群26にセットされている命令コードBP1が、
IR17と置換されて、命令コードレジスタ40にセッ
トされる。このときのプログラム制御命令はnop命令
である。
BPl of 88 indicates the operation when the break point is established. At this time, the instruction code BP1 set in the breakpoint register group 26 is
It is replaced with IR17 and set in the instruction code register 40. The program control instruction at this time is a nop instruction.

【0038】89のBP2は、ブレークポイントが成立
したときの動作を示す。このとき、ブレークポイントレ
ジスタにセットされている命令コードBP2が、IR2
0と置換されて、命令コードレジスタ40にセットされ
る。このときのプログラム制御命令がjump命令であ
る場合は、命令コードレジスタ40にセットされた新し
いジャンプ先のアドレスがプログラムカウンタ30にセ
ットされる。次のクロックでプログラムカウンタ30の
値が非同期式メモリ11のアドレスに入力され、非同期
式メモリ11の出力がセレクタ42を介して出力し、ジ
ャンプ先の命令が命令コードレジスタ40にセットされ
る。
BP2 at 89 indicates the operation when the break point is established. At this time, the instruction code BP2 set in the break point register is IR2.
It is replaced with 0 and set in the instruction code register 40. If the program control instruction at this time is a jump instruction, the address of the new jump destination set in the instruction code register 40 is set in the program counter 30. At the next clock, the value of the program counter 30 is input to the address of the asynchronous memory 11, the output of the asynchronous memory 11 is output via the selector 42, and the instruction of the jump destination is set in the instruction code register 40.

【0039】ここでは、ジャンプ命令、サブルーチン命
令、リターン命令等で、プログラム制御命令がjump
命令、push命令、pop命令の場合、ジャンプ先の
命令が実行されるまで2クロック必要なので、ジャンプ
先の命令を実行する前に、ジャンプ命令の次の命令が実
行される。このため、図12のプログラムと同じ動作を
実現するためには、図17に示すように、JMP、Pu
sh、Pop命令の次に各々Nop命令を追加する必要
がある。
Here, the program control instruction is a jump instruction, a subroutine instruction, a return instruction, or the like.
In the case of the instruction, push instruction, and pop instruction, two clocks are required until the instruction of the jump destination is executed, so the instruction next to the jump instruction is executed before the instruction of the jump destination is executed. Therefore, in order to realize the same operation as the program of FIG. 12, as shown in FIG. 17, JMP, Pu
It is necessary to add the Nop instruction after the sh and Pop instructions.

【0040】このように、同期式アクセス方式を使用し
たコンピュータ制御回路では、プログラムカウンタ30
の値PCがセットされて、非同期式メモリ11のアドレ
スに入力され、非同期式メモリ11の出力が命令コード
レジスタ40にセットされるのに1クロック掛かる。ま
た、命令コードレジスタ40にセットされてから、組合
せ回路46でデコードを行い、プログラム制御命令を生
成して、プログラムカウンタ30にセットされるまで1
クロック掛かる。
As described above, in the computer control circuit using the synchronous access method, the program counter 30
The value PC of is set and input to the address of the asynchronous memory 11, and it takes one clock for the output of the asynchronous memory 11 to be set in the instruction code register 40. Also, it is set to 1 from the time it is set in the instruction code register 40 until it is decoded in the combination circuit 46 to generate the program control instruction and set in the program counter 30.
It takes a clock.

【0041】よって、同期式アクセス方式を使用したコ
ンピュータ制御回路では、プログラムカウンタ30に非
同期式メモリ11のアドレスがセットされて、非同期式
メモリ11のアクセス時間後に命令コードが出力され、
命令コードレジスタ40にセットされるまでの第1の遅
延時間と、命令コードレジスタ40にセットされてか
ら、組合せ回路46でデコードを行い、プログラムカウ
ンタ30にセットされるまで第2の遅延時間の内の遅い
方の遅延時間によりクロックの周期が決定されることに
なる。
Therefore, in the computer control circuit using the synchronous access method, the address of the asynchronous memory 11 is set in the program counter 30, and the instruction code is output after the access time of the asynchronous memory 11,
Of the first delay time until the instruction code register 40 is set and the second delay time until the combination circuit 46 performs decoding after the instruction code register 40 is set and the program counter 30 is set. The clock cycle is determined by the delay time of the later one.

【0042】図7で説明した非同期式メモリを使用する
コンピュータ制御回路では、上記の第1の遅延時間と第
2の遅延時間の合計でクロックの周期が決定されるた
め、図7の同期式アクセス方式の方がより早いクロック
で動作させることが可能となり、そのため、タイミング
設計も容易になる。
In the computer control circuit using the asynchronous memory described with reference to FIG. 7, since the clock cycle is determined by the sum of the first delay time and the second delay time, the synchronous access of FIG. The method can be operated with a faster clock, which facilitates timing design.

【0043】一方、同期式アクセス方式の場合は、プロ
グラムカウンタ30上の命令を実行するタイミングが1
クロック遅くなる。連続した命令であれば、命令の実行
がプログラムカウンタ30の指示よりも全体が遅れるこ
とになる。
On the other hand, in the case of the synchronous access method, the timing of executing the instruction on the program counter 30 is 1
Clock slows down. If it is a continuous instruction, the execution of the instruction will be entirely delayed from the instruction of the program counter 30.

【0044】また、ジャンプ命令やサブルーチン命令の
ようにプログラムカウンタ30の値PCが変化する命令
(ジャンプ命令等)を実行すると、新しいジャンプ先が
プログラムカウンタ30にセットされる。このジャンプ
命令の実行中には、プログラムカウンタ30に、次の命
令アドレスがセットされており、次のクロックではジャ
ンプ命令の次の命令を実行し、その次のクロックでジャ
ンプ先の命令を実行することになる。
When a command such as a jump command or a subroutine command in which the value PC of the program counter 30 changes (jump command or the like) is executed, a new jump destination is set in the program counter 30. During execution of this jump instruction, the next instruction address is set in the program counter 30, the instruction next to the jump instruction is executed at the next clock, and the instruction at the jump destination is executed at the next clock. It will be.

【0045】よって、図7に示した非同期式メモリを使
用するコンピュータ制御回路用に開発されたプログラム
を、図13に示した同期式メモリを使用するコンピュー
タ制御回路で使用するためには、ジャンプ命令の前後関
係を考慮して、Nop命令を挿入したり、ジャンプに影
響されない命令に変更したりして、プログラムを同期式
メモリ用に修正する必要がある。
Therefore, in order to use the program developed for the computer control circuit using the asynchronous memory shown in FIG. 7 in the computer control circuit using the synchronous memory shown in FIG. It is necessary to modify the program for the synchronous memory by inserting the Nop instruction or changing to the instruction that is not affected by the jump in consideration of the context.

【0046】[第3の従来例]図18に同期式メモリ方
式のコンピュータ制御回路の構成を示す。10は同期式
メモリであり、非同期式メモリ11、入力データレジス
タ12、アドレスレジスタ13、出力データレジスタ1
5を具備し、入出力がクロックに同期してアクセスされ
る。その他の図13と同じものには同じ符号を付けた。
[Third Conventional Example] FIG. 18 shows the configuration of a synchronous memory type computer control circuit. Reference numeral 10 is a synchronous memory, which is an asynchronous memory 11, an input data register 12, an address register 13, and an output data register 1.
5, the input and output are accessed in synchronization with the clock. The same parts as those in FIG. 13 are denoted by the same reference numerals.

【0047】図18の同期式メモリ方式のコンピュータ
制御回路の構成が図13の同期アクセス方式のコンピュ
ータ制御回路の構成と違うところは、図13の非同期式
メモリ11が図18の同期式メモリ10に代わっている
点と、図18の同期式メモリ10の内部のアドレスレジ
スタ13の値addrとプログラムカウンタ30の値P
Cが同じになるように構成され、プログラムカウンタ3
0にセットされる値(PC−1)が実際のアドレスad
drとなり、そのアドレスaddrによる出力が出力レ
ジスタ15により1クロック遅れる点である。
The configuration of the synchronous memory type computer control circuit of FIG. 18 differs from that of the synchronous access type computer control circuit of FIG. 13 in that the asynchronous memory 11 of FIG. 18, the value addr of the address register 13 and the value P of the program counter 30 in the synchronous memory 10 of FIG.
Program counter 3 is configured so that C is the same.
The value set to 0 (PC-1) is the actual address ad
This is a point where the output by the address addr is delayed by one clock due to the output register 15.

【0048】図19は同期式メモリ10を使用したコン
ピュータ制御回路のプログラムの例であり、図20、図
21、図22は、同期式メモリ10を使用したコンピュ
ータ制御回路において、図19のプログラムを実行した
場合のタイミング図である。このタイミングは、図20
の右端が図21の左端に連続し、図21の右端が図22
の左端に連続する。
FIG. 19 shows an example of a program of a computer control circuit using the synchronous memory 10, and FIGS. 20, 21 and 22 show the program of FIG. 19 in the computer control circuit using the synchronous memory 10. It is a timing diagram at the time of performing. This timing is shown in FIG.
21 is continuous with the left end of FIG. 21, and the right end of FIG.
Continue to the left edge of.

【0049】図20、図21、図22において、CLK
はクロック、STはスタート制御レジスタ25の値、n
extPCはセレクタ34の出力、PCはプログラムカ
ウンタ30の値、DOは同期式メモリ10の出力、IR
は命令コードレジスタ40の値、Decodeは組合せ
回路46によって生成されるプログラム制御命令、ST
K1はスタック群28のSTK1レジスタの値、BPn
はブレークポイントの値である。
In FIGS. 20, 21, and 22, CLK
Is the clock, ST is the value of the start control register 25, n
extPC is the output of the selector 34, PC is the value of the program counter 30, DO is the output of the synchronous memory 10, IR
Is the value of the instruction code register 40, Decode is a program control instruction generated by the combination circuit 46, ST
K1 is the value of the STK1 register of the stack group 28, BPn
Is the value of the breakpoint.

【0050】ここで、ST、PC、DO、IR、STK
1はクロックCLKの立ち上がりに同期して動作する
が、nextPC、DecodeはクロックCLKとは
非同期で動作する。
Here, ST, PC, DO, IR, STK
1 operates in synchronization with the rising edge of the clock CLK, while nextPC and Decode operate asynchronously with the clock CLK.

【0051】さて、制御回路20からスタート制御レジ
スタ25にST=1をセットすると、同期式メモリ10
に格納されたプログラムが‘000’からスタートする
(図20の91)。その後、プログラム制御命令がno
n命令の場合はプログラムカウンタ30の値PCが順次
インクリメントされるが、それより1つ前の値「PC−
1」が同期式メモリ10のアドレスレジスタ13に入力
され、新しい命令コードが出力データレジスタ15にセ
ットされて、次のクロックでセレクタ42を介して命令
コードレジスタ40にセットされる。新しい命令コード
が命令コードレジスタ40にセットされると、組合せ回
路46の処理結果により、新しいプログラム制御命令が
決定される。ここで、IR0からIR81(Pop)
は、図12に示した命令コードに対応している。
Now, when ST = 1 is set in the start control register 25 from the control circuit 20, the synchronous memory 10
The program stored in is started from '000' (91 in FIG. 20). After that, the program control instruction is no
In the case of an n instruction, the value PC of the program counter 30 is sequentially incremented, but the value "PC-
1 ”is input to the address register 13 of the synchronous memory 10, a new instruction code is set in the output data register 15, and is set in the instruction code register 40 via the selector 42 at the next clock. When a new instruction code is set in the instruction code register 40, a new program control instruction is decided according to the processing result of the combination circuit 46. Here, IR0 to IR81 (Pop)
Corresponds to the instruction code shown in FIG.

【0052】92のJMP0は、条件ジャンプで条件が
成立しない場合を示す。このときはプログラム制御命令
はnon命令となり、プログラムカウンタ30の値PC
は+1加算される。
JMP0 of 92 indicates the case where the condition is not satisfied in the conditional jump. At this time, the program control instruction becomes a non instruction, and the value PC of the program counter 30
Is incremented by +1.

【0053】93のJMP1は、条件ジャンプで条件が
成立した場合を示す。このときはプログラム制御命令が
jump命令となり、命令コードレジスタ40にセット
されたアドレスが、セレクタ34を介して同期式メモリ
10のアドレスレジスタ13とプログラムカウンタ30
にセットされる。次のクロックで同期式メモリ10から
命令コードが出力され、その次のクロックで同期式メモ
リ10の出力がセレクタ42を介して出力し、ジャンプ
先の命令が命令コードレジスタ40にセットされる。
JMP1 of 93 shows the case where the condition is satisfied by the conditional jump. At this time, the program control instruction becomes a jump instruction, and the address set in the instruction code register 40 is transferred through the selector 34 to the address register 13 of the synchronous memory 10 and the program counter 30.
Is set to. The instruction code is output from the synchronous memory 10 at the next clock, the output of the synchronous memory 10 is output at the next clock via the selector 42, and the instruction of the jump destination is set in the instruction code register 40.

【0054】94のWait1は、Wait命令で、W
ait条件が成立した場合を示す。このときはプログラ
ム制御命令はwait命令となり、PC、IRとも変化
しない。
Wait 1 at 94 is a Wait instruction
The case where the ait condition is satisfied is shown. At this time, the program control instruction becomes a wait instruction, and neither PC nor IR changes.

【0055】95のWait0は、Wait命令で、W
ait条件が成立しない場合を示す。このときはプログ
ラム制御命令はnon命令となり、プログラムカウンタ
30の値PCは+1加算される。
95, Wait 0, is a Wait instruction
The case where the ait condition is not satisfied is shown. At this time, the program control instruction becomes a non instruction, and the value PC of the program counter 30 is incremented by +1.

【0056】96のPushは、サブルーチン命令であ
り、プログラムカウンタ30の値PCをSTK1レジス
タにセットすると共に、命令コードレジスタ40にセッ
トされた新しいジャンプ先のアドレスが、同期式メモリ
10のアドレスレジスタ13とプログラムカウンタ30
にセットされる。次のクロックで同期式メモリ10から
命令コードが出力され、その次のクロックで同期式メモ
リ10の出力がセレクタ42を介して出力し、ジャンプ
先の命令が命令コードレジスタ40にセットされる。
Push of 96 is a subroutine instruction and sets the value PC of the program counter 30 to the STK1 register, and the new jump destination address set to the instruction code register 40 is the address register 13 of the synchronous memory 10. And program counter 30
Is set to. The instruction code is output from the synchronous memory 10 at the next clock, the output of the synchronous memory 10 is output at the next clock via the selector 42, and the instruction of the jump destination is set in the instruction code register 40.

【0057】97のPopは、リターン命令であり、S
TK1レジスタに待避されていたプログラムカウンタ3
0の値が、加算器39で+1インクリメントされて、同
期式メモリ10のアドレスレジスタ13とプログラムカ
ウンタ30にセットされる。次のクロックで同期式メモ
リ10から命令コードが出力され、その次のクロックで
同期式メモリ10の出力がセレクタ42を介して出力
し、ジャンプ先の命令が命令コードレジスタ40にセッ
トされる。
Pop of 97 is a return instruction and S
Program counter 3 saved in the TK1 register
The value of 0 is incremented by 1 in the adder 39 and set in the address register 13 and the program counter 30 of the synchronous memory 10. The instruction code is output from the synchronous memory 10 at the next clock, the output of the synchronous memory 10 is output at the next clock via the selector 42, and the instruction of the jump destination is set in the instruction code register 40.

【0058】98のBPlは、プレークポイントが成立
したときの動作を示す。このとき、ブレークポイントレ
ジスタにセットされている命令コードBPlが、IR1
7と置換されて、命令コードレジスタ40にセットされ
る。このときのプログラム制御命令がnop命令であ
る。ここで、ブレークポイントレジスタのアドレスに
は、置換したい命令のアドレス+1の値をセットする必
要がある。
BPl of 98 indicates the operation when the break point is established. At this time, the instruction code BPl set in the breakpoint register is IR1.
It is replaced with 7 and set in the instruction code register 40. The program control instruction at this time is a nop instruction. Here, it is necessary to set the value of the address +1 of the instruction to be replaced to the address of the breakpoint register.

【0059】99のBP2は、ブレークポイントが成立
したときの動作を示す。このとき、プレークポイントレ
ジスタにセットされている命令コードBP2が、IR2
0と置換されて、命令コードレジスタ40にセットされ
る。このときのプログラム制御命令がjump命令であ
る場合は、命令コードレジスタ40にセットされた新し
いジャンプ先のアドレスが、同期式メモリ10のアドレ
スレジスタ13とプログラムカウンタ30にセットされ
る。次のクロックで同期式メモリ10から命令コードが
出力され、その次のクロックで同期式メモリ10の出力
がセレクタ42を介して出力し、ジャンプ先の命令が命
令コードレジスタ40にセットされる。
BP2 of 99 indicates the operation when the break point is established. At this time, the instruction code BP2 set in the break point register is IR2.
It is replaced with 0 and set in the instruction code register 40. If the program control instruction at this time is a jump instruction, the new jump destination address set in the instruction code register 40 is set in the address register 13 and the program counter 30 of the synchronous memory 10. The instruction code is output from the synchronous memory 10 at the next clock, the output of the synchronous memory 10 is output at the next clock via the selector 42, and the instruction of the jump destination is set in the instruction code register 40.

【0060】ここでは、ジャンプ命令、サブルーチン命
令、リターン命令等により、プログラム制御命令がju
mp命令、push命令、pop命令の場合には、ジャ
ンプ先の命令が実行されるまで3クロック必要なので、
ジャンプ先の命令を実行する前に、ジャンプ命令の次の
命令が実行される。このため、図12のプログラムと同
じ動作を実現するためには、図19に示すように、JM
P、Push、Pop、Waitの命令の次にNop命
令を2つ追加する必要がある。
Here, the program control instruction is ju due to a jump instruction, a subroutine instruction, a return instruction, or the like.
In the case of mp instruction, push instruction, and pop instruction, it takes 3 clocks until the instruction of the jump destination is executed.
The instruction next to the jump instruction is executed before the instruction at the jump destination is executed. Therefore, in order to realize the same operation as the program of FIG. 12, as shown in FIG.
It is necessary to add two Nop instructions after the P, Push, Pop, and Wait instructions.

【0061】このように、同期式メモリ10を使用した
コンピュータ制御回路では、同期式メモリ10の出力が
クロックに同期しているので、Wait命令やブレーク
ポイントや他の条件を含めた動作を考慮すると、図18
に示すようにセレクタ42を介して命令コードレジスタ
40に接続する必要があるので、図13に示した同期式
アクセス方式のコンピュータ制御回路よりも、アドレス
アドレスレジスタ13にアドレスがセットされてから、
命令コードレジスタ40に命令コードがセットされるの
が1クロック遅くなる。
As described above, in the computer control circuit using the synchronous memory 10, since the output of the synchronous memory 10 is synchronized with the clock, considering the operation including the Wait instruction, the breakpoint and other conditions. , FIG. 18
Since it is necessary to connect it to the instruction code register 40 via the selector 42 as shown in FIG. 1, after the address is set in the address address register 13 than in the synchronous access method computer control circuit shown in FIG.
It takes one clock to set the instruction code in the instruction code register 40.

【0062】よって、同期式メモリ10を使用したコン
ピュータ制御回路の場合は、プログラムカウンタ30上
の命令を実行するタイミングが2クロック遅くなる。連
続した命令であれば、命令の実行がプログラムカウンタ
30の指示よりも全体が遅れることになる。
Therefore, in the case of the computer control circuit using the synchronous memory 10, the timing of executing the instruction on the program counter 30 is delayed by 2 clocks. If it is a continuous instruction, the execution of the instruction will be entirely delayed from the instruction of the program counter 30.

【0063】また、ジャンプやサブルーチン命令のよう
にプログラムカウンタの値が変化する命令(ジャンプ命
令等)を実行すると、新しいジャンプ先がプログラムカ
ウンタにセットされるが、このジャンプ命令の実行中に
は、プログラムカウンタに次の命令アドレスがセットさ
れており、次のクロックではジャンプ命令の次の命令を
実行し、その次のクロックでジャンプ先の命令を実行す
ることになる。よって、非同期式のメモリ11を使用す
るコンピュータ制御回路用に開発されたプログラムを同
期式メモリ10を使用するコンピュータ制御回路で使用
するためには、ジャンプ命令の前後関係を考慮して、N
op命令2個を挿入したり、ジャンプに影響されない命
令に変更したりして、プログラムを同期式メモリ10用
に修正する必要がある。
When a command such as a jump or a subroutine command in which the value of the program counter changes (jump command, etc.) is executed, a new jump destination is set in the program counter. During execution of this jump command, The next instruction address is set in the program counter, the instruction after the jump instruction is executed at the next clock, and the instruction at the jump destination is executed at the next clock. Therefore, in order to use a program developed for a computer control circuit that uses the asynchronous memory 11 in a computer control circuit that uses the synchronous memory 10, considering the context of the jump instruction, N
It is necessary to modify the program for the synchronous memory 10 by inserting two op instructions or changing to instructions that are not affected by jumps.

【0064】[0064]

【発明が解決しようとする課題】今日、プロセス技術が
進化して微細化されている。ここで、一度コンピュータ
制御回路を開発した後、より微細化されたプロセスにて
再開発する場合、非同期式メモリを使用していると、非
同期式メモリの個所でタイミング問題が発生しやすい。
そこで、同期式メモリを使用するとタイミング問題が発
生しにくいので、同期式メモリを使用することが多くな
っている。さらに、プロセスメーカとして、非同期式メ
モリを準備しないケースも増えている。
Today, process technology is evolving and miniaturized. Here, when a computer control circuit is once developed and then redeveloped in a more miniaturized process, when an asynchronous memory is used, a timing problem is likely to occur at the location of the asynchronous memory.
Therefore, since the timing problem is less likely to occur when the synchronous memory is used, the synchronous memory is often used. Furthermore, as a process maker, there are increasing cases where an asynchronous memory is not prepared.

【0065】しかし、非同期式メモリを同期式メモリに
変更すると、前述したように、プログラムメモリにアド
レスを入力してから、データが出てくるまで1クロック
遅れる。そのため、プログラムカウンタ上の命令を実行
するタイミングが1クロック遅くなる。連続した命令で
あれば、命令の実行がプログラムカウンタの指示よりも
全体が遅れることになる。
However, when the asynchronous memory is changed to the synchronous memory, as described above, there is a delay of 1 clock from the input of the address to the program memory until the output of data. Therefore, the timing of executing the instruction on the program counter is delayed by one clock. If the instructions are continuous, the execution of the instructions will be entirely behind the instruction of the program counter.

【0066】また、ジャンプやサブルーチン命令のよう
にプログラムカウンタの値が変化する命令(ジャンプ命
令等)を実行すると、新しいジャンプ先がプログラムカ
ウンタにセットされるが、このジャンプ命令の実行中に
は、プログラムカウンタに次の命令アドレスがセットさ
れており、次のクロックではジャンプ命令の次の命令を
実行し、その次のクロックでジャンプ先の命令を実行す
ることになるので、非同期式のメモリ用に開発されたプ
ログラムを同期式メモリで使用するためには、ジャンプ
命令の前後関係を考慮して、Nop命令を挿入したり、
ジャンプに影響されない命令に変更したりして、プログ
ラムを同期式メモリ用に修正する必要があるという問題
がある。
When an instruction (jump instruction or the like) whose value of the program counter changes, such as a jump or a subroutine instruction, a new jump destination is set in the program counter. During execution of this jump instruction, Since the next instruction address is set in the program counter, the instruction after the jump instruction is executed at the next clock, and the instruction at the jump destination is executed at the next clock, so it is necessary for the asynchronous memory. In order to use the developed program in the synchronous memory, consider the context of jump instructions, insert Nop instructions,
There is a problem that the program needs to be modified for the synchronous memory by changing to an instruction that is not affected by the jump.

【0067】本発明は上記問題点を解消し、非同期式メ
モリ用に開発されたプログラムを修正すること無くその
まま使用できるようにした同期式メモリ使用のコンピュ
ータ制御回路を実現することを目的とするものである。
An object of the present invention is to solve the above problems and to realize a computer control circuit using a synchronous memory, which allows a program developed for an asynchronous memory to be used as it is without modification. Is.

【0068】[0068]

【課題を解決するための手段】請求項1に係る発明は、
同期式メモリを使用したコンピュータ制御回路におい
て、出力命令コードを保持するラッチの出力、前記同期
式メモリから出力される命令コード、Nop命令コー
ド、およびブレークポイントで発生した命令コードの内
の1つを選択するセレクタと、該セレクタの選択動作を
制御するレジスタを具備し、前記セレクタは、前記レジ
スタにより、前記同期式メモリから出力される命令コー
ドがジャンプ命令のときは前記Nop命令コードを選択
して出力し、Wait命令のときは前記ラッチの出力を
選択して出力し、ブレークポイント条件が成立したとき
は該ブレークポイントの命令コードを選択して出力する
よう制御されることを特徴とするコンピュータ制御回路
とした。
The invention according to claim 1 is
In a computer control circuit using a synchronous memory, one of an output of a latch holding an output instruction code, an instruction code output from the synchronous memory, a Nop instruction code, and an instruction code generated at a breakpoint is set. A selector for selecting and a register for controlling a selecting operation of the selector are provided. The selector selects the Nop instruction code by the register when the instruction code output from the synchronous memory is a jump instruction. Computer control characterized in that it is controlled so that the output of the latch is selected and outputted in the case of a Wait instruction and the instruction code of the breakpoint is selected and outputted when a breakpoint condition is satisfied. It was a circuit.

【0069】請求項2に係る発明は、請求項1に係る発
明おいて、前記レジスタは、前記セレクタの選択状態を
1クロック期間保持することを特徴とするコンピュータ
制御回路とした。
The invention according to claim 2 is the computer control circuit according to the invention according to claim 1, characterized in that the register holds the selection state of the selector for one clock period.

【0070】請求項3に係る発明は、請求項1又は2に
係る発明おいて、前記同期メモリに内蔵されたアドレス
レジスタと同じ値を持つよう制御されるプログラムカウ
ンタを具備することを特徴とするコンピュータ制御回路
とした。
The invention according to claim 3 is the invention according to claim 1 or 2, characterized in that the program counter is controlled so as to have the same value as the address register built in the synchronous memory. It was a computer control circuit.

【0071】[0071]

【発明の実施の形態】本発明の同期式メモリを使用した
コンピュータ制御回路では、命令コード選択用セレクタ
を使用し、このセレクタを命令コード選択用レジスタで
制御する。これにより、命令コードを保持するラッチの
出力、同期式メモリから出力される命令コード、Nop
命令コード、プレークポイント等で発生した命令コード
の内の1つを命令コード選択用セレクタで選択し、命令
コードがジャンプ命令のときはNop命令を挿入し、W
ait命令のときは命令をラッチしたラッチから同じ命
令コードを出力し、ブレークポイント条件が成立した場
合にはその命令コードが出力されるようする。
BEST MODE FOR CARRYING OUT THE INVENTION In a computer control circuit using a synchronous memory of the present invention, an instruction code selection selector is used, and this selector is controlled by an instruction code selection register. As a result, the output of the latch holding the instruction code, the instruction code output from the synchronous memory, Nop
Select one of the instruction codes generated at the instruction code, the break point, etc. with the instruction code selection selector. If the instruction code is a jump instruction, insert a Nop instruction, and
In the case of the ait instruction, the same instruction code is output from the latch that latches the instruction, and when the breakpoint condition is satisfied, that instruction code is output.

【0072】このような構成すると、命令コードの選択
に命令コード選択用レジスタを使用しているので、選択
された命令コードがクロックの途中で変化しない。つま
り、命令コードがクロックに同期する。よって、そのセ
レクタの出力を命令コードレジスタの出力と同じように
使用できる。
With this configuration, since the instruction code selection register is used to select the instruction code, the selected instruction code does not change during the clock. That is, the instruction code is synchronized with the clock. Therefore, the output of the selector can be used in the same manner as the output of the instruction code register.

【0073】図1に本発明の1つの実施形態のコンピュ
ータ制御回路の構成を示す。10は同期式メモリであ
り、非同期式メモリ11、入力データレジスタ12、ア
ドレスレジスタ13、出力データレジスタ15を具備
し、入出力がクロックに同期してアクセスされる。21
はデータレジスタ、22はアドレスレジスタ、23はア
ドレス切替セレクタであり、これらは、同期式メモリ1
0がRAMの場合は、制御回路20から非同期式メモリ
11ヘプログラムをダウンロードするときに使用する
が、同期式メモリ10がROMの場合は不要となる。
FIG. 1 shows the configuration of a computer control circuit according to one embodiment of the present invention. Reference numeral 10 is a synchronous memory, which includes an asynchronous memory 11, an input data register 12, an address register 13, and an output data register 15, and its input and output are accessed in synchronization with a clock. 21
Is a data register, 22 is an address register, and 23 is an address switching selector. These are synchronous memory 1
When 0 is a RAM, it is used when the program is downloaded from the control circuit 20 to the asynchronous memory 11, but it is not necessary when the synchronous memory 10 is a ROM.

【0074】25はスタート制御レジスタであり、制御
回路20からST=1を書き込むことにより、プログラ
ムがスタートする。26はブレークポイント用レジスタ
群であり、主にプログラムのデバッグ時に用いる。
Reference numeral 25 is a start control register, and the program is started by writing ST = 1 from the control circuit 20. Reference numeral 26 is a breakpoint register group, which is mainly used during program debugging.

【0075】30はプログラムカウンタであり、同期式
メモリ10内のアドレスレジスタ13と同じ値がセット
される。31は同期式メモリ10のアドレス用およびプ
ログラムカウンタ30用のセレクタであり、その選択条
件と出力nextPCを図3に示す。図3において、セ
レクタ31はスタート制御レジスタ25の値がST=0
のときは‘000’を選択し、ST=1のときはプログ
ラム制御命令push、pop、jump、wait、
nonに応じて、PC+1、PC、IR、STK1等を
選択する。例えば、プログラム制御命令がnon命令の
場合は、プログラムカウンタ30の値PCが加算器39
により+1インクリメントされてPC+1となる。
A program counter 30 has the same value as that of the address register 13 in the synchronous memory 10. Reference numeral 31 is a selector for the address of the synchronous memory 10 and for the program counter 30, and its selection condition and output nextPC are shown in FIG. In FIG. 3, in the selector 31, the value of the start control register 25 is ST = 0.
'000' is selected in the case of, and program control instructions push, pop, jump, wait, are selected in the case of ST = 1.
PC + 1, PC, IR, STK1 or the like is selected according to non. For example, when the program control instruction is a non instruction, the value PC of the program counter 30 is the adder 39.
Is incremented by 1 to become PC + 1.

【0076】28はスタック命令用レジスタ群であり、
プログラムの命令コードがPush命令の場合は、プロ
グラムカウンタ30の値PCを待避し、Pop命令の場
合はSTK1レジスタの値をセレクタ31を介して同期
式メモリ10のアドレスとプログラムカウンタ30にセ
ットする。スタックレジスタ群28は、プログラムのス
タックの深さ分だけ準備する。図4にスタックが6段の
場合の命令コードと動作を示した。
28 is a stack instruction register group,
When the instruction code of the program is the Push instruction, the value PC of the program counter 30 is saved, and when it is the Pop instruction, the value of the STK1 register is set to the address of the synchronous memory 10 and the program counter 30 via the selector 31. The stack register group 28 is prepared by the depth of the stack of the program. FIG. 4 shows the instruction code and the operation when the stack has 6 stages.

【0077】41は命令コード選択用セレクタ、45は
ブレークポインタ用レジスタ群26のアドレスBP1〜
BP6とプログラムカウンタ30の値PCとの一致を検
出する比較器である。
Reference numeral 41 is an instruction code selection selector, and 45 is an address BP1 to BP1 of the break pointer register group 26.
It is a comparator that detects the coincidence between BP6 and the value PC of the program counter 30.

【0078】46は組合せ回路であり、命令コード選択
用セレクタ41から出力された命令コードをデコードし
て、ALU等の演算処理を行うと共に、次のプログラム
の順番を制御するプログラム制御命令push、po
p、jump、wait、nonの生成を行う。
Reference numeral 46 denotes a combinational circuit, which decodes the instruction code output from the instruction code selection selector 41 to perform arithmetic processing such as ALU, and at the same time, program control instructions push and po that control the order of the next program.
p, jump, wait, non are generated.

【0079】47も組合せ回路であり、組合せ回路46
で生成したプログラム制御命令、比較器45の出力、お
よびスタート制御レジスタ25の出力を入力し、命令コ
ード選択用セレクタ41の選択条件を生成する。55は
命令コード選択レジスタであり、組合せ回路47の処理
結果に応じてセレクタ41の選択条件をセットする。
47 is also a combinational circuit, and a combinational circuit 46
The program control instruction generated in step 3, the output of the comparator 45, and the output of the start control register 25 are input, and the selection condition of the instruction code selection selector 41 is generated. An instruction code selection register 55 sets the selection condition of the selector 41 according to the processing result of the combination circuit 47.

【0080】図2にセレクタ41の選択条件とその出力
の関係を示す。図2において、ST=0で且つプログラ
ム制御命令がjump、push、又はpopのときは
Nop命令を選択し、ST=1で且つプログラム制御命
令がnonのときはRAM(同期式メモリ10の出力)
を選択し、ST=1で且つプログラム制御命令がwai
tのときはセレクタ41の出力をラッチするラッチ50
の出力R1を選択し、ST=1で且つPC=BP1、B
P2、BP3、BP4、BP5、又はBP6のときはB
P1〜BP6の対応するいずれかを選択する。
FIG. 2 shows the relationship between the selection condition of the selector 41 and its output. In FIG. 2, when ST = 0 and the program control instruction is jump, push, or pop, the Nop instruction is selected, and when ST = 1 and the program control instruction is non, RAM (output of the synchronous memory 10).
Is selected, ST = 1 and the program control instruction is wai
Latch 50 for latching the output of the selector 41 at t
Output R1 is selected, ST = 1 and PC = BP1, B
B when P2, BP3, BP4, BP5, or BP6
One of the corresponding P1 to BP6 is selected.

【0081】図5、図6に本発明の実施形態のコンピュ
ータ制御回路のタイミング図を示す。このタイミング図
は、図7に示した非同期式メモリを使用したコンピュー
タ制御回路用のプログラム(図12)を実行した場合の
タイミング図である。このタイミングにおいて、図5の
右端が図6の左端に連続する。
5 and 6 are timing diagrams of the computer control circuit according to the embodiment of the present invention. This timing chart is a timing chart when the program (FIG. 12) for the computer control circuit using the asynchronous memory shown in FIG. 7 is executed. At this timing, the right end of FIG. 5 continues to the left end of FIG.

【0082】図5、図6において、CLKはクロック、
STはスタート制御レジスタ25の値、nextPCは
セレクタ31の出力、PCはプログラムカウンタ30の
値、DOは同期式メモリ10の出力、R1は命令コード
を保持するラッチ50の値、Selは命令コード選択レ
ジスタ55の値、IRは命令コード選択用セレクタ41
の出力、Decodeは組合せ回路46によって生成さ
れるプログラム制御命令、STK1はスタック群28の
STK1レジスタの値、BPnはプレークポイントの値
である。
In FIGS. 5 and 6, CLK is a clock,
ST is the value of the start control register 25, nextPC is the output of the selector 31, PC is the value of the program counter 30, DO is the output of the synchronous memory 10, R1 is the value of the latch 50 holding the instruction code, and Sel is the instruction code selection. The value of the register 55, IR is the instruction code selection selector 41
, Decode is a program control instruction generated by the combination circuit 46, STK1 is the value of the STK1 register of the stack group 28, and BPn is the value of the break point.

【0083】ここで、ST、PC、DO、R1、Se
l、STK1はクロックCLKの立ち上がりに同期して
動作する。IRはクロックの立ち上がりに対してセレク
タ41の動作時間だけ遅延する。また、nextPC、
DecodeはクロックCLKとは非同期で動作する。
Here, ST, PC, DO, R1, Se
l and STK1 operate in synchronization with the rising edge of the clock CLK. IR is delayed by the operation time of the selector 41 with respect to the rising edge of the clock. Also, nextPC,
Decode operates asynchronously with clock CLK.

【0084】ここでは、同期式メモリ10の内部のアド
レスレジスタ13の値addrとプログラムカウンタ3
0の値PCが同じになり、プログラムカウンタ30にセ
ットされる値(PC−1)が実際のアドレスaddrと
なり、そのアドレスaddrによる出力が出力レジスタ
15により1クロック遅れる。
Here, the value addr of the address register 13 inside the synchronous memory 10 and the program counter 3 are used.
The value PC of 0 becomes the same, the value (PC-1) set in the program counter 30 becomes the actual address addr, and the output by the address addr is delayed by one clock by the output register 15.

【0085】さて、制御回路20からスタート制御レジ
スタ25にST=1をセットすると、同期式メモリ10
に格納されたプログラムが‘000’からスタートする
(図5の61)。その後、プログラム制御命令がnon
命令の場合は、プログラムカウンタ30の値PCが順次
インクリメントされるが、それより1つ前の値「PC−
1」が同期式メモリ10のアドレスレジスタ13に入力
され、新しい命令コードが出力データレジスタ15にセ
ットされ、その出力がセレクタ41を介して新しい命令
コードとなる。そして、組合せ回路46の処理結果によ
り、新しいプログラム制御命令が決定される。ここで、
IR0からIR81(Pop)は図12の命令コードに
対応している。
Now, when ST = 1 is set in the start control register 25 from the control circuit 20, the synchronous memory 10
The program stored in is started from '000' (61 in FIG. 5). After that, the program control instruction is non
In the case of an instruction, the value PC of the program counter 30 is sequentially incremented, but one value before that, "PC-
1 ”is input to the address register 13 of the synchronous memory 10, a new instruction code is set in the output data register 15, and its output becomes a new instruction code via the selector 41. Then, a new program control instruction is determined according to the processing result of the combination circuit 46. here,
IR0 to IR81 (Pop) correspond to the instruction code in FIG.

【0086】62のJMP0は、条件ジャンプで条件が
成立しない場合を示す。このときは、プログラム制御命
令はnon命令となり、プログラムカウンタ30の値P
Cは+1加算される。
JMP0 of 62 indicates the case where the condition is not satisfied in the conditional jump. At this time, the program control instruction becomes a non instruction, and the value P of the program counter 30
C is incremented by +1.

【0087】63のJMPlは、条件ジャンプで条件が
成立した場合を示す。このときは、プログラム制御命令
がjump命令となり、セレクタ41が出力している命
令コードIR上のアドレスが、セレクタ31を介して同
期式メモリ10のアドレスレジスタ13とプログラムカ
ウンタ30にセットされる。また、jump命令の場合
は、組合せ回路47によりセレクタ41の次の出力とし
てNop命令が選択されて、次のクロックで命令コード
選択レジスタ55がNopの選択用にセットされ、セレ
クタ41から命令コードとしてNop命令が出力され
る。その次のクロックで同期式メモリ10からジャンプ
先の命令コードが出力される。このときは、プログラム
制御命令はnon命令なので、命令コード選択レジスタ
55が同期式メモリ10の出力の選択用にセットされ、
同期式メモリ10の出力がセレクタ41を介して出力
し、ジャンプ先の命令コードとなる。このようにジャン
プ命令とジャンプ先の命令の間にNop命令が自動挿入
される。
JMPl of 63 indicates the case where the condition is satisfied in the conditional jump. At this time, the program control instruction becomes a jump instruction, and the address on the instruction code IR output by the selector 41 is set in the address register 13 and the program counter 30 of the synchronous memory 10 via the selector 31. In the case of the jump instruction, the combination circuit 47 selects the Nop instruction as the next output of the selector 41, the instruction code selection register 55 is set for the selection of Nop at the next clock, and the selector 41 outputs the instruction code as the instruction code. The Nop command is output. At the next clock, the instruction code at the jump destination is output from the synchronous memory 10. At this time, since the program control instruction is a non instruction, the instruction code selection register 55 is set for selecting the output of the synchronous memory 10,
The output of the synchronous memory 10 is output via the selector 41 and becomes the instruction code of the jump destination. In this way, the Nop instruction is automatically inserted between the jump instruction and the jump destination instruction.

【0088】64のWait1は、Wait命令で、W
ait条件が成立した場合を示す。このときは、プログ
ラム制御命令はwait命令となり、同期式メモリ10
のアドレスレジスタ13とプログラムカウンタ30の値
は変化しない。また、組合せ回路47によりセレクタ4
1の次の出力としてラッチ50のR1が選択され、次の
クロックで命令コード選択レジスタ55がラッチ50の
R1の選択用にセットされ、セレクタ41から現在実行
中と同じ命令コードが出力される。
Wait 1 of 64 is a Wait instruction
The case where the ait condition is satisfied is shown. At this time, the program control instruction becomes a wait instruction, and the synchronous memory 10
The values of the address register 13 and the program counter 30 do not change. In addition, the combination circuit 47 allows the selector 4
R1 of the latch 50 is selected as the output next to 1, the instruction code selection register 55 is set for the selection of R1 of the latch 50 at the next clock, and the same instruction code as the one currently being executed is output from the selector 41.

【0089】65のWait0は、Wait命令で、W
ait条件が成立しない場合を示す。このときは、プロ
グラム制御命令はnon命令となり、プログラムカウン
タ30の値PCは+1加算される。このときは、プログ
ラム制御命令はnon命令なので、命令コード選択レジ
スタ55が同期式メモリ10の出力の選択用にセットさ
れて、同期式メモリ10の出力がセレクタ41を介して
出力し、次の命令コードとなる。
Wait0 of 65 is a Wait instruction, and
The case where the ait condition is not satisfied is shown. At this time, the program control instruction becomes a non instruction, and the value PC of the program counter 30 is incremented by +1. At this time, since the program control instruction is the non instruction, the instruction code selection register 55 is set to select the output of the synchronous memory 10, the output of the synchronous memory 10 is output via the selector 41, and the next instruction It becomes a code.

【0090】66のPushは、サブルーチン命令で、
プログラムカウンタ30の値PCをSTK1レジスタに
セットする。このときは、プログラム制御命令がpus
h命令となり、セレクタ41が出力している命令コード
IR上のアドレスが、同期式メモリ10のアドレスレジ
スタ13とプログラムカウンタ30にセットされる。ま
た、push命令の場合は、組合せ回路47により次の
セレクタ41の出力としてNop命令が選択されて、次
のクロックで命令コード選択レジスタ55がNopの選
択用にセットされ、セレクタ41から命令コードIRと
してNop命令が出力される。その次のクロックで同期
式メモリ10からジャンプ先の命令コードが出力され
る。このときは、プログラム制御命令はnon命令なの
で、命令コード選択レジスタ55が同期式メモリ10の
出力の選択用にセットされて、同期式メモリ10の出力
がセレクタ41を介して出力し、ジャンプ先の命令コー
ドとなる。このようにPush命令とジャンプ先の命令
の間にNop命令が自動挿入される。
Push of 66 is a subroutine instruction,
The value PC of the program counter 30 is set in the STK1 register. At this time, the program control instruction is pus
This is the h instruction, and the address on the instruction code IR output by the selector 41 is set in the address register 13 and the program counter 30 of the synchronous memory 10. In the case of the push instruction, the combination circuit 47 selects the Nop instruction as the output of the next selector 41, the instruction code selection register 55 is set for the Nop selection at the next clock, and the selector 41 outputs the instruction code IR. The Nop command is output as. At the next clock, the instruction code at the jump destination is output from the synchronous memory 10. At this time, since the program control instruction is a non instruction, the instruction code selection register 55 is set for selection of the output of the synchronous memory 10, the output of the synchronous memory 10 is output via the selector 41, and the jump destination It becomes an instruction code. In this way, the Nop instruction is automatically inserted between the Push instruction and the instruction at the jump destination.

【0091】67のPopは、リターン命令で、プログ
ラム制御命令がpop命令となり、STK1レジスタに
待避されていたプログラムカウンタ30の値PCが、同
期式メモリ10のアドレスレジスタ13とプログラムカ
ウンタ30にセットされる。また、pop命令の場合
は、組合せ回路47により次のセレクタ41の出力IR
としてNop命令が選択されて、次のクロックで命令コ
ード選択レジスタ55がNopの選択用にセットされ、
これによりセレクタ41から命令コードIRとしてNo
p命令が出力される。その次のクロックで同期式メモリ
10から待避先の命令コードが出力される。このとき
は、プログラム制御命令はnon命令なので、命令コー
ド選択レジスタ55が同期式メモリ10の出力の選択用
にセットされて、同期式メモリ10の出力がセレクタ4
1を介して出力し、待避先の命令コードとなる。このよ
うにpop命令と待避先の命令の間にNop命令が自動
挿入される。
Pop of 67 is a return instruction, the program control instruction becomes a pop instruction, and the value PC of the program counter 30 saved in the STK1 register is set in the address register 13 and the program counter 30 of the synchronous memory 10. It In the case of a pop instruction, the combination circuit 47 outputs the output IR of the next selector 41.
Nop instruction is selected as, and the instruction code selection register 55 is set for Nop selection at the next clock,
As a result, the selector 41 outputs the instruction code IR
p command is output. At the next clock, the instruction code of the save destination is output from the synchronous memory 10. At this time, since the program control instruction is the non instruction, the instruction code selection register 55 is set for selecting the output of the synchronous memory 10, and the output of the synchronous memory 10 is changed to the selector 4
It is output via 1 and becomes the instruction code of the save destination. In this way, the Nop instruction is automatically inserted between the pop instruction and the save destination instruction.

【0092】68のBP1は、ブレークポイントが成立
したときの動作を示す。このときは、組合せ回路47に
より次のセレクタ41の出力としてBP1が選択され、
次のクロックで命令コード選択レジスタ55がBP1の
選択用にセットされ、これによりブレークポイントレジ
スタ群26にセットされている命令コードBP1がIR
17と置換されて、セレクタ41を介して新しい命令コ
ードIRとして出力される。
BP1 at 68 indicates the operation when the break point is established. At this time, the combination circuit 47 selects BP1 as the output of the next selector 41,
At the next clock, the instruction code selection register 55 is set for the selection of BP1, so that the instruction code BP1 set in the breakpoint register group 26 becomes IR.
It is replaced with 17 and output as a new instruction code IR via the selector 41.

【0093】69のBP2は、ブレークポイントが成立
したときの動作を示す。このときは、組合せ回路47に
より次のセレクタ41の出力としてBP2が選択され
て、次のクロックで命令コード選択レジスタ55がBP
2の選択用にセットされ、セレクタ41からプレークポ
イントレジスタ群26にセットされている命令コードB
P2が、IR20と置換されて、セレクタ41を介して
新しい命令コードとして出力される。このときのプログ
ラム制御命令がjump命令である場合は、セレクタ4
1が出力している命令コードIR上のアドレスが、同期
式メモリ10のアドレスレジスタ13とプログラムカウ
ンタ30にセットされる。また、jump命令の場合
は、組合せ回路47により次のセレクタ41の出力とし
てNop命令が選択されて、次のクロックで命令コード
選択レジスタ55がNopの選択用にセットされ、セレ
クタ41から命令コードIRとしてNop命令が出力さ
れる。その次のクロックで同期式メモリ10からジャン
プ先の命令コードが出力される。このときは、プログラ
ム制御命令はnon命令なので、命令コード選択レジス
タ55が同期式メモリ10の出力の選択用にセットさ
れ、同期式メモリ10の出力がセレクタ41を介して出
力し、ジャンプ先の命令コードとなる。このようにジャ
ンプ命令とジャンプ先の命令の問にNop命令が自動挿
入される。
BP2 at 69 indicates the operation when the break point is established. At this time, BP2 is selected as the output of the next selector 41 by the combination circuit 47, and the instruction code selection register 55 is set to BP2 at the next clock.
The instruction code B set for the selection of 2 and set in the break point register group 26 from the selector 41.
P2 is replaced with IR20 and output as a new instruction code via the selector 41. If the program control instruction at this time is a jump instruction, the selector 4
The address on the instruction code IR output by 1 is set in the address register 13 and the program counter 30 of the synchronous memory 10. In the case of the jump instruction, the combination circuit 47 selects the Nop instruction as the output of the next selector 41, the instruction code selection register 55 is set for the Nop selection at the next clock, and the selector 41 outputs the instruction code IR. The Nop command is output as. At the next clock, the instruction code at the jump destination is output from the synchronous memory 10. At this time, since the program control instruction is the non instruction, the instruction code selection register 55 is set for selecting the output of the synchronous memory 10, the output of the synchronous memory 10 is output via the selector 41, and the instruction of the jump destination is set. It becomes a code. In this way, the Nop instruction is automatically inserted between the jump instruction and the jump destination instruction.

【0094】以上のように、本実施形態では、非同期式
メモリを同期式メモリに変更する場合、非同期式メモリ
用に開発されたプログラムを実行するとき、ジャンプや
サブルーチン命令等で自動的にNop命令を挿入するの
で、非同期式メモリ用に開発されたプログラムを変更せ
ずにそのまま使用することができる。
As described above, in the present embodiment, when the asynchronous memory is changed to the synchronous memory, when the program developed for the asynchronous memory is executed, the Nop instruction is automatically executed by the jump or the subroutine instruction. Since, is inserted, a program developed for asynchronous memory can be used as it is without modification.

【0095】さらに、命令コード選択用レジスタ55を
用いているので、図7、図13、図18のコンピュータ
制御回路で使用した命令コードレジスタ40と同等な、
クロックに同期した命令コードを得ることができる。
Further, since the instruction code selection register 55 is used, it is equivalent to the instruction code register 40 used in the computer control circuits of FIGS. 7, 13 and 18.
The instruction code synchronized with the clock can be obtained.

【0096】[0096]

【発明の効果】以上から本発明によれば、非同期式メモ
リを同期式メモリに変更する場合、非同期式メモリ用に
開発されたプログラムを変更せずに使用することができ
るようになるため、プログラムの開発コストが不要にな
る。
As described above, according to the present invention, when the asynchronous memory is changed to the synchronous memory, the program developed for the asynchronous memory can be used without being changed. No development cost is required.

【0097】通常、非同期式メモリを同期式メモリに変
更する場合、タイミング調整用にNop等の命令を追加
するためにプログラムの容量が増えるが、本発明ではプ
ログラム容量は変化しないので、メモリの増加によるチ
ップのコスト上昇がない。
Normally, when the asynchronous memory is changed to the synchronous memory, the capacity of the program increases because the instruction such as Nop is added for the timing adjustment. However, since the program capacity does not change in the present invention, the memory increases. There is no increase in chip cost.

【0098】また、同期式メモリを使用すると、タイミ
ング制約が簡単になり、プロセスが微細化した場合に、
容易にプロセスの変更ができるため、同じ回路において
チップ面積を小さくすることにより、チップコストが安
くなる。
Further, the use of the synchronous memory simplifies the timing constraint, and when the process is miniaturized,
Since the process can be easily changed, the chip cost can be reduced by reducing the chip area in the same circuit.

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

【図1】 本発明の一実施形態の同期式メモリを使用し
たコンピュータ制御回路の回路図である。
FIG. 1 is a circuit diagram of a computer control circuit using a synchronous memory according to an embodiment of the present invention.

【図2】 図1の回路の命令コード選択用セレクタ41
のテーブルの説明図である。
FIG. 2 is a selector 41 for selecting an instruction code in the circuit of FIG.
3 is an explanatory diagram of a table of FIG.

【図3】 図1の回路のプログラムカウンタ用セレクタ
31のテーブルの説明図である。
FIG. 3 is an explanatory diagram of a table of a program counter selector 31 of the circuit of FIG.

【図4】 図1のスタック用レジスタ群28のスタック
状態遷移テーブルの説明図である。
4 is an explanatory diagram of a stack state transition table of a stack register group 28 in FIG.

【図5】 図1の回路の動作のタイミング図である5 is a timing diagram of the operation of the circuit of FIG.

【図6】 図1の回路の動作のタイミング図である。6 is a timing diagram of the operation of the circuit of FIG.

【図7】 従来の非同期式メモリを使用したコンピュー
タ制御回路の回路図である。
FIG. 7 is a circuit diagram of a computer control circuit using a conventional asynchronous memory.

【図8】 図7の回路の命令コードレジスタ用セレクタ
のテーブルの説明図である。
8 is an explanatory diagram of a table of an instruction code register selector of the circuit of FIG.

【図9】 図7の回路のアドレス用セレクタのテーブル
の説明図である。
9 is an explanatory diagram of a table of address selectors of the circuit of FIG.

【図10】 図7の回路の動作のタイミング図である。10 is a timing diagram of the operation of the circuit of FIG.

【図11】 図7の回路の動作のタイミング図である。11 is a timing diagram of the operation of the circuit of FIG.

【図12】 図7の回路用のプログラムの説明図であ
る。
12 is an explanatory diagram of a program for the circuit of FIG.

【図13】 従来の同期式アクセス方式のコンピュータ
制御回路の回路図である。
FIG. 13 is a circuit diagram of a conventional synchronous access type computer control circuit.

【図14】 図13の回路のプログラムカウント用セレ
クタのテーブルの説明図である。
14 is an explanatory diagram of a table of a program count selector of the circuit of FIG.

【図15】 図13の回路の動作のタイミング図であ
る。
FIG. 15 is a timing diagram of the operation of the circuit of FIG.

【図16】 図13の回路の動作のタイミング図であ
る。
16 is a timing diagram of the operation of the circuit of FIG.

【図17】 図13の回路用のプログラムの説明図であ
る。
17 is an explanatory diagram of a program for the circuit of FIG.

【図18】 従来の同期式メモリを使用したコンピュー
タ制御回路の回路図である。
FIG. 18 is a circuit diagram of a computer control circuit using a conventional synchronous memory.

【図19】 図18の回路用のプログラムの説明図であ
る。
19 is an explanatory diagram of a program for the circuit in FIG.

【図20】 図18の回路の動作のタイミング図であ
る。
20 is a timing diagram of the operation of the circuit of FIG.

【図21】 図18の回路の動作のタイミング図であ
る。
21 is a timing diagram of the operation of the circuit of FIG.

【図22】 図18の回路の動作のタイミング図であ
る。
22 is a timing diagram of the operation of the circuit of FIG.

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

10:同期式メモリ、11:非同期式メモリ、12:入
力データレジスタ、13:アドレスレジスタ、15:出
力データレジスタ、20:制御回路、21:データレジ
スタ、22:アドレスレジスタ、23:アドレス切替セ
レクタ、25:スタート制御レジスタ、26:ブレーク
ポイント用レジスタ群、28:スタック命令用レジスタ
群、30:プログラムカウンタ、31:同期式メモリの
アドレスおよびプログラムカウンタ用のセレクタ、3
2:アドレス用セレクタ、33:プログラムカウンタ用
セレクタ、34,35:プログラムカウンタ用セレク
タ、39:加算器、40:命令コードレジスタ、41:
命令コード選択用セレクタ、42:命令コードレジスタ
用セレクタ、45:比較器、46,47,48:組合せ
回路、50:ラッチ、55:命令コード選択レジスタ。
10: Synchronous memory, 11: Asynchronous memory, 12: Input data register, 13: Address register, 15: Output data register, 20: Control circuit, 21: Data register, 22: Address register, 23: Address switching selector, 25: Start control register, 26: Breakpoint register group, 28: Stack instruction register group, 30: Program counter, 31: Synchronous memory address and program counter selector, 3
2: address selector, 33: program counter selector, 34, 35: program counter selector, 39: adder, 40: instruction code register, 41:
Instruction code selection selector, 42: instruction code register selector, 45: comparator, 46, 47, 48: combinational circuit, 50: latch, 55: instruction code selection register.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】同期式メモリを使用したコンピュータ制御
回路において、 出力命令コードを保持するラッチの出力、前記同期式メ
モリから出力される命令コード、Nop命令コード、お
よびブレークポイントで発生した命令コードの内の1つ
を選択するセレクタと、該セレクタの選択動作を制御す
るレジスタを具備し、 前記セレクタは、前記レジスタにより、前記同期式メモ
リから出力される命令コードがジャンプ命令のときは前
記Nop命令コードを選択して出力し、Wait命令の
ときは前記ラッチの出力を選択して出力し、ブレークポ
イント条件が成立したときは該ブレークポイントの命令
コードを選択して出力するよう制御されることを特徴と
するコンピュータ制御回路。
1. A computer control circuit using a synchronous memory, comprising: an output of a latch holding an output instruction code; an instruction code output from the synchronous memory; a Nop instruction code; and an instruction code generated at a breakpoint. A selector for selecting one of the selectors, and a register for controlling a selecting operation of the selector. The selector selects the Nop instruction when the instruction code output from the synchronous memory is a jump instruction. It is controlled so that the code is selected and output, the output of the latch is selected and output in the case of the Wait instruction, and the instruction code of the breakpoint is selected and output when the breakpoint condition is satisfied. Characterized computer control circuit.
【請求項2】請求項1において、 前記レジスタは、前記セレクタの選択状態を1クロック
期間保持することを特徴とするコンピュータ制御回路。
2. The computer control circuit according to claim 1, wherein the register holds the selection state of the selector for one clock period.
【請求項3】請求項1又は2において、 前記同期メモリに内蔵されたアドレスレジスタと同じ値
を持つよう制御されるプログラムカウンタを具備するこ
とを特徴とするコンピュータ制御回路。
3. The computer control circuit according to claim 1, further comprising a program counter controlled to have the same value as an address register built in the synchronous memory.
JP2001310335A 2001-10-05 2001-10-05 Computer control circuit Expired - Fee Related JP3716320B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001310335A JP3716320B2 (en) 2001-10-05 2001-10-05 Computer control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001310335A JP3716320B2 (en) 2001-10-05 2001-10-05 Computer control circuit

Publications (2)

Publication Number Publication Date
JP2003114796A true JP2003114796A (en) 2003-04-18
JP3716320B2 JP3716320B2 (en) 2005-11-16

Family

ID=19129326

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001310335A Expired - Fee Related JP3716320B2 (en) 2001-10-05 2001-10-05 Computer control circuit

Country Status (1)

Country Link
JP (1) JP3716320B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100705384B1 (en) * 2005-08-16 2007-04-10 삼성전자주식회사 Process Cartridge in an Image Forming Apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100705384B1 (en) * 2005-08-16 2007-04-10 삼성전자주식회사 Process Cartridge in an Image Forming Apparatus

Also Published As

Publication number Publication date
JP3716320B2 (en) 2005-11-16

Similar Documents

Publication Publication Date Title
US20070288724A1 (en) Microprocessor
JP4412905B2 (en) Low power operation control device and program optimization device
US6012138A (en) Dynamically variable length CPU pipeline for efficiently executing two instruction sets
JP2003114796A (en) Computer control circuit
JP2005234968A (en) Arithmetic processing unit
US6389528B2 (en) Processor with a control instruction for sending control signals without interpretation for extension of instruction set
JP3459821B2 (en) Microprocessor
JPH1091430A (en) Instruction decoding device
JP3699796B2 (en) Processor
JP2000284962A (en) Microcomputer
KR100345937B1 (en) A digital signal processor
JP3958239B2 (en) Microcontroller
US6704853B1 (en) Digital signal processing apparatus and method for controlling the same
JPH0793151A (en) Instruction supplying device
JP3540802B2 (en) Instruction generation method, instruction generation method, and information processing apparatus
KR100314805B1 (en) A booting circuit for pipeline-controlled processor
JP2721610B2 (en) Programmable controller
KR100345678B1 (en) Control unit for being easy change of design
JP2721611B2 (en) Programmable controller
JP2000222238A (en) In-circuit emulator and in-circuit emulation method
KR100388943B1 (en) Apparatus for processing immediate data on a DSP
JPH1049398A (en) Program counter reproduction circuit
JP3814548B2 (en) Information processing control device
JPH08106383A (en) Arithmetic processor
JPH10333975A (en) Microprocessor system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040805

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050719

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050810

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080909

Year of fee payment: 3

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110909

Year of fee payment: 6

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130909

Year of fee payment: 8

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees