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
JPH0693222B2 - User definition macro instruction definition method - Google Patents
[go: Go Back, main page]

JPH0693222B2 - User definition macro instruction definition method - Google Patents

User definition macro instruction definition method

Info

Publication number
JPH0693222B2
JPH0693222B2 JP17706587A JP17706587A JPH0693222B2 JP H0693222 B2 JPH0693222 B2 JP H0693222B2 JP 17706587 A JP17706587 A JP 17706587A JP 17706587 A JP17706587 A JP 17706587A JP H0693222 B2 JPH0693222 B2 JP H0693222B2
Authority
JP
Japan
Prior art keywords
address
user
macro instruction
microcode
parameter
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
JP17706587A
Other languages
Japanese (ja)
Other versions
JPS6421533A (en
Inventor
孝雄 林
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP17706587A priority Critical patent/JPH0693222B2/en
Publication of JPS6421533A publication Critical patent/JPS6421533A/en
Publication of JPH0693222B2 publication Critical patent/JPH0693222B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、書換え可能な制御記憶を有するマイクロプロ
グラム制御方式の情報処理装置に関し、特にユーザ自身
が作成したマクロ命令を情報処理装置に定義する方式に
関する。
Description: TECHNICAL FIELD The present invention relates to a microprogram control type information processing apparatus having a rewritable control memory, and particularly defines macro instructions created by a user in the information processing apparatus. Regarding the scheme.

〔従来の技術〕[Conventional technology]

従来、書換え可能な制御記憶を有するマイクロプログラ
ム制御方式の情報処理装置において、システム自身が基
本的に提供するマクロ命令とは別に、ユーザ自身が作成
したマクロ命令(ユーザ定義マクロ命令)を定義する場
合、定義しようとするユーザ定義マクロ命令に対応する
マイクロコード列を主記憶上に用意し、このマイクロコ
ード列を用意した主記憶上の領域と定義しようとするユ
ーザ定義マクロ命令に対応する制御記憶の領域とを指定
することにより、中央処理装置内部の転送手段がほぼ無
条件で前記指定された主記憶上の領域の内容を制御記憶
の前記指定された領域へ転送することで行なわれてい
た。
Conventionally, in a microprogram control type information processing apparatus having a rewritable control memory, when a macro instruction created by a user (user-defined macro instruction) is defined separately from a macro instruction which is basically provided by the system itself. , A microcode string corresponding to the user-defined macro instruction to be defined is prepared in the main memory, and this microcode string is defined as an area on the main memory of the control memory corresponding to the user-defined macro instruction to be defined. By specifying the area, the transfer means inside the central processing unit almost unconditionally transfers the contents of the specified area in the main memory to the specified area in the control memory.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

従って、ユーザが制御記憶の領域のアドレスを誤って指
定した場合は、情報処理装置としての本来の機能を実現
しているシステム提供マクロ命令対応のマイクロコード
を破壊してしまうことがあり、システムの信頼性上問題
があった。
Therefore, if the user erroneously specifies the address of the control storage area, the microcode corresponding to the system-provided macroinstruction that realizes the original function of the information processing device may be destroyed. There was a problem with reliability.

本発明はこのような事情に鑑みて為されたものであり、
その目的は、制御記憶上に既に記憶されたシステム提供
マクロ命令対応のマイクロコード等が破壊されるのを防
止しつつ、ユーザ定義マクロ命令の定義を行ない得るよ
うにすることにある。
The present invention has been made in view of such circumstances,
The purpose thereof is to prevent the destruction of the microcode or the like corresponding to the system-provided macro instruction already stored in the control memory, and to enable the definition of the user-defined macro instruction.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は上記目的を達成するために、第1の発明にあっ
ては、書換え可能な制御記憶を有するマイクロプログラ
ム制御方式の情報処理装置において、 各マクロ命令に対応するマイクロコード列が記憶される
前記制御記憶の先頭アドレスを記憶するマップメモリ
と、 定義しようとするユーザ定義マクロ命令のコードを第1
パラメータとし、前記定義しようとするユーザ定義マク
ロ命令に対応するマイクロコード列を含む情報が格納さ
れた主記憶上のアドレスを第2パラメータとして持つ定
義用マクロ命令に応答して、前記第1パラメータで示さ
れるユーザ定義マクロ命令のコードがユーザ定義マクロ
命令として開放されたコードであるか否かをチェックす
る第1のチェック手段と、 前記第2パラメータで示される主記憶上のアドレスに格
納された情報中のマイクロ先頭アドレスに対応する前記
制御記憶の領域が未使用か否かをチェックする第2のチ
ェック手段と、 前記第1および第2のチェック手段のチェック結果に応
じて、前記第2パラメータで示される主記憶上のアドレ
スから前記マイクロコード列を読出し、前記マイクロ先
頭アドレスに対応する前記制御記憶の領域へ順次格納す
るマイクロコード転送手段とを有する。
In order to achieve the above object, the present invention is, in the first invention, a microprogram control type information processing apparatus having a rewritable control memory, in which a microcode string corresponding to each macroinstruction is stored. The map memory for storing the start address of the control memory and the code of the user-defined macro instruction to be defined are
In response to a defining macroinstruction having as a parameter a main memory address storing information including a microcode string corresponding to the user-defined macroinstruction to be defined as a second parameter, the first parameter First checking means for checking whether or not the code of the user-defined macro instruction shown is a code released as a user-defined macro instruction; and information stored in the address on the main memory indicated by the second parameter. Second check means for checking whether or not the area of the control memory corresponding to the micro start address of the inside is unused; and the second parameter according to the check results of the first and second check means. The microcode string is read from the indicated main memory address, and the control corresponding to the micro start address is read. Sequentially stores into the storage area and a microcode transfer means.

また本発明の第2の発明にあっては、上記構成に加え、
前記第2パラメータで示される主記憶上のアドレスに格
納された内容がマイクロコードであるか否かをチェック
する第3のチェック手段が設けられ、マイクロコード転
送手段は第1,第2および第3のチェック手段のチェック
結果を考慮してマイクロコードの転送を行なう。
In addition, in the second aspect of the present invention, in addition to the above configuration,
Third checking means for checking whether or not the content stored at the address on the main memory indicated by the second parameter is microcode is provided, and the microcode transferring means is the first, second and third. The microcode is transferred in consideration of the check result of the check means.

〔作用〕[Action]

ユーザが新たなユーザ定義マクロ命令を情報処理装置に
定義する場合、先ず、主記憶上にそのユーザ定義マクロ
命令に対応するマイクロコード列とこのマイクロコード
列を制御記憶のどの領域に記憶するかを示すマイクロ先
頭アドレスとを作成し、第1パラメータに定義しようと
するユーザ定義マクロ命令のコードをセットし、第2パ
ラメータに主記憶上の前記作成領域のアドレスをセット
した定義用マクロ命令を実行させる。若し、主記憶上に
作成したマイクロ先頭アドレスが制御記憶の例えばシス
テム定義マクロ命令対応のマイクロコード領域を誤って
指示していればその領域は使用済なので第2のチェック
手段により検出され、マイクロコード転送手段によるマ
イクロコードの転送は行なわれないので、制御記憶の既
登録のマイクロコードが破壊されるのを防止することが
できる。また、第1パラメータに誤ってシステム定義マ
クロ命令と同一のコードを指定した場合には第1のチェ
ック手段により検出され、第2パラメータに誤って主記
憶上のマイクロコード作成領域以外の領域のアドレスを
指定した場合にはマイクロコード列が存在しないことが
第3のチェック手段により検出され、何れもマイクロコ
ード転送手段によるマイクロコードの転送は行なわれな
いので、不正な登録を防止することができる。
When the user defines a new user-defined macro instruction in the information processing device, first, in the main memory, a microcode string corresponding to the user-defined macro instruction and in which area of the control memory the microcode string is stored. The micro start address shown is created, the code of the user-defined macro instruction to be defined is set in the first parameter, and the definition macro instruction in which the address of the created area in the main memory is set in the second parameter is executed. . If the micro start address created in the main memory erroneously points to the microcode area corresponding to, for example, the system definition macro instruction in the control memory, that area is already used and is detected by the second checking means. Since the microcode is not transferred by the code transfer means, it is possible to prevent the already registered microcode in the control memory from being destroyed. When the same code as the system-defined macro instruction is erroneously specified as the first parameter, it is detected by the first checking means, and the second parameter is erroneously specified as the address of the area other than the microcode creation area in the main memory. In the case where is specified, the third check means detects that the microcode string does not exist, and the microcode transfer means does not transfer the microcode in either case, so that illegal registration can be prevented.

〔実施例〕〔Example〕

次に本発明の実施例について図面を参照して説明する。 Next, embodiments of the present invention will be described with reference to the drawings.

第2図は本発明を適用した情報処理装置の一例を示すブ
ロック図であり、1ワードが例えば32ビット幅で容量が
例えば1MWの主記憶1と、例えば32ビット固定長の命令
コードを処理する中央処理装置2と、1ワードが例えば
32ビット幅で容量が例えば64KWの書込み読出し可能な制
御記憶3と、1ワードが16ビット幅で容量が例えば256W
の書込み読出し可能なマップメモリ(マッピングメモ
リ)6と、入出力装置8とで構成されている。中央処理
装置2と主記憶1とはアドレス線4-1,制御線4-2および
データ線4-3で接続され、中央処理装置2と制御記憶3
とはアドレス線5-1,制御線5-2およびデータ線5-3で接続
され、中央処理装置2とマップメモリ6とはアドレス線
7-1,制御線7-2およびデータ線7-3で接続される。
FIG. 2 is a block diagram showing an example of an information processing apparatus to which the present invention is applied. The main memory 1 has a word width of, for example, 32 bits and a capacity of 1 MW, and an instruction code having a fixed length of 32 bits, for example. Central processing unit 2 and 1 word is for example
Writable and readable control memory 3 with a width of 32 bits and a capacity of, for example, 64 KW and one word with a width of 16 bits and a capacity of, for example, 256 W
And a map memory (mapping memory) 6 capable of writing and reading, and an input / output device 8. The central processing unit 2 and the main memory 1 are connected by an address line 4-1, a control line 4-2 and a data line 4-3, and the central processing unit 2 and the control memory 3 are connected.
Are connected by an address line 5-1, a control line 5-2 and a data line 5-3, and the central processing unit 2 and the map memory 6 are connected by an address line.
7-1, control line 7-2 and data line 7-3 are connected.

第3図は第2図のより詳細なブロック図で、第2図中の
入出力装置8は図示を省略してある。この第3図におい
て、主記憶1と制御記憶3とマップメモリ6とは第2図
に示すものと同じであり、それ以外の部分は第2図の中
央処理装置2に含まれる主要な要素を示す。即ち、20は
命令レジスタ、21,23はセレクタ、22は制御記憶アドレ
スレジスタ、24は制御記憶データレジスタ、25はデコー
ダやALU等の各種の演算器,レジスタ等をマイクロコー
ドで指示される操作を実行する論理回路網、2はデコー
ダ、27は命令カウンタ、28はメモリアドレスレジスタ、
29はメモリデータレジスタである。命令カウンタ27の内
容等に従って定まるメモリアドレスレジスタ28で指示さ
れた主記憶1のアドレスから読出されたマイクロ命令
は、メモリデータレジスタ29を介して命令レジスタ20に
格納され、本実施例の場合その上位8ビットがマップメ
モリ6のアドレスとして使用され、マップメモリ6がア
クセスされる。このマップメモリ6には各マクロ命令に
対応するマイクロコード列が制御記憶3のどのアドレス
を先頭として格納されているかを示すマイクロ先頭アド
レスが格納されており、そのマイクロ先頭アドレスが制
御記憶アドレスレジスタ22に読出され、制御記憶3がア
クセスされる。制御記憶3から読出されたマイクロコー
ドは制御記憶データレジスタ24を介して論理回路網25に
加えられる。論理回路網25は、加えられたマイクロコー
ドに応じた動作を実行するために各種の制御信号を外部
に送出する。また、制御記憶アドレスレジスタ22の内容
を更新し、次のマイクロコードの読出しを行なう。そし
て、一つのマクロ命令に対応する動作を終えると命令カ
ウンタ27の内容を更新し、次のマクロ命令を主記憶1か
ら読出して上述と同様な動作を繰返す。更に、論理回路
網25はマップメモリ6および制御記憶3の内容の更新等
の動作も行なう。
FIG. 3 is a more detailed block diagram of FIG. 2, and the input / output device 8 in FIG. 2 is omitted. In FIG. 3, the main memory 1, the control memory 3, and the map memory 6 are the same as those shown in FIG. 2, and the other parts are the main elements included in the central processing unit 2 of FIG. Show. That is, 20 is an instruction register, 21 and 23 are selectors, 22 is a control storage address register, 24 is a control storage data register, and 25 is an operation unit such as a decoder or an ALU that is instructed by microcode. Logic circuit network to execute, 2 decoder, 27 instruction counter, 28 memory address register,
29 is a memory data register. The microinstruction read from the address of the main memory 1 designated by the memory address register 28 determined according to the content of the instruction counter 27 is stored in the instruction register 20 via the memory data register 29, and in the case of this embodiment, the higher order thereof. 8 bits are used as an address of the map memory 6, and the map memory 6 is accessed. The map memory 6 stores a micro head address indicating which address in the control memory 3 the micro code string corresponding to each macro instruction is headed, and the micro head address is stored in the control memory address register 22. And the control memory 3 is accessed. The microcode read from the control memory 3 is applied to the logic network 25 via the control memory data register 24. The logic network 25 sends various control signals to the outside in order to execute an operation according to the applied microcode. Also, the contents of the control memory address register 22 are updated and the next microcode is read. When the operation corresponding to one macro instruction is completed, the content of the instruction counter 27 is updated, the next macro instruction is read from the main memory 1, and the same operation as described above is repeated. Further, the logic circuit network 25 also performs operations such as updating the contents of the map memory 6 and the control memory 3.

第4図はユーザ定義マクロ命令の定義用マクロ命令のフ
ォーマット例およびその内容説明図である。同図に示す
ように定義用マクロ命令は、8ビットの命令コード10-1
と、8ビットの第1パラメータ10-2と、16ビットの第2
パラメータ10-3とから構成される。命令コード10-1は当
該マクロ命令が定義用マクロ命令であることを示す8ビ
ットのコードであり、第1パラメータ10-2は定義しよう
とするユーザ定義マクロ命令のコードを示し、第2パラ
メータ10-3は登録しようとするマイクロコード列が格納
された主記憶1上のアドレスを示す。即ち、第4図に示
すようにユーザ定義マクロ命令を新たに定義する合、主
記憶1上の或るアドレスA3〜Anに登録しようとする複数
のマイクロコードを作成しておくと共に、その2ワード
前のアドレスA1に本主記憶領域にマイクロコードが作成
されている旨を示す所定パターンのチェックコードを格
納し、更に1ワード前のアドレスA2にマイクロコードの
サイズ(マイクロコードの個数)及びマイクロコードを
記憶させる制御記憶3の先頭アドレス(マイクロ先頭ア
ドレス)とを格納しておくものであり、上記第2パラメ
ータ10-3にはこの場合アドレスA1が設定される。また、
第1パラメータ10-2に基づいてマップメモリ6のアドレ
スが決定され、このアドレスにマイクロ先頭アドレスが
主記憶1より転送される。更に制御記憶3のマイクロ先
頭アドレス以降にアドレスA3〜Anに記憶されたマイクロ
コードが書込まれ、後の削除の為にマイクロ先頭アドレ
ス−1のアドレスにマイクロコードのサイズが主記憶1
より転送される。
FIG. 4 is a format example of a macro instruction for defining a user-defined macro instruction and its contents explanatory diagram. As shown in the figure, the definition macro instruction is an 8-bit instruction code 10-1.
, 8-bit first parameter 10-2 and 16-bit second parameter
It consists of parameters 10-3. The instruction code 10-1 is an 8-bit code indicating that the macro instruction is a defining macro instruction, the first parameter 10-2 indicates the code of the user-defined macro instruction to be defined, and the second parameter 10-2. -3 indicates an address on the main memory 1 in which the microcode string to be registered is stored. That is, when a user-defined macro instruction is newly defined as shown in FIG. 4, a plurality of microcodes to be registered at a certain address A3 to An on the main memory 1 are created, and their two words are written. A check pattern of a predetermined pattern indicating that a microcode is created in the main memory area is stored in the previous address A1, and the microcode size (the number of microcodes) and the microcode are stored in the address A2 one word before. And the start address (micro start address) of the control memory 3 for storing the above. The address A1 is set to the second parameter 10-3 in this case. Also,
The address of the map memory 6 is determined based on the first parameter 10-2, and the micro head address is transferred from the main memory 1 to this address. Further, the microcode stored in the addresses A3 to An is written after the microstart address of the control memory 3, and the size of the microcode is stored in the address of the micro start address-1 for later deletion.
Will be transferred.

また第5図はユーザ定義マクロ命令の削除用マクロ命令
のフォーマット例を示す。同図に示すように削除用マク
ロ命令は、8ビットの命令コード11-1と、8ビットの第
1パラメータ11-2とを有し、下位16ビットは未使用とな
っている。命令コード11-1には当該マクロ命令が削除用
マクロ命令である旨の命令コードがセットされ、第1パ
ラメータ11-2には削除しようとするユーザ定義マクロ命
令のコードがセットされる。
Further, FIG. 5 shows a format example of a macro instruction for deleting a user-defined macro instruction. As shown in the figure, the delete macro instruction has an 8-bit instruction code 11-1 and an 8-bit first parameter 11-2, and the lower 16 bits are unused. The instruction code 11-1 is set to the instruction code indicating that the macro instruction is a deletion macro instruction, and the first parameter 11-2 is set to the code of the user-defined macro instruction to be deleted.

第1図は第4図に示した定義用マクロ命令が中央処理装
置2においてマイクロプログラム制御により実行される
際の処理の流れ図、第6図は第5図に示した削除用マク
ロ命令が中央処理装置2においてマイクロプログラム制
御により実行される際の処理の流れ図であり、以下各図
を参照して本実施例の動作を説明する。
FIG. 1 is a flow chart of the processing when the definition macro instruction shown in FIG. 4 is executed by the central processing unit 2 under microprogram control, and FIG. 6 is the deletion macro instruction shown in FIG. It is a flow chart of the processing when it is executed by the microprogram control in the device 2, and the operation of the present embodiment will be described below with reference to each drawing.

(ユーザ定義マクロ命令の定義) ユーザは、新たなマクロ命令を定義しようとする場合、
第4図に示したように主記憶1の或るアドレスA3〜Anに
定義しようとするマクロ命令対応のマイクロコード列を
作成し、その1ワード前のアドレスA2にそのマイクロコ
ードのサイズ及びそれらマイクロコードを記憶させる制
御記憶3の先頭アドレス(マイクロ先頭アドレス)とを
格納し、更に2ワード前のアドレスA1に本主記憶領域に
マイクロコードが作成されている旨を示すチェックコー
ドを作成する。そして、第2図の入出力装置8等から、
第4図に示した命令コード10-1に定義用マクロ命令の命
令コードを、第1パラメータ10-2に定義しようとするマ
クロ命令のコードを、第2パラメータ10-3に主記憶1の
アドレスAを設定した定義用マクロ命令を投入する。
(Definition of user-defined macro instruction) When the user tries to define a new macro instruction,
As shown in FIG. 4, a microcode string corresponding to a macro instruction to be defined at a certain address A3 to An in the main memory 1 is created, and at the address A2 one word before, the size of the microcode and those microcodes are generated. The start address (micro start address) of the control memory 3 for storing the code is stored, and a check code indicating that the micro code is created in the main storage area is created at the address A1 two words before. Then, from the input / output device 8 etc. of FIG.
The instruction code of the defining macro instruction is shown in the instruction code 10-1 shown in FIG. 4, the code of the macro instruction to be defined in the first parameter 10-2, and the address of the main memory 1 in the second parameter 10-3. Input the definition macro instruction with A set.

この定義用マクロ命令は、第3図に示す命令レジスタ20
に移送され、上位8ビットの命令コード10-1がセレクタ
21を介してマップメモリ6にアドレスとして加えられ、
マップメモリ6がアクセスされる。マップメモリ6の命
令コード10-1に対応するアドレスには、定義用マクロ命
令に対応するマイクロコード列の先頭アドレスが予め記
憶されているので、その先頭アドレスが取出されて制御
記憶アドレスレジスタ22に格納され、制御記憶3がアク
セスされる。これによって制御記憶3から読出されたマ
イクロコードは制御記憶データレジスタ24を経て論理回
路網25に加えられ、以後このマイクロコードおよび続い
て制御記憶3から読出される一連のマイクロコードに従
って第1図に示す処理が論理回路網25等によって実行さ
れる。
This definition macro instruction is the instruction register 20 shown in FIG.
And the upper 8 bit instruction code 10-1 is transferred to
It is added as an address to the map memory 6 via 21,
The map memory 6 is accessed. At the address corresponding to the instruction code 10-1 in the map memory 6, the start address of the microcode string corresponding to the defining macro instruction is stored in advance. Therefore, the start address is taken out and stored in the control storage address register 22. It is stored and the control memory 3 is accessed. As a result, the microcode read from the control memory 3 is applied to the logic network 25 via the control memory data register 24, and thereafter the microcode and a series of microcodes subsequently read from the control memory 3 are shown in FIG. The processing shown is executed by the logic circuit network 25 or the like.

先ず、論理回路網25は、命令レジスタ20に格納されてい
る第1パラメータ10-2のユーザ定義マクロ命令のコード
がユーザに開放されているコードの一つであるか否かを
チェックする(ステップS1)。このチェックは、例えば
合計8ビットで表現される命令コードのうちユーザに開
放されているコードが少なくとも上位何ビットかは“1"
でなければならないとすると、それらのビットが全て
“1"であるか否かによりチェックされる。勿論、他の方
法によってチェックすることもできる。そして、ユーザ
に開放されていないコードをユーザ定義マクロ命令のコ
ードとして定義することが検出されたときは、命令トラ
ップを発生させ、ユーザに通知する(ステップS21)。
First, the logic circuit network 25 checks whether the code of the user-defined macroinstruction of the first parameter 10-2 stored in the instruction register 20 is one of the codes open to the user (step). S1). For this check, for example, among the instruction codes expressed by a total of 8 bits, at least the upper bits of the code open to the user are “1”.
If it has to be, then it is checked whether those bits are all "1" s. Of course, it can be checked by other methods. When it is detected that the code not released to the user is defined as the code of the user-defined macro instruction, an instruction trap is generated and the user is notified (step S21).

