JP2764024B2 - Storage device table indexing method and indexing device - Google Patents

Storage device table indexing method and indexing device

Info

Publication number
JP2764024B2
JP2764024B2 JP31567495A JP31567495A JP2764024B2 JP 2764024 B2 JP2764024 B2 JP 2764024B2 JP 31567495 A JP31567495 A JP 31567495A JP 31567495 A JP31567495 A JP 31567495A JP 2764024 B2 JP2764024 B2 JP 2764024B2
Authority
JP
Japan
Prior art keywords
command
data
storage device
index
table index
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 - Fee Related
Application number
JP31567495A
Other languages
Japanese (ja)
Other versions
JPH09160771A (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.)
GOTAI HANDOTAI KOFUN JUGENKOSHI
Original Assignee
GOTAI HANDOTAI KOFUN JUGENKOSHI
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 GOTAI HANDOTAI KOFUN JUGENKOSHI filed Critical GOTAI HANDOTAI KOFUN JUGENKOSHI
Priority to JP31567495A priority Critical patent/JP2764024B2/en
Publication of JPH09160771A publication Critical patent/JPH09160771A/en
Application granted granted Critical
Publication of JP2764024B2 publication Critical patent/JP2764024B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は記憶装置のテーブル
索引方法及びその装置に関し、特にパイプラインに応用
される記憶装置のテーブル索引方法及びその装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and apparatus for indexing a table in a storage device, and more particularly to a method and an apparatus for indexing a table in a storage device applied to a pipeline.

【0002】[0002]

【従来の技術】マイクロコントローラで行われるマイク
ロ制御においては、通常常用されるデータ、例えば変換
用数値及び索引データなどを読出し専用記憶装置(RO
M)中に置いてトランスファテーブルを建立して行われ
る。これの一般的なハードウェアの実施装置及び実施方
法については、従来のマイクロコントローラのテーブル
索引部分の構造とテーブル索引動作との関係を示した図
2を参照して説明する。図2においてマイクロコントロ
ーラ10は、記憶装置11(例えばROM)と、プログ
ラムカウンタ12と、指標レジスタ13と、マルチプレ
クサ14とデータレジスタ15と、制御装置16と、指
令デコード実行装置17とを備えており、その中の記憶
装置11には指令データ記憶区段111とテーブル索引
データ記憶区段112とが含まれている。
2. Description of the Related Art In microcontrol performed by a microcontroller, normally used data, for example, numerical values for conversion and index data are read-only memory (RO).
M) and the transfer table is erected. The general hardware implementation device and implementation method will be described with reference to FIG. 2 showing the relationship between the structure of the table index portion of the conventional microcontroller and the table index operation. In FIG. 2, the microcontroller 10 includes a storage device 11 (for example, ROM), a program counter 12, an index register 13, a multiplexer 14, a data register 15, a control device 16, and a command decode execution device 17. The storage device 11 includes a command data storage section 111 and a table index data storage section 112.

【0003】当該指令データ記憶区段111及びテーブ
ル索引データ記憶区段112において、符号PC,mは
夫々プログラムカウンタ12及び指標レジスタ13の内
含値であると共に、夫々記憶装置11のアドレスPC,
mを表わす。なお、符号PC+1はプログラムカウンタ
12の内含値PCに1を加算したものであると共に記憶
装置11のアドレスPC+1を表わす。そして符号(P
C),(PC+1),(m)は夫々記憶装置11のアド
レスPC,PC+1,mのメモリ内含値である。ここで
断るべきところは、本願においては前記符号(PC),
(PC+1)は夫々指令データ記憶区段111において
のテーブル索引指令とサブコマンドとを指していい、当
該符号(m)はテーブル索引データ記憶区段112に記
憶されているテーブル索引データを指していう。
In the command data storage section 111 and the table index data storage section 112, symbols PC and m are values included in the program counter 12 and the index register 13, respectively, and the addresses PC and
represents m. The code PC + 1 is obtained by adding 1 to the content value PC of the program counter 12 and represents the address PC + 1 of the storage device 11. And the sign (P
C), (PC + 1), and (m) are the values contained in the memory at addresses PC, PC + 1, and m of the storage device 11, respectively. It should be noted here that, in the present application, the code (PC),
(PC + 1) indicates a table index command and a subcommand in the command data storage section 111, respectively, and the symbol (m) indicates table index data stored in the table index data storage section 112.

【0004】図2を応用した索引2作のプログラムを説
明する。 ステップ(a)−制御装置16により発生され、そして
第1のマルチプレクサ制御状態にあるマルチプレクサ制
御信号C1 、メモリイネーブル信号E及びプログラムカ
ウンタ12の内含値PCに応じて、記憶装置11がその
指令データ記憶区段111からテーブル索引指令(P
C)を指令デコード実行装置17に出力した後、指令デ
コード実行装置17によりデコードされ、これにより得
たテーブル索引信号Lを出力してテーブル索引プログラ
ムを開始する。
[0004] A program of the second indexing work applied to FIG. 2 will be described. Step (a)-In response to the multiplexer control signal C 1 , the memory enable signal E and the content PC of the program counter 12 generated by the controller 16 and in the first multiplexer control state, the storage device 11 issues the command. A table index command (P
After C) is output to the command decode execution device 17, the command is decoded by the command decode execution device 17, and the obtained table index signal L is output to start the table index program.

【0005】ステップ(b)−この際、制御装置16は
テーブル索引信号Lに応じて、第2のマルチプレクサ制
御状態にあるマルチプレクサ制御信号C1 が発生してマ
ルチプレクサ14に出力されることにより、指標レジス
タ13の内含値mをテーブル索引データ記憶区段112
に切替え出力する。
Step (b): At this time, the control device 16 generates the multiplexer control signal C 1 in the second multiplexer control state according to the table index signal L and outputs the generated signal to the multiplexer 14 to indicate the index. The content m of the register 13 is stored in the table index data storage section 112.
And output.

【0006】ステップ(c)−メモリイネーブル信号E
に応じて記憶装置11からテーブル索引データ(m)が
出力されると共に、制御装置16により発生された書き
込み信号C2 に応答してデータレジスタ15にこのテー
ブル索引データ(m)が記憶される。
Step (c) —Memory enable signal E
With table index data (m) is output from the storage device 11, the table index data in the data register 15 in response to the write signal C 2 which is generated by the controller 16 (m) are stored in accordance with the.

【0007】ステップ(d)−もしこの制御装置16に
テーブル索引信号Lが入力されていない場合は、制御装
置16により改めて第1のマルチプレクサ制御状態にあ
るマルチプレクサ制御信号C1 が発生してマルチプレク
サ14に出力されることにより、プログラムカウンタ1
4の内含値PCに1を加算した後の値PC+1を指令デ
ータ記憶区段111に切替え出力してサブコマンド(P
C+1)の出力アドレスとするとともに、テーブル索引
プログラムを結束する。
Step (d)-If the table index signal L is not input to the control unit 16, the control unit 16 again generates a multiplexer control signal C1 in the first multiplexer control state, and Is output to the program counter 1
The value PC + 1 after adding 1 to the content value PC of 4 is output to the command data storage section 111 and output to the sub-command (P
C + 1) and bind the table look-up program.

【0008】上記テーブル索引プログラムにおいて、記
憶装置11の不同アドレス区段内のデータを読み取るた
めにプログラムカウンタ12と、指標レジスタ13の内
含値との切替えを行わなければならないので、マイクロ
コントローラ10をパイプライン構造にすると、データ
の読取り作業に莫大な時間がかかり、さらなる改善が待
れている。
In the above table look-up program, switching between the program counter 12 and the contents included in the index register 13 must be performed in order to read data in the non-uniform address sections of the storage device 11. With the pipeline structure, the data reading operation takes an enormous amount of time, and further improvement is expected.

【0009】パイプライン構造とは、図3(a)のマイ
クロコントローラのパイプラインの動作と構造との関係
に示されているように、記憶装置21(例えばROM)
と、プログラムカウンタ22と、指令バッファ23と、
指令レジスタ24と、指令デコード実行装置25とによ
りマイクロコントローラ20として表わされる構造をい
う。
The pipeline structure is, as shown in the relationship between the operation of the pipeline of the microcontroller and the structure in FIG.
, A program counter 22, a command buffer 23,
This means a structure represented as the microcontroller 20 by the command register 24 and the command decode execution device 25.

【0010】なお、図3(b)は取出しタイミング周期
FCと実行タイミング周期ECとが相互に重り合ってパ
イプライン作業を実行する見取り図である。図において
nは記憶装置21のアドレスとして用いられるプログラ
ムカウンタ22内含値、(n)は記憶装置21における
アドレスnの内含値(例えば指令)、TO 〜T2 はタイ
ミング周期TO 〜T2 である。
FIG. 3B is a schematic diagram in which the extraction timing cycle FC and the execution timing cycle EC overlap each other to execute a pipeline operation. In the figure, n is a value contained in the program counter 22 used as an address of the storage device 21, (n) is a value contained in the address n in the storage device 21 (for example, a command), and T O to T 2 are timing periods T O to T 2. 2

