JPH07129398A - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JPH07129398A
JPH07129398A JP5293950A JP29395093A JPH07129398A JP H07129398 A JPH07129398 A JP H07129398A JP 5293950 A JP5293950 A JP 5293950A JP 29395093 A JP29395093 A JP 29395093A JP H07129398 A JPH07129398 A JP H07129398A
Authority
JP
Japan
Prior art keywords
instruction
immediate
data
code
bus width
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.)
Pending
Application number
JP5293950A
Other languages
Japanese (ja)
Inventor
Tadashi Kamata
忠 鎌田
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.)
Denso Corp
Original Assignee
NipponDenso Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NipponDenso Co Ltd filed Critical NipponDenso Co Ltd
Priority to JP5293950A priority Critical patent/JPH07129398A/en
Publication of JPH07129398A publication Critical patent/JPH07129398A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To provide a microprocessor immediate inputting means capable of attaining compact constitution reducing the number of codes without changing bus width. CONSTITUTION:In a microprocessor(MPU) attaining an MPU immediate inputting means, an instruction buffer 2 is connected to an instruction storing means 1 and a selector 9 is connected to the most significant bit(MSB) of the buffer 2. When immediate data having constitution whose bits are less than the bus width only by one bit are judged by a selector based upon one remaining bit, data in the buffer 2 are directly transferred to a control mechanism 8 in a data bus 5. In this constitution, a memory is reduced and processing time is also shortened. When immediate data for the bus width are required, an instruction word for recovering the bus width is added, so that the added contents can be processed by the number of codes and processing time similar to a conventional case.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、電子制御等に使用され
るマイクロプロセッサに関し、命令記憶部から定数を即
値として演算器に導入する即値導入機構を有するマイク
ロプロセッサに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microprocessor used for electronic control or the like, and more particularly to a microprocessor having an immediate value introduction mechanism for introducing a constant from an instruction storage unit into an arithmetic unit as an immediate value.

【0002】[0002]

【従来の技術】従来、マイクロプロセッサにおいて、演
算用のバス幅と同一の幅を持つ即値データの取扱いは、
図4に示すように、演算用バスの2倍の命令語長の命令
セット(あるいは即値データが二つ必要な場合は3倍の
命令語長の命令セット)により行われるのが一般的で、
前半のバス幅の命令コード+バス幅の即値データという
構成となり、必要な即値データの2倍もしくは3倍の語
長となる。例えば2倍の命令語長の場合、8ビット=1
バイトのバス幅では2バイト=1ワードが1命令セット
となる。そのため、バス幅の即値データを多用するプロ
グラムではコード量が増大する。即値データの取扱いは
この命令語セットによるので、バス幅より少し桁の少な
い即値データでも2倍のコード量を必要とする。なお、
バス幅より十分小さい桁の即値に対しては、1コードの
前半を命令語として後半を即値領域とした命令コードが
あるので問題とはならない。このため、バス幅を大きく
することで、即値データばかりか命令語も豊富となるの
で、自然な開発展開として多ビットバスのマイクロプロ
セッサの設計が手がけられ、演算のバス幅は8ビットか
ら16ビット、32ビット、64ビットと倍々になり機
能が充実している。勿論この開発は、複雑な周辺回路や
設計を必要とし、簡単に実施はできない。
2. Description of the Related Art Conventionally, in a microprocessor, the handling of immediate data having the same width as the bus width for operation is
As shown in FIG. 4, it is generally performed by an instruction set having an instruction word length twice that of the operation bus (or an instruction set having an instruction word length three times when two immediate data are required).
The first half of the bus width has an instruction code + the immediate data of the bus width, and the word length is twice or three times the required immediate data. For example, if the instruction word length is double, 8 bits = 1
In the bus width of bytes, 2 bytes = 1 word is 1 instruction set. Therefore, the code amount increases in a program that uses a large amount of immediate data of the bus width. Since the immediate data is handled by this instruction word set, even the immediate data having a few digits smaller than the bus width requires a double code amount. In addition,
Since there is an instruction code in which the first half of one code is the instruction word and the latter half is the immediate value area, there is no problem for the immediate value of a digit sufficiently smaller than the bus width. Therefore, by increasing the bus width, not only immediate data but also instruction words are abundant, and as a natural development development, a multi-bit bus microprocessor can be designed, and the operation bus width is from 8 bits to 16 bits. , 32 bits, 64 bits, and the functions are enhanced. Of course, this development requires complicated peripheral circuits and designs and cannot be easily implemented.