また、命令コードが正しいとき、論理回路網25は、命令
レジスタ20から読込んだ第1パラメータ10-2をセレクタ
21を介してマップメモリ6にアドレスとして与えてその
内容を読込み(ステップS2)、オール“0"か否かをチェ
ックする(ステップS3)。マップメモリ6は前述したよ
うに各マクロ命令に対応してそのマイクロコード列が制
御記憶3のどのアドレスから記憶されているかを示すマ
イクロ先頭アドレスを記憶するものであり、システム定
義マクロ命令に対応する領域及び既登録済のユーザ定義
マクロ命令に対応する領域には既に何等かのマイクロ先
頭アドレスが記憶されている。従って、オール“0"でな
いときは不正な登録であるとして命令トラップを発生さ
せる(ステップS21)。
When the instruction code is correct, the logic circuit network 25 selects the first parameter 10-2 read from the instruction register 20 as a selector.
It is given as an address to the map memory 6 via 21 and the contents are read (step S2), and it is checked whether all are "0" (step S3). The map memory 6 stores the micro head address indicating from which address of the control memory 3 the microcode string is stored corresponding to each macroinstruction as described above, and corresponds to the system definition macroinstruction. Some micro head address is already stored in the area and the area corresponding to the registered user-defined macro instruction. Therefore, if all are not "0", an instruction trap is generated as an illegal registration (step S21).

