WO2002086652A1 - Processeur - Google Patents

Processeur Download PDF

Info

Publication number
WO2002086652A1
WO2002086652A1 PCT/JP2002/003930 JP0203930W WO02086652A1 WO 2002086652 A1 WO2002086652 A1 WO 2002086652A1 JP 0203930 W JP0203930 W JP 0203930W WO 02086652 A1 WO02086652 A1 WO 02086652A1
Authority
WO
WIPO (PCT)
Prior art keywords
instruction
definition
data
read
processor
Prior art date
Application number
PCT/JP2002/003930
Other languages
English (en)
French (fr)
Inventor
Koji Ozaki
Original Assignee
Sony Corporation
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 Sony Corporation filed Critical Sony Corporation
Publication of WO2002086652A1 publication Critical patent/WO2002086652A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30145Instruction analysis, e.g. decoding, instruction word fields

Definitions

  • the present invention relates to a processor, and more particularly to a processor capable of realizing an improvement in execution speed by dynamically changing an instruction system and reducing an amount of data of an instruction to be read.
  • microprocessors are used in all electronic devices, not just computers and mobile terminals. Each of these microprocessors has its own unique instruction system, and the program operates according to the read instructions by being created according to the instruction contents.
  • the instructions held by the microprocessor are fixed when the microprocessor is ready, fixed, and usually can not be changed.
  • microprocessors that can read special programs at startup and internally convert instructions into processor-specific instructions have been put to practical use. The change of this instruction is realized by reading a special program at startup, so the change of instruction is limited to only at startup.
  • the present invention has been made in view of these points, and by dynamically changing the instruction system by the program, the instructions of the program are simplified, the reading time of instruction data is shortened, and the execution speed is improved. It is an object of the present invention to provide a processor which can improve the program utilization between different processors of the processor while improving it. Disclosure of the invention
  • a processor including a control unit that acquires an instruction from an external memory and issues an instruction to a data path unit that performs an operation
  • one or more existing instructions are represented by different data.
  • Storage means for storing the definition information defined above, determination means for determining whether or not the acquired instruction is the defined instruction, and the storage means when it is determined that the acquired instruction is the defined instruction
  • instruction issuing means for issuing an instruction to the data path unit using data of definition information stored in the processor.
  • definition information in which a plurality of instructions are defined in one instruction is stored in the storage means, and if the acquired instruction is the defined instruction, the stored definition information data is stored. Used to issue instructions.
  • the definition information stored in the storage means can freely change the processor-specific instruction system according to the nature of the program by redefining frequently used instructions with a short data amount.
  • the redefined short data amount of instructions the data amount of the whole program can be reduced, and the instruction acquisition time can be shortened.
  • by defining multiple instructions into one instruction pipeline disturbances are reduced, and program execution is reduced. The line speed can be improved.
  • by using only the instruction defined instruction it is possible to eliminate the processor dependency of the program.
  • FIG. 1 is a schematic block diagram showing the configuration of the processor of the present invention
  • FIG. 2 is a flow chart showing the flow of instruction execution of the processor of the present invention.
  • FIG. 3 is a diagram showing an example of processor instructions and instructions in a program.
  • FIG. 4 shows an example of instructions in another processor's instruction and program.
  • FIG. 1 is a schematic block diagram showing the configuration of the processor of the present invention.
  • the processor 1 includes a control unit 2 that acquires an instruction and issues an instruction, a data path unit 3 that executes an operation according to the instruction, and an external bus interface unit that reads programs from the outside and outputs operation results. It consists of 4 and Outside the processor 1, a memory 6 is connected from an external bus interface unit 4 through an address bus 51 and a data bus 52.
  • the control unit 2 comprises an instruction decoder 21, an address generator 22 and an instruction issuer 23.
  • the processor according to the present invention further comprises one or more existing instructions, that is, processor specific.
  • An instruction definition storage memory 24 is provided to store instruction definition information defined by representing an instruction by different data.
  • the instruction decoder 21 decodes an instruction to create an internal control signal for instruction execution.
  • the address generator 22 generates an instruction execution address.
  • Instruction Issuer 23 determines whether the acquired instruction is the defined instruction, and in the case of the defined instruction, it refers to instruction definition storage memory 24 and defines it for instruction decoder 21 Issue an ordered instruction. If not, issue the instruction as it is.
  • the data path unit 3 is composed of an arithmetic unit 31 and a general purpose register 32.
  • the arithmetic unit 31 performs various operations in accordance with the instruction from the instruction decoder 21.
  • the general-purpose register 32 stores various data on the way of operation and the operation result.
  • the external bus interface unit 4 converts internal signals into external bus signals, and reads and writes data with the external memory, here, the memory 6.
  • the external memory 6 stores the instruction 6 1 and the data 6 2, and the external bus interface section 4 requests the address 6 1 or data 6 2 of the address requested via the address bus 5 1 Supply via bus 52.
  • FIG. 2 is a flow chart showing the flow of instruction execution of the processor of the present invention.
  • the processor 1 generates an address for the address generator 22 to obtain an instruction (step S 1).
  • the address generated by the address generator 22 is sent to the external bus interface unit 4 by the instruction issuing unit 23.
  • the memory 6 is accessed to read a predetermined amount of data including the specified address from the memory 6. (Step S 2).
  • step S 3 determines whether the instruction in the read data is an instruction definition execution instruction that executes the instruction definition (step S 3), and the instruction definition If the instruction is an execution instruction, new definition information of the instruction definition is stored in the instruction definition storage memory 24 (step S 4), and if it is not an instruction definition execution instruction, step S 4 is passed.
  • the instruction issuing unit 23 determines whether the instruction in the read data is the defined instruction (step S 5). Here, if the read instruction is not a defined instruction, the instruction issuing unit 23 directly passes the read instruction to the instruction decoder 21.
  • the instruction decoder 21 decodes the received instruction, generates an internal control signal (step S 6), and passes the internal control signal to the arithmetic unit 31 of the data path unit 3.
  • Arithmetic unit 31 of data path unit 3 requests instruction execution based on the internal control signal (step S7), writes the executed operation result back to general purpose register 32 (step S8), Complete the operation of the ream.
  • steps S1, S2, S6 to S8 are the same operations as those performed by the conventional processor.
  • step S5 If it is determined in step S5 that the read instruction is the defined instruction, the instruction issuing device 23 accesses the instruction definition storage memory 24 and reads the defined instruction therefrom (step S 9) Execute the operation using the defined instruction. That is, the instruction which has been defined is passed to the instruction decoder 21 by the instruction issue unit 23. The instruction is decoded there (step S10) and decoded in the arithmetic unit 31 of the data path unit 3. The instruction is executed (step S1 1), and the executed operation result is written back to the general purpose register 32 (step S 1 2).
  • step S 1 3 the processing of steps S9 to S12 is repeated, and if it has ended, the processing ends here.
  • an instruction possessed by the processor 1 and an instruction described in the program will be described by way of an example and comparing with the conventional case.
  • FIG. 3 is a diagram showing an example of processor instructions and instructions in a program.
  • processor 1 has instructions A, B and C.
  • the instructions in the conventional program are, as shown in the figure, programmed by combining the instructions possessed by processor 1
  • a unit of processing consisting of instructions in the order of “A, B, B” and “A, C, C” is described in combination.
  • an instruction is defined for each unit of processing.
  • the instruction “P” performs “A, B, B”
  • the instruction “Q” defines “A, C, (::”).
  • Processor 1 with A, B, and C can behave as if it has an instruction system such as “ABB” or “ACC”.
  • the instructions of the program according to the present invention may be instructions for each unit of processing such as "perform P" and "perform Q", the data amount of the instruction to be executed is reduced. Since the amount of instruction loading is small, the instruction loading time is shortened, leading to shortening of the execution time, and the capacity of the memory 6 for storing the program can be reduced.
  • an instruction stored in the cache stores "ABB” and "ACC” itself in the conventional program
  • the program according to the present invention stores the "ABB” and "ACC” itself.
  • the instruction P and the instruction Q are stored, the instruction itself becomes shorter and the cache can be effectively used.
  • the instructions P and Q defining three instructions respectively are indicated by codes respectively compressed by the Huffman code as shown in the column of "instruction code of the present invention".
  • all conventional instruction codes that are not Huffman-coded have the same bit length. Each instruction code is preceded by ": B '" to indicate that the numerical representation is binary.
  • the instruction issuing unit 23 for reading the defined instruction has a function of expanding the compressed data.
  • the 2 3 decompresses the read instruction and then passes it to the instruction decoder 2 1.
  • the code length of the instruction code of the instructions P and Q is made to depend on the appearance frequency of the instruction.
  • the code length of the instruction Q is shorter than the code length of the instruction P because the number of instructions Q in the instructions of the program is larger than the number of the instruction P.
  • FIG. 4 is a diagram showing an example of instructions of another processor and instructions of a program.
  • processor la has instructions D, E, F.
  • the instructions in the conventional program can be programmed by combining the instructions possessed by this processor 1a, and the programs are, for example, in the order of “D, E, E” and “D, F, F”. It is assumed that several units of processing consisting of are described in combination.
  • the program will have much more instruction execution than the instruction definition, and most of the same parts will be. Therefore, when it is desired to operate a program that was operating in processor 1 in processor 1 a, it is possible to operate only by changing the part of the instruction definition, so that the diversion of the program is greatly enhanced. .
  • all definition information is stored in the instruction definition storage memory 24.
  • all of the instruction definition storage memory 24 is stored. It may not be possible to enter.
  • definition information is input beyond the storage capacity of the instruction definition storage memory 24, the definition information used so far is temporarily saved in the external memory, and when necessary, the instruction definition storage is stored. It may be possible to write back to the memory 24.
  • the instruction issuing device 23 monitors the free space of the instruction definition storage memory 24 and the data amount of the newly read definition information, and the definition information newly read into the instruction definition storage memory 24 is If the stored definition information can not be stored, the stored definition information is moved to an external memory, for example, memory 6, or, if necessary, the saved definition information is saved from memory 6 to the instruction definition storage memory 24.
  • the definition information stored in the instruction definition storage memory 24 is compressed by the Huffman code.
  • an arithmetic code is used as the compression code. May be In the above embodiment, the code length of the instruction code of the instructions P and Q in the execution part of the program is made to depend on the appearance frequency of the instruction, but the code length depends on the execution frequency. It may be in the form of
  • the configuration of the processor according to the present invention is not limited to a single processor, but can be applied similarly to a microprocessor including its peripheral processing function, a microcontroller incorporating a program, and the like.
  • the processing contents of the functions that the processor should have as shown in FIG. 2 are described in a program recorded on a processor readable recording medium, for example, R * M (Read On Memory). be able to.
  • R * M Read On Memory
  • the instructions 6 1 and the data 6 2 in the memory 6 are the programs stored in the storage device in the device in which the processor 1 is installed, or the programs transferred from the storage device of another device through the network. It can be done.
  • the present invention includes storage means for storing definition information in which one or more existing instructions are expressed by different data, and in the case of an instruction for which the acquired instruction is defined, the storage means And configured to issue an instruction using definition information data.
  • the storage means In this way, a plurality of frequently used instructions are defined in short data amount and stored in the storage means, and the instruction of the program uses the instructions stored and stored, the data amount of the whole program Can reduce the time to read instruction data.
  • the instruction data amount can be further reduced by changing the instruction definition when the processing nature of the task program changes.
  • the pipeline is disrupted due to re-fetching and the like, and the amount of instruction data decreases, and the execution speed is increased. It can be improved.
  • a program that can be executed by a processor can be divided into an instruction definition part and a program body, and rewriting only the instruction definition part can eliminate the processor set dependency of the program, and change the instruction definition part. It will be executable on other processors.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Executing Machine-Instructions (AREA)