【0003】そこまでハードウエア的に機能を向上させ
なくとも、特開昭56-85159号公報に提案されているよう
に、バス幅に1ビットか2ビットの付加的語長を追加す
る提案がある。これは例えば、8ビット・バス構成なら
ば、9もしくは10ビット目のバスラインを付加した構
成にして、付加したビットに即値データを示す値をセッ
トし、即値であればそのデータが即アキュムレータへ転
送されるものである。そのため即値データを転送するた
めの命令コードをセットする必要がない。それで同一バ
ス幅の即値データに着目すれば、この場合もコード量を
抑えるのに効果がある。
There is a proposal to add an additional word length of 1 bit or 2 bits to the bus width, as proposed in Japanese Patent Application Laid-Open No. 56-85159, even if the function is not improved so much by hardware. is there. For example, in the case of an 8-bit bus configuration, the configuration is such that a bus line of the 9th or 10th bit is added, a value indicating immediate data is set in the added bit, and if it is an immediate value, that data is immediately sent to the accumulator. It is what is transferred. Therefore, it is not necessary to set the instruction code for transferring the immediate data. Therefore, if attention is paid to the immediate data having the same bus width, it is effective in suppressing the code amount also in this case.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、上記文
献の場合では、付加的語長のためのハード的構成を余分
に必要とし、演算用のバスと付加的バスとを分離した構
造としなければならないので、回路規模の増大、チップ
面積の増大となり、設計上好ましくないという問題があ
る。さりとて、従来のままでは、どのバス幅において
も、バス幅に等しい即値データの取扱いは、バスの2倍
の命令語長の命令セットにしなければならず、必要な即
値長の2倍のコード量あるいは2つのバスサイクル、つ
まりプログラムコード量が大きくなり、処理時間が倍に
なるという問題がある。特にワンチップマイクロコンピ
ュータでは使用できるメモリ量が多くないため、コード
量の増大は処理機能や処理時間の低下をまねくという問
題になる。さらに、バス幅より大きな命令語長を有する
場合もあり、命令が2つのバスサイクルに及ぶこともあ
るため、命令が即値の導入を含むか否かを前命令のサイ
クルで解釈し、それに基づき後命令の後に即値データを
導入するというシーケンスが必要となり、機構が複雑に
なる欠点を有する。現実のプログラムに使用される即値
データは、一般にはコード量の20〜30%を占めると
言われているが、そのうちバス幅の即値が実際に必要な
頻度は低いと言える。そのため、バス幅未満の即値デー
タのためにバス幅の即値データをセットして命令コード
をさらに付加しなければならないことは、効率的とは言
いがたい。従って本発明の目的は、バス幅を変えること
なく、コンパクトでコード量の少ない構成を実現するマ
イクロプロセッサ即値導入手段を提供することである。
However, in the case of the above-mentioned document, an additional hardware structure for the additional word length is required, and the operation bus and the additional bus must be separated. Therefore, there is a problem that the circuit scale and the chip area increase, which is not preferable in design. By the way, in the conventional case, in any bus width, the handling of immediate data equal to the bus width must be done by an instruction set having an instruction word length that is twice as long as the bus, and a code amount that is twice the required immediate length. Alternatively, there is a problem that two bus cycles, that is, the amount of program code becomes large and the processing time is doubled. In particular, since the amount of memory that can be used in the one-chip microcomputer is not large, an increase in the amount of code causes a problem that the processing function and the processing time decrease. Further, since the instruction word length may be larger than the bus width and the instruction may extend over two bus cycles, whether or not the instruction includes the introduction of an immediate value is interpreted in the cycle of the previous instruction, and based on that, It requires a sequence of introducing immediate data after the instruction, which has a drawback of complicating the mechanism. It is said that the immediate data used in an actual program generally occupies 20 to 30% of the code amount, but it can be said that the immediate value of the bus width is actually required less frequently. Therefore, it is difficult to say that it is efficient to set the immediate data of the bus width and add the instruction code for the immediate data of less than the bus width. Therefore, an object of the present invention is to provide a microprocessor immediate value introducing means which realizes a compact and small code amount configuration without changing the bus width.