次に、ステップS3でマップメモリ6の内容がオール“0"
であると判定したとき、論理回路網25は、命令レジスタ
20の第2パラメータ10-3で示される主記憶アドレスをMA
とし、このアドレスMAをメモリアドレスレジスタ28に設
定して主記憶1のアドレスMAの内容を読取る(ステップ
S4)。そしてこの内容が所定のチェックコードか否かを
判定し(ステップS5)、所定のチェックコードでなけれ
ば命令トラップを発生させる(ステップS21)。また所
定のチェックコードであれば、アドレスMAを+1して主
記憶1の内容を読込み(ステップS6)、その下位16ビッ
トの内容(マイクロ先頭アドレス)を第1パラメータ10
-2の値に対応するマップメモリ6のアドレスに書込む
(ステップS7)。
Next, in step S3, the contents of the map memory 6 are all "0".
If it is determined that the
MA the main memory address indicated by the second parameter 10-3 of 20
Then, this address MA is set in the memory address register 28 to read the contents of the address MA of the main memory 1 (step
S4). Then, it is determined whether the content is a predetermined check code (step S5), and if it is not the predetermined check code, an instruction trap is generated (step S21). If it is a predetermined check code, the address MA is incremented by 1 to read the contents of the main memory 1 (step S6), and the contents of the lower 16 bits (micro head address) of the first parameter 10
Write to the address of the map memory 6 corresponding to the value of -2 (step S7).

