Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0520773B2 - - Google Patents
[go: Go Back, main page]

JPH0520773B2 - - Google Patents

Info

Publication number
JPH0520773B2
JPH0520773B2 JP57170613A JP17061382A JPH0520773B2 JP H0520773 B2 JPH0520773 B2 JP H0520773B2 JP 57170613 A JP57170613 A JP 57170613A JP 17061382 A JP17061382 A JP 17061382A JP H0520773 B2 JPH0520773 B2 JP H0520773B2
Authority
JP
Japan
Prior art keywords
instruction
address
stack
return
jump
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP57170613A
Other languages
Japanese (ja)
Other versions
JPS5958551A (en
Inventor
Mitsuo Suzuki
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.)
Toshiba Corp
Original Assignee
Tokyo Shibaura Electric 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 Tokyo Shibaura Electric Co Ltd filed Critical Tokyo Shibaura Electric Co Ltd
Priority to JP57170613A priority Critical patent/JPS5958551A/en
Publication of JPS5958551A publication Critical patent/JPS5958551A/en
Publication of JPH0520773B2 publication Critical patent/JPH0520773B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • G06F9/4484Executing subprograms
    • G06F9/4486Formation of subprogram jump address

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Executing Machine-Instructions (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明は、スタツク動作テストを簡単に行なえ
る機構を具えたマイクロプロセツサに関する。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a microprocessor equipped with a mechanism for easily performing a stack operation test.

〔発明の技術的背景〕[Technical background of the invention]

近年マイクロコンピユータの普及は急速に進
み、その利用範囲はあらゆる産業分野に及んでい
る。このマイクロコンピユータの主構成要素であ
るマイクロプロセツサは、第1図に示すように構
成され、マイクロプログラムカウンタ(以下PC
と略す)2がアドレスバス3を介して指定するア
ドレスの命令をマイクロプログラムメモリ(以下
ROMと略す)4から抽出し命令レジスタ5に一
時格納する。命令レジスタ5は、前記格納された
命令にもとづき、実行回路6を駆動させることに
より、この命令は実行される。例えば、この命令
が外部装置に出力する命令であれば、実行回路6
からデータバス8を介して制御信号が送られ、デ
ータレジスタ9を制御すると共に所定の外部装置
へ出力された。
In recent years, microcomputers have rapidly become popular, and their use extends to all industrial fields. The microprocessor, which is the main component of this microcomputer, is configured as shown in Figure 1.
(abbreviated as ) 2 transfers the instruction at the address specified via the address bus 3 to the microprogram memory (hereinafter referred to as
(abbreviated as ROM) 4 and temporarily stored in the instruction register 5. The instruction register 5 executes the instruction by driving the execution circuit 6 based on the stored instruction. For example, if this instruction is an instruction to be output to an external device, the execution circuit 6
A control signal was sent from the controller via the data bus 8 to control the data register 9 and output to a predetermined external device.

このように与えられるプログラムは命令を1つ
1つ順序よく実行することにより処理されるが、
このプログラムが所定のアドレスレへジヤンプせ
よという命令、例えばサブルーチンジヤンプ命令
を有したものであつた場合、PC2はこのサブル
ーチンジヤンプ命令が実行され該実行終了後に戻
るべきメインルーチンのアドレスデータをスタツ
ク1に出力して記憶させる。その後、サブルーチ
ンの指定されたアドレスへジヤンプし該サブルー
チンの命令を順次実行し該サブルーチン命令の実
行が終了すると前記PC2はスタツク1から、サ
ブルーチンへジヤンプする時に格納しておいた戻
るべきアドレスのアドレスデータを読みとり、該
読みとつたアドレスデータをPOM4に指定し、
このアドレスの命令を実行するとともにこの命令
以後のメインルーチンの命令を順次実行していく
ものであつた。ところで前述したようにプログラ
ムの命令を順次実行していく上でサブルーチンジ
ヤンプ命令に従つた命令を実行した後、指定され
た戻り先すなわちスタツク1に格納されたアドレ
スに確実に戻ることは重要なことであり、このた
めスタツク1に格納されたアドレスが正常なプロ
グラムに即したものであるかどうかのテストを行
うことが必要とされていた。
A program given in this way is processed by executing instructions one by one in order, but
If this program has an instruction to jump to a predetermined address level, for example, a subroutine jump instruction, the PC 2 stores the address data of the main routine to which the subroutine jump instruction is executed and returns to after the execution is completed in stack 1. Output and memorize. Thereafter, the PC 2 jumps to the specified address of the subroutine, executes the instructions of the subroutine sequentially, and when the execution of the subroutine instructions is completed, the PC 2 transfers the address data of the address to return to, which was stored when jumping to the subroutine, from stack 1. Read the read address data and specify it to POM4,
The instruction at this address is executed, and the instructions of the main routine after this instruction are sequentially executed. By the way, as mentioned above, when sequentially executing program instructions, it is important to ensure that the program returns to the specified return destination, that is, the address stored in stack 1, after executing the instruction according to the subroutine jump instruction. Therefore, it is necessary to test whether the address stored in stack 1 corresponds to a normal program.

従来のこのようなスタツク動作テストは第2図
に示すサブルーチンジヤンプ命令を有したプログ
ラムを実行する場合以下に示すように行われてい
た。すなわち第2図に示すプログラムはメインル
ーチンのアドレス100から命令実行を開始しア
ドレス103の命令を実行することによりアドレ
ス500からのサブルーチン命令にジヤンプしア
ドレス500からのサブルーチン命令をアドレス
505まで順次実行してゆく。そしてアドレス5
05の命令を実行することによつてメインルーチ
ンのアドレス104にリターンし、該アドレス1
04の命令を実行した後順次105,106……
の命令を実行せよという意味の命令である。そこ
でマイクロプロセツサはアドレス100から上述
した方法によつて命令の実行を開始し命令の実行
がアドレス103に至ると、PC2はROM4にこ
のアドレス103を指定する。この103の命令
がアドレス500へジヤンプせよという命令であ
ることからPC2は飛び先であるサブルーチンの
アドレス500の検索を開始するとともに、サブ
ルーチンがアドレス500〜505まで実行され
た後戻るべきメインルーチンのアドレス104を
スタツク1に送出しこれを格納させた後検索して
いた飛び先のアドレス500へ所定の動作により
ジヤンプする。その後、500から順次命令を実
行してゆきPC2からROM4に対してアドレス5
05が指定されると、このアドレス505の命令
を命令レジスタ5に格納するとともにこの命令の
内容を解読する。この時アドレス505の命令が
104へリターンせよという命令であることから
実行回路6は制御線7を介してPO2に制御信号
を送出する。そこで、PC2はサブルーチンへジ
ヤンプする時に戻り先のアドレスとしてスタツク
1に格納させていたアドレス104を該スタツク
1から読み出し、このアドレス104をアドレス
バス3を介してROM4に指定する。その後、
ROM4でこの命令をデータフエツチし命令レジ
スタ5にとりこみこのとりこまれた命令の内容に
もづいて実行回路6から制御信号を送出しデータ
バス8、データレジスタ9を介して前記アドレス
104の命令を実行させる。ここで、データレジ
スタ9はこの実行された動作がスタツク1に格納
されていたアドレスの命令によるものであれば外
部端子91から1を出力し、そうでない場合外部
端子90から0を出力する。上述したようにこの
アドレス104はサブルーチンへジヤンプする前
にスタツク1に格納しておいたアドレスであり、
従来のスタツク動作テストはこのアドレス104
の命令を実行させ、その実行結果に応じてスタツ
ク1に格納されたアドレスデータを確認するとい
う方法により行なわれていた。
Conventionally, such a stack operation test is performed as shown below when executing a program having a subroutine jump instruction as shown in FIG. In other words, the program shown in FIG. 2 starts executing instructions at address 100 of the main routine, jumps to the subroutine instruction from address 500 by executing the instruction at address 103, and sequentially executes the subroutine instructions from address 500 to address 505. I'm going to go. and address 5
By executing the instruction 05, the main routine returns to address 104, and the address 1
After executing instruction 04, sequentially 105, 106...
This command means to carry out the command. Therefore, the microprocessor starts executing instructions from address 100 using the method described above, and when the instruction execution reaches address 103, PC 2 specifies this address 103 in ROM 4. Since this instruction 103 is an instruction to jump to address 500, PC2 starts searching for address 500 of the subroutine that is the jump destination, and also the address of the main routine to which to return after the subroutine has been executed from addresses 500 to 505. 104 is sent to stack 1 and stored therein, the CPU jumps to address 500, which is the destination of the search, by a predetermined operation. After that, instructions are executed sequentially starting from 500, and address 5 is sent from PC2 to ROM4.
When 05 is specified, the instruction at address 505 is stored in the instruction register 5, and the contents of this instruction are decoded. At this time, since the command at address 505 is a command to return to 104, execution circuit 6 sends a control signal to PO2 via control line 7. Therefore, when the PC 2 jumps to the subroutine, it reads the address 104 stored in the stack 1 as the return destination address from the stack 1, and specifies this address 104 to the ROM 4 via the address bus 3. after that,
The ROM 4 fetches the data of this instruction, loads it into the instruction register 5, and based on the contents of the loaded instruction, sends a control signal from the execution circuit 6 to execute the instruction at the address 104 via the data bus 8 and data register 9. . Here, the data register 9 outputs 1 from the external terminal 91 if the executed operation is due to the instruction at the address stored in the stack 1, and otherwise outputs 0 from the external terminal 90. As mentioned above, this address 104 is the address stored in stack 1 before jumping to the subroutine.
The conventional stack operation test uses this address 104.
This was done by executing an instruction and checking the address data stored in stack 1 according to the execution result.

〔背景技術の問題点〕[Problems with background technology]

かかる従来のマイクロプロセツサによればスタ
ツク動作テストを行う場合にスタツク1に格納さ
れたアドレスを外部へ取り出す径路がなく、スタ
ツク1の内容はマイクロプログラムカウンタ2を
通してマイクロプログラムメモリ4のアドレス指
定用に使用されるだけであり、このアドレスの命
令を実行させなければ前記スタツク1の内容が判
断できずさらに実行回路6の実行結果がスタツク
1に格納されていたアドレスの命令によるものか
どうかの解析をしなければならなかつた。このた
めその解析ができるだけ簡便に処理できるように
テストプログラム中にプツシユ命令やリターン命
令を盛りこむとか、あるいはスタツク1に格納さ
れていたアドレスの命令による正常な動作がなさ
れた時に外部接続端子を例えば0から1に変化さ
せる等の処理を行う負荷装置が必要になるという
欠点があつた。
According to such a conventional microprocessor, when performing a stack operation test, there is no path for extracting the address stored in the stack 1 to the outside, and the contents of the stack 1 are passed through the microprogram counter 2 to specify the address of the microprogram memory 4. The contents of stack 1 cannot be determined unless the instruction at this address is executed, and it is necessary to analyze whether the execution result of execution circuit 6 is due to the instruction at the address stored in stack 1. I had to. Therefore, in order to make the analysis as simple as possible, it is recommended to include a push instruction or a return instruction in the test program, or to connect an external connection terminal when a normal operation is performed by the instruction at the address stored in stack 1. There was a drawback that a load device was required to perform processing such as changing from 0 to 1.

〔発明の目的〕[Purpose of the invention]

本発明はかかる従来の欠点を除去するためにな
されたものであり、上述したスタツク動作の良否
を判定する負荷装置が不用でありテストプログラ
ムに対する種々の配慮を低減することができ、か
つスタツクに格納されたデータのテストが簡単に
行なえる機構を具えたマイクロプロセツサを提供
することをその目的とする。
The present invention has been made in order to eliminate such conventional drawbacks, and does not require the above-mentioned load device for determining the quality of stack operation, reduces various considerations for test programs, and stores data in the stack. The purpose of the present invention is to provide a microprocessor equipped with a mechanism that allows easy testing of data generated by the microprocessor.

〔発明の概要〕[Summary of the invention]

本発明においては、マイクロプログラムカウン
タまたはスタツクと出力データレジスタに接続さ
れるデータバスとの間に前記スタツクに格納され
ている戻り先アドレスを前記出力データレジスタ
に直接転送するためのパスラインを設けている。
そしてプログラムメモリの所定のアドレスNに格
納したリターン&転送命令を実行させリターン命
令によつて前記スタツクに格納される戻り先アド
レスを前記パスライン上に出力し、前記転送命令
によつて前記パスライン中に構成されるゲート回
路を開放させ前記スタツクに格納される戻り先ア
ドレスを出力レジスタに直接取りこんで監視する
ことで上記目的を達している。
In the present invention, a pass line is provided between the microprogram counter or stack and a data bus connected to the output data register for directly transferring the return destination address stored in the stack to the output data register. There is.
Then, a return & transfer instruction stored at a predetermined address N of the program memory is executed, the return address stored in the stack is outputted to the path line by the return instruction, and the return destination address stored in the stack is output to the path line by the transfer instruction. The above objective is achieved by opening the gate circuit constructed inside the stack and directly reading the return destination address stored in the stack into the output register for monitoring.

〔発明の実施例〕[Embodiments of the invention]

以下本発明の実施例を添付図面にもとづき詳細
に説明する。第3図は本発明の一実施例を示すマ
イクロプロセツサのブロツク図でありPC2と
ROM4の間のアドレスバス3とデータレジスタ
間にはスタツク1に格納されたアドレスデータを
転送させるためのパスライン11が設けられ、さ
らにこのパスライン11には所定の命令によつて
開閉されるゲート回路10が設けられている。
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Figure 3 is a block diagram of a microprocessor showing one embodiment of the present invention, and is
A path line 11 is provided between the address bus 3 between the ROM 4 and the data register for transferring the address data stored in the stack 1, and this path line 11 is further provided with a gate that is opened and closed by a predetermined command. A circuit 10 is provided.

また、第4図は第3図に示すマイクロプロセツ
サにおけるスタツク動作テストに用いるテストプ
ログラムの一例を示すものである。今マイクロプ
ロセツサに命令実行の指示が与えられるとPC2
はROM4にアドレス100を指定しこのアドレ
ス100からの命令を上述した方法により順次実
行する。PC2がROM4に対しアドレス103を
指定すると、このアドレス103の命令内容が命
令レジスタに格納されその判別が行なわれる。こ
のアドレス103の命令内容はサブルーチンのア
ドレス500へジヤンプせよと命令であることか
ら前記PC2は、とび先であるサブルーチンのア
ドレス500の検索を開始するとともに、該サブ
ルーチン命令実行終了後に戻るべきアドレスであ
るメインルーチンのアドレス104をスタツク1
に送出し、該アドレス104をスタツク1に格納
し、その後検索していたサブルーチンのアドレス
500へジヤンプする。その後サブルーチン50
0からの命令が順次実行され、PC2からROM4
にアドレス505が指定されるとROM4がデー
タフエツチを行いこのアドレス505の命令が命
令レジスタ5に格納されこの命令の内容によつて
実行回路6を駆動する。第4図からも明らかなよ
うにこの命令は、アドレス104へリターンしか
つPC2の出力をデータレジスタ9へ転送せよと
いう命令であることから実行回路6はPC2に対
して制御信号線7を介してこの旨の制御信号を送
出し所定の制御を行う。ここでPC2はアドレス
505のアドレス104へリターンせよという命
令によりサブルーチンへジヤンプする前にスタツ
ク1に格納しておいた、該サブルーチン命令実行
後に行なわれる命令が格納された戻り先アドレス
104を該スタツク1から読みとる。そして引き
続きアドレス104からの命令を実行させるべく
アドレスバス3を介してROM4にこのアドレス
104をアドレスバス3に出力する。これと同時
にアドレス505のPC2の出力をデータレジス
タ9に転送せよという命令によりゲート回路10
が開放される。このため前記PC2の出力すなわ
ちスタツク1に格納されていた戻り先アドレスデ
ータ104はアドレスバス3、パスライン11ゲ
ート回路10、データバス8を介してデータレジ
スタ9に取り込まれる。
Further, FIG. 4 shows an example of a test program used for a stack operation test in the microprocessor shown in FIG. 3. Now, when the microprocessor is given an instruction to execute an instruction, the PC2
specifies address 100 in the ROM 4 and sequentially executes instructions from address 100 in the manner described above. When the PC 2 specifies address 103 to the ROM 4, the contents of the instruction at this address 103 are stored in the instruction register and determined. Since the instruction at address 103 is an instruction to jump to address 500 of the subroutine, the PC 2 starts searching for address 500 of the subroutine to jump to, and this is the address to return to after execution of the subroutine instruction. Stack address 104 of main routine to stack 1
, the address 104 is stored in stack 1, and then a jump is made to address 500 of the subroutine being searched. Then subroutine 50
Instructions from 0 are executed sequentially and transferred from PC2 to ROM4.
When an address 505 is designated, the ROM 4 performs a data fetch, and the instruction at this address 505 is stored in the instruction register 5, and the execution circuit 6 is driven according to the contents of this instruction. As is clear from FIG. 4, this instruction is an instruction to return to address 104 and transfer the output of PC2 to data register 9, so execution circuit 6 sends a signal to PC2 via control signal line 7. A control signal to this effect is sent out and predetermined control is performed. Here, PC2 stores the return destination address 104 in which the instruction to be executed after executing the subroutine instruction, which was stored in stack 1 before jumping to the subroutine by the instruction to return to address 104 at address 505, in stack 1. Read from. Then, this address 104 is outputted to the ROM 4 via the address bus 3 to cause the instruction from the address 104 to be executed subsequently. At the same time, the gate circuit 10 receives an instruction to transfer the output of PC2 at address 505 to data register 9.
will be released. Therefore, the output of the PC 2, that is, the return destination address data 104 stored in the stack 1 is taken into the data register 9 via the address bus 3, the pass line 11, the gate circuit 10, and the data bus 8.

次に適当なテストプログラムを作成し、このテ
ストプログラムの適当なアドレス例えばアドレス
300にサブルーチン505へジヤンプせよとい
う命令を入れて所定のアドレスからこのテストプ
ログラムの実行を開始する。テストプログラムが
アドレス300に至るとPC2からROM4にアド
レス300が指定され命令レジスタ5にこのアド
レス300の命令が格納される。このアドレス3
00の命令はサブルーチン505へジヤンプせよ
という命令であるから前述したと同様の動作によ
りスタツク1に該サブルーチンの命令実行後に戻
るべきアドレス104を格納した後サブルーチン
505の命令を実行する。アドレス505の命令
は、アドレス104へリターンしかつPC2の出
力をデータレジスタ9に転送せよという命令であ
るから実行回路6によりこの命令を実行する。ま
ずPC2ではスタツク1から戻り先アドレス10
4を読みとるとともにこのアドレス104をアド
レスバス3に送出する。
Next, an appropriate test program is created, a command to jump to subroutine 505 is entered into an appropriate address, for example address 300, of this test program, and execution of this test program is started from a predetermined address. When the test program reaches address 300, the address 300 is specified from the PC 2 to the ROM 4, and the instruction at this address 300 is stored in the instruction register 5. this address 3
Since the instruction 00 is an instruction to jump to subroutine 505, the address 104 to be returned to after execution of the subroutine instruction is stored in stack 1 by the same operation as described above, and then the instruction of subroutine 505 is executed. The command at address 505 is a command to return to address 104 and transfer the output of PC2 to data register 9, so execution circuit 6 executes this command. First, on PC2, from stack 1 to return address 10
4 and sends this address 104 to the address bus 3.

この時ゲート回路10は上述した転送命令によ
り開放されているため、このPC2の出力すなわ
ちスタツク1の格納アドレス104はアドレスバ
ス3パスライン11ゲート回路10、データバス
8を介して、データレジスタ9に取り込まれる。
このようにテストプログラムの任意のアドレスn
にサブルーチンジヤンプ命令を入れてアドレスN
にジヤンプさせ、このアドレスNにリターン&転
送命令を格納しアドレスnに近いアドレスから命
令を実行させることにより簡単にスタツク1の内
容をデータレジスタ9に取り込むことができる。
また上述した実施例ではPC2とROM4の間のア
ドレスバスとデータレジスタ間にパスライン11
を設けPC2の出力を直接データレジスタ9に取
り込む方法で説明したが、第5図に示すようにス
タツク1とPC2の間のデータを受け渡しするバ
スラインとデータレジスタ9間に同様のパスライ
ン12を設けスタツク1の出力を直接データレジ
スタ9に取り込む方法でも同じ効果が得られる。
At this time, since the gate circuit 10 is opened by the above-mentioned transfer command, the output of this PC2, that is, the storage address 104 of the stack 1, is sent to the data register 9 via the address bus 3 pass line 11 gate circuit 10 and data bus 8. It is captured.
In this way, any address n in the test program
Add a subroutine jump instruction to address N
The contents of stack 1 can be easily loaded into data register 9 by jumping to address N, storing a return & transfer instruction at address N, and executing the instruction from an address close to address n.
Furthermore, in the embodiment described above, a path line 11 is provided between the address bus and the data register between the PC 2 and the ROM 4.
The explanation has been given on a method in which the output of PC2 is directly taken into the data register 9, but as shown in FIG. The same effect can be obtained by directly taking the output of the stack 1 into the data register 9.

このとき、第4図に示したプログラムのアドレ
ス505には104へリターンせよそしてスタツ
ク1の出力をデータレジスタ9へ転送せよという
命令に設定し任意のn番地からサブルーチン50
5へジヤンプさせる。実行回路6からのリターン
命令によつてスタツク1からPC2に予め格納さ
れた戻り先アドレス104が出力されこのとき同
時に転送命令によつてゲート回路10が開放され
ているためパスライン12、ゲート回路10、デ
ータバス8を介して、このスタツク1の内容を直
接データレジスタ9に取り込むことができる。ま
た、例えば第4図に示すプログラムのアドレス1
03のアドレス500へジヤンプせよという命令
に転送命令を付加して該103の命令を実行させ
ればPC2およびスタツク1から出力されるアド
レスデータ500をゲート回路9を介してデータ
レジスタに取り込むことができるため、ジヤンプ
命令に関しても同様に簡単にテストが行なえる。
At this time, an instruction to return to 104 and transfer the output of stack 1 to data register 9 is set in address 505 of the program shown in FIG.
Jump to 5. The return address 104 previously stored in the PC 2 is output from the stack 1 by the return command from the execution circuit 6, and at the same time, the gate circuit 10 is opened by the transfer command, so the pass line 12 and the gate circuit 10 are , the contents of this stack 1 can be taken directly into the data register 9 via the data bus 8. For example, address 1 of the program shown in FIG.
By adding a transfer instruction to the instruction to jump to address 500 of 03 and executing the instruction 103, address data 500 output from PC 2 and stack 1 can be taken into the data register via gate circuit 9. Therefore, it is possible to easily test jump instructions as well.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明に係る機能を具えた
マイクロプロセツサによれば、適当なn番地にサ
ブルーチンジヤンプ命令を入れてN番地にジヤン
プさせこのN番地にリターン&転送命令を入れて
実行させることによりスタツクのテストが簡単に
実現できるとともに従来のようにテストプログラ
ム中にプツシユ命令やリターン命令を盛りこむと
か、スタツク動作の良否を判定する負荷装置が不
用になるという優れた効果を奏する。
As explained above, according to the microprocessor equipped with the functions according to the present invention, a subroutine jump instruction can be placed at an appropriate address N, the jump is made to address N, and a return & transfer instruction is placed at this address N and executed. This makes it possible to easily test the stack, and has the excellent effect of eliminating the need for conventional methods such as incorporating push commands and return commands into the test program, and eliminating the need for a load device to determine the quality of stack operation.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は従来のマイクロプロセツサのブロツク
図、第2図は従来のスタツク動作テストに用いる
プログラムの一例を示した図、第3図、第5図は
本発明の一実施例を示すマイクロプロセツサのブ
ロツク図、第4図は本発明のマイクロプロセツサ
に係るプログラムの一例を示した図である。 1…スタツク、2…マイクロプログラムカウン
タ、4…マイクロプログラムメモリ、5…命令レ
ジスタ、6…実行回路、9…データレジスタ、1
0…ゲート回路。
FIG. 1 is a block diagram of a conventional microprocessor, FIG. 2 is a diagram showing an example of a program used for a conventional stack operation test, and FIGS. 3 and 5 are microprocessor blocks showing an embodiment of the present invention. FIG. 4, a block diagram of the processor, is a diagram showing an example of a program related to the microprocessor of the present invention. 1... Stack, 2... Micro program counter, 4... Micro program memory, 5... Instruction register, 6... Execution circuit, 9... Data register, 1
0...Gate circuit.

Claims (1)

【特許請求の範囲】 1 所定の動作プログラムを格納するプログラム
メモリと、 該プログラムメモリにアドレスを指示するプロ
グラムカウンタと、 該プログラムカウンタにより指示されたアドレ
スの命令を前記プログラムメモリから読み込んで
記憶する命令レジスタと、 リターン命令やループ命令またはジヤンプ命令
を実行するための戻り先アドレスまたは飛び先ア
ドレスを格納するスタツクと、 該スタツクに格納されている戻り先アドレスま
たは飛び先アドレスを出力データレジスタに直接
転送するためのパスラインと、 前記命令レジスタに格納された命令を実行する
とともに、実行すべき命令が前記リターン命令や
ループ命令またはジヤンプ命令であつた場合、当
該各命令の実行と同時に前記スタツクに格納され
ている戻り先アドレスまたは飛び先アドレスを前
記パスラインに出力する命令実行手段と を具備することを特徴とするマイクロプロセツ
サ。 2 パスラインは、前記プログラムカウンタと、
前記出力データレジスタに接続されるデータバス
との間に接続されることを特徴とする特許請求の
範囲第1項記載のマイクロプロセツサ。 3 パスラインは、前記スタツクと、前記出力デ
ータレジスタに接続されるデータバスとの間に接
続されることを特徴とする特許請求の範囲第1項
記載のマイクロプロセツサ。 4 パスラインは、前記リターン命令やループ命
令またはジヤンプ命令に付加される転送命令の実
行によつて開かれるゲート回路を有することを特
徴とする特許請求の範囲第1乃至第3項のいずれ
か1つに記載のマイクロプロセツサ。
[Scope of Claims] 1. A program memory that stores a predetermined operating program, a program counter that specifies an address to the program memory, and an instruction that reads and stores an instruction at an address specified by the program counter from the program memory. A register, a stack that stores a return address or jump address for executing a return, loop, or jump instruction, and a stack that directly transfers the return or jump address stored in the stack to the output data register. A pass line for executing the instruction stored in the instruction register, and if the instruction to be executed is the return instruction, loop instruction, or jump instruction, storing it in the stack at the same time as each instruction is executed. and instruction execution means for outputting a return destination address or a jump destination address to the pass line. 2. The pass line is connected to the program counter,
2. The microprocessor according to claim 1, wherein the microprocessor is connected between the output data register and a data bus connected to the output data register. 3. The microprocessor according to claim 1, wherein a pass line is connected between the stack and a data bus connected to the output data register. 4. Any one of claims 1 to 3, wherein the pass line has a gate circuit that is opened by executing a transfer instruction added to the return instruction, loop instruction, or jump instruction. The microprocessor described in .
JP57170613A 1982-09-28 1982-09-28 Microprocessor Granted JPS5958551A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57170613A JPS5958551A (en) 1982-09-28 1982-09-28 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57170613A JPS5958551A (en) 1982-09-28 1982-09-28 Microprocessor

Publications (2)

Publication Number Publication Date
JPS5958551A JPS5958551A (en) 1984-04-04
JPH0520773B2 true JPH0520773B2 (en) 1993-03-22

Family

ID=15908102

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57170613A Granted JPS5958551A (en) 1982-09-28 1982-09-28 Microprocessor

Country Status (1)

Country Link
JP (1) JPS5958551A (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100413674B1 (en) * 1996-12-05 2004-02-14 삼성전자주식회사 Device for generating hard wired sub routine
JP4873626B2 (en) * 2006-10-12 2012-02-08 学校法人常翔学園 Twin roll type vertical casting apparatus and composite material sheet manufacturing method
JP2014100542A (en) * 2013-10-22 2014-06-05 Daito Giken:Kk Game machine

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5739457A (en) * 1980-08-18 1982-03-04 Mitsubishi Electric Corp Program device
JPS57141760A (en) * 1981-02-25 1982-09-02 Nec Corp Semiconductor information processor

Also Published As

Publication number Publication date
JPS5958551A (en) 1984-04-04

Similar Documents

Publication Publication Date Title
JP2006127553A (en) Central processing unit for easy program testing and debugging
JPH0447856B2 (en)
JPH0520773B2 (en)
KR100297224B1 (en) Microcomputer loaded with prom and data read-out testing method for same
KR940007675A (en) Data Processor and Debug Device Using It
JPS59114637A (en) Data processing device
JP2575025B2 (en) In-circuit emulator
JPS60164842A (en) Instruction prefetching device
JPS6015970B2 (en) Interrupt processing device in microprocessor
KR940002321B1 (en) Test method of microcoded data processor
JP2570119B2 (en) Software simulator
JPS5987555A (en) Hash total checking system of microprogram rom
JPH09319592A (en) Microcomputer
JPS6329852A (en) Developing device for microcomputer applied apparatus
JP3087282B2 (en) Software development support equipment
JPH06222917A (en) Electronic device
JPS5822765B2 (en) Program loading method in electronic computer system
JPS63269235A (en) Cpu system testing method
JPS60247752A (en) Breakpoint setting system of symbolic debugger
JPS6029411B2 (en) Microprogram control method
JPS5916057A (en) Microcomputer
JPS58163043A (en) microprogram controller
JPS61240341A (en) Microprogram controller
JPS5875254A (en) One-chip microcomputer system
JPS648381B2 (en)