【0005】[0005]

【課題を解決するための手段】上記の課題を解決するた
め本発明の構成は、バス幅以下の即値データを使用し、
予め命令記憶部に記憶された即値コードおよび命令コー
ドからなる命令語の前記プログラムコードを逐次該バス
幅である1コードごと呼び出し、前記命令コードを命令
デコーダで分析して命令を実行し、前記即値コードの即
値データを演算器等を有するデータパスで処理する機構
を有するマイクロプロセッサにおいて、最長の即値デー
タを、バス幅よりも1ビット少ない数値データとし、前
記1ビットの値により、前記命令記憶部からのデータが
即値であるか命令であるかを判断するセレクタと、即値
コードである場合に、該即値コードを命令デコーダに送
らずに直ちに前記データパス内に転送する機構を有し、
前記即値データの目的内容により、前記即値データを前
記バス幅と同じ幅に拡張する演算処理を前記プログラム
コードに有することである。
In order to solve the above-mentioned problems, the structure of the present invention uses immediate data having a bus width or less,
The program code of the instruction word consisting of the immediate code and the instruction code stored in advance in the instruction storage unit is sequentially called for each code having the bus width, the instruction code is analyzed by the instruction decoder, and the instruction is executed to execute the immediate value. In a microprocessor having a mechanism for processing immediate data of a code by a data path including an arithmetic unit or the like, the longest immediate data is set to numerical data which is 1 bit smaller than a bus width, and the instruction storage unit is set by the 1-bit value. A selector that determines whether the data from is an immediate value or an instruction, and if it is an immediate code, a mechanism that immediately transfers the immediate code into the data path without sending it to the instruction decoder,
According to the purpose of the immediate data, the program code has an arithmetic process for expanding the immediate data to the same width as the bus width.

【0006】また関連発明の構成は、前記1ビットは、
前記命令記憶部に接続された命令バッファのMSB(最
上位ビット)であり、前記セレクタは、前記MSBの値
が0の場合に前記データパスの制御機構を活性化させて
前記命令バッファのコードを制御機構に受け取らせ、前
記MSBの値が1の場合に命令デコーダを活性化させ、
前記コードを命令デコーダに受け取らせる回路であるこ
とを特徴とする。
Further, in the configuration of the related invention, the 1 bit is
The MSB (most significant bit) of the instruction buffer connected to the instruction storage unit, and the selector activates the control mechanism of the data path when the value of the MSB is 0, and sets the code of the instruction buffer. The control mechanism receives it, and activates the instruction decoder when the value of the MSB is 1.
It is a circuit that causes the instruction decoder to receive the code.

【0007】上記発明に関連した第三の構成は、前記演
算処理は、前記即値コードを転送後、バス幅を回復する
命令コードを付加することであり、前記命令コードが、
前記即値データがバス幅の桁を有する数値データの場
合、MSBに1をセットするビットセット命令である、
もしくは、前記即値データが奇数アドレス配置を許さな
いアドレス指定のアドレスデータの場合、LSB(最下
位ビット)を0とする、左シフト命令である、もしく
は、前記即値データが符号付きバス幅データとしての負
値の場合、ビット反転命令して1を加える1コード命令
となっていることである。
A third configuration related to the above invention is that the arithmetic processing adds an instruction code for restoring the bus width after transferring the immediate code, and the instruction code is
When the immediate data is numeric data having a digit of the bus width, it is a bit set instruction for setting 1 in the MSB.
Alternatively, when the immediate data is address data for addressing that does not allow odd address arrangement, the LSB (least significant bit) is 0, a left shift instruction, or the immediate data is a signed bus width data. In the case of a negative value, it means that it is a one-code instruction that adds 1 as a bit inversion instruction.