次に論理回路網25は、ステップS6で読取ったマイクロ先
頭アドレスをμaとし、μaを−1した制御記憶3のア
ドレスの内容を読込み(ステップS8)、その内容がオー
ル“0"か否かを判定する(ステップS9)。オール“0"で
なければ、既にそのアドレスに何等かの有為な情報が設
定されておりそこに上書きすると有為な情報を破壊する
ことになるので、ステップS20の復元処理を行ない、ス
テップS7で書込んだマップメモリ6の内容をオール“0"
に復元し、命令トラップを発生させる(ステップS2
1)。一方、ステップS9でオール“0"と判別したとき、
ステップS6で読込んだ内容の上位16ビットの内容(マイ
クロコードのサイズ)を制御記憶3のアドレスμa(現
在の値はマイクロ先頭アドレス−1である)に書込む
(ステップS10)。そして、そのマイクロコードのサイ
ズをμSとし(ステップS11)、ステップS12へ進む。
Next, the logic circuit network 25 sets the micro head address read in step S6 to .mu.a, reads the contents of the address of the control memory 3 in which .mu.a is -1 (step S8), and checks whether the contents are all "0". The determination is made (step S9). If it is not all "0", some significant information has already been set to that address and overwriting it will destroy the significant information. Therefore, the restoration process of step S20 is performed, and step S7 is performed. All the contents of map memory 6 written by
To generate an instruction trap (step S2
1). On the other hand, when it is determined that all are “0” in step S9,
The contents of the upper 16 bits (the size of the microcode) of the contents read in step S6 are written in the address μa of the control memory 3 (the current value is the micro start address -1) (step S10). Then, the size of the microcode is set to μS (step S11), and the process proceeds to step S12.