【0011】上記図3(a)及び図3(b)を参照しな
がらパイプライン構造をより詳細に説明する。タイミング周期TO において 取出し周期EC期間−プログラムカウンタ22から記憶
装置21のアドレスnを出力して当該アドレスnの内含
値を読み出す:指令(n)が指令バッファ23に来る。
The pipeline structure will be described in more detail with reference to FIGS. 3 (a) and 3 (b). At the timing cycle T O , the extraction cycle EC period—the address n of the storage device 21 is output from the program counter 22 to read out the contents included in the address n: the command (n) comes to the command buffer 23.

【0012】タイミング周期T1 において (1)実行周期EC期間−指令バッファ23内の指令
(n)を指令レジスタ24に出力して、指令デコード実
行装置25のデコード及び実行に供する。
In the timing cycle T 1 , (1) the execution cycle EC period—the command (n) in the command buffer 23 is output to the command register 24, and is used for decoding and execution by the command decode execution device 25.

【0013】(2)取出し周期FC期間−プログラムカ
ウンタ22内含値nに1を加算し、プログラムカウンタ
22から記憶装置21のアドレスn+1を出力して当該
記憶装置21アドレスn+1の内含値を読み取る:指令
(n+1)が指令バッファ23に来る。
(2) Retrieval period FC period-addition of 1 to the value n contained in the program counter 22, the program counter 22 outputs the address n + 1 of the storage device 21, and reads the value contained in the address n + 1 of the storage device 21. : Command (n + 1) comes to command buffer 23.

【0014】タイミング周期T2 において (1)実行周期EC期間−指令バッファ23中の指令
(n+1)を指令レジスタ24に出力して指令デコード
実行装置25のデコード及び実行に供する。
In the timing cycle T 2 , (1) the execution cycle EC period—the command (n + 1) in the command buffer 23 is output to the command register 24 to be used by the command decode execution device 25 for decoding and execution.

【0015】(2)取出し周期FC期間−プログラムカ
ウンタ22内含値n+1に1を加算し、プログラムカウ
ンタ22から記憶装置21のアドレスn+2を出力して
当該記憶装置21アドレスn+2の内含値を読み取る:
指令(n+2)が指令バッファ23に来る。
(2) Retrieval period FC period-addition of 1 to the content value n + 1 in the program counter 22, the address n + 2 of the storage device 21 is output from the program counter 22, and the content value in the address n + 2 of the storage device 21 is read. :
The command (n + 2) comes to the command buffer 23.

【0016】記憶装置21中に記憶された指令の実行が
完了するまで上記の作業を繰り返す。次に、2層パイプ
ラインの構造を例にとる。図4(a)は従来の2層パイ
プライン作業におけるマイクロコントローラテーブル索
引部分の構造とテーブル索引作業との関係を示す例示図
である。図4(a)においてマイクロコントローラ30
は記憶装置31(例えばROM)と、プログラムカウン
タ32と、指標レジスタ33とマルチプレクサ34と、
データレジスタ35と、制御装置36と、指令バッファ
38と、指令デコード実行装置39とを備えてなり、そ
の中の記憶装置31は指令記憶区段311とテーブル索
引データ記憶区段312とを備える。
The above operation is repeated until the execution of the command stored in the storage device 21 is completed. Next, the structure of a two-layer pipeline is taken as an example. FIG. 4A is an exemplary diagram showing the relationship between the structure of the microcontroller table index portion and the table indexing operation in the conventional two-layer pipeline operation. In FIG. 4A, the microcontroller 30
Is a storage device 31 (for example, ROM), a program counter 32, an index register 33, a multiplexer 34,
It comprises a data register 35, a control device 36, a command buffer 38, and a command decode execution device 39, and the storage device 31 includes a command storage section 311 and a table index data storage section 312.

【0017】そして符号PC,mは夫々プログラムカウ
ンタ32と指令レジスタ33の内含値であると共に、夫
々記憶装置のアドレスPC,mである。また、符号PC
+1,PC+2はプログラムカウンタ32の内含値PC
に1を、及び2を加算したものであると共に、記憶装置
31のアドレスPC+1,PC+2である。また、(P
C),(PC+1),(PC+2)及び(m)は夫々記
憶装置31のアドレスPC,PC+1,PC+2,mの
メモリ内含値である。同様に本願における符号(PC)
及び(PC+1)は夫々指令データ記憶区段311に記
憶されたテーブル索引指令及びサブコマンドを意味する
ものであり、符号(m)はテーブル索引データ記憶区段
312に記憶されたテーブル索引データを意味する。
Symbols PC and m are the contents included in the program counter 32 and the command register 33, respectively, and are the addresses PC and m of the storage device, respectively. Also, the code PC
+1 and PC + 2 are the contents PC of the program counter 32
And 1 + 2, and the addresses PC + 1 and PC + 2 of the storage device 31. Also, (P
(C), (PC + 1), (PC + 2) and (m) are the values contained in the memory at the addresses PC, PC + 1, PC + 2 and m of the storage device 31, respectively. Similarly, reference numeral (PC) in the present application
And (PC + 1) mean the table index command and the subcommand stored in the command data storage section 311, respectively, and the symbol (m) means the table index data stored in the table index data storage section 312. I do.

【0018】なお、図4(b)は従来のパイプライン作
業のマイクロコントローラタイミングを示す例示図であ
り、その中の符号FCは取り出し周期、符号ECは実行
周期である。
FIG. 4B is a view showing an example of the timing of a microcontroller in a conventional pipeline operation. In FIG. 4B, reference numeral FC denotes an extraction period, and reference numeral EC denotes an execution period.

【0019】ここに、テーブル索引動作のプログラムに
応用された図4(a)の構造を、図4(b)に示された
マイクロ制御器のタイミング例示図を参照しながら説明
する。
Here, the structure of FIG. 4A applied to the program for the table look-up operation will be described with reference to a timing diagram of the microcontroller shown in FIG. 4B.

【0020】タイミング周期TO において 取出し周期FC期間−制御装置36により発生され、そ
して第1のマルチ制御状態にあるマルチプレクサ制御信
号C1 、メモリイネーブル信号E及びプログラムカウン
タ32の内含値PCに応じて、記憶装置31により指令
データ記憶区段311からテーブル索引指令(PC)を
指令バッファ37に出力する。
In the timing period T O , the fetch period FC period—generated by the controller 36 and according to the multiplexer control signal C 1 , the memory enable signal E and the content PC of the program counter 32 in the first multi-control state. Then, the table index command (PC) is output from the command data storage section 311 to the command buffer 37 by the storage device 31.

【0021】タイミング周期T1 において (1)実行周期EC期間−指令バッファ37におけるテ
ーブル索引指令(PC)を指令レジスタ38に出力した
後、指令デコード実行装置39により指令レジスタから
当該テーブル索引指令(PC)を読み出して実行するこ
とにより、テーブル索引信号Lを発生させて出力する。
In the timing cycle T 1 , (1) execution cycle EC period—table index command (PC) in the command buffer 37 is output to the command register 38, and then the table index command (PC) is read from the command register by the command decode execution device 39. ) Is read and executed to generate and output a table index signal L.

【0022】(2)取出し周期FC期間−第1のマルチ
プレクサ制御状態にあるマルチプレクサ制御信号C1
メモリイネーブル信号及びプログラムカウンタ32の内
含値PCに1を加算したPC+1に応じて、記憶装置3
1によりその指令記憶区段311からサブコマンド(P
C+1)を指令バッファ37に出力する。
(2) Extraction period FC period—the multiplexer control signal C 1 in the first multiplexer control state,
In accordance with the memory enable signal and PC + 1 obtained by adding 1 to the content value PC of the program counter 32, the storage device 3
1, the sub-command (P
C + 1) is output to the command buffer 37.

【0023】タイミング周期T2 において (1)実行周期EC期間−不動作(NOP)状態を保持
する。 (2)取出し周期FC期間−制御装置36によりテーブ
ル索引信号Lに応じて、第2のマルチ制御状態にあるマ
ルチプレクサ制御信号C1 が発生してマルチプレクサ3
4に出力されることにより、指標レジスタ33の内含値
mを記憶装置31に切替え出力する。この際、メモリイ
ネーブル信号Eに応じて記憶装置31からテーブル索引
データ区段312に記憶されたテーブル索引データ
(m)を指令バッファ37に出力することにより、本来
タイミング周期T1 の取出し周期FC期間に指令バッフ
ァ37に記憶されたサブコマンド(PC+1)を遮る。
[0023] In the timing period T 2 (1) run periodic EC period - to hold the non-operation (NOP) state. (2) extraction period FC period - in accordance with the table index signal L by the controller 36, the multiplexer 3 multiplexer control signal C 1 at the second multi-control condition occurs
4, the content m of the index register 33 is switched to the storage device 31 and output. At this time, by outputting the table index data (m) stored in the table index data section 312 from the storage device 31 to the command buffer 37 in response to the memory enable signal E, the take-out period FC of the original timing period T 1 The sub-command (PC + 1) stored in the command buffer 37 is interrupted.

