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
JPS646490B2 - - Google Patents
[go: Go Back, main page]

JPS646490B2 - - Google Patents

Info

Publication number
JPS646490B2
JPS646490B2 JP60050442A JP5044285A JPS646490B2 JP S646490 B2 JPS646490 B2 JP S646490B2 JP 60050442 A JP60050442 A JP 60050442A JP 5044285 A JP5044285 A JP 5044285A JP S646490 B2 JPS646490 B2 JP S646490B2
Authority
JP
Japan
Prior art keywords
storage device
instruction
byte
address
register
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
Application number
JP60050442A
Other languages
Japanese (ja)
Other versions
JPS60221843A (en
Inventor
Tadashi Kubota
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP60050442A priority Critical patent/JPS60221843A/en
Publication of JPS60221843A publication Critical patent/JPS60221843A/en
Publication of JPS646490B2 publication Critical patent/JPS646490B2/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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30145Instruction analysis, e.g. decoding, instruction word fields
    • G06F9/30149Instruction analysis, e.g. decoding, instruction word fields of variable length instructions

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)
  • Debugging And Monitoring (AREA)

Description

【発明の詳細な説明】 本発明は第1の記憶装置に格納されているプロ
グラムの実行された部分、実行されなかつた部分
を判定する判定装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a determination device that determines which portions of a program stored in a first storage device have been executed and which portions have not been executed.

従来、この種の判定装置としては、命令の長さ
に固定長のものがあつた。この場合には、第2の
記憶装置を設け、この中に、第1の記憶装置に格
納されている1つの命令に対応して1ビツトを割
当てておき、該命令が実行されたら、該ビツトを
セツトする、という装置を作つておけばよい。例
えば、1命令が2バイト長ならば、第1の記憶装
置の2バイトを第2の記憶装置の1ビツトに対応
させ、その命令が実行されたら、対応するビツト
もセツトされる、という論理を組んでおけばよ
い。しかし、命令の長さが可変長であると、ビツ
トの対応のしかたが複雑となり、固定長の場合の
考えは、そのままは適用できない。
Conventionally, this type of determination device has had a fixed length instruction. In this case, a second storage device is provided, in which one bit is allocated corresponding to one instruction stored in the first storage device, and when the instruction is executed, the bit is All you have to do is create a device that can set the . For example, if one instruction is 2 bytes long, the logic is such that 2 bytes in the first storage device correspond to 1 bit in the second storage device, and when that instruction is executed, the corresponding bit is also set. Just put it together. However, if the length of the instruction is variable, the bit correspondence becomes complicated, and the ideas for a fixed length cannot be applied as is.

本発明は、この点を鑑み、可変長の命令に関し
て、実行したかしなかつたかを判別することがで
きる判定装置を提供するものである。
In view of this point, the present invention provides a determination device that can determine whether a variable length instruction has been executed or not.

本発明は、第1の記憶装置の1バイトと、第2
の記憶装置の1ビツトを対応させ、複数バイトに
及ぶ命令を実行したときには、対応する複数ビツ
トに1をセツトし、1バイトの命令を実行したと
きには、対応する1ビツトのみをセツトすること
のできる回路である。
The present invention stores one byte of the first storage device and one byte of the second storage device.
When a multiple-byte instruction is executed, the corresponding multiple bits are set to 1, and when a 1-byte instruction is executed, only the corresponding 1 bit is set. It is a circuit.

以下、本発明の一実施例を図により説明する。
簡単のため、命令長は、1バイトと2バイトと2
種類のみとする。なお命令長は命令コードにより
一意的に定まるものとする。アドレスレジスタ4
によつて第1の記憶装置1が読み出され、命令が
レジスタ2に格納される。レジスタ2には命令コ
ードが含まれており、これをデコーダ3を通し
て、1バイト長か2バイト長かが判定される。簡
単のため、第2の記憶装置9は2ビツト単位の読
み書きとし、OR回路7,8はそれぞれ、第0ビ
ツト目の入力、第1ビツト目の入力とする。切り
換え回路5は、アドレスの最下位ビツトが0なら
ば、1バイト命令または2バイト命令のとき1、
アドレスの最下位ビツトが1ならば1バイト命令
または2バイト命令のとき0のようにしておく。
切り換え回路6は、アドレスの最下位ビツトが0
ならば、1バイト命令のとき0、2バイト命令の
とき命令の最初のバイトの場合1で命令の最後の
バイトの場合0になるようにする。またアドレス
の最下位ビツトが1ならば、1バイト命令または
2バイト命令のときに1になるようにする。
Hereinafter, one embodiment of the present invention will be described with reference to the drawings.
For simplicity, the instruction lengths are 1 byte, 2 bytes, and 2 bytes.
Only types. Note that the instruction length is uniquely determined by the instruction code. address register 4
The first storage device 1 is read out by , and the instruction is stored in the register 2 . Register 2 contains an instruction code, which is passed through decoder 3 to determine whether it is 1 byte or 2 bytes long. For simplicity, the second storage device 9 is assumed to be read and written in units of 2 bits, and the OR circuits 7 and 8 are assumed to have inputs of the 0th bit and the 1st bit, respectively. If the least significant bit of the address is 0, the switching circuit 5 selects 1 for a 1-byte or 2-byte instruction;
If the least significant bit of the address is 1, it is set to 0 for a 1-byte or 2-byte instruction.
The switching circuit 6 is configured so that the least significant bit of the address is 0.
Then, for a 1-byte instruction, the value is 0, for a 2-byte instruction, the first byte of the instruction is 1, and the last byte of the instruction is 0. Also, if the least significant bit of the address is 1, it becomes 1 when it is a 1-byte instruction or a 2-byte instruction.