ステップS12で論理回路網25は、μaを+1した制御記
憶3のアドレスの内容を読込み、オール“0"か否かを判
定する(ステップS13)。そしてオール“0"でなければ
既登録情報の破壊を防止するために、ステップS20へ進
んでステップS7書込んだマップメモリ6の内容をオール
“0"に復元すると共にステップS15の処理が行なわれて
いればその処理で制御記憶3に書込んだアドレスを全て
オール“0"に復元し、命令トラップを発生させる(ステ
ップS21)。
In step S12, the logic circuit network 25 reads the contents of the address of the control memory 3 in which μa is incremented by 1, and determines whether or not all are "0" (step S13). If it is not all "0", in order to prevent the destruction of the registered information, the process proceeds to step S20, the contents of the map memory 6 written in step S7 is restored to all "0", and the process of step S15 is performed. If so, all the addresses written in the control memory 3 in that process are restored to all "0", and an instruction trap is generated (step S21).

ステップS13でオール“0"であると判別したとき、論理
回路網25はMAを+1した主記憶1のアドレスの内容を読
込み(ステップS14)、その内容を制御記憶3のアドレ
スμaに書込む(ステップS15)。このステップS14,S15
の処理が1回行なわれることにより、一つのマイクロコ
ードが主記憶1から制御記憶3へ転送される。
When it is determined in step S13 that all are "0", the logic circuit network 25 reads the contents of the address of the main memory 1 in which MA is incremented by 1 (step S14), and writes the contents to the address μa of the control memory 3 ( Step S15). This step S14, S15
By carrying out the process 1) once, one microcode is transferred from the main memory 1 to the control memory 3.