【0024】タイミング周期T3 において (1)実行周期EC期間−指令バッファ37におけるテ
ーブル索引データ(m)は指標レジスタ38を介して、
制御装置36により発生された書き込み信号C 2 に応答
してデータレジスタ35に出力されテーブル索引動作が
完成される。
[0024]In timing the period T 3  (1) Execution period EC period-text in the command buffer 37
The index data (m) is transmitted through the index register 38,
Write signal C generated by controller 36 TwoRespond to
Is output to the data register 35 and the table lookup operation is performed.
Be completed.

【0025】(2)取出し周期FC期間−制御装置36
により改めて第1のマルチプレクサ制御状態にあるマル
チプレクサ制御信号C1 が発生してマルチプレクサ34
に出力されることにより、プログラムカウンタ32の内
含値PC+1を記憶装置31に出力し、記憶装置31を
してメモリイネーブル信号Eに応答して改めて指令デー
タ記憶区段31からサブコマンド(PC+1)を指令バ
ッファ37に出力せしめる。そして、本来タイミング周
期T1 の取出し周期FC期間に指令バッファ37に記憶
されたサブコマンド(PC+1)はタイミング周期T2
の取出し周期FC期間のテーブル索引データ(n)に遮
られているため、この時のプログラムカウンタ32の内
含値はなおPC+1に保持されている。
(2) Removal cycle FC period—control device 36
Again generates a multiplexer control signal C 1 in the first multiplexer control state,
, The content value PC + 1 of the program counter 32 is output to the storage device 31, and the storage device 31 sends the subcommand (PC + 1) again from the command data storage section 31 in response to the memory enable signal E. Is output to the command buffer 37. The sub command stored in the command buffer 37 to the original take-out period FC duration of the timing period T 1 (PC + 1) is the timing period T 2
, The value included in the program counter 32 at this time is still held at PC + 1.

【0026】タイミング周期T4 において (1)実行周期EC期間−指令バッファ37におけるサ
ブコマンド(PC+1)を指令レジスタ38に出力した
後、指令実行装置39により指令レジスタ38からサブ
コマンド(PC+1)を読取り実行する。
The timing period T in 4 (1) run periodic EC period - after outputting the subcommand (PC + 1) to the command register 38 in the instruction buffer 37, reads the sub-command (PC + 1) from the command register 38 by a command execution unit 39 Run.

【0027】(2)取出し周期FC期間−第1のマルチ
プレクサ制御状態にあるマルチプレクサ信号C1 、メモ
リイネーブル信号E及びプログラムカウンタ32の内含
値PC+1に加算したPC+2に応じて、記憶装置によ
り指令データ記憶区段311から指令(PC+2)を指
令バッファ37に出力する。
(2) Take-out cycle FC period—instruction data from the storage device according to the multiplexer signal C 1 in the first multiplexer control state, the memory enable signal E, and PC + 2 added to the content value PC + 1 of the program counter 32 The command (PC + 2) is output from the storage section 311 to the command buffer 37.

【0028】[0028]

【発明が解決しようとする課題】要するに、上記従来の
2層パイプライン構造を備えた制御器30がテーブル索
引動作(テーブル索引信号Lを発生してから該テーブル
索引データ(m)がデータレジスタ35に入力される迄
の動作)を完成するには、3個のタイミング周期(T1
〜T3 )を必要とし、その中の1個のタイミング周期だ
けでも予めサブコマンド(PC+1)を読み取るための
動作に時間が浪費され、指令バッファ37の運用効率を
低下してしまうこととなり、ましてパイプライン構造が
3層以上にもなると、そのタイミング周期にかかる時間
の浪費は線性方式変化ではなく、それをはるかに越えた
非線性の浪費が予見され、その結果制御器30の作業効
率が大巾に低下される。
In short, the controller 30 having the above-mentioned conventional two-layer pipeline structure performs the table indexing operation (after generating the table index signal L, the table index data (m) is stored in the data register 35). In order to complete the operation up to the input to the clock, three timing periods (T 1)
TT 3 ), and the operation for reading the subcommand (PC + 1) is wasted in advance even with only one timing period among them, and the operation efficiency of the command buffer 37 is reduced. If the pipeline structure has three or more layers, the time wasted in the timing cycle is not a change in the linearity scheme, but a much larger non-linearity is expected. As a result, the working efficiency of the controller 30 is increased. Reduced to width.

【0029】本発明の主たる目的はパイプライン構造に
応用されることができ、かつ、テーブル索引時間を短縮
できる記憶装置のテーブル索引方法を提供することにあ
る。本発明の次の目的は、従来のマイクロコントローラ
を大幅に変更することなく、低コストの記憶装置のテー
ブル索引装置を提供することにある。
A main object of the present invention is to provide a table indexing method for a storage device which can be applied to a pipeline structure and can reduce a table indexing time. A second object of the present invention is to provide a low-cost storage device table indexing device without significantly changing the conventional microcontroller.

【0030】[0030]

【課題を解決するための手段】上記目的を達成するため
の本発明の記憶装置のテーブル索引方法は、指令緩衝実
行装置と、制御装置と、データレジスタとを利用して記
憶装置に記憶されたテーブル索引データをデータレジス
タに出力するテーブル索引方法において、(a)第1の
タイミング周期において、前記指令緩衝実行装置により
予め記憶されたテーブル索引指令を実行してテーブル索
引信号を発生させて出力した後、前記制御装置によりこ
のテーブル索引信号に応じて、前記記憶装置に記憶され
たサブコマンドを前記指令緩衝実行装置に出力し、
(b)第2のタイミング周期において、前記制御装置に
より使用禁止信号が発生して前記指令緩衝実行装置にお
ける前記サブコマンドをラッチした後、前記制御装置に
書込み指令が発生してこれを前記指令緩衝実行装置に出
力させることにより、前記指令緩衝実行装置に書込み信
号が発生して前記テーブル索引データを前記データレジ
スタに出力するステップを備えてなる記憶装置のテーブ
ル索引方法。
According to a first aspect of the present invention, there is provided a table indexing method for a storage device, comprising: a command buffer executing device, a control device, and a data register; In a table indexing method for outputting table index data to a data register, (a) in a first timing cycle, a table index command stored in advance by the command buffer executing device is executed to generate and output a table index signal. After that, the controller outputs the subcommand stored in the storage device to the command buffer execution device according to the table index signal,
(B) in the second timing period, after the control device generates a use prohibition signal and latches the subcommand in the command buffer execution device, a write command is generated in the control device and the command is transmitted to the command buffer. A table indexing method for a storage device, comprising the step of: outputting a table index data to the data register by generating a write signal in the command buffer executing unit by outputting the command index to the execution unit.

【0031】好適には、前記記憶装置は指令データ記憶
区段とテーブル索引データ記憶区段とを備えてなる。好
適には、前記ステップ(a)におけるテーブル索引指令
及びサブコマンドはいずれも前記指令データ記憶区段に
記憶され、前記テーブル索引データは前記テーブル索引
データ記憶区段に記憶されている。
Preferably, the storage device includes a command data storage section and a table index data storage section. Preferably, both the table index command and the subcommand in the step (a) are stored in the command data storage section, and the table index data is stored in the table index data storage section.

【0032】好適には、前記ステップ(a)の前には更
に、前記制御装置はプログラム指令カウント値に応じ
て、前記指令データ記憶区段における前記テーブル索引
指令を前記指令緩衝実行装置に出力してこの指令緩衝実
行装置の実行に供するステップ(c)を備えてなる。
Preferably, before the step (a), the control device outputs the table index command in the command data storage section to the command buffer execution device according to a program command count value. Step (c) is provided for executing the leverage command buffer execution device.

【0033】好適には前記プログラム指令カウント値は
前記指令データ記憶区段に記憶された指令のアドレスと
して使用される。好適には、前記ステップ(b)は更
に、(b1)前記制御装置により発生出力された使用禁止
信号を利用して、前記指令緩衝実行装置に位置するサブ
コマンドをラッチし、(b2)テーブル索引データの指標
値に応じて前記記憶装置におけるテーブル索引データを
データバスに出力し、(b3)前記制御装置より前記書込
み指令が発生して前記指令緩衝実行装置に出力されるこ
とにより、該指令緩衝実行装置をして前記書込み指令を
実行せしめ、(b4)前記指令緩衝実行装置より前記書込
み信号を前記データレジスタに出力することにより、前
記データバスに位置されたテーブル索引データが前記デ
ータレジスタに入力されるステップを備えてなる。
Preferably, the program command count value is used as an address of a command stored in the command data storage section. Preferably, the step (b) further, (b 1) by using the disable signal generated output by the controller latches the subcommand located at the command buffer execution device, (b 2) Outputting the table index data in the storage device to the data bus in accordance with the index value of the table index data, and (b 3 ) the write command being generated by the control device and output to the command buffer execution device, Causing the command buffer execution device to execute the write command; and (b 4 ) outputting the write signal from the command buffer execution device to the data register, whereby the table index data located on the data bus is updated. A step of inputting to the data register.