【0008】[0008]

【作用】バス幅より1ビット少ない即値データの導入に
より、そのデータが即値コードであることを残りの1ビ
ット(MSBなど) で判定する。即値コードである判
定は、命令バッファに接続されたセレクタ回路で行わ
れ、即値コードの場合はデータを演算する回路のデータ
パス側が選択され、その制御機構へ転送される。そして
必要に応じて、バス幅の即値データとするために、即値
コードの残りの1ビットを別途付加的な命令コードでバ
ス幅に設定した後、演算に使用される。
By introducing the immediate data which is 1 bit smaller than the bus width, it is determined by the remaining 1 bit (MSB etc.) that the data is an immediate code. The determination as an immediate code is made by a selector circuit connected to the instruction buffer. In the case of an immediate code, the data path side of the circuit that operates the data is selected and transferred to its control mechanism. Then, if necessary, in order to obtain immediate data of the bus width, the remaining 1 bit of the immediate code is separately set to the bus width by an additional instruction code and then used for the operation.

【0009】[0009]

【発明の効果】プログラムに頻繁に使用される即値デー
タのうち、バス幅の即値データの頻度が少ないことか
ら、本発明の構成によってコード量を減少させることが
でき、メモリの利用効率を上げ、処理時間の短縮が実現
する。またバス幅を変える必要のないことから、演算操
作のために既に備わっている機構を利用できるため、機
構を簡素化でき、コンパクトなマイクロプロセッサが設
計できて、コストを抑えることができる。
Of the immediate data frequently used in the program, the frequency of the immediate data of the bus width is low. Therefore, the code amount can be reduced by the configuration of the present invention, and the memory utilization efficiency is improved. The processing time can be shortened. Further, since it is not necessary to change the bus width, the mechanism already provided for the arithmetic operation can be used, so that the mechanism can be simplified, a compact microprocessor can be designed, and the cost can be suppressed.

【0010】[0010]

【実施例】以下、本発明を具体的な実施例に基づいて説
明する。図1は、本発明の即値導入機構を有するマイク
ロプロセッサ(以下MPUと記す)の一実施例で、MP
U100は図示しない周辺機器等と接続されてマイクロ
コンピュータシステムを構成している。命令コードおよ
び即値コードの命令語セットによるプログラムコードが
構成されており、そのプログラムコードが記憶されてい
る命令記憶部1には、命令バッファ2が接続され、命令
バッファ2のMSB(上位ビット)にセレクタ9が接続
されている。命令バッファ2からは命令デコーダ3へと
データパス5へと接続される。そして命令デコーダ3で
解読された命令はデータパス5に指示を伝えるべく接続
されている。
EXAMPLES The present invention will be described below based on specific examples. FIG. 1 shows an embodiment of a microprocessor (hereinafter referred to as MPU) having an immediate value introduction mechanism of the present invention.
The U100 is connected to peripheral devices (not shown) and constitutes a microcomputer system. An instruction buffer 2 is connected to an instruction storage unit 1 in which a program code is configured by an instruction word set of an instruction code and an immediate value code, and the instruction buffer 2 is connected to the MSB (upper bit) of the instruction buffer 2. The selector 9 is connected. The instruction buffer 2 is connected to the instruction decoder 3 and the data path 5. The instruction decoded by the instruction decoder 3 is connected to the data path 5 to transmit the instruction.

【0011】データパス5内では命令バッファ2からの
データが制御機構8を通じて入力レジスタ4につながれ
ている。入力されたデータは演算器6およびアキュムレ
ータ7等で演算され処理される。
In the data path 5, the data from the instruction buffer 2 is connected to the input register 4 through the control mechanism 8. The input data is calculated and processed by the calculator 6 and the accumulator 7.