次に論理回路網25は現マイクロコードのサイズμSを−
1し、それが0以下でなければステップS12に戻って上
述した処理を繰返すことにより、主記憶1に記憶されて
いた全てのマイクロコードを制御記憶3へ転送する。
Next, the logic network 25 determines the size μS of the current microcode as −
If it is not equal to or less than 0, the process returns to step S12 and the above-mentioned processing is repeated to transfer all the microcodes stored in the main memory 1 to the control memory 3.

(ユーザ定義マクロ命令の定義の無効化) ユーザは、既に定義したマクロ命令を無効化しようとす
る場合、第5図に示した命令コード11-1に削除用マクロ
命令の命令コードを、第1パラメータ11-2に無効化しよ
うとするマクロ命令のコードをそれぞれ設定した削除用
マクロ命令を、第2図に示す入出力装置8等から投入す
る。
(Invalidation of Definition of User-Defined Macro Instruction) When the user intends to invalidate a macro instruction that has already been defined, the instruction code of the deletion macro instruction is added to the instruction code 11-1 shown in FIG. A deletion macro instruction in which the code of the macro instruction to be invalidated is set in the parameter 11-2 is input from the input / output device 8 shown in FIG.

この削除用マクロ命令は、第3図に示す命令レジスタ20
に移送され、上位8ビットの命令コード11-1がセレクタ
21を介してマップメモリ6にアドレスとして加えられ、
マップメモリ6がアクセスされる。マップメモリ6の命
令コード11-1に対応するアドレスには、削除用マクロ命
令に対応するマイクロコード列の先頭アドレスが予め記
憶されているので、その先頭アドレスが取出されて制御
記憶アドレスレジスタ22に格納され、制御記憶3がアク
セスされる。これによって制御記憶3から読出されたマ
イクロコードは制御記憶データレジスタ24を経て論理回
路網25に加えられ、以後このマイクロコードおよび続い
て制御記憶3から読出される一連のマイクロコードに従
って第6図に示す処理が論理回路網25等によって実行さ
れる。
This delete macro instruction is the instruction register 20 shown in FIG.
And the upper 8-bit instruction code 11-1 is transferred to
It is added as an address to the map memory 6 via 21,
The map memory 6 is accessed. At the address corresponding to the instruction code 11-1 in the map memory 6, the start address of the microcode sequence corresponding to the delete macro instruction is stored in advance, so that the start address is fetched and stored in the control storage address register 22. It is stored and the control memory 3 is accessed. As a result, the microcode read from the control memory 3 is added to the logic network 25 via the control memory data register 24, and the microcode and a series of microcodes subsequently read from the control memory 3 are shown in FIG. The processing shown is executed by the logic circuit network 25 or the like.

先ず論理回路網25は、命令レジスタ20に格納されている
第1パラメータ11-22のユーザ定義マクロ命令のコード
がユーザに開放されているコードの一つであるか否かを
チェックし(ステップS30)、ユーザに開放されていな
いコードを無効化の対象とするような不正な要求である
ことが検出されたときは、命令トラップを発生させ、ユ
ーザに通知する(ステップS37)。
First, the logic circuit network 25 checks whether the code of the user-defined macroinstruction of the first parameter 11-22 stored in the instruction register 20 is one of the codes open to the user (step S30). ), When it is detected that the request is an invalid request for invalidating a code that has not been released to the user, an instruction trap is generated and the user is notified (step S37).