【0034】好適には、前記ステップ(b2)において、
前記テーブル索引データの指標値により指標値が指標レ
ジスタに記憶される。好適には、前記指令緩衝実行装置
は指令バッファと、指令レジスタと、指令デコード実行
装置とを備えてなる。
Preferably, in the step (b 2 ),
An index value is stored in the index register according to the index value of the table index data. Preferably, the command buffer execution device includes a command buffer, a command register, and a command decode execution device.

【0035】好適には、前記指令バッファは前記使用禁
止信号に応じて前記サブコマンドをその内にラッチさせ
る。好適には、前記指令レジスタは前記制御装置により
発生し出力された書込指令を入力記憶する。
Preferably, the command buffer latches the subcommand therein in response to the use prohibition signal. Preferably, the command register inputs and stores a write command generated and output by the control device.

【0036】好適には前記指令デコード実行装置は順次
前記指令レジスタからの前記テーブル索引指令、書込み
指令及びサブコマンドをデコード実行する。また、本願
の別の発明である記憶装置のテーブル索引装置は、テー
ブル索引指令、サブコマンド及びテーブル索引データを
有し、指標アドレス制御信号に応じて前記テーブル索引
指令、サブコマンド及びテーブル索引データを順次出力
する記憶装置と、前記記憶装置に電気的に接続され、前
記記憶装置から前記テーブル索引指令及びサブコマンド
が入力された後、前記テーブル索引指令を実行する時に
テーブル索引信号出力が発生する指令緩衝実行装置と、
前記指令緩衝実行装置及び記憶装置に電気的に接続さ
れ、前記テーブル索引信号に応じて前記指標アドレス制
御信号が発生し出力されることにより、前記記憶装置を
して前記テーブル索引データを出力せしめると共に、使
用禁止信号及び書込み指令が発生して前記指令緩衝実行
装置に出力され、前記指令緩衝実行装置をして前記サブ
コマンドが入力された時にそのサブコマンドをラッチせ
しめ、同時に前記書込み指令に応じて発生した書込み信
号を出力する制御装置と、前記記憶装置及び指令緩衝実
行装置に電気的に接続され、前記書込み信号に応じて前
記記憶装置から前記テーブル索引データが入力されるデ
ータレジスタとを備えてなる。
Preferably, the command decode execution device sequentially decodes the table index command, write command and subcommand from the command register. A table indexing device for a storage device according to another invention of the present application has a table indexing command, a subcommand, and table indexing data, and stores the table indexing command, the subcommand, and the table indexing data in response to an index address control signal. A storage device for sequentially outputting, and a command that is electrically connected to the storage device and that generates a table index signal output when executing the table index command after the table index command and the subcommand are input from the storage device. A buffer execution device;
The index buffer control device is electrically connected to the command buffer execution device and the storage device, and the index address control signal is generated and output in response to the table index signal, thereby causing the storage device to output the table index data. When a use prohibition signal and a write command are generated and output to the command buffer execution device, the command buffer execution device latches the subcommand when the subcommand is input, and simultaneously responds to the write command. A control device that outputs the generated write signal, and a data register that is electrically connected to the storage device and the command buffer execution device, and that receives the table index data from the storage device according to the write signal. Become.

【0037】好適には前記記憶装置は読出し専用記憶装
置(ROM)である。好適には前記指令緩衝実行装置
は、前記記憶装置及び制御装置に電気的に接続され、順
次前記記憶装置から前記テーブル索引指令及びサブコマ
ンドが入力されると共に、前記サブコマンドが入力され
た時に前記使用禁止信号に応じて前記サブコマンドをラ
ッチする指令バッファと、前記指令緩衝実行装置、制御
装置及びデータレジスタに電気的に接続され、前記テー
ブル索引指令を実行する時に、前記テーブル信号が発生
して前記制御装置に出力されると共に、前記書込み指令
を実行することにより、前記書込み信号が発生して前記
データレジスタに出力される指令実行装置とを備えてな
る。
Preferably, the storage device is a read-only storage device (ROM). Preferably, the command buffer execution device is electrically connected to the storage device and the control device, and the table index command and the subcommand are sequentially input from the storage device, and the subcommand is input when the subcommand is input. A command buffer for latching the subcommand in response to a use prohibition signal, and the command buffer execution device, which is electrically connected to a control device and a data register, the table signal is generated when the table index command is executed. A command execution device that is output to the control device and executes the write command to generate the write signal and output the signal to the data register.

【0038】好適には前記指令実行装置は、前記指令バ
ッファ及び制御装置に電気的に接続されることにより順
次前記テーブル索引指令及び前記サブコマンドを記憶す
ると共に、前記制御装置から前記書込み指令が入力され
る指令レジスタと、前記指令レジスタ及び制御装置に電
気的に接続されることにより、前記指令レジスタから入
力された前記テーブル索引指令及び前記書込み指令を実
行することで、夫々前記テーブル索引信号及び前記書込
み信号が発生して前記制御装置に出力される指令デコー
ド実行装置とを備えてなる。
Preferably, the command execution device is electrically connected to the command buffer and the control device to sequentially store the table index command and the subcommand, and receives the write command from the control device. Command register, and by being electrically connected to the command register and the control device, by executing the table index command and the write command input from the command register, respectively, the table index signal and the A command decode execution device for generating a write signal and outputting the write signal to the control device.

【0039】好適には前記記憶装置のテーブル索引装置
は更に、前記テーブル索引指令及びサブコマンドを前記
記憶装置の記憶アドレスに記憶させるプログラムカウン
タと、前記テーブル索引データを前記記憶装置の記憶ア
ドレスに記憶させる指標レジスタと、前記プログラムカ
ウンタ、指標レジスタ、制御装置及び記憶装置に電気的
に接続されることにより、前記制御装置より出力された
マルチプレクサ制御信号に応じて、前記プログラムカウ
ンタ又は前記指標レジスタにおける内含値を順番に前記
指標アドレス制御信号として使用することで、前記テー
ブル索引指令、サブコマンド及びテーブル索引データを
順番に前記記憶装置に出力するマルチプレクサとを備え
てなる。
Preferably, the table index device of the storage device further stores a program counter for storing the table index command and the subcommand at a storage address of the storage device, and stores the table index data at a storage address of the storage device. An index register to be executed and the program counter, the index register, a control device, and a storage device are electrically connected to each other, so that the program counter or the index register can be read in accordance with a multiplexer control signal output from the control device. A multiplexer for sequentially outputting the table index command, the subcommand, and the table index data to the storage device by sequentially using the included values as the index address control signal.

【0040】好適には、前記制御装置は、前記テーブル
索引信号が入力されていない時に第1のマルチプレクサ
制御状態にある前記マルチプレクサ制御状態を出力して
前記プログラムカウンタの内含値を前記指標アドレス制
御信号として使用することにより、前記記憶装置をして
前記テーブル索引指令又は前記サブコマンドを出力せし
め、これに対し前記制御装置に前記テーブル索引信号が
入力されている時は、前記マルチ制御信号が第2のマル
チプレクサ制御状態となって前記指標レジスタの内含値
を前記指標アドレス制御信号として使用することによ
り、前記記憶をして前記テーブル索引データを出力せし
めるようにしてなる。
Preferably, the control device outputs the multiplexer control state in the first multiplexer control state when the table index signal is not input, and controls the contents contained in the program counter to the index address control. By using the signal as a signal, the storage device causes the table index command or the subcommand to be output, and when the table index signal is input to the control device, the multi control signal is By using the value contained in the index register as the index address control signal in the multiplexer control state of 2, the memory is stored and the table index data is output.

【0041】好適には、前記第1及び第2のマルチプレ
クサ制御状態は夫々ハイレベル及びローレベル状態であ
る。好適には前記第1及び第2のマルチプレクサ制御状
態は夫々ローレベル及びハイレベルである。
Preferably, the first and second multiplexer control states are a high level and a low level, respectively. Preferably, the first and second multiplexer control states are low and high, respectively.

【0042】好適には前記記憶装置のテーブル索引装置
は更に、前記記憶装置、指令緩衝実行装置、データレジ
スタ及び制御装置に電気的に接続されることにより、前
記制御装置より出力されたデマルチプレクサ信号に応じ
て前記テーブル索引指令及び次の指令を前記指令緩衝実
行装置に出力し、又は前記テーブル索引データを前記デ
ータレジスタに出力するデマルチプレクサを備えてな
る。
Preferably, the table look-up device of the storage device is further electrically connected to the storage device, the command buffer execution device, the data register and the control device, so that the demultiplexer signal output from the control device is provided. And a demultiplexer for outputting the table index command and the next command to the command buffer execution device in accordance with the above, or outputting the table index data to the data register.