Description

明細 : プロセッサ 技術分野
本発明はプロセッサに関し、 特に命令体系を動的に変更し、 読み込む 命令のデータ量を削減することにより、 実行速度の向上を実現すること ができるプロセッサに関する。 背景技術
現在、 コンピュータや携帯端末はもとより、 あらゆる電子機器におい てマイクロプロセッサが用いられている。 このようなマイクロプロセッ サは、 それぞれ固有の命令体系を持っており、 プログラムもその命令内 容に合わせて作成されることで読み込んだ命令に従って動作する。 マイ クロプロセッサが持っている命令は、 マイクロプロセッサができた時点 で決まっており、 固定されていて、 通常は変更することができない。 また、 最近では、 起動時に特殊なプログラムを読み込み、 命令をプロ セッサ固有の命令に内部で変換できるマイクロプロセッサが実用化され ている。 この命令の変更は、 起動時に特殊なプログラムを読み込むこと により実現しているため、 命令の変更は起動時のみに限られる。
従来のプロセッサでは、 プログラムによらず命令体系が一定のため、 性質のまったく異なるプログラムを切り替えて使用する場合に、 ある命 令体系のプロセッサでほ 1つまたは少ない命令で演算実行が可能であつ ても、 別の命令体系のプロセッサでは多くの命令が必要であったりする ことがあり、 後者の場合には、 読み込む命令のデータ量が多くなるため 命令の読み込みに時間を取られ、 実行速度があがらないという問題があ つた。
本発明はこのような点に鑑みてなされたものであり、 プログラムによ つて命令体系を動的に変更することで、 プログラムの命令を簡素化し、 命令データの読み込み時間を短縮して実行速度を向上するとともに、 ァ ーキテクチヤの異なるプロセッサ間でのプログラムの流用度を向上させ ることができるプロセッサを提供することを目的とする。 発明の開示
本発明によれば、 外部メモリから命令を取得し、 演算を行うデ一タパ ス部に対して命令の発行を行う制御部を備えたプロセッサにおいて、 一 つ以上の既存の命令を異なるデータで表現して定義した定義情報を記憶 する記憶手段と、 取得した命令が定義された命令か否かを判断する判断 手段と、 前記取得した命令が定義された命令と判断された場合に前記記 憶手段に記憶された定義情報のデータを用いて前記データパス部に命令 を発行する命令発行手段と、 を備えることを特徴とするプロセッサが提 供される。
上記構成によれば、 記憶手段に複数の命令を一つの命令に定義した定 義情報を記憶しておき、 取得した命令が定義された命令である場合には, 記憶された定義情報のデータを用いて命令を発行するように構成した。 記憶手段に記憶される定義情報は、 よく使用する命令を短データ量で再 定義することで、 プロセッサ固有の命令体系をプログラムの性質に応じ て自由に変更できる。 これにより、 再定義した短データ量の命令を使用 することにより、 プログラム全体のデータ量を少なくすることができ、 命令の取得時間を短縮することができる。 また、 複数の命令を一つの命 令に定義することによりパイプラインの乱れが減少し、 プログラムの実 行速度を向上させることができる。 また、 命令定義された命令のみを使 用することで、 プログラムのプロセッサ依存をなくすことができる。 図面の簡単な説明
第 1図は、 本発明のプロセッサの構成を示した概略ブロック図である, 第 2図は、 本発明のプロセッサの命令実行の流れを示すフローチヤ一 トである。
第 3図は、 プロセッサの命令およびプログラムでの命令の例を示す図 である。
第 4図は、 別のプロセッサの命令およびプログラムでの命令の例を示 す図である。 発明を実施するための最良の形態
以下、 本発明の実施の形態を図面を参照して説明する。
第 1図は本発明のプロセッサの構成を示した概略プロック図である。 プロセッサ 1は、 命令の取得と命令の発行とを行う制御部 2と、 命令 に従って演算を実行するデータパス部 3と、 外部からプログラムなどを 読み込んだり演算結果を出力するための外部バスィンタフェース部 4と から構成される。 このプロセッサ 1の外には、 外部バスインタフエ一ス 部 4からアドレスバス 5 1およびデータバス 5 2を介してメモリ 6が接 続されている。
制御部 2は、 命令デコ一ダ 2 1と、 アドレス生成器 2 2と、 命令発行 器 2 3とから構成され、 本発明のプロセッサでは、 さらに、 一つ以上の 既存の命令、 すなわちプロセッサ固有の命令を異なるデ一夕で表現して 定義した命令の定義情報を記憶する命令定義格納メモリ 2 4を備えてい る。 命令デコーダ 2 1は、 命令のデコードを行い、 命令実行のための内部 の制御信号を作成する。 アドレス生成器 2 2は、 命令の実行アドレスを 生成する。 命令発行器 2 3は、 取得した命令が定義された命令か否かを 判断し、 定義された命令の場合は、 命令定義格納メモリ 2 4を参照し、 命令デコ一ダ 2 1に対して定義された命令を発行する。 そうでないとき はそのままその命令を発行する。
データパス部 3は、 演算器 3 1と汎用レジス夕 3 2とから構成されて いる。 演算器 3 1は、 命令デコーダ 2 1からの命令に従って各種演算を 行い、 汎用レジスタ 3 2は、 演算途中および演算結果の各種データを格 納する。
外部バスィンタフェース部 4は、 内部の信号を外部のバス信号に変 し、 外部、 ここではメモリ 6とのデータの読み書きを行う。 外部のメモ リ 6は、 命令 6 1とデータ 6 2とを格納しており、 外部バスィン夕フエ —ス部 4がァドレスバス 5 1を介して要求するァドレスの命令 6 1また はデータ 6 2をデータバス 5 2を介して供給する。
以上の構成のプロセッサ 1において、 その命令実行の流れをフローチ ヤートに基づいて説明する。
第 2図は本発明のプロセッサの命令実行の流れを示すフローチャート である。
まず、 プロセッサ 1は、 アドレス生成器 2 2が命令を取得するための アドレスを生成する (ステップ S 1 ) 。 アドレス生成器 2 2によって生 成されたアドレスは、 命令発行器 2 3によって外部バスイン夕フェース 部 4に出され、 それに基づきメモリ 6にアクセスしてメモリ 6から指定 アドレスを含む所定量のデータを読み込む (ステップ S 2 ) 。
次に、 命令発行器 2 3は、 読み込んだデータ中の命令が命令定義を実 行する命令定義実行命令かどうかを判断し (ステップ S 3 ) 、 命令定義 実行命令のときには、 命令定義の新たな定義情報を命令定義格納メモリ 2 4へ格納し (ステップ S 4 ) 、 命令定義実行命令でなければ、 ステツ プ S 4をパスする。
次に、 命令発行器 2 3は、 読み込んだデータ中の命令が定義された命 令かどうかを判断する (ステップ S 5 ) 。 ここで、 読み込んだ命令が定 義された命令でなければ、 命令発行器 2 3は、 読み込んだ命令をそのま ま命令デコーダ 2 1に渡す。 命令デコーダ 2 1は、 渡された命令をデコ ードして、 内部の制御信号を生成し (ステップ S 6 ) 、 データパス部 3 の演算器 3 1にその内部の制御信号を渡す。 データパス部 3の演算器 3 1は、 内部の制御信号に基づき命令の実行を佇い (ステップ S 7 ) 、 実 行した演算結果を汎用レジスタ 3 2に書き戻して (ステップ S 8 ) 、 一 連の動作を完了する。 ちなみに、 上記の動作の中で、 ステップ S l, S 2 , S 6〜S 8については、 従来のプロセッサが行っていた動作と同じ 動作である。
ステップ S 5の判断において、 読み込んだ命令が定義された命令であ る場合には、 命令発行器 2 3は、 命令定義格納メモリ 2 4にアクセスし て、 そこから定義された命令を読み込み (ステップ S 9 ) 、 その定義さ れた命令を使って演算を実行する。 すなわち、 その定義された命令は、 命令発行器 2 3によって命令デコーダ 2 1に渡され、 そこでデコードさ れ (ステップ S 1 0 ) 、 データパス部 3の演算器 3 1において、 デコ一 ドされた命令の実行を行い (ステップ S 1 1 ) 、 実行した演算結果を汎 用レジスタ 3 2に書き戻す (ステップ S 1 2 ) 。 そして、 定義された命 令の場合は複数の命令が定義されている場合があるので、 命令定義が終 了したかどうかが判断され (ステップ S 1 3 ) 、 終了していない場合に は、 ステップ S 9に戻ってステップ S 9〜S 1 2の処理を繰り返し、 終 了していれば、 ここで終了となる。 次に、 プロセッサ 1が持っている命令とプログラムに記述される命令 とについて、 その例を挙げて従来の場合と比較しながら説明する。
第 3図はプロセッサの命令およびプログラムでの命令の例を示す図で ある。
ここで、 プロセッサ 1は、 A, B , Cという命令を持っているとする 従来のプログラムでの命令は、 図示のように、 プロセッサ 1が持ってい る命令を組み合わせてプログラムができていて、 そのプログラムがたと えば 「A, B , B」 と 「A , C, C」 という順番の命令からなる処理の 単位がいくつか組み合わされて記述されていたとする。
このような場合、 本発明でのプログラムの命令では、 まず、 処理の単 位ごとに命令定義を行う。 図示の例では、 「P」 という命令は、 「A , B , B」 を行う、 「Q」 という命令は、 「A, C , (:」 を行う、 と定義 している。 これにより、 命令 A, B, Cを持つプロセッサ 1は、 あたか も、 「A B B」 とか 「A C C」 という命令体系を持っているかのように 振る舞うことができる。
したがって、 本発明でのプログラムの命令は、 「Pを行う」 、 「Qを 行う」 といった処理の単位ごとの命令で済むため、 実行する部分の命令 のデータ量が少なくなる。 読み込む命令のデ一夕量が少ないため、 命令 の読み込み時間が短くなり、 実行時間の短縮に繋がるとともに、 プログ ラムを格納しておくメモリ 6の容量を小さくすることができる。
また、 図示はしないが、 キャッシュを搭載したプロセッサでは、 キヤ ッシュに格納される命令は、 従来のプログラムでは、 「A B B」 および 「A C C」 自体を格納してしまうのに対し、 本発明でのプログラムの場 合には、 命令 Pおよび命令 Qを格納するため、 命令自身も短くなり、 キ ャッシュの有効利用にもなる。 さらに、 図示の例ではそれぞれ 3つの命令を定義した命令 P、 Qは、 「本発明の命令コード」 の欄に示したように、 ハフマン符号でそれぞれ 圧縮されたコードで示している。 これに対し、 ハフマン符号化されてい ない従来の命令コードは、 すべてビット長が同じになっている。 なお、 各命令コードは、 先頭に 「: B ' 」 を付して数値の表記が 2進数であるこ とを示している。
このように、 命令の定義情報が圧縮されて格納されている場合、 この 定義された命令を読み込む命令発行器 2 3には、 圧縮されたデータを伸 長する機能を備えており、 命令発行器 2 3は、 読み込んだ命令を伸長し てから命令デコーダ 2 1に渡すことになる。
また、 本発明でのプログラムでは、 定義部分の後に記述される実行部 分において、 命令 P、 Qの命令コードの符号長を命令の出現頻度に依存 するようにしている。 図示の例では、 プログラムの命令の中で命令 Qの 数が命令 Pの数よりも多いため、 命令 Qの符号長は命令 Pの符号長より も短くなつている。
第 4図は別のプロセッサの命令およびプログラムでの命令の例を示す 図である。
ここで、 プロセッサ l aは、 D, E , Fという命令を持っているとす る。 従来のプログラムでの命令は、 このプロセッサ 1 aが持っている命 令を組み合わせてプログラムができていて、 そのプログラムがたとえば 「D, E , E」 と 「D , F , F」 という順番の命令からなる処理の単位 がいくつか組み合わせて記述されていたとする。
このプロセッサ 1 aのためのプログラムの場合、 第 3図に示したプロ グラムと比較して、 従来プログラムでの命令はまったく同様の部分がな いことが分かる。 しかし、 プロセッサ 1およびプロセッサ 1 aの本発明 でのプログラムの欄を比較すると分かるように、 命令の定義部分以外は まったく同じである。 このように、 プログラムを定義部分と実行部分と を分けた構成にしたことで、 定義部分だけを書き替えることによって、 別のプロセッサ 1 aで動作するプログラムを作ることができる。 したが つて、 プロセッサ 1用のプログラムをプロセッサ 1 a用のものに移植す る際には、 基本的には定義部分の変更だけで済むことになる。
しかも、 例に挙げたプログラムのように非常に単純なものでない場合 には、 プログラムは、 命令の定義より命令実行が圧倒的に多くなり、 同 じ部分がほとんどとなる。 よって、 プロセッサ 1で動作していたプログ ラムをプロセッサ 1 aで動作させたい場合、 命令定義の部分を変更する だけで、 動作をさせることができるようになるため、 プログラムの流用 性が大幅に高まる。
なお、 上記の実施の形態では、 すべての定義情報を命令定義格納メモ リ 2 4に格納するようにしたが、 たとえばタスクあるいは命令の体系が 変わったときに、 この命令定義格納メモリ 2 4に全部入り切らない場合 がある。 定義情報が命令定義格納メモリ 2 4の記憶容量を越えて入力さ れるような場合には、 今まで使っていた定義情報を一旦外部のメモリに 待避しておき、 必要なときに、 命令定義格納メモリ 2 4に書き戻すよう にしてもよい。 この場合、 たとえば命令発行器 2 3が命令定義格納メモ リ 2 4の空き容量および新たに読み込んだ定義情報のデータ量を監視し ていて、 命令定義格納メモリ 2 4に新たに読み込んだ定義情報を格納で きない場合に、 格納されていた定義情報を外部のメモリ、 たとえばメモ リ 6に移動したり、 あるいは、 必要時に、 待避していた定義情報をメモ リ 6から命令定義格納メモリ 2 4に移し替えたり.するようにしてもよい また、 上記の実施の形態では、 命令定義格納メモリ 2 4に格納される 定義情報をハフマン符号で圧縮した例を示したが、 圧縮符号として算術 符号を用いてもよい。 また、 上記の実施の形態では、 プログラムの実行部分にある命令 P、 Qの命令コ一ドの符号長を命令の出現頻度に依存するようにしたが、 そ の符号長は、 実行頻度に依存した形にしてもよい。
さらに、 本発明によるプロセッサの構成は、 プロセッサ単体に限定さ れるものではなく、 その周辺処理機能を含んだマイクロプロセッサ、 プ ログラムを内蔵したマイクロコントローラなどにも同じように適用する ことができる。
また、 第 2図に示すようなプロセッサが有すべき機能の処理内容は、 プロセッサで読み取り可能な記録媒体、 たとえば R〇M (Re a d On l y Memo r y)に記録されたプログラムに記述させておくことができる。 この プログラムをプロセッサで実行することにより、 上記処理がプロセッサ で実現できる。 なお、 メモリ 6内の命令 6 1およびデ一夕 6 2について は、 このプロセッサ 1が搭載された装置内の記憶装置に格納されている プログラムあるいはネットワークを通じて他の装置の記憶装置から転送 されたプログラムとすることができる。
以上説明したように本発明では、 一つ以上の既存の命令を異なるデー 夕で表現して定義した定義情報を記憶する記憶手段を備え、 取得した命 令が定義された命令の場合に記憶手段を参照し、 定義情報のデータを用 いて命令を発行するように構成にした。 これにより、 よく使用する複数 の命令を短データ量で定義して記憶手段に記憶しておき、 プログラムの 命令には、 その定義して記憶した命令を使用することにより、 プロダラ ム全体のデータ量を少なくすることができ、 命令データの読み込み時間 を短縮することができるようになる。
また、 プログラムにより各命令の使用頻度は異なるため、 タスクゃプ ログラムの処理の性質が変化した時点で、 命令定義を変更することによ り、 より命令データ量を減少させることができる。 また、 従来、 複数命令を共通化するため分岐して行っていた処理を一 つの命令に定義することにより、 フェッチのやり直しなどによるパイプ ラインの乱れと、 命令のデータ量が減少し、 実行速度を向上することが できる。
また、 プロセッサで実行可能なプログラムは、 命令定義部とプロダラ ム本体とに分け、 命令定義部のみを書き替えることで、 プログラムのプ 口セッサ依存を解消することができ、 命令定義部を変更するだけで他の プロセッサで実行可能となる。

Claims

請求の範囲
1 . 外部メモリから命令を取得し、 演算を行うデータパス部に対して 命令の発行を行う制御部を備えたプロセッサにおいて、
一つ以上の既存の命令を異なるデータで表現して定義した定義情報を 記憶する記憶手段と、
取得した命令が定義された命令か否かを判断する判断手段と、 前記取得した命令が定義された命令と判断された場合に前記記憶手段 に記憶された定義情報のデータを用いて前記データパス部に命令を発行 する命令発行手段と、
を備えることを特徴とするプロセッサ。
2 . 命令を読み込むアドレスを生成するアドレス生成器、 生成された 指定ァドレスを含むデータを読み込んで命令を発行する命令発行器およ び発行された命令をデコードする命令デコーダを有する制御部と、 前記 命令デコーダから発行された命令に基づいて命令を実行するデータパス 部とを備えたプロセッサにおいて、
前記制御部に、 一つ以上の既存の命令を異なるデータで表現して定義 した命令の定義情報を記憶する命令定義格納メモリを有し、
前記命令発行器は、 読み込んだデータ中の命令が定義された命令か否 かを判断し、 定義された命令の場合には前記命令定義格納メモリに記憶 された前記定義情報のデータ中の命令を用い、 読み込んだデータ中の命 令が定義された命令でない場合には読み込んだデータ中の命令を用いて 命令を発行する機能を有していることを特徴とするプロセッサ。
3 . 前記命令発行器は、 読み込んだデータ中の命令が命令定義を実行 する命令定義実行命令の場合に、 前記命令定義の新たな定義情報を前記 命令定義格納メモリに格納する格納機能を有することを特徴とする請求 の範囲第 1項記載のプロセッサ。
4 . 前記命令定義格納メモリに記憶される定義情報のデータは圧縮符 号であり、 前記命令発行器は定義情報のデータを伸長するデータ伸長機 能を有していることを特徴とする請求の範囲第 2項記載のプロセッサ。
5 . 前記圧縮符号は、 ハフマン符号または算術符号であることを特徴 とする請求の範囲第 4項記載のプロセッサ。
6 . 前記定義された命令に対する実行命令は、 符号長がプログラムで の出現頻度または実行頻度に依存することを特徴とする請求の範囲第 3 項記載のプロセッサ。
7 . 前記命令発行器は、 前記命令定義格納メモリから前記命令の定義 情報を前記プロセッサの外部に読み出したり、 前記プロセッサの外部か ら前記命令の定義情報を前記命令定義格納メモリに書き込む機能を有し ていることを特徴とする請求の範囲第 2項記載のプロセッサ。
8 . 命令に従って動作を行うプロセッサの動作方法において、
命令を読み込むァドレスを生成し、
生成された指定ァドレスを含むデータを読み込み、
読み込んだデータ中の命令が命令定義を実行する命令定義実行命令か 否かを判断し、
読み込んだデータ中の命令が前記命令定義実行命令のときには一つ以 上の既存の命令を異なるデータで表現して定義した定義情報を記憶し、 読み込んだデ一夕中の命令が定義した命令か否かを判断し、 読み込んだデータ中の命令が定義された命令の場合に記憶された前記 定義情報のデータ中の命令を用い、 読み込んだ命令が定義された命令で ない場合には読み込んだ命令を用いて演算実行の命令を発行する、 ようにしたことを特徴とするプロセッサの動作方法。
9 . プロセッサに、 命令を読み込むアドレスを生成し、 生成された指 定ァドレスを含むデータを読み込み、 読み込んだデータ中?)命令が命令 定義を実行する命令定義実行命令か否かを判断し、 読み込んだデ一夕中 の命令が前記命令定義実行命令のときには一つ以^:の既存の命令を異な るデ一夕で表現して定義した定義情報を記憶し、 読み込んだデ一夕中の 命令が定義した命令か否かを判断し、 読み込んだデ一夕中の命令が定義 された命令の場合に記憶された前記定義情報のデータ中の命令を用い、 読み込んだ命令が定義された命令でない場合には読み込んだ命令を用い て演算実行の命令を発行する手順を実行させるためのプログラムを記録 したプロセッサ読み取り可能な記録媒体。
1 0 . プロセッサに、 命令を読み込むアドレスを生成し、 生成された 指定ァドレスを含むデータを読み込み、 読み込んだデータ中の命令が命 令定義を実行する命令定義実行命令か否かを判断し、 読み込んだデータ 中の命令が前記命令定義実行命令のときには一つ以上の既存の命令を異 なるデータで表現して定義した定義情報を記憶し、 読み込んだデータ中 の命令が定義した命令か否かを判断し、 読み込んだデータ中の命令が定 義された命令の場合に記憶された前記定義情報のデ一夕中の命令を用い 読み込んだ命令が定義された命令でない場合には読み込んだ命令を用い て演算実行の命令を発行する手順を実行させるためのプログラム。
PCT/JP2002/003930 2001-04-19 2002-04-19 Processeur WO2002086652A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2001121308A JP2002318686A (ja) 2001-04-19 2001-04-19 プロセッサ
JP2001-121308 2001-04-19