また、命令コードが正しいとき、論理回路網25は、命令
レジスタ20から読込んだ第1パラメータ11-2をセレクタ
21を介してマップメモリ6にアドレスとして与えてその
内容(マイクロ先頭アドレスμa)を読込み(ステップ
S31)、μaを−1した制御記憶3のアドレスの内容
(マイクロコードのサイズμS)を読込む(ステップS3
2)。そして、μaを+1した制御記憶3のアドレスの
内容をオール“0"に更新し(ステップS33)、一つのマ
イクロコードを削除する。次いで、μSを−1し(ステ
ップS34)、μSが0以下でなければステップS33に戻っ
て次のマイクロコードの削除を行なう。ステップS35で
μSが0になったことが検出されると、今回無効化の要
求されたユーザ定義マクロ命令に対応する全てのマイク
ロコードを削除し終えたので、命令レジスタ20の第1パ
ラメータ11-2に対応するマップメモリ6のアドレスの内
容をオール“0"に変更して処理を終える(ステップS3
6)。
When the instruction code is correct, the logic circuit network 25 selects the first parameter 11-2 read from the instruction register 20 as a selector.
It is given as an address to the map memory 6 via 21 and the content (micro head address μa) is read (step
S31), the contents of the address (microcode size μS) of the control memory 3 minus μa is read (step S3
2). Then, the contents of the address of the control memory 3 in which μa is incremented by 1 are updated to all "0" (step S33), and one microcode is deleted. Next, μS is decremented by 1 (step S34), and if μS is not less than 0, the flow returns to step S33 to delete the next microcode. When μS is detected to be 0 in step S35, all the microcodes corresponding to the user-defined macro instruction requested to be invalidated this time have been deleted, so the first parameter 11- The contents of the address of the map memory 6 corresponding to 2 are changed to all "0" and the processing is terminated (step S3
6).

なお、上述のようにしてマップメモリ6,制御記憶3から
ユーザ定義マクロ命令,マイクロコード列に関する情報
が削除された後、何等かの理由によりそのユーザ定義マ
クロ命令が命令レジスタ20に移送されて実行されようと
した場合、マップメモリ6の出力はオール“0"となり、
例えば制御記憶3のオール“0"のアドレスに格納された
マイクロコードにより命令トラップが発生される。
After the user-defined macro instruction and the information about the microcode string are deleted from the map memory 6 and the control memory 3 as described above, the user-defined macro instruction is transferred to the instruction register 20 and executed for some reason. If you try to do so, the output of the map memory 6 becomes all "0",
For example, the instruction trap is generated by the microcode stored in the address of all "0" s of the control memory 3.

〔発明の効果〕〔The invention's effect〕

以上説明したように、本発明によれば、第1のチェック
手段によってシステム定義マクロ命令と同一コードをユ
ーザ定義マクロ命令として定義する誤りからシステテム
を保護することができ、第2のチェック手段によって制
御記憶に既に登録されているマイクロコードを破壊して
しまうことを防止することができる効果がある。
As described above, according to the present invention, it is possible to protect the system from the error of defining the same code as the system-defined macro instruction as the user-defined macro instruction by the first checking means, and control by the second checking means. This has an effect of preventing the microcode already registered in the memory from being destroyed.

また第3のチェック手段を設けることにより、更にマイ
クロコード以外の不正な内容を誤って制御記憶に登録す
ることを防止することができ、不正な内容をマイクロコ
ードとして登録されることから生じるプログラム暴走等
を防ぐことができる。
Further, by providing the third checking means, it is possible to further prevent erroneous registration of illegal contents other than microcode in the control memory, and program runaway resulting from illegal contents being registered as microcode. Etc. can be prevented.

従って、システムの信頼性を高めることができ、ユーザ
定義マクロ命令の定義操作を、ユーザは安心して行なう
ことができる効果がある。
Therefore, the reliability of the system can be improved, and the user can safely perform the definition operation of the user-defined macro instruction.

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