【0043】好適には、前記制御装置は、前記テーブル
索引信号が入力されていない時に第1のデマルチプレク
サ制御状態にある前記デマルチプレクサ制御信号を出力
して、前記テーブル索引指令及び次の指令を前記指令緩
衝実行装置に出力させ、これに対し、前記制御装置に前
記テーブル索引データが入力されている時は、前記デマ
ルチプレクサ信号が第2のデマルチプレクサ制御状態と
なって前記テーブル索引データを前記データレジスタに
出力する。
Preferably, the control device outputs the demultiplexer control signal in the first demultiplexer control state when the table index signal is not input, and outputs the table index command and the next command. When the table index data is input to the control device, the demultiplexer signal is in a second demultiplexer control state, and the table index data is output to the command buffer execution device. Output to data register.

【0044】好適には前記第1及び第2のデマルチプレ
クサ制御状態は夫々ハイレベル及びローレベル状態であ
る。好適には、前記第1及び第2のデマルチプレクサ制
御状態は夫々ローレベル及びハイレベル状態である。
Preferably, the first and second demultiplexer control states are a high level and a low level, respectively. Preferably, the first and second demultiplexer control states are a low level state and a high level state, respectively.

【0045】好適には、前記記憶装置は前記テーブル索
引指令及び次の指令を記憶する指令データ記憶区段と、
前記テーブル索引データを記憶するテーブル索引データ
記憶区段とを備えてなる。
Preferably, the storage device has a command data storage section for storing the table index command and the next command.
A table index data storage section for storing the table index data.

【0046】[0046]

【作用】本発明のマイクロコントローラは記憶装置例え
ばROMと、制御装置と、データレジスタと、指令緩衝
実行装置と、プログラムカウンタと、指標レジスタと、
マルチプレクサ47と、データレジスタとを備えてな
り、前記指令緩衝実行装置は指令バッファと、指令レジ
スタ及び指令デコード実行装置を備えた指令実行装置と
によりなり、そして記憶装置は指令データ記憶区段と、
テーブル索引データ記憶区段とを備えているので、テー
ブル索引動作は僅かに二つのタイミング周期しか必要と
せず、かつ、パイプライン構造を3層以上に変更して
も、その必要とする周期も従来の図4(a)(b)に示
されたものの必要とする周期よりはるかに短く、マイク
ロコントローラの作業効率を大幅に向上させることがで
きる。
The microcontroller of the present invention comprises a storage device such as a ROM, a control device, a data register, a command buffer executing device, a program counter, an index register,
Comprising a multiplexer 47 and a data register, the command buffer execution device comprising a command buffer, a command execution device having a command register and a command decode execution device, and a storage device comprising a command data storage section;
Since the table index data storage section is provided, the table index operation requires only two timing periods, and even if the pipeline structure is changed to three or more layers, the required period is the same as the conventional one. 4A and 4B, the period is much shorter than that required, and the working efficiency of the microcontroller can be greatly improved.

【0047】本発明はまたテーブル索引指令(PC)に
よりテーブル索引データ(m)を出力して記憶装置にお
けるアドレスmに記憶されると共にプログラムカウンタ
の内含値PC,PC+1,PC+2などを指標アドレス
制御信号Pとして使用できるので、指標レジスタ及びマ
ルチプレクサを節約できる。
According to the present invention, the table index data (m) is output according to the table index command (PC) and stored at the address m in the storage device, and the contents PC, PC + 1, PC + 2, etc. of the program counter are controlled by the index address. Since it can be used as the signal P, the index register and the multiplexer can be saved.

【0048】また、本発明は制御装置により指標アドレ
ス制御信号Pを出力できるので、さらにプログラムカウ
ンタを節約できる。
Further, according to the present invention, since the index address control signal P can be output by the control device, the program counter can be further saved.

【0049】[0049]

【発明の実施の形態】図1(a)は本発明の好適な実施
例を示すブロック見取り図である。図1(a)において
マイクロコントローラ40は、記憶装置41(例えばR
OM)と、制御装置42と、データレジスタ43と、指
令緩衝実行装置44と、プログラムカウンタ45と、指
標レジスタ46と、マルチプレクサ47と、データレジ
スタ48とを備えてなる。前記指令緩衝実行装置44は
指令バッファ441と、指令レジスタ4421及び指令
デコード実行装置4422を備えた指令実行装置442
とによりなり、そして前記記憶装置41は指令データ記
憶区段411と、テーブル索引データ記憶区段412と
を備えてなる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1A is a block diagram showing a preferred embodiment of the present invention. In FIG. 1A, the microcontroller 40 includes a storage device 41 (for example, R
OM), a control device 42, a data register 43, a command buffer execution device 44, a program counter 45, an index register 46, a multiplexer 47, and a data register 48. The command buffer execution device 44 includes a command buffer 441, a command register 4421, and a command execution device 442 including a command decode execution device 4422.
The storage device 41 includes a command data storage section 411 and a table index data storage section 412.

【0050】符号PC,mはプログラムカウンタ45及
び指標レジスタ46の内含値であると共に、夫々記憶装
置41のアドレスPC,mである。なお、符号PC+
1,PC+2はプログラムカウンタ45の内含値PCに
1及びPCに2を加算したものであると共に、記憶装置
41のアドレスPC+1,PC+2である。また符号
(PC),(PC+1),(PC+2)及び(m)は夫
々記憶装置41のアドレスPC,PC+1,PC+2,
mのメモリ内含値であり、ここに符号(PC)及び(P
C+1)とは夫々指令データ記憶区段411に記憶され
たテーブル索引指令及びサブコマンドのことを指してい
い、符号(m)とはテーブル索引データ記憶区段412
に記憶されたテーブル索引データのことをいう。
Symbols PC and m are values included in the program counter 45 and the index register 46, and are addresses PC and m of the storage device 41, respectively. The sign PC +
1 and PC + 2 are obtained by adding 1 and 2 to the content value PC of the program counter 45, and are addresses PC + 1 and PC + 2 of the storage device 41. Reference numerals (PC), (PC + 1), (PC + 2) and (m) denote addresses PC, PC + 1, PC + 2 of the storage device 41, respectively.
m in memory, where the codes (PC) and (P
C + 1) indicates the table index command and the subcommand stored in the command data storage section 411, respectively, and the symbol (m) indicates the table index data storage section 412.
Means the table index data stored in the.

【0051】また、図1(b)は本発明の好適な実施例
のタイミング図であり、その中、FCは取出し周期、E
Cは実行周期である。ここにテーブル索引動作のプログ
ラムに応用された図1(a)の構造を、図1(b)に示
されたマイクロ制御器のタイミング例示図を参照しなが
ら説明する。
FIG. 1B is a timing chart of a preferred embodiment of the present invention.
C is an execution cycle. Here, the structure of FIG. 1A applied to the program for the table look-up operation will be described with reference to a timing diagram of the microcontroller shown in FIG. 1B.

【0052】タイミング周期TO において 取出し周期FC期間−先ず、制御装置42により発生さ
れ、そして第1のマルチプレクサ制御状態にあるマルチ
プレクサ制御信号C1 、第1のデマルチプレクサ制御状
態にあるマルチプレクサ制御信号C2 、メモリイネーブ
ル信号E及び指標アドレス制御信号Pとして使用された
プログラムカウンタ45の内含値PCに応じて、記憶装
置41が指令データ記憶区段411よりテーブル索引指
令(PC)を指令バッファ441に出力する。
The take-out period FC in the timing period T O --the multiplexer control signal C 1 first generated by the controller 42 and in the first multiplexer control state, the multiplexer control signal C in the first demultiplexer control state 2. In accordance with the contents PC of the program counter 45 used as the memory enable signal E and the index address control signal P, the storage device 41 sends a table index command (PC) from the command data storage section 411 to the command buffer 441. Output.

【0053】タイミング周期T1 において (1)実行周期EC期間−指令バッファ441における
テーブル索引指令(PC)を指令レジスタ4421に出
力した後、指令デコード実行装置4422により指令レ
ジスタ4421からテーブル索引指令(PC)を読み出
して実行することにより、テーブル索引信号Lを発生さ
せて出力する。
In the timing cycle T 1 , (1) execution period EC period—table index command (PC) in the command buffer 441 is output to the command register 4421, and then, the command decode execution unit 4422 outputs the table index command (PC) from the command register 4421. ) Is read and executed to generate and output a table index signal L.