Publications (1)

Publication Number Publication Date
WO2002086652A1 true WO2002086652A1 (fr) 2002-10-31

Family

ID=18971211

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2002/003930 WO2002086652A1 (fr) 2001-04-19 2002-04-19 Processeur

Country Status (2)

Country Link
JP (1) JP2002318686A (ja)
WO (1) WO2002086652A1 (ja)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4761808B2 (ja) * 2005-04-11 2011-08-31 株式会社東芝 マイクロプロセッサおよびその制御方法
JP4962476B2 (ja) * 2008-11-28 2012-06-27 ソニー株式会社 算術復号装置
JP5965262B2 (ja) * 2012-09-12 2016-08-03 株式会社日立情報通信エンジニアリング マイクロプロセッサ及びプログラムのコンパイル処理方法
US9672041B2 (en) 2013-08-01 2017-06-06 Andes Technology Corporation Method for compressing variable-length instructions including PC-relative instructions and processor for executing compressed instructions using an instruction table

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01276233A (ja) * 1988-04-27 1989-11-06 Nec Corp マイクロプロセッサ
JPH04370832A (ja) * 1991-06-19 1992-12-24 Nec Corp プロセッサ回路
JPH08194614A (ja) * 1995-01-19 1996-07-30 Nec Corp マイクロコンピュータ
US5632024A (en) * 1993-06-08 1997-05-20 Hitachi, Ltd. Microcomputer executing compressed program and generating compressed branch addresses
US6158046A (en) * 1996-02-22 2000-12-05 Sharp Kabushiki Kaisha Computer device and method for processing data utilizing pseudoinstruction words

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01276233A (ja) * 1988-04-27 1989-11-06 Nec Corp マイクロプロセッサ
JPH04370832A (ja) * 1991-06-19 1992-12-24 Nec Corp プロセッサ回路
US5632024A (en) * 1993-06-08 1997-05-20 Hitachi, Ltd. Microcomputer executing compressed program and generating compressed branch addresses
JPH08194614A (ja) * 1995-01-19 1996-07-30 Nec Corp マイクロコンピュータ
US6158046A (en) * 1996-02-22 2000-12-05 Sharp Kabushiki Kaisha Computer device and method for processing data utilizing pseudoinstruction words