このときにアドレスが(×××………×0)2
で、その番地にある1バイト命令が実行されたと
きには、デコーダ3の出力は1バイト長を意味す
る信号が1、2バイト長を意味する信号が0とな
り、それゆえ切り換え回路5の出力は1、切り換
え回路6の出力は0となる。この出力と、第2の
記憶装置からの読出しデータを格納するレジスタ
10(前からセツトされていたデータ)をOR回
路7,8を通して、第2の記憶装置9に書き込
む。このときアドレスはアドレスレジスタ4の最
下位ビツトを除いたものを使用する。アドレスが
(×××………×0)2で、その番地にある2バイ
ト命令が実行されたときには、デコーダ3の出力
は、2バイト長を意味する信号のみが1となり、
それゆえ切り換え回路5,6の出力はともに1と
なる。この出力とアドレスレジスタ4の最下位ビ
ツトを除いたアドレスによつて第2の記憶装置が
アクセスされレジスタ10に読み出されたデータ
とがOR回路7,8を介して第2の記憶装置9に
書き込まれる。アドレスが(×××………×1)2
で、その番地にある1バイト命令が実行されたと
きには、切り換え回路5,6の出力はそれぞれ
0、1となり、この出力とアドレスレジスタ4の
最下位ビツトを除いたアドレスによつて第2の記
憶装置がアクセスされレジスタ10に読み出され
たデータとがOR回路7,8を介して第2の記憶
装置9に書き込まれる。アドレスが(×××……
…×1)2で、その番地にある2バイト命令が実行
されたときには、切り換え回路5,6の出力は最
初のバイトでそれぞれ0、1、最後のバイトでそ
れぞれ1、0となり、アドレスレジスタ4の最下
位ビツトを除いたアドレスによつて第2の記憶装
置9が2回アクセスされ、それぞれレジスタ10
に読み出されたデータと切り換え回路5,6の出
力とがOR回路7,8を介して2回に亘つて第2
の記憶装置9に書き込まれる。このようにして、
実行した部分は、第2の記憶装置の中の対応する
ビツトが1となり、実行されなかつた部分は、第
2の記憶装置の中の対応するビツトは0にとどま
る。
At this time, the address is (×××……×0) 2
Then, when the 1-byte instruction at that address is executed, the output of the decoder 3 becomes 1, which means 1 byte length, and 0, which means 2 bytes, and therefore the output of switching circuit 5 becomes 1. , the output of the switching circuit 6 becomes 0. This output and the register 10 (previously set data) storing read data from the second storage device are written into the second storage device 9 through OR circuits 7 and 8. At this time, the address of address register 4 excluding the least significant bit is used. When the address is (XXXX......×0) 2 and the 2-byte instruction at that address is executed, the output of the decoder 3 is that only the signal indicating the 2-byte length becomes 1,
Therefore, the outputs of switching circuits 5 and 6 are both 1. The second storage device is accessed by this output and the address excluding the least significant bit of the address register 4, and the data read into the register 10 is transferred to the second storage device 9 via OR circuits 7 and 8. written. The address is (×××……×1) 2
When the 1-byte instruction at that address is executed, the outputs of the switching circuits 5 and 6 become 0 and 1, respectively, and this output and the address excluding the least significant bit of the address register 4 are used to store the second memory. The data read into the register 10 when the device is accessed is written into the second storage device 9 via the OR circuits 7 and 8. The address is (×××……
...×1) 2 , when the 2-byte instruction at that address is executed, the outputs of switching circuits 5 and 6 become 0 and 1, respectively, for the first byte, and 1 and 0, respectively, for the last byte, and the output of address register 4 The second storage device 9 is accessed twice by the address excluding the least significant bit of the register 10.
The data read out and the outputs of the switching circuits 5 and 6 are passed through OR circuits 7 and 8 to
is written into the storage device 9 of. In this way,
For the executed portion, the corresponding bit in the second storage device becomes 1, and for the unexecuted portion, the corresponding bit in the second storage device remains 0.

なお言うまでもなく、第2の記憶装置は予め0
にクリヤされており、また第1の記憶装置からは
本文に記載されていない制御回路によつて次々に
命令がとり出されて実行されるが、それは本考案
には関係しないので、詳説を省く。デコーダ3は
ハードウエアによる回路でもよく、また記憶装置
(Read Only Memory)を使用してもよい。
Needless to say, the second storage device is set to 0 in advance.
The instructions are cleared from the first storage device and are executed one after another by a control circuit not described in the main text, but this is not related to the present invention, so detailed explanation will be omitted. . The decoder 3 may be a hardware circuit, or may use a storage device (Read Only Memory).