【0012】MPU100は通電開始と共に、このプロ
グラムコードを読み出して逐次実行していく。読み出さ
れた命令語は、一旦命令バッファ2に保持される。命令
バッファ2のMSB(上位1ビット)は命令記憶部から
のデータが命令コードか即値コードかの区別を与えるビ
ットであり、図2の一例に示すように、バス幅16ビッ
トとして、MSBのビット15が「0」の場合は、バス幅
の即値データ導入指示であり、「1」の場合は即値導入
以外の命令となっている。そこで、即値導入以外の命令
語であるとセレクタが判定すると、その命令語は命令デ
コーダへ転送され、命令が解析されて実行指示がデータ
パス5に対してなされる。即値データであるとセレクタ
が判定した場合は、命令バッファ2のデータは直接デー
タパス5の制御機構8へ転送され、入力レジスタ4から
演算器6に至って、必要に応じてバス幅等が拡張され、
目的の演算処理がなされる。
The MPU 100 reads out the program code and sequentially executes it when the energization starts. The read instruction word is temporarily held in the instruction buffer 2. The MSB (upper 1 bit) of the instruction buffer 2 is a bit that distinguishes whether the data from the instruction storage unit is an instruction code or an immediate code. As shown in an example of FIG. 2, the MSB bit has a bus width of 16 bits. When 15 is "0", it is an instruction to introduce immediate data of the bus width, and when "1", it is an instruction other than the instruction to introduce immediate data. Therefore, when the selector determines that the instruction word is other than the immediate value introduction instruction, the instruction word is transferred to the instruction decoder, the instruction is analyzed, and the execution instruction is given to the data path 5. When the selector determines that the data is immediate data, the data in the instruction buffer 2 is directly transferred to the control mechanism 8 in the data path 5 and reaches the arithmetic unit 6 from the input register 4 to expand the bus width and the like as necessary. ,
Target arithmetic processing is performed.

【0013】データパス5に転送された即値データは、
必要に応じてバス幅にセットされるが、バス幅にセット
する必要がない場合も多い。例えば16ビットバス幅、
MSBを判定ビットとして、定数「146Eh」(hは
十六進法を示す。二進法では0001 0100 0110 1110)の
数値はMSBが0であるので、判定ビットをそのままデ
ータビットとみなしてデータを使用して問題を生じな
い。従ってバス幅を補正する処理を必要とせず、従来よ
り半分のコードで済む(図3(a) の場合)。
The immediate data transferred to the data path 5 is
It is set to the bus width as needed, but in many cases it is not necessary to set it to the bus width. For example, 16-bit bus width,
With the MSB as the judgment bit, the numerical value of the constant "146Eh" (h indicates the hexadecimal system. In the binary system, 0001 0100 0110 1110) has the MSB of 0, so the judgment bit is regarded as a data bit and the data is used. Does not cause a problem. Therefore, the processing for correcting the bus width is not required, and only half the code is required as in the conventional case (in the case of FIG. 3 (a)).

【0014】MSBが1となるような即値データ、例え
ば、16ビットの例で「946Eh」という即値データ
は、命令バッファ2に保持されている際には、バス幅で
みると、定数「146Eh」としておく。従って、これ
をビットセット命令によってMSBを1にセットするこ
とで目的の定数に設定することになる。つまり、マイク
ロプロセッサにとっては、予めプログラムするので、そ
の即値データがどのデータかはわかっているため、目標
の即値データとするための処理の命令語を付け加えるこ
とになる(図3(b) の場合)。
Immediate data whose MSB is 1 such as "946Eh" in the case of 16 bits has a constant "146Eh" when viewed from the bus width when held in the instruction buffer 2. I will keep it. Therefore, this is set to the target constant by setting the MSB to 1 by the bit set instruction. In other words, for the microprocessor, since it is programmed in advance, it is known which data is the immediate data, and therefore a command word for processing to make it the target immediate data is added (in the case of FIG. 3 (b)). ).