Also Published As

Publication number Publication date
JP2002318686A (ja) 2002-10-31

Similar Documents

Publication Publication Date Title
CN102033734B (zh) 数据处理引擎
JP6069031B2 (ja) 計算機及びメモリ管理方法
US20030033504A1 (en) Micro-controller for reading out compressed instruction code and program memory for compressing instruction code and storing therein
US6700582B2 (en) Method and system for buffer management
WO2002086652A1 (fr) Processeur
JP3935873B2 (ja) プリフェッチ・バッファを用いたメモリ電力管理
KR20020032136A (ko) 메모리를 이용한 대용량 보조기억장치
US6393498B1 (en) System for reducing processor workloads with memory remapping techniques
CN116149554A (zh) 一种基于risc-v及其扩展指令的数据存储处理系统及其方法
JP4471947B2 (ja) データ処理装置及びデータ処理方法
CN105404591A (zh) 处理器系统及其存储器控制方法
CN104424124A (zh) 内存装置、电子设备和用于控制内存装置的方法
JP2000207203A (ja) マイクロコントロ―ラ
JP4826873B2 (ja) ホットルーチンメモリを有するマイクロプロセッサシステム
US20230401060A1 (en) Processing unit, computing device and instruction processing method
JPH06161842A (ja) 外部記憶装置およびこれを用いたコンピュータ
JP4667717B2 (ja) 固定幅命令エンコード内のプロセッサ操作の拡張された機能性
JPH08255034A (ja) 低消費電力型データ処理装置
JPS6125168B2 (ja)
JP2000285019A (ja) キャッシュ制御回路
JP3076199B2 (ja) バッファアクセス制御回路
JP2003196087A (ja) マイクロコントローラのメモリアドレッシング方法及びページマッピング装置
JP2819753B2 (ja) パイプライン・マイクロプロセッサ
JP2000163264A (ja) Cpu用のプログラム記憶装置
JPH0816406A (ja) プログラム格納方法

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): KR US

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE TR

121 Ep: the epo has been informed by wipo that ep was designated in this application
122 Ep: pct application non-entry in european phase