上記説明は1バイト命令、2バイト命令の場
合、第2の記憶装置9の読み書きは2ビツト単位
の場合としたが、これらが一般に1バイト命令か
らnバイト命令まで、第2の記憶装置9の読み書
きがmビツト単位(n、m≧1)であつても全く
さしつかえがないことは本文中の説明により明ら
かである。また、上記説明は第1の記憶装置1の
1バイトを第2の記憶装置9の1ビツトに対応さ
せたが、これはPバイト(P≧1)に拡張しても
さしつかえがない。
In the above explanation, in the case of 1-byte instructions and 2-byte instructions, the reading and writing of the second storage device 9 is performed in 2-bit units, but these generally range from 1-byte instructions to n-byte instructions, and the second storage device 9 It is clear from the explanation in the text that there is no problem even if reading and writing is done in units of m bits (n, m≧1). Furthermore, in the above description, one byte of the first storage device 1 corresponds to one bit of the second storage device 9, but this may be extended to P bytes (P≧1).

本発明によつて、可変長の命令を実行した場合
の、通過したか否かを識別するための判定ができ
る効果を有するものである。
The present invention has the effect that when a variable length instruction is executed, it is possible to make a determination as to whether or not it has passed.

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

図は本発明の判定装置の実施例の回路図であ
る。 1…第1の記憶装置、3…デコーダ、5,6…
切り換え回路、9…第2の記憶装置。
The figure is a circuit diagram of an embodiment of the determination device of the present invention. 1...First storage device, 3...Decoder, 5, 6...
switching circuit, 9... second storage device;

Claims (1)

【特許請求の範囲】[Claims] 1 第1の記憶装置と、第2の記憶装置と、第1
の記憶装置から読み出した命令を格納するレジス
タ1と、レジスタ1に格納された命令コードをデ
コーダを通して該命令の長さを識別する回路と、
該デコーダの出力をデータとし、第1の記憶装置
のアドレスの一部で切り換える切り換え回路と、
第2の記憶装置からの読出しデータを格納するレ
ジスタ2と、レジスタ2と該切り換え回路との
OR回路を具備し、該OR回路を第2記憶装置の
入力データとし、第1の記憶装置のアドレスの一
部を第2の記憶装置のアドレスとすることによ
り、第1の記憶装置に格納されている命令の通過
部分の判定を行なうことができるように構成され
てなることを特徴とする判定装置。
1 a first storage device, a second storage device, and a first storage device;
a register 1 for storing an instruction read from a storage device; a circuit that passes the instruction code stored in the register 1 through a decoder and identifies the length of the instruction;
a switching circuit that uses the output of the decoder as data and switches based on a part of the address of the first storage device;
A register 2 that stores read data from the second storage device, and a connection between the register 2 and the switching circuit.
An OR circuit is provided, the OR circuit is used as input data of the second storage device, and a part of the address of the first storage device is used as the address of the second storage device, so that the data is stored in the first storage device. A determining device characterized in that it is configured to be able to determine a passing portion of an instruction.
JP60050442A 1985-03-15 1985-03-15 Deciding device Granted JPS60221843A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60050442A JPS60221843A (en) 1985-03-15 1985-03-15 Deciding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60050442A JPS60221843A (en) 1985-03-15 1985-03-15 Deciding device

Publications (2)

Publication Number Publication Date
JPS60221843A JPS60221843A (en) 1985-11-06
JPS646490B2 true JPS646490B2 (en) 1989-02-03

Family

ID=12858973

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60050442A Granted JPS60221843A (en) 1985-03-15 1985-03-15 Deciding device

Country Status (1)

Country Link
JP (1) JPS60221843A (en)

Also Published As

Publication number Publication date
JPS60221843A (en) 1985-11-06

Similar Documents

Publication Publication Date Title
US4446517A (en) Microprogram memory with page addressing and address decode in memory
JPH0248931B2 (en)
JPS5644946A (en) Code error correction and detection system
EP0240606A2 (en) Pipe-line processing system and microprocessor using the system
EP0057096A2 (en) Information processing unit
JPS646490B2 (en)
KR960016401B1 (en) Page selecting circuit of register pages using register page pointer
SU1564633A1 (en) Device for addressing immediate-access memory
JPS586970B2 (en) ROM address sequence control method
JPS6148174B2 (en)
KR900005554B1 (en) Memory space expansion method by data manipulation
JPH0226252B2 (en)
JPS6049334B2 (en) control storage
JPS6320631A (en) Register selecting system
US5321822A (en) Information processing system with addressing exception
JPS6127775B2 (en)
JPS6128145B2 (en)
JPS6141420B2 (en)
JPS634358A (en) Parity bit rewriting circuit
JPS59117375A (en) Mh coding system
JPS6227414B2 (en)
JPH0991135A (en) Arithmetic processing device and instruction conversion device
JPH10301797A (en) System for writing parity bit
JPS6310454B2 (en)
JPH01229320A (en) Microcomputer