【0015】また、即値データが命令語のアドレスのよ
うな場合、16ビットの例でいうと、通常16ビット命
令語の格納アドレスはバイトごとにアドレッシングする
ので、即値データのLSBは「0」となる。従って、即
値データとしてはアドレスの上位15ビット分を即値デ
ータ領域にセットしておき、転送後に左シフトコマンド
一つで目的のアドレス値を得ることができ、従来と同じ
処理時間でセットできる(図3(c) の場合)。
When the immediate data is an address of an instruction word, in the case of a 16-bit example, since the storage address of a 16-bit instruction word is usually addressed byte by byte, the LSB of the immediate data is "0". Become. Therefore, as the immediate data, the upper 15 bits of the address are set in the immediate data area, and the target address value can be obtained by one left shift command after the transfer and can be set in the same processing time as the conventional one (see FIG. In case of 3 (c)).

【0016】さらに、即値データが符号付データの場合
は、MSBを符号ビット、残りの15ビットを数値デー
タとして用い、通常MSBを「1」の場合に負の場合と
することが多い。すると従来のビット構成のままでは、
命令語と判定されてしまうので、ここでは、正の数とし
て反転した即値データを用意し、後にビット反転命令
(NEG 命令)によりバス幅の符号付データとする(図3
(d) の場合)。
Further, when the immediate data is signed data, the MSB is used as a sign bit and the remaining 15 bits are used as numerical data, and the normal MSB is often set to a negative value when it is "1". Then, with the conventional bit configuration,
Since it is determined to be an instruction word, the immediate value data that is inverted as a positive number is prepared here, and the bit width inversion instruction (NEG instruction) is used later to make the data with the bus width as a sign (FIG. 3).
(d)).

【0017】以上のように、バス幅の即値データを使用
したい場合は、ビット回復のための処理プロセスが必要
となる。しかし、付加的命令コードも1コードでほとん
ど対応でき、従来と同等のコード量、処理時間でよい。
即ち、プログラムで使用されるバス幅一杯のデータは頻
度が少なく、それにも係わらずバス幅以下のデータに対
してもバス幅即値のデータを用いなければならなかった
場合に比べて、本発明の構成では即値データの処理が、
メモリおよび処理時間ともに短縮することができた。
As described above, when it is desired to use the immediate data of the bus width, a processing process for bit recovery is required. However, only one additional instruction code can be used, and the code amount and processing time are the same as those in the past.
That is, the data of the full bus width used in the program is infrequent, and nevertheless, the data of the immediate bus width must be used even for the data of the bus width or less. In the configuration, the processing of immediate data is
Both memory and processing time could be shortened.

【0018】仮に、即値データの出現頻度をPi、そのう
ちMSBが0であるような即値データが導入される頻度
をPz、従来技術による即値導入の命令コード長をLo、本
発明の即値データにおける命令コード長をLi、バス幅拡
張に使用する命令コード長をLeとすると、コード量の削
減分は数1式で示される。
Suppose that the appearance frequency of the immediate data is Pi, the frequency at which the immediate data whose MSB is 0 is introduced is Pz, the instruction code length of the immediate data introduction according to the prior art is Lo, and the instruction in the immediate data of the present invention is When the code length is Li and the instruction code length used for expanding the bus width is Le, the reduction amount of the code amount is expressed by the equation (1).

【数1】Pi*[1- Pz*Li/Lo -(1-Pz)*(Li+Le)/Lo] と表される。ここで一般的な例として、Pi= 0.2 , Pz=
0.8 , Lo= 4(byte) , Li=Le=2(byte) として計算すると
8%のコード量削減となる。
[Equation 1] Pi * [1-Pz * Li / Lo- (1-Pz) * (Li + Le) / Lo]. Here, as a general example, Pi = 0.2, Pz =
When calculated as 0.8, Lo = 4 (byte), Li = Le = 2 (byte), the code amount is reduced by 8%.