第1図はユーザ定義マクロ命令の定義処理の一例を示す
流れ図、 第2図は本発明を適用した情報処理装置のブロック図、 第3図は第2図のより詳細なブロック図、 第4図は定義用マクロ命令のフォーマット例等を示す
図、 第5図は削除用マクロ命令のフォーマット例を示す図お
よび、 第6図はユーザ定義マクロ命令の無効化処理の一例を示
す流れ図である。 図において、 1……主記憶 2……中央処理装置 3……書込み読出し可能な制御記憶 4-1,5-1,7-1……アドレス線 4-2,5-2,7-2……制御線 4-3,5-3,7-3……データ線 6……マップメモリ 8……入出力装置
FIG. 1 is a flow chart showing an example of definition processing of a user-defined macro instruction, FIG. 2 is a block diagram of an information processing apparatus to which the present invention is applied, FIG. 3 is a more detailed block diagram of FIG. 2, and FIG. Is a diagram showing a format example of a definition macro instruction, FIG. 5 is a diagram showing a format example of a deletion macro instruction, and FIG. 6 is a flow chart showing an example of invalidation processing of a user-defined macro instruction. In the figure, 1 ... Main memory 2 ... Central processing unit 3 ... Writable and readable control memory 4-1,5-1,7-1 ... Address line 4-2,5-2,7-2 ... … Control line 4-3,5-3,7-3 …… Data line 6 …… Map memory 8 …… Input / output device

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】書換え可能な制御記憶を有するマイクロプ
ログラム制御方式の情報処理装置において、 各マクロ命令に対応するマイクロコード列が記憶される
前記制御記憶の先頭アドレスを記憶するマップメモリ
と、 定義しようとするユーザ定義マクロ命令のコードを第1
パラメータとし、前記定義しようとするユーザ定義マク
ロ命令に対応するマイクロコード列を含む情報が格納さ
れた主記憶上のアドレスを第2パラメータとして持つ定
義用マクロ命令に応答して、前記第1パラメータで示さ
れるユーザ定義マクロ命令のコードがユーザ定義マクロ
命令として開放されたコードであるか否かをチェックす
る第1のチェック手段と、 前記第2パラメータで示される主記憶上のアドレスに格
納された情報中のマイクロ先頭アドレスに対応する前記
制御記憶の領域が未使用か否かをチェックする第2のチ
ェック手段と、 前記第1および第2のチェック手段のチェック結果に応
じて、前記第2パラメータで示される主記憶上のアドレ
スから前記マイクロコード列を読出し、前記マイクロ先
頭アドレスに対応する前記制御記憶の領域へ順次格納す
るマイクロコード転送手段とを具備したことを特徴とす
るユーザ定義マクロ命令の定義方式。
1. In a microprogram control type information processing device having a rewritable control memory, a map memory for storing a start address of the control memory for storing a microcode string corresponding to each macro instruction will be defined. The user defined macro instruction code
In response to a defining macroinstruction having as a parameter a main memory address storing information including a microcode string corresponding to the user-defined macroinstruction to be defined as a second parameter, the first parameter First checking means for checking whether or not the code of the user-defined macro instruction shown is a code released as a user-defined macro instruction; and information stored in the address on the main memory indicated by the second parameter. Second check means for checking whether or not the area of the control memory corresponding to the micro start address of the inside is unused; and the second parameter according to the check results of the first and second check means. The microcode string is read from the indicated main memory address, and the control corresponding to the micro start address is read. Definition method of the user-defined macro instruction which is characterized by comprising a micro-code transfer means for sequentially storing the storage area.
【請求項2】書換え可能な制御記憶を有するマイクロプ
ログラム制御方式の情報処理装置において、 各マクロ命令に対応するマイクロコード列が記憶される
前記制御記憶の先頭アドレスを記憶するマップメモリ
と、 定義しようとするユーザ定義マクロ命令のコードを第1
パラメータとし、前記定義しようとするユーザ定義マク
ロ命令に対応するマイクロコード列を含む情報が格納さ
れた主記憶上のアドレスを第2パラメータとして持つ定
義用マクロ命令に応答して、前記第1パラメータで示さ
れるユーザ定義マクロ命令のコードがユーザ定義マクロ
命令として開放されたコードであるか否かをチェックす
る第1のチェック手段と、 前記第2パラメータで示される主記憶上のアドレスに格
納された情報中のマイクロ先頭アドレスに対応する前記
制御記憶の領域が未使用か否かをチェックする第2のチ
ェック手段と、 前記第2パラメータで示される主記憶上のアドレスに格
納された内容がマイクロコードであるか否かをチェック
する第3のチェック手段と、 前記第1,第2および第3のチェック手段のチェック結果
に応じて、前記第2パラメータで示される主記憶上のア
ドレスから前記マイクロコード列を読出し、前記マイク
ロ先頭アドレスに対応する前記制御記憶の領域へ順次格
納するマイクロコード転送手段とを具備したことを特徴
とするユーザ定義マクロ命令の定義方式。
2. A map memory for storing a start address of the control memory in which a microcode string corresponding to each macro instruction is stored in an information processing device of a microprogram control system having a rewritable control memory. The user defined macro instruction code
In response to a defining macroinstruction having as a parameter a main memory address storing information including a microcode string corresponding to the user-defined macroinstruction to be defined as a second parameter, the first parameter First checking means for checking whether or not the code of the user-defined macro instruction shown is a code released as a user-defined macro instruction; and information stored in the address on the main memory indicated by the second parameter. Second check means for checking whether the area of the control memory corresponding to the micro start address in the inside is unused, and the contents stored in the address on the main memory indicated by the second parameter are microcodes. Third check means for checking whether or not there is a check result of the first, second and third check means Accordingly, the microcode transfer means for reading the microcode string from the address on the main memory indicated by the second parameter and sequentially storing the microcode string in the area of the control memory corresponding to the micro head address is provided. The definition method of the user-defined macro instruction.
JP17706587A 1987-07-17 1987-07-17 User definition macro instruction definition method Expired - Lifetime JPH0693222B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17706587A JPH0693222B2 (en) 1987-07-17 1987-07-17 User definition macro instruction definition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17706587A JPH0693222B2 (en) 1987-07-17 1987-07-17 User definition macro instruction definition method

Publications (2)

Publication Number Publication Date
JPS6421533A JPS6421533A (en) 1989-01-24
JPH0693222B2 true JPH0693222B2 (en) 1994-11-16

Family

ID=16024504

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17706587A Expired - Lifetime JPH0693222B2 (en) 1987-07-17 1987-07-17 User definition macro instruction definition method

Country Status (1)

Country Link
JP (1) JPH0693222B2 (en)

Also Published As

Publication number Publication date
JPS6421533A (en) 1989-01-24

Similar Documents

Publication Publication Date Title
JP4668416B2 (en) Protecting boot block code when enabling write access to the boot block
JPH11110141A (en) External storage device and data processing method
US20040260919A1 (en) Computer system and method therefor to bootup the system quickly after initialization
JP2003015929A (en) Non-volatile memory control method
JP2575358B2 (en) IC card
JP4175881B2 (en) Nonvolatile memory storage method and storage device
JP2001154909A (en) Flash memory management device and recording medium
JP2000163268A (en) Computer
JP3070539B2 (en) External storage device, data processing device, and data processing method
JP2008009485A (en) Virtual storage control device and virtual storage control program
JPH0693222B2 (en) User definition macro instruction definition method
JPH048838B2 (en)
JP2003036209A (en) Nonvolatile memory and data rewriting method for nonvolatile memory
JP2910745B2 (en) Storage device and data processing method
JP3271935B2 (en) Control system
JPH0551938B2 (en)
JPH10289144A (en) Memory control method
JP2004152331A (en) Storage device
JP2004055031A (en) Magnetic disk drive, control method therefor, and information system
JP4146581B2 (en) Flash memory
JPH10260908A (en) Storage device
JPH01112446A (en) System for controlling internal data
JP3359934B2 (en) Data storage device
JPH0156411B2 (en)
JP2003331586A (en) Data storing method