【0054】(2)取出し周期FC期間−第1のマルチ
プレクサ制御状態にあるマルチプレクサ制御信号C1
第1のデマルチプレクサ制御状態にあるマルチプレクサ
制御信号C2 、メモリイネーブル信号E及びプログラム
カウンタ45の内含値PCに1を加算したPC+1に応
じて、記憶装置41によりその指令データ記憶区段41
1からサブコマンド(PC+1)を指令バッファ441
に出力する。
(2) Extraction period FC period—the multiplexer control signal C 1 in the first multiplexer control state,
In response to the multiplexer control signal C 2 in the first demultiplexer control state, the memory enable signal E, and the PC + 1 obtained by adding 1 to the value PC included in the program counter 45, the storage device 41 causes the command data storage section 41 to store the command data.
Subcommand (PC + 1) from 1 to command buffer 441
Output to

【0055】タイミング周期T2 において (1)実行周期EC期間−制御装置42により使用禁止
信号Xが発生し、これを指令バッファ441に出力する
ことによりサブコマンドをラッチすると共に、制御装置
42にまた書込信号Iが発生してこれを指令レジスタ4
421に送り、指令デコード実行装置4422により指
令レジスタ4421内にある当該書込み指令Iを読取り
実行することで書込信号Wが発生してデータレジスタ4
3に出力することにより、データレジスタ48をしてデ
ータバス内のデータ(即ち、タイミング周期T2 におい
て取出し周期FC期間にデータバスDに出力されたテー
ブル索引データ(m))をその内に入力せしめる。(図
(b)の符号(B)部分を参照されたし) (2)取出し周期FC期間−制御装置42によりテーブ
ル索引信号Lに応じて第2のマルチプレクサ制御状態に
あるマルチプレクサ制御信号L1 が発生してマルチプレ
クサ47に出力されると共に、第2のデマルチプレクサ
制御状態にあるマルチプレクサ信号C2 が発生してデマ
ルチプレクサ48に出力されることにより、指標アドレ
ス制御信号Pとして使用される指標レジスタ6の内含値
mを記憶装置41に切替え出力した後、記憶装置により
メモリイネーブル信号Eに応答してテーブル索引データ
記憶区段412に記憶されているテーブル索引データ
(m)をデータバスDに出力する。(図1(b)におけ
る符号(A)部分を参照されたし)タイミング周期T3 において (1)実行周期EC期間−指令バッファ441にラッチ
されたサブコマンド(PC+1)を指令レジスタ442
1に出力した後、指令デコード実行装置4422により
指令レジスタ4421から当該サブコマンド(PC+
1)を読出し実行する。
In the timing cycle T 2 , (1) execution cycle EC period—a use prohibition signal X is generated by the control device 42, and is output to the command buffer 441 to latch a subcommand. A write signal I is generated and transmitted to the command register 4
421, and the command decode execution device 4422 reads and executes the write command I in the command register 4421, thereby generating a write signal W and causing the data register 4
By outputting to 3, the input data of the data register 48 the data bus (i.e., the table index data output to the data bus D to the take-out period FC period at timing period T 2 (m)) to them Let me know. (Refer to the part (B) in FIG. 7B.) (2) Take-out period FC period—The multiplexer 42 controls the multiplexer control signal L 1 in the second multiplexer control state according to the table index signal L by the controller 42. The index register 6 used as the index address control signal P is generated and output to the multiplexer 47, and the multiplexer signal C2 in the second demultiplexer control state is generated and output to the demultiplexer 48. Is switched to the storage device 41 and the table index data (m) stored in the table index data storage section 412 is output to the data bus D by the storage device in response to the memory enable signal E. I do. (It has been referring to the code (A) portion in FIG. 1 (b)) (1) run periodic EC period at timing period T 3 - command subcommand latched in the command buffer 441 (PC + 1) register 442
After that, the subcommand (PC +
1) is read and executed.

【0056】(2)取出し周期FC期間−制御装置42
により改めて第1のマルチプレクサ状態にあるマルチプ
レクサ制御信号C1 が発生してマルチプレクサ47に出
力されると共に、改めて第1のデマルチ制御状態にある
デマルチプレクサ制御信号C 2 が発生してマルチプレク
サ47に出力され、同時にプログラムカウンタ45の内
含値PC+1に1を加算してPC+2として記憶装置4
1に出力されることにより、記憶装置41をしてメモリ
イネーブル信号Eに応答して、指令データ記憶区段41
1より当該指令(PC+2)を指令バッファ441に出
力せしめる。
(2) Removal cycle FC period—Control device 42
Again in the first multiplexer state.
Lexer control signal C1Is generated and output to the multiplexer 47.
And again in the first demulti control state
Demultiplexer control signal C TwoMultiplex
Output from the program counter 45 and
The storage device 4 adds 1 to the included value PC + 1 to obtain PC + 2.
1 to the storage device 41
In response to the enable signal E, the command data storage section 41
1 outputs the command (PC + 2) to the command buffer 441.
I will force you.

【0057】[0057]

【発明の効果】従って、本願発明の2層パイプライン構
造に応用されるマイクロコントローラ40においては、
前記テーブル索引動作(即ち、テーブル索引信号Lが発
生してからテーブル索引データ(m)がデータレジスタ
48に入力されるまでの動作)は僅かに二つのタイミン
グ周期(即ち、T1 ,T2 )しか必要とせず、かつ、パ
イプライン構造を3層以上に変更しても、その必要とす
る周期も図4(a),(b)に示されたものの必要とす
る周期よりはるかに短く、マイクロコントローラの作業
効率を大幅に向上させることができる。
Therefore, in the microcontroller 40 applied to the two-layer pipeline structure of the present invention,
The table look-up operation (ie, the operation from the generation of the table look-up signal L to the input of the table look-up data (m) to the data register 48) is only two timing periods (ie, T 1 , T 2 ). Even if the pipeline structure is changed to three or more layers, the required period is much shorter than the required period of those shown in FIGS. The working efficiency of the controller can be greatly improved.

【0058】本発明はまたテーブル索引指令(PC)に
よりテーブル索引データ(m)を出力して記憶装置にお
けるアドレスmに記憶されると共に、プログラムカウン
タ45の内含値PC,PC+1,PC+2等を指標アド
レス制御信号Pとして使用できるので、指標レジスタ4
6及びマルチプレクサ47を節約できる。
According to the present invention, table index data (m) is output by a table index command (PC) and stored at an address m in the storage device, and the contents PC, PC + 1, PC + 2, etc. of the program counter 45 are indexed. Since it can be used as the address control signal P, the index register 4
6 and the multiplexer 47 can be saved.

【0059】また、本発明は制御装置42により指標ア
ドレス制御信号Pを出力できるので、さらにプログラム
カウンタ45を節約できる。なお、本発明も指令データ
記憶区段411の出力端子を指令バッファ441に電気
的に接続できると共に、テーブル索引データ記憶区段4
12の出力端子をデータレジスタ48に電気的に接続で
きるので、デマルチプレクサ48を節約できる。
In the present invention, since the index address control signal P can be output by the control device 42, the program counter 45 can be further saved. In the present invention, the output terminal of the command data storage section 411 can be electrically connected to the command buffer 441.
Since the twelve output terminals can be electrically connected to the data register 48, the demultiplexer 48 can be saved.

【0060】なお、記憶装置41の内含値のビット数が
データバスDのビット数よりも大きい場合、別のデータ
レジスタを増設して額外のビットを記憶することができ
る。要するに、本発明は大幅に従来のマイクロコントロ
ーラの構図を変更することなく低コストの記憶装置のテ
ーブル索引方法及び索引装置を提供するもので、パイプ
ラインに応用されテーブル索引の時間を短縮できるの
で、産業上の利用価値が極めて大きい。
When the number of bits of the contents included in the storage device 41 is larger than the number of bits of the data bus D, another data register can be added to store bits outside the frame. In short, the present invention provides a low-cost table indexing method and indexing device for a storage device without significantly changing the composition of a conventional microcontroller, and can be applied to a pipeline to reduce the time required for table indexing. Extremely high industrial utility value.

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

【図1】(a)(b)は本発明の好適な実施例の構造及
びタイミング例示図。
FIGS. 1A and 1B are diagrams illustrating the structure and timing of a preferred embodiment of the present invention.

【図2】従来のマイクロコントローラテーブル索引部分
の構造とテーブル索引作業との関係を示す例示図。
FIG. 2 is an exemplary diagram showing a relationship between the structure of a conventional microcontroller table index portion and a table indexing operation.

【図3】(a)(b)はマイクロコントローラのパイプ
ライン作業の構造と作業との関係及びタイミングを示す
例示図。
FIGS. 3A and 3B are exemplary diagrams showing the relationship between a pipeline operation structure of a microcontroller, operations, and timings.

【図4】(a)(b)は従来の2層パイプラインのマイ
クロコントローラ部分の構造とテーブル索引作業との関
係及びタイミングを示す例示図である。
FIGS. 4A and 4B are illustrations showing the relationship and timing between the structure of a microcontroller part of a conventional two-layer pipeline and a table look-up operation.

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