【0019】即ち本発明では、使用頻度の少ないバス幅
一杯の即値データを用いずに、1ビット減らした構成
で、残った1ビットを即値コードか命令コードかの判定
ビットとするので、バス幅まで必要のない15ビット分
までの即値コードに対する処理が即値コードの1コード
で済み、従ってプログラムも短くて良く、処理時間も短
くできる。そしてバス幅の即値データを必要とする場合
に、バス幅回復のための命令語を付加するので、この分
に対しては従来と同等のコード量、処理時間で対処でき
る。
That is, according to the present invention, the immediate bit data which is not frequently used and has a full bus width is not used, and the remaining 1 bit is used as a judgment bit of an immediate code or an instruction code without using the immediate bit data. The process for the immediate code up to 15 bits which is not necessary is only one code of the immediate code, so that the program can be short and the processing time can be shortened. When immediate data of the bus width is required, an instruction word for recovering the bus width is added, so that this amount can be dealt with with the same code amount and processing time as the conventional one.

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

【図1】本発明の即値導入機構の構成を示すブロック
図。
FIG. 1 is a block diagram showing the configuration of an immediate value introduction mechanism of the present invention.

【図2】本発明の命令語と即値の構成例を示す説明図。FIG. 2 is an explanatory diagram showing a configuration example of an instruction word and an immediate value according to the present invention.

【図3】即値判定後の即値データのバス幅拡張の説明
図。
FIG. 3 is an explanatory diagram of expanding the bus width of immediate data after immediate value determination.

【図4】従来の命令語および即値の構成例を示す説明
図。
FIG. 4 is an explanatory diagram showing a configuration example of a conventional command word and an immediate value.

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

1 命令記憶部 2 命令バッファ 3 命令デコーダ 4 入力レジスタ 5 データパス(6、7、8を含む枠内全体) 6 演算器 7 アキュムレータ 8 制御機構 9 セレクタ 10 データバス 1 instruction storage unit 2 instruction buffer 3 instruction decoder 4 input register 5 data path (entire frame including 6, 7, 8) 6 arithmetic unit 7 accumulator 8 control mechanism 9 selector 10 data bus

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 バス幅以下の即値データを使用し、予め
命令記憶部に記憶された即値コードおよび命令コードか
らなる命令語の前記プログラムコードを逐次該バス幅で
ある1コードごと呼び出し、前記命令コードを命令デコ
ーダで分析して命令を実行し、前記即値コードの即値デ
ータを演算器等を有するデータパスで処理する機構を有
するマイクロプロセッサにおいて、 最長の即値データを、バス幅よりも1ビット少ない数値
データとし、 前記1ビットの値により、前記命令記憶部からのデータ
が即値であるか命令であるかを判断するセレクタと、 即値コードである場合に、該即値コードを命令デコーダ
に送らずに直ちに前記データパス内に転送する機構を有
し、 前記即値データの目的内容により、前記即値データを前
記バス幅と同じ幅に拡張する演算処理を前記プログラム
コードに有することを特徴とするマイクロプロセッサ。
1. Using immediate data having a width less than or equal to a bus width, the program code of an instruction word consisting of an immediate code and an instruction code stored in advance in an instruction storage unit is sequentially called for each code having the bus width. In a microprocessor having a mechanism for analyzing a code with an instruction decoder to execute an instruction and processing the immediate data of the immediate code with a data path having an arithmetic unit etc., the longest immediate data is 1 bit smaller than the bus width. Numerical data, a selector that determines whether the data from the instruction storage unit is an immediate value or an instruction based on the 1-bit value, and, if it is an immediate code, without sending the immediate code to the instruction decoder It has a mechanism for immediately transferring it into the data path, and makes the immediate data the same width as the bus width depending on the purpose of the immediate data. Microprocessor, characterized in that an arithmetic processing for Zhang in the program code.
【請求項2】 前記1ビットは、前記命令記憶部に接続
された命令バッファのMSB(最上位ビット)であり、 前記セレクタは、前記MSBの値が0の場合に前記デー
タパスの制御機構を活性化させて前記命令バッファのコ
ードを制御機構に受け取らせ、前記MSBの値が1の場
合に命令デコーダを活性化させ、前記コードを命令デコ
ーダに受け取らせる回路であることを特徴とする請求項
1に記載のマイクロプロセッサ。
2. The 1 bit is the MSB (most significant bit) of an instruction buffer connected to the instruction storage unit, and the selector operates the data path control mechanism when the value of the MSB is 0. 7. A circuit for activating the instruction buffer to cause the control mechanism to receive the code, activating the instruction decoder when the value of the MSB is 1, and causing the instruction decoder to receive the code. 1. The microprocessor according to 1.
【請求項3】 前記演算処理は、前記即値コードを転送
後、バス幅を回復する命令コードを付加することであ
り、 前記命令コードは、 前記即値データがバス幅の桁を有する数値データの場
合、MSBに1をセットするビットセット命令である、
もしくは前記即値データが奇数アドレス配置を許さない
アドレス指定のアドレスデータの場合、LSB(最下位
ビット)を0とする、左シフト命令である、もしくは前
記即値データが符号付きバス幅データとしての負値の場
合、ビット反転命令して1を加える1コード命令である
ことを特徴とする請求項2に記載のマイクロプロセッ
サ。
3. The arithmetic processing is to add an instruction code for recovering the bus width after transferring the immediate code, wherein the instruction code is a case where the immediate data is numerical data having a digit of the bus width. , A bit set instruction that sets the MSB to 1,
Alternatively, when the immediate data is address data for addressing that does not allow odd address arrangement, the LSB (least significant bit) is 0, a left shift instruction, or the immediate data is a negative value as signed bus width data. In the case of, the microprocessor according to claim 2, wherein the microprocessor is a one-code instruction which adds 1 by performing a bit inversion instruction.
JP5293950A 1993-10-29 1993-10-29 Microprocessor Pending JPH07129398A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5293950A JPH07129398A (en) 1993-10-29 1993-10-29 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5293950A JPH07129398A (en) 1993-10-29 1993-10-29 Microprocessor