41 記憶装置 42 制御装置 43,48 データレジスタ 44 指令緩衝実行装置 45 プログラムカウンタ 46 指標レジスタ 47 マルチプレクサ 411 指令データ記憶区段 412 テーブル索引データ記憶区段 441 指令バッファ 442 指令実行装置 4421 指令レジスタ 4422 指令緩衝実行装置 41 storage device 42 control device 43,48 data register 44 command buffer execution device 45 program counter 46 index register 47 multiplexer 411 command data storage section 412 table index data storage section 441 command buffer 442 command execution device 4421 command register 4422 command buffer Execution device

Claims (11)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 指令緩衝実行装置と、制御装置と、デー
タレジスタとを利用して記憶装置に記憶されたテーブル
索引データをデータレジスタに出力するテーブル索引方
法において、 (a)第1のタイミング周期において、前記指令緩衝実
行装置により予め記憶されたテーブル索引指令を実行し
てテーブル索引信号を発生させて出力した後、前記制御
装置によりこのテーブル索引信号に応じて、前記記憶装
置に記憶されたサブコマンドを前記指令緩衝実行装置に
出力し、 (b)第2のタイミング周期において、前記制御装置に
より使用禁止信号が発生して前記指令緩衝実行装置にお
ける前記サブコマンドをラッチした後、前記制御装置に
書込み指令が発生してこれを前記指令緩衝実行装置に出
力させることにより、前記指令緩衝実行装置に書込み信
号が発生して前記テーブルデータを前記データレジスタ
に出力するステップを備えてなる記憶装置のテーブル索
引方法。
1. A table indexing method for outputting table index data stored in a storage device to a data register using a command buffer execution device, a control device, and a data register, comprising: (a) a first timing period; In the above, after executing the table indexing command stored in advance by the command buffer executing device to generate and output the table indexing signal, the controller stores the sub index stored in the storage device in accordance with the table indexing signal. Outputting a command to the command buffer execution device; (b) in the second timing period, after the control device generates a use prohibition signal and latches the subcommand in the command buffer execution device, A write command is generated and output to the command buffer execution device, thereby writing the command buffer execution device. Table look method of a storage device which signal is generated consisting comprises a step of outputting the table data to the data register.
【請求項2】 前記記憶装置は指令データ記憶区段とテ
ーブル索引データ記憶区段とを備えてなり、前記ステッ
プ(a)におけるテーブル索引指令及びサブコマンドは
いずれも前記指令データ記憶区段に記憶され、前記テー
ブル索引データは前記索引データ記憶区段に記憶されて
おり、前記ステップ(a)の前には更に、 (c)前記制御装置はプログラム指令カウント値に応じ
て、前記指令データ記憶区段における前記テーブル索引
指令を前記指令緩衝実行装置に出力してこの指令緩衝実
行装置の実行に供する請求項1に記載の記憶装置のテー
ブル索引方法。
2. The storage device comprises a command data storage section and a table index data storage section, and both the table index command and the subcommand in the step (a) are stored in the command data storage section. The table index data is stored in the index data storage section, and before the step (a), further, (c) the control device controls the command data storage section in accordance with a program command count value. 2. The table indexing method for a storage device according to claim 1, wherein the table indexing command in a stage is output to the command buffer executing device and used for execution of the command buffer executing device.
【請求項3】 前記ステップ(b)はさらに、 (b1)前記制御装置により発生出力された使用禁止信号
を利用して、前記指令緩衝実行装置に位置するサブコマ
ンドをラッチし、 (b2)テーブル索引データの指標値に応じて前記記憶装
置におけるテーブル索引データをデータバスに出力し、 (b3)前記制御装置より前記書込み指令が発生して前記
指令緩衝実行装置に出力されることにより、該指令緩衝
実行装置をして前記書込み指令を実行せしめ、 (b4)前記指令緩衝実行装置より前記書込み信号を前記
データレジスタに出力することにより、前記データバス
に位置されたテーブル索引データが前記データレジスタ
に入力されるステップを備えてなり、前記ステップ(b
2)において、前記テーブル索引データの指標値により指
標値が指標レジスタに記憶される請求項1に記載の記憶
装置のテーブル索引方法。
Wherein said step (b) further, (b 1) by using the disable signal generated output by the controller latches the subcommand located at the command buffer execution device, (b 2 (B) outputting the table index data in the storage device to the data bus in accordance with the index value of the table index data, and (b 3 ) generating the write command from the control device and outputting it to the command buffer execution device. And causing the command buffer execution device to execute the write command. (B 4 ) By outputting the write signal from the command buffer execution device to the data register, the table index data located on the data bus is Inputting the data to the data register;
2. The table indexing method according to claim 1, wherein in step 2 ), an index value is stored in an index register based on the index value of the table index data.
【請求項4】 前記指令緩衝実行装置は指令バッファ
と、指令レジスタと、指令デコード実行装置とを備えて
なり、その中、前記指令バッファは前記使用禁止信号に
応じて前記サブコマンドをその内にラッチさせ、また、
前記指令レジスタは前記制御装置により発生し出力され
た書込指令を入力記憶し、そして前記指令デコード実行
装置は順次前記指令レジスタからの前記テーブル索引指
令、書込み指令及びサブコマンドをデコード実行する請
求項1に記載の記憶装置のテーブル索引方法。
4. The command buffer execution device includes a command buffer, a command register, and a command decode execution device, wherein the command buffer stores the subcommand in response to the use prohibition signal. Latch,
The command register inputs and stores a write command generated and output by the control device, and the command decode executing device sequentially decodes and executes the table index command, the write command, and the subcommand from the command register. 2. The table indexing method for a storage device according to claim 1.
【請求項5】 前記記憶装置は読出し専用記憶装置(R
OM)である請求項1に記載の記憶装置のテーブル索引
方法。
5. The storage device according to claim 1, wherein the storage device is a read-only storage device (R).
2. The table indexing method for a storage device according to claim 1, wherein the table index is OM).
【請求項6】 テーブル索引指令、サブコマンド及びテ
ーブル索引データを有し、指標アドレス制御信号に応じ
て前記テーブル索引指令、サブコマンド及びテーブル索
引データを順次出力する記憶装置と、前記記憶装置に電
気的に接続され、前記記憶装置から前記テーブル索引指
令及びサブコマンドが入力された後、前記テーブル索引
指令を実行する時にテーブル索引信号が発生する指令緩
衝実行装置と、前記指令緩衝実行装置及び記憶装置に電
気的に接続され、前記テーブル索引信号に応じて前記指
標アドレス制御信号が発生し出力されることにより、前
記記憶装置をして前記テーブルデータを出力せしめると
共に、使用禁止信号及び書込み指令が発生して前記指令
緩衝実行装置に出力され、前記指令緩衝実行装置をして
前記サブコマンドが入力された時にそのサブコマンドを
ラッチせしめ、同時に前記書込み指令に応じて発生した
書込み信号を出力する制御装置と、前記記憶装置及び指
令緩衝実行装置に電気的に接続され、前記書込み信号に
応じて前記記憶装置から前記テーブル索引データが入力
されるデータレジスタとを備えてなる記憶装置のテーブ
ル索引装置。
6. A storage device having a table index command, a subcommand, and table index data, and sequentially outputting the table index command, the subcommand, and the table index data in response to an index address control signal. A command buffer execution device that generates a table index signal when the table index command is executed after the table index command and the subcommand are input from the storage device, and the command buffer execution device and the storage device The index address control signal is generated and output in response to the table index signal, thereby causing the storage device to output the table data, and generating a use prohibition signal and a write command. Is output to the command buffer execution device, and the command is executed by the command buffer execution device. A control device that latches the subcommand when input, and simultaneously outputs a write signal generated according to the write command, and is electrically connected to the storage device and the command buffer execution device, and responds to the write signal. A data register to which the table index data is input from the storage device;
【請求項7】 前記記憶装置は読出し専用記憶装置(R
OM)である請求項6に記載の記憶装置のテーブル索引
装置。
7. The read-only storage device (R)
OM). The table indexing device for a storage device according to claim 6, wherein
【請求項8】 前記指令緩衝実行装置は、前記記憶装置
及び制御装置に電気的に接続され、順次前記記憶装置か
ら前記テーブル索引指令及びサブコマンドが入力される
と共に、前記サブコマンドが入力された時に前記使用禁
止信号に応じて前記サブコマンドをラッチする指令バッ
ファと、前記指令緩衝実行装置、制御装置及びデータレ
ジスタに電気的に接続され、前記テーブル索引指令を実
行する時に、前記テーブル信号が発生して前記制御装置
に出力されると共に、前記書込み指令を実行することに
より、前記書込み信号が発生して前記データレジスタに
出力される指令実行装置とを備えてなり、その中、前記
指令実行装置は、前記指令バッファ及び制御装置に電気
的に接続されることにより順次前記テーブル索引指令及
びサブコマンドを記憶すると共に、前記制御装置から前
記書込み指令が入力される指令レジスタと、前記指令レ
ジスタ及び制御装置に電気的に接続されることにより、
前記指令レジスタから入力された前記テーブル索引指令
及び前記書込み指令を実行することで、夫々前記テーブ
ル索引信号及び前記書込み信号が発生して前記制御装置
に出力される指令デコード実行装置とを備えてなる請求
項6に記載の記憶装置のテーブル索引装置。
8. The command buffer execution device is electrically connected to the storage device and the control device, and sequentially receives the table index command and the subcommand from the storage device and receives the subcommand. A command buffer that latches the subcommand in response to the use prohibition signal, and is electrically connected to the command buffer execution device, the control device, and the data register, and the table signal is generated when the table index command is executed. And a command execution device that generates the write signal and outputs the write signal to the data register by executing the write command. Is electrically connected to the command buffer and the control device to sequentially record the table index command and the subcommand. Remember, a command register to which the write command is input from the control device, and by being electrically connected to the command register and the control device,
A command decode execution device that generates the table index signal and the write signal and outputs the generated signal to the control device by executing the table index command and the write command input from the command register. A table indexing device for a storage device according to claim 6.
【請求項9】 前記記憶装置のテーブル索引装置はさら
に、前記テーブル索引指令及びサブコマンドを前記記憶
装置の記憶アドレスに記憶させるプログラムカウンタ
と、前記テーブル索引データを前記記憶装置の記憶アド
レスに記憶させる指標レジスタと、前記プログラムカウ
ンタ、指標レジスタ、制御装置及び記憶装置に電気的に
接続されることにより、前記制御装置より出力されたマ
ルチプレクサ制御信号に応じて、前記プログラムカウン
タ又は前記指標レジスタにおける内含値を順番に前記指
標アドレス制御信号として使用することで、前記テーブ
ル索引指令、サブコマンド及びテーブル索引データを順
番に前記記憶装置に出力するマルチプレクサとを備えて
なり、その中、前記制御装置は、前記テーブル索引信号
が入力されていない時に第1のマルチプレクサ制御状態
にある前記マルチプレクサ制御状態を出力して前記プロ
グラムカウンタの内含値を前記指標アドレス制御信号と
して使用することにより、前記記憶装置をして前記テー
ブル索引指令又は前記サブコマンドを出力せしめ、これ
に対し前記制御装置に前記テーブル索引信号が入力され
ている時は、前記マルチ制御信号が第2のマルチプレク
サ制御状態となって前記指標レジスタの内含値を前記指
標アドレス制御信号として使用することにより、前記記
憶をして前記テーブル索引データを出力せしめ、前記第
1及び第2のマルチプレクサ制御状態は夫々ハイレベル
及びローレベル状態であり、又はローレベル及びハイレ
ベル状態である請求項6に記載の記憶装置のテーブル索
引装置。
9. The table indexing device of the storage device further stores a program counter for storing the table index command and the subcommand at a storage address of the storage device, and stores the table index data at a storage address of the storage device. By being electrically connected to the index register and the program counter, the index register, the control device, and the storage device, an index register is included in the program counter or the index register according to a multiplexer control signal output from the control device. By using a value in order as the index address control signal, the table index command, a subcommand and a multiplexer for sequentially outputting the table index data to the storage device, wherein the control device, When the table index signal is not input Outputting the multiplexer control state in the first multiplexer control state and using the contents contained in the program counter as the index address control signal, thereby causing the storage device to execute the table index command or the subcommand. When the table index signal is input to the control device, the multi control signal enters the second multiplexer control state, and the content of the index register is changed to the index address control signal. The first and second multiplexer control states are a high level and a low level state, or are a low level and a high level state, respectively, by storing the data and outputting the table index data. Item 7. A table indexing device for a storage device according to Item 6.
【請求項10】 前記記憶装置のテーブル索引装置はさ
らに、前記記憶装置、指令緩衝実行装置、データレジス
タ及び制御装置に電気的に接続されることにより、前記
制御装置より出力されたデマルチプレクサ信号に応じて
前記テーブル索引指令及び次の指令を前記指令緩衝実行
装置に出力し、又は前記テーブル索引データを前記デー
タレジスタに出力するデマルチプレクサを備えてなり、
その中、前記制御装置は前記テーブル索引信号が入力さ
れていない時に第1のデマルチプレクサ制御状態にある
前記デマルチプレクサ制御信号を出力して、前記テーブ
ル索引指令及び次の指令を前記指令緩衝実行装置に出力
させ、これに対し、前記制御装置に前記テーブル索引デ
ータが入力されている時は、前記デマルチプレクサ信号
が第2のデマルチプレクサ制御状態となって前記テーブ
ル索引データを前記データレジスタに出力させ、前記第
1及び第2のデマルチプレクサ制御状態は夫々ハイレベ
ル及びロー状態であり、又はローレベル及びハイレベル
状態である請求項6に記載の記憶装置のテーブル索引装
置。
10. The table look-up device of the storage device is further electrically connected to the storage device, the command buffer execution device, the data register, and the control device so that a demultiplexer signal output from the control device can be obtained. And a demultiplexer that outputs the table index command and the next command to the command buffer execution device, or outputs the table index data to the data register,
The controller outputs the demultiplexer control signal in the first demultiplexer control state when the table index signal is not input, and outputs the table index command and the next command to the command buffer execution device. On the other hand, when the table index data is input to the control device, the demultiplexer signal enters the second demultiplexer control state, and the table index data is output to the data register. 7. The apparatus according to claim 6, wherein the first and second demultiplexer control states are a high level and a low level, or a low level and a high level, respectively.
【請求項11】 前記記憶装置は前記テーブル索引指令
及び次の指令を記憶する指令データ記憶区段と、前記テ
ーブル索引データを記憶するテーブル索引データ記憶区
段とを備えてなる請求項6に記載の記憶装置のテーブル
索引装置。
11. The storage device according to claim 6, wherein the storage device comprises a command data storage section for storing the table index command and the next command, and a table index data storage section for storing the table index data. Table indexing device for storage devices.
JP31567495A 1995-12-04 1995-12-04 Storage device table indexing method and indexing device Expired - Fee Related JP2764024B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP31567495A JP2764024B2 (en) 1995-12-04 1995-12-04 Storage device table indexing method and indexing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31567495A JP2764024B2 (en) 1995-12-04 1995-12-04 Storage device table indexing method and indexing device

Publications (2)

Publication Number Publication Date
JPH09160771A JPH09160771A (en) 1997-06-20
JP2764024B2 true JP2764024B2 (en) 1998-06-11

Family

ID=18068212

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31567495A Expired - Fee Related JP2764024B2 (en) 1995-12-04 1995-12-04 Storage device table indexing method and indexing device

Country Status (1)

Country Link
JP (1) JP2764024B2 (en)

Also Published As

Publication number Publication date
JPH09160771A (en) 1997-06-20

Similar Documents

Publication Publication Date Title
US20050198471A1 (en) Micro-controller for reading out compressed instruction code and program memory for compressing instruction code and storing therein
JP2764024B2 (en) Storage device table indexing method and indexing device
US5875323A (en) Processor using implicit register addressing
KR100230184B1 (en) Memory table look-up device and method
US5754806A (en) Memory table look-up device and method
JP3000857B2 (en) Programmable controller
JPH0795269B2 (en) Instruction code decoding device
KR20010106421A (en) A programmable controller
JP2973578B2 (en) Bit arithmetic processing unit
KR950003884B1 (en) Personal computer bus interface circuit
JP2563557Y2 (en) Bit arithmetic processing unit
JPH0713758A (en) Instruction decoding method
JP2000029508A (en) Programmable controller
KR100433515B1 (en) Input/output module dedicated static ram initialization apparatus and its method, in which an initialization operation is performed by only writing data to be initialized in addresses
JPH11163736A (en) Processor
KR0164118B1 (en) Lookup table control apparatus using lancam, method of lookup, connection setup, and connection cancelation using the former apparatus
JPS61161509A (en) System and device for operating high speed sequence
JPS63148305A (en) Quick arithmetic processing system for programmable sequence controller
JPH05289938A (en) Memory access device
JPS63299458A (en) Memory access circuit
JPH0319570B2 (en)
JPH0224748A (en) Address switching circuit
JPS62287323A (en) Microcomputer
JP2000284961A (en) Arithmetic processor
JPS63133243A (en) Data processor

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Year of fee payment: 10

Free format text: PAYMENT UNTIL: 20080327

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

Free format text: PAYMENT UNTIL: 20090327

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20090327

Year of fee payment: 11

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

Year of fee payment: 12

Free format text: PAYMENT UNTIL: 20100327

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

Year of fee payment: 12

Free format text: PAYMENT UNTIL: 20100327

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

Year of fee payment: 13

Free format text: PAYMENT UNTIL: 20110327

LAPS Cancellation because of no payment of annual fees