Publications (1)

Publication Number Publication Date
JPH07129398A true JPH07129398A (en) 1995-05-19

Family

ID=17801281

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5293950A Pending JPH07129398A (en) 1993-10-29 1993-10-29 Microprocessor

Country Status (1)

Country Link
JP (1) JPH07129398A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007088819A1 (en) * 2006-02-03 2007-08-09 Matsushita Electric Industrial Co., Ltd. Processor
WO2021060135A1 (en) * 2019-09-24 2021-04-01 国立大学法人東京工業大学 Processor embedded with small instruction set

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007088819A1 (en) * 2006-02-03 2007-08-09 Matsushita Electric Industrial Co., Ltd. Processor
WO2021060135A1 (en) * 2019-09-24 2021-04-01 国立大学法人東京工業大学 Processor embedded with small instruction set

Similar Documents

Publication Publication Date Title
EP0766169B1 (en) Processor and control method for performing proper saturation operation
EP1063586B1 (en) Apparatus and method for processing data with a plurality of flag groups
US5682531A (en) Central processing unit
JPH05216917A (en) Arithmetic and logic unit
JP3201716B2 (en) Computer equipment
EP1143333B1 (en) Microprocessor for supporting reduction of program codes in size
JP2000207205A (en) Arithmetic unit
US6334135B2 (en) Data processing system and register file
US5077659A (en) Data processor employing the same microprograms for data having different bit lengths
US5539900A (en) Information processing system
JP3556252B2 (en) Data processing system and method for calculating offset total
US7308553B2 (en) Processor device capable of cross-boundary alignment of plural register data and the method thereof
JPH07129398A (en) Microprocessor
JPH1091395A (en) Processor
US6005502A (en) Method for reducing the number of bits needed for the representation of constant values in a data processing device
US6144321A (en) Microprocessor dedicated to processing of bit streams in a system of compression/decompression of animated images
JP3332606B2 (en) Microprocessor
US6133859A (en) Microprocessor dedicated to processing of bit streams in a system of compression/decompression of animated images
JP3525582B2 (en) Bit operation circuit
US5142636A (en) Memory bank address calculation with reduced instruction execution cycles
JPH11163736A (en) Processor
JPH05313886A (en) Digital signal processor
JP2004151915A (en) Data processor
JP2003216418A (en) Arithmetic circuit
JPH1097409A (en) Computer