JPH0528032A - Data alignment device - Google Patents

Data alignment device

Info

Publication number
JPH0528032A
JPH0528032A JP18425491A JP18425491A JPH0528032A JP H0528032 A JPH0528032 A JP H0528032A JP 18425491 A JP18425491 A JP 18425491A JP 18425491 A JP18425491 A JP 18425491A JP H0528032 A JPH0528032 A JP H0528032A
Authority
JP
Japan
Prior art keywords
data
bus
instruction
shift
bits
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.)
Granted
Application number
JP18425491A
Other languages
Japanese (ja)
Other versions
JP3003292B2 (en
Inventor
Hiroaki Kaneko
博昭 金子
Masahiro Kusuda
昌弘 楠田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP3184254A priority Critical patent/JP3003292B2/en
Publication of JPH0528032A publication Critical patent/JPH0528032A/en
Application granted granted Critical
Publication of JP3003292B2 publication Critical patent/JP3003292B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)
  • Advance Control (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To provide the small micro processor by performing data alignment with the use of shift arithmetic device to be used for the arithmetic execution processing in a microprocessor transferring data with a smaller number of bits than the data bus width to an external memory. CONSTITUTION:The data alignment device is provided with a SHIFT 220 performing shift operation, a SOPR 221 holding the type of shift operation, an SB 222 holding the number of shift bits, a data type signal DTYP to be notified from an instruction decode unit, an ALBGEN 228 generating the number of align bits by an internal address IA to be notified from an effective address calculation unit, and an SBMPX 223 notifying the output of the SB 222 or the ALBGEN 228 selectively to the SHIFT 220 as the number of shift bits according to the information held in the SOPR 221.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、マイクロプロセッサの
外部メモリのアクセスに際し、データ・アライン(Al
igne:整列)されていないデータ・バスのビット幅
に足りないデータを転送する際に、外部メモリに割り当
てられたアドレスとデータのビット幅に従い、マイクロ
プロセッサのデータ端子を制御するマイクロプロセッサ
のデータ・アライン装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to data alignment (Al) when accessing an external memory of a microprocessor.
igne: The data width of the microprocessor that controls the data pins of the microprocessor according to the address and data bit width assigned to the external memory when transferring data that is less than the bit width of the unaligned data bus. Regarding the alignment device.

【0002】[0002]

【従来の技術】マイクロプロセッサを用いた情報処理シ
ステムでは、マイクロプロセッサと命令コードやオペラ
ンド・データを格納する外部メモリの間でデータ転送す
るデータ・バスのビット幅が、処理性能に対して影響を
与える。現在では高性能マイクロプロセッサの大半は、
32ビット幅のデータ・バスを有する。
2. Description of the Related Art In an information processing system using a microprocessor, the bit width of a data bus that transfers data between the microprocessor and an external memory that stores instruction codes and operand data affects the processing performance. give. Today, most high-performance microprocessors
It has a 32-bit wide data bus.

【0003】一方で、プログラム処理においては必ずし
もデータ・バス幅と同一幅のデータを処理するわけでは
ない。ASCII文字は8ビットで表現されるし、JI
S漢字文字は16ビットで表現される。また、数値を扱
う場合においても8ビットや16ビットでも十分である
ことが多い。したがって、プログラム処理においては8
/16/32ビット幅のデータが混在して存在すること
が普通である。このため、外部メモリ装置にあっても8
/16/32ビットのオペランドが混在している。
On the other hand, program processing does not always process data having the same width as the data bus width. ASCII characters are represented by 8 bits, and JI
The S-Kanji character is represented by 16 bits. Also, when dealing with numerical values, 8 bits or 16 bits are often sufficient. Therefore, in program processing, 8
It is usual that data of / 16/16/32 bit width is mixedly present. Therefore, even if the external memory device is 8
/ 16/16 / 32-bit operands are mixed.

【0004】もちろん浮動小数点数のように、32ビッ
トで表現できず、64ビットあるいはそれ以上のビット
幅を必要とする場合もあるが、ここでは言及しない。
Of course, like a floating point number, it may not be represented by 32 bits and may require a bit width of 64 bits or more, but it is not mentioned here.

【0005】マイクロプロセッサは外部メモリ装置に格
納されているオペランドをアクセスする場合に、そのオ
ペランドが格納されているアドレスをアドレス・バスを
介して通知する。
When accessing the operand stored in the external memory device, the microprocessor notifies the address where the operand is stored via the address bus.

【0006】外部メモリは、最小ビット幅のデータ、す
なわちここでは8ビット幅のデータ(バイト・データ)
のアクセスが可能なように、8ビット単位の構成を取
る。
The external memory stores data having a minimum bit width, that is, 8-bit width data (byte data) in this case.
In order to be able to access the above, a structure of 8 bits is adopted.

【0007】図4に32ビット幅のデータ・バスD0−
D31を持ち、外部メモリ402(図中MEMと記す)
に接続されるマイクロプロセッサ(図中CPUと記す)
の構成を示す。外部メモリ402は、8ビット単位のメ
モリ・バンクM0〜M3 410〜413で構成され
る。メモリ・バンクM0 410はデータ・バスD0−
D7、M1 411はデータ・バスD8−D15、M2
412はデータ・バスD16−D23、M3 413
はデータ・バスD24−D31のそれぞれ8ビットに対
応する。各メモリ・バンクはマイクロプロセッサ401
から共通の30ビット幅のアドレスA31−A2を通知
される。同時に各メモリ・バンクには各メモリ・バンク
の有効性を示すためのイネーブル信号、M0410には
BE0(−)、M1 411にはBE1(−)、M2
412にはBE2(−)、M3 413にはBE3
(−)がマイクロプロセッサ401より通知される。イ
ネーブル信号がアクティブであるメモリ・バンクに対
し、アドレス・バスで指定されるアドレスに対してアク
セスが行われることになる。
FIG. 4 shows a 32-bit wide data bus D0-
An external memory 402 (denoted as MEM in the figure) having a D31
A microprocessor connected to the (referred to as CPU in the figure)
Shows the configuration of. The external memory 402 is composed of 8-bit unit memory banks M0 to M3 410 to 413. The memory bank M0 410 has a data bus D0-
D7, M1 411 is the data bus D8-D15, M2
412 is a data bus D16-D23, M3 413
Corresponds to 8 bits on each of data buses D24-D31. Each memory bank is a microprocessor 401
Is notified of a common 30-bit width address A31-A2. At the same time, each memory bank has an enable signal for indicating the validity of each memory bank, BE04 (-) for M0410, BE1 (-) for M1 411, and M2.
BE2 (-) for 412 and BE3 for M3 413
(-) Is notified from the microprocessor 401. The memory bank in which the enable signal is active will be accessed at the address specified by the address bus.

【0008】イネーブル信号BE0(−)〜BE3
(−)を用いることで、マイクロプロセッサ401が内
部的に発生する32ビット幅のアドレス(以下内部アド
レスと呼ぶ)のうち、最下位の2ビットを通知すること
が不要なばかりでなく、データ・バス幅(32ビット)
に満たない8/16ビット・データのアクセスを行え
る。ここで、“(−)”は信号が負論理であることを示
す。
Enable signals BE0 (-) to BE3
By using (-), it is not only unnecessary to notify the lowest 2 bits of the 32-bit width address (hereinafter referred to as an internal address) internally generated by the microprocessor 401, but also the data Bus width (32 bits)
It is possible to access less than 8 / 16-bit data. Here, "(-)" indicates that the signal has negative logic.

【0009】図8に内部アドレス、およびデータ・タイ
プにしたがってアクセスされるメモリ・バンクとデータ
・バス端子の関係を示す。
FIG. 8 shows the relationship between memory banks and data bus terminals accessed according to internal addresses and data types.

【0010】さらに、マイクロプロセッサ401と外部
メモリ402の間には、メモリ制御装置403(図中M
CONと記す)が配置される。
Further, between the microprocessor 401 and the external memory 402, a memory control device 403 (M in the figure).
CON).

【0011】マイクロプロセッサ401からメモリ制御
装置403に対しては、バス・サイクルの種類(たとえ
ばメモリ空間に対するものか、I/O空間に対するもの
か)を示すステータス信号ST0−ST2、バス・サイ
クルの開始を示すタイミング信号BCYST(−)、バ
ス・サイクルで行われるデータ転送の方向(リード/ラ
イト)示すステータス信号R/W(−)が接続される。
これらのステータス信号、およびタイミング信号によ
り、外部メモリに対するリード・タイミング信号RD、
およびライト・タイミング信号WRを生成する。
From the microprocessor 401 to the memory controller 403, status signals ST0-ST2 indicating the type of bus cycle (for example, for memory space or for I / O space), start of bus cycle. , And a status signal R / W (−) indicating the direction (read / write) of data transfer performed in the bus cycle are connected.
By these status signals and timing signals, the read timing signal RD for the external memory,
And a write timing signal WR.

【0012】同時に、外部メモリ402のアクセスに必
要なアクセス・タイムを保証するために、レディ信号R
EADY(−)を発生しマイクロプロセッサ401に通
知する。レディ信号READY(−)がインアクティブ
の期間、マイクロプロセッサ401によって起動されて
いるバス・サイクルは、終了せずに現在の状態を保留す
る。
At the same time, in order to guarantee the access time required to access the external memory 402, the ready signal R
EADY (-) is generated and notified to the microprocessor 401. While the ready signal READY (-) is inactive, the bus cycle started by the microprocessor 401 does not end and holds the current state.

【0013】マイクロプロセッサ401内部で外部メモ
リ402とのデータ転送に関するインタフェースを司ど
る機能単位をバス・インタフェース・ユニットと呼ぶ。
A functional unit that controls an interface related to data transfer with the external memory 402 inside the microprocessor 401 is called a bus interface unit.

【0014】次に8/16/32ビットの各オペランド
に対する、マイクロプロセッサ401の外部メモリ40
2へのアクセス動作について述べる。 (1)8ビット・オペランド:内部アドレスの値によっ
て、データ・バスの使用が8ビット単位に異なる。マイ
クロプロセッサ401からバス・サイクルが発行される
際、内部アドレスの最下位2ビットが00bならばD0
−D7を使用するようにBE0(−)信号を、01bな
らばD8−D15を使用するようにBE1(−)信号
を、10bならばD16−D23を使用するようにBE
2(−)信号を、11bならばD24−D31を使用す
るよようにBE3(−)信号が、それぞれアクティブに
される。 (2)16ビット・オペランド:内部アドレスの値によ
って、データ・バスの使用が16ビット単位に異なる。
マイクロプロセッサ401では、16ビット・データは
内部アドレスの最下位1ビットが0bであるアドレスに
配置するように制限される。マイクロプロセッサ401
からバス・サイクルが発行される際、内部アドレスの最
下位2ビットが0Xb(“X”はDon’t Cade
であるビットであることを意味する)ならばD0−D1
5を使用するようにBE0(−)信号およびBE1
(−)信号を、1XbならばD16−D31を使用する
ようにBE2(−)信号およびBE3(−)信号が、そ
れぞれアクティブにされる。 (3)32ビット・オペランド・マイクロプロセッサ4
01では、32ビット・データは内部アドレスの最下位
2ビットが00bであるアドレスに配置するように制限
される。マイクロプロセッサ40からバス・サイクルが
発行される際、D0−D31を使用するようにBE0
(−)〜BE3(−)信号のすべてが同時にアクティブ
される。
Next, the external memory 40 of the microprocessor 401 for each operand of 8/16/32 bits
The operation of accessing 2 will be described. (1) 8-bit operand: The use of the data bus differs in 8-bit units depending on the value of the internal address. When the bus cycle is issued from the microprocessor 401, if the least significant 2 bits of the internal address are 00b, D0
BE0 (-) signal to use -D7, BE1 (-) signal to use D8-D15 if 01b, D16-D23 to use BE for 10b
The BE3 (-) signal is activated so as to use the 2 (-) signal and D24-D31 for 11b, respectively. (2) 16-bit operand: The use of the data bus differs in units of 16 bits depending on the value of the internal address.
In the microprocessor 401, 16-bit data is restricted to be placed at an address where the least significant 1 bit of the internal address is 0b. Microprocessor 401
When the bus cycle is issued from the internal address, the least significant 2 bits of the internal address are 0Xb (“X” is Don't Cade
, Which means that the bits are D0-D1
BE0 (-) signal and BE1 to use 5
The BE2 (-) signal and the BE3 (-) signal are activated to use the (-) signal and D16-D31 for 1Xb, respectively. (3) 32-bit operand microprocessor 4
At 01, the 32-bit data is restricted to be placed at an address where the least significant 2 bits of the internal address are 00b. BE0 to use D0-D31 when a bus cycle is issued from the microprocessor 40
All of the (-) to BE3 (-) signals are active at the same time.

【0015】マイクロプロセッサ401では、16ビッ
トおよび32ビット・オペランドのメモリ配置に制限を
設けることで、1回のオペランド・アクセスは1回のバ
ス・サイクルで完結できる。
In the microprocessor 401, by limiting the memory allocation of 16-bit and 32-bit operands, one operand access can be completed in one bus cycle.

【0016】図面では省略しているが、マイクロプロセ
ッサ401はオペランド・データを格納するための汎用
レジスタを持つ。外部メモリ402と汎用レジスタの間
でデータ転送を行うために、マイクロプロセッサ401
にはLOAD命令とSTORE命令が用意されている。
LOAD命令はバス・サイクルを起動し、外部メモリか
ら汎用レジスタにオペランドを転送する。
Although omitted in the drawing, the microprocessor 401 has a general-purpose register for storing operand data. In order to transfer data between the external memory 402 and general-purpose registers, the microprocessor 401
Has a LOAD command and a STORE command.
The LOAD instruction initiates a bus cycle and transfers an operand from external memory to a general register.

【0017】STORE命令はバス・サイクルを起動
し、汎用レジスタから外部メモリ401にオペランドを
転送する。
The STORE instruction activates a bus cycle and transfers an operand from a general purpose register to external memory 401.

【0018】また、算術/論理/シフト等の演算命令
は、汎用レジスタ内に格納されているデータを演算対象
とし、演算結果は汎用レジスタに戻される。
In addition, arithmetic instructions such as arithmetic / logic / shift are performed on the data stored in the general-purpose register, and the arithmetic result is returned to the general-purpose register.

【0019】汎用レジスタは、外部メモリ402から転
送された8/16/32ビット・データを格納するが、
いずれのタイプのデータを格納する場合でも、LSB
(Least Significant Bit:最小
有意ビット)の位置は、次の理由で共通的にビット0し
ている。
The general purpose register stores the 8/16/32 bit data transferred from the external memory 402.
Whether storing any type of data, the LSB
The position of (Least Significant Bit: least significant bit) is commonly set to 0 for the following reason.

【0020】汎用レジスタの内容は、図面で省略されて
いる二進算術論理演算装置ALU、シフタ等の演算装置
に内部データ・バスを介して転送され、必要な演算が行
われる。この時、各データ・タイプを持つデータどうし
のLSB位置が揃っていないと、正しく演算できないか
らである。
The contents of the general-purpose register are transferred via an internal data bus to an arithmetic unit such as a binary arithmetic logic unit ALU or a shifter, which is omitted in the drawing, to perform a necessary arithmetic operation. At this time, if the LSB positions of the data having each data type are not aligned, the correct calculation cannot be performed.

【0021】例えば内部アドレスの最下位2ビットが0
1bなるアドレスに配置された8ビット・データαはデ
ータ・バスからそのままマイクロプロセッサ401に取
り込むと、XXαX(ここでXはDon’t Care
な8ビット・データであることを意味する)となり、α
のLSBは32ビット・データとして扱う場合にビット
8に位置してしまう。
For example, the least significant 2 bits of the internal address are 0
When the 8-bit data α arranged at the address 1b is taken into the microprocessor 401 from the data bus as it is, XXαX (X is Don't Care)
It means that it is 8-bit data) and α
The LSB of is located at bit 8 when treated as 32-bit data.

【0022】同様に内部アドレス1Xbなるアドレスに
配置された16ビット・データβγはβγXXとなり、
LSBはビット16に位置してしまう。
Similarly, the 16-bit data βγ arranged at the internal address 1Xb becomes βγXX,
The LSB will be located in bit 16.

【0023】以上のLSB位置の不一致を避けるため
に、演算命令の実行に先立ちそれぞれのデータは、XX
Xα、およびXXβγの形式に変換しておく必要があ
る。
In order to avoid the above-mentioned mismatch of LSB positions, each data is XX before execution of the operation instruction.
It is necessary to convert to the Xα and XXβγ formats.

【0024】演算命令は実行されるタイミングが不定な
ため、LOAD命令の実行時に上述のLSB位置変換を
行う必要がある。
Since the execution timing of the arithmetic instruction is indefinite, it is necessary to perform the above-mentioned LSB position conversion when the LOAD instruction is executed.

【0025】マイクロプロセッサ401において、汎用
レジスタ、二進算術論理演算装置、シフタ等を含み、命
令の実行処理を行う機能単位を実行ユニットと呼ぶ。
In the microprocessor 401, a functional unit that includes a general-purpose register, a binary arithmetic logic unit, a shifter, etc., and executes an instruction execution process is called an execution unit.

【0026】一方、一度マイクロプロセッサ401に取
り込まれたメモリ・オペランドを、格納すべき内部アド
レスに拘わらず常にLSBの位置を揃えておくと、外部
メモリ402に書き込みを行う場合に常にLSBの位置
はビット0に揃ってしまう。STORE命令の実行時に
内部アドレス、およびデータ・タイプに従ってLSB位
置の逆変換が必要である。
On the other hand, if the memory operand once fetched by the microprocessor 401 is always aligned in the LSB position regardless of the internal address to be stored, the LSB position will always be the same when writing to the external memory 402. It will be aligned to bit 0. An inverse translation of the LSB location is required according to the internal address and data type when executing the STORE instruction.

【0027】これらのマイクロプロセッサ401と外部
メモリ402間のデータ転送の際に、内部アドレス、お
よびデータ・タイプに従ってLSB位置の変換する機能
を、データ・アライン機能と呼ぶ。
The function of converting the LSB position according to the internal address and the data type at the time of data transfer between the microprocessor 401 and the external memory 402 is called a data align function.

【0028】[0028]

【発明が解決しようとする課題】従来、マイクロプロセ
ッサにおけるデータ・アライン機能は、バス・インタフ
ェース・ユニットが担当しており、専用のハードウェア
を用いている。専用ハードウェアを必要とする理由は、
1)変換に要する時間を最小限にするため、2)バス・
インタフェース・ユニットと実行ユニットが互いに独立
して動作させるため、である。
Conventionally, the bus interface unit is in charge of the data align function in the microprocessor, and dedicated hardware is used. The reason why you need dedicated hardware is
1) To minimize the conversion time 2) Bus
This is because the interface unit and the execution unit operate independently of each other.

【0029】従来データ・アラインに関しては、米国特
許第4,624,660号明細書に示されるように、C
PUと記憶装置の間に配置され、アドレス・バスとデー
タ・バスの作業を調整するバス・コントローラの責任で
あるとしている。上記特許明細書のFig.1におい
て、中央処理装置12と記憶装置20の間は、データ・
バスを制御するデータ・バス・インタフェース18、ア
ドレス・バスを制御するアドレス・バス・インタフェー
ス16によってインタフェースされる。データ・バス・
インタフェース18によってミスアライン(misal
ignment)が修正された上で、中央処理装置12
との間で内部データバスIDB0−IDB31とのアラ
インされたデータの転送を行う。Fig.13,15,
19,20に8ビット単位に記載されているデータ・バ
ス・インタフェース18から分るように、外部データ・
バスD0−D31は、8ビット単位づつ(D0−D7,
D8−D15,D16−D23,D24−D31)内部
データ・バスIDB0−IDB31のうち任意の8ビッ
ト(IDB0−IDB7,IDB8−IDB15,ID
B16−IDB23,IDB24−D31)に接続する
ような機構が必要である。具体的にはFig.21にあ
るように、外部データ・バスの1ビットあたり内部デー
タ・バスの4ビットを選択的に接続する双方向のマルチ
プレクサを用いている。バス・コントローラ14は、
1)アドレス・バス・インタフェース16、ならびにデ
ータ・バス・インタフェース18に対する制御、2)ア
ラインされたデータ転送であるかの判定、3)必要なバ
ス・サイクルの起動、4)記憶装置20に対する制御信
号の発行を行う。
Regarding conventional data alignment, as shown in US Pat. No. 4,624,660, C
It is said to be the responsibility of the bus controller, which is arranged between the PU and the storage device and coordinates the work of the address bus and the data bus. In FIG. 1 between the central processing unit 12 and the storage unit 20
The data bus interface 18 controls the bus, and the address bus interface 16 controls the address bus. Data bus
Misaligned by the interface 18 (misal
(i.g., the central processing unit 12)
And the data aligned with the internal data buses IDB0 to IDB31 are transferred between them. Fig. 13, 15,
External data, as can be seen from the data bus interface 18 described in 8-bit units 19 and 20,
The buses D0 to D31 are arranged in 8-bit units (D0 to D7,
D8-D15, D16-D23, D24-D31) Arbitrary 8 bits (IDB0-IDB7, IDB8-IDB15, ID) of internal data bus IDB0-IDB31
B16-IDB23, IDB24-D31) is required. Specifically, FIG. As shown in 21, a bidirectional multiplexer for selectively connecting 4 bits of the internal data bus per 1 bit of the external data bus is used. The bus controller 14
1) Control for address bus interface 16 and data bus interface 18, 2) Judgment of aligned data transfer, 3) Activation of necessary bus cycle, 4) Control signal for storage device 20 Is issued.

【0030】以上のように、データ・アライン機能を実
現するために、外部データ・バスと内部データ・バスの
間に8ビットづつ交換する専用のハードウェアが必要で
あることを示唆している。
As mentioned above, in order to realize the data align function, it is suggested that dedicated hardware for exchanging 8 bits each between the external data bus and the internal data bus is required.

【0031】このような専用ハードウェアは、次の欠点
を持つ。 (1)データ・アライン機能だけのための論理回路を必
要とし、デバイス規模の増大を招く。 (2)半導体集積回路に実現する場合、信号線の相互交
換は配線領域の増大を招き、デバイス上の有効トランジ
スタ数の使用効率を下げる。 (3)内部データ・バスと外部データ・バスの間に回路
が挿入されることで、動作速度を低下させる。
Such dedicated hardware has the following drawbacks. (1) A logic circuit only for the data align function is required, which causes an increase in device scale. (2) In the case of realizing it in a semiconductor integrated circuit, mutual exchange of signal lines causes an increase in wiring area and reduces the efficiency of use of the number of effective transistors on the device. (3) By inserting a circuit between the internal data bus and the external data bus, the operation speed is reduced.

【0032】[0032]

【課題を解決するための手段】上記した欠点を解消する
ために、本発明による装置は、データ・バス幅のビット
長より小さなビット長を持つデータを外部メモリと転送
するマイクロプロセッサのデータ・アライン装置におい
て、命令実行の際にデータ転送を行う内部データ・バ
ス、前記内部データ・バスに接続されたシフト演算装
置、およびアクセスすべき外部メモリへのアドレスの一
部分およびデータのビット長によりアラインすべきビッ
ト数を生成する手段を有することを特徴とする。
In order to overcome the above-mentioned drawbacks, the device according to the present invention is a data aligner for a microprocessor for transferring data having a bit length smaller than the bit length of the data bus width to an external memory. In the device, an internal data bus for transferring data when executing an instruction, a shift arithmetic unit connected to the internal data bus, and a part of an address to an external memory to be accessed and a bit length of data should be aligned. It is characterized by having means for generating the number of bits.

【0033】すなわち、本発明では、シフト命令、浮動
小数点演算命令等で使用される実行ユニットにおけるシ
フタを、共通の資源として用いてデータ・アライン機能
を実現している。
That is, in the present invention, the data align function is realized by using the shifter in the execution unit used for the shift instruction, the floating point operation instruction, etc. as a common resource.

【0034】[0034]

【実施例】以下、図面を用いて本発明を詳述する。The present invention will be described in detail below with reference to the drawings.

【0035】図1は、本発明を利用して32ビットのデ
ータ・バスに接続し、8/16/32ビット・データを
アクセスできるマイクロプロセッサ100の概略構成を
示す図面である。
FIG. 1 is a diagram showing a schematic structure of a microprocessor 100 which can be connected to a 32-bit data bus and can access 8/16 / 32-bit data by utilizing the present invention.

【0036】本マイクロプロセッサ100は、パイプラ
イン処理を行うために、命令フェッチ・ユニット(以下
IUと称する)101、命令デコード・ユニット(以下
DUと称する)102、命令実行ユニット(以下EUと
称する)103、実効アドレス計算ユニット(以下AU
と称する)104、バス・インタフェース・ユニット
(以下BUと称する)105を持つ。
The microprocessor 100 has an instruction fetch unit (hereinafter referred to as IU) 101, an instruction decode unit (hereinafter referred to as DU) 102, and an instruction execution unit (hereinafter referred to as EU) in order to perform pipeline processing. 103, effective address calculation unit (hereinafter AU
104) and a bus interface unit (hereinafter referred to as BU) 105.

【0037】IU101は、フェチ・サイクルの起動制
御、およびフェッチ・サイクルで外部より取り込んだ命
令コードを蓄積する。命令コード・キャッシュを含むよ
うな構成も考えられる。命令コードは、16ビット長あ
るいは32ビット長のいずれかである。各命令コードは
メモリのハーフワード境界から(内部アドレスの最下位
ビットが0b)置かれるものとする。
The IU 101 stores the instruction code fetched from the outside in the fetish cycle activation control and the fetch cycle. A configuration including an instruction code cache is also conceivable. The instruction code has either a 16-bit length or a 32-bit length. It is assumed that each instruction code is placed from the halfword boundary of the memory (the least significant bit of the internal address is 0b).

【0038】DU102は、IU101に蓄積された命
令コードをデコードし、個々の命令に特有な処理を示す
信号を発生させる。代表的な信号としては、1)命令実
行処理の種類、2)オペランドの種類(メモリ/レジス
タの番号)、3)オペランドのデータ・タイプ、4)特
殊な命令の認識、などがある。DU102で発生された
信号は、図面では一部省略されているがその他の各ユニ
ットに対する動作指示信号として与えられる。
The DU 102 decodes the instruction code stored in the IU 101, and generates a signal indicating the processing peculiar to each instruction. Typical signals include 1) type of instruction execution processing, 2) type of operand (memory / register number), 3) data type of operand, and 4) recognition of special instruction. The signal generated by the DU 102 is given as an operation instruction signal for each of the other units, although part of the signal is omitted in the drawing.

【0039】EU103は、32本の32ビット幅の汎
用レジスタ、32ビット幅の算術論理演算装置ALU、
バレル・シフタ等を含み、DU102によって指定され
た命令実行処理を行う。その内部制御はハードワイアド
論理によるもの、マイクロプログラムを用いたもの等が
考えられる。
The EU 103 comprises 32 32-bit wide general-purpose registers, a 32-bit wide arithmetic logic unit ALU,
It includes a barrel shifter and the like, and executes an instruction execution process designated by the DU 102. The internal control may be based on a hardwired logic, a microprogram, or the like.

【0040】AU104は、DU102がメモリあるい
はI/Oに対するアクセスを含む命令であることを検知
すると、オペランドに対するアドレスを計算する。アド
レス計算に使用される要素は、命令コード中に含まれる
ディスプレースメント値、あるいは汎用レジスタの内容
がベース値として用いられる。前者はIU101から、
後者はEU103から供給される。
When the AU 104 detects that the DU 102 is an instruction including access to memory or I / O, it calculates an address for an operand. As the element used for the address calculation, the displacement value included in the instruction code or the content of the general-purpose register is used as the base value. The former is from IU101,
The latter is supplied by EU 103.

【0041】オペランド・データは8/16/32ビッ
トのものがあり、16ビット・データはハーフワード境
界(内部アドレスの最下位ビットが0b)から、32ビ
ット・データはワード境界(内部アドレスの最下位2ビ
ットが00b)から配置されるものとする。
There are operand data of 8/16/32 bits, and 16-bit data starts from a half word boundary (the least significant bit of the internal address is 0b) and 32-bit data starts at a word boundary (the internal address has the least significant bit). It is assumed that the lower 2 bits are arranged from 00b).

【0042】BU105は、他のユニットから与えられ
るアドレス情報、データ情報、および起動要求に基づい
て、外部バス・サイクルを発生する。バス・サイクルで
外部から読み込まれたデータは、命令コードはIU10
1に、オペランド・データはEU103に供給される。
BU 105 generates an external bus cycle based on address information, data information and activation request given from another unit. The data read from the outside in the bus cycle has an instruction code of IU10.
1, the operand data is supplied to the EU 103.

【0043】各ユニットは、図1に概略を示すようにバ
ス構造で内部接続される。
Each unit is internally connected by a bus structure as schematically shown in FIG.

【0044】BU105とIU101間はオペランド・
アクセス以外のバス・サイクルで使用するアドレス(内
部アドレス・バスIA0−IA31を経由)と命令コー
ドを転送するために、IU101とDU102間は命令
コードを転送するために、AU104とIU101間、
およびAU104とEU103間はアドレス計算に使用
されるアドレス要素を転送するために(IA0−IA3
1を経由)、EU103とBU105間はリード・オペ
ランドまたはライト・オペランドを双方向的に転送する
ために(内部データ・バスID0−ID31を経由)、
AU104とBU105間は実効アドレスを転送するた
めに(IA0−IA31を経由)、EU103とBU1
05の間は任意のバス・サイクルで使用するアドレスを
転送するために(IA0−IA31を経由)接続され
る。
Operands between BU 105 and IU 101
In order to transfer the address (via internal address bus IA0-IA31) and instruction code used in a bus cycle other than access, between IU101 and DU102, between AU104 and IU101, in order to transfer the instruction code.
And between AU104 and EU103 to transfer address elements used for address calculation (IA0-IA3
1), in order to bidirectionally transfer a read operand or a write operand between the EU 103 and the BU 105 (via internal data buses ID0-ID31),
In order to transfer an effective address between AU104 and BU105 (via IA0-IA31), EU103 and BU1
Between 05, it is connected (via IA0-IA31) to transfer the address used in any bus cycle.

【0045】図面では説明を簡略化するために、内部デ
ータ・バスID0−ID31は32ビット幅のバス1系
統に見せているが、実際には複数の32ビット・バスで
構成される。
In the drawing, the internal data buses ID0 to ID31 are shown as a single bus having a 32-bit width for simplification of description, but in reality, they are composed of a plurality of 32-bit buses.

【0046】IU101からのバス・サイクル起動要求
はFREQ信号、DU102からのものはOPREQ信
号、EU103からのものはACREQ信号で表現され
る。これらの要求信号は、実際にはバス・サイクルの種
類を表現するための複数の信号、およびタイミングを規
定する信号等の複数の信号によって構成される。
The bus cycle activation request from the IU 101 is represented by the FREQ signal, the one from the DU 102 by the OPREQ signal, and the one from the EU 103 by the ACREQ signal. These request signals are actually composed of a plurality of signals for expressing the type of bus cycle and a plurality of signals such as signals for defining the timing.

【0047】BU105はバス・サイクルに関連して、
30ビットのワード・アドレス(32ビット単位アドレ
ス)を出力するアドレス・バス端子A2−A3112
1、32ビット・データの授受を行うデータ・バス端子
D0−D31 122、データ・バス端子のどの8ビッ
ト位置を用いて有効データを転送するかを示すバイトイ
ネーブル出力端子BE0(−)〜BE3(−)123
(BE0(−)はD0−D7、BE1(−)はD8−D
15、BE2(−)はD16−D23、BE3(−)は
D24−D31に対応する)、バス・サイクルの種類
(たとえばメモリ空間に対するものか、I/O空間に対
するものか)を示すステータス端子ST0−ST2 1
24、バス・サイクルの開始を示すタイミング出力端子
(BCYST(−)125、バス・サイクルで行われる
データ転送の方向(リード/ライト)を示すステータス
出力端子R/W(−)126を持つ。
BU 105 is associated with a bus cycle,
Address bus terminals A2-A3112 for outputting a 30-bit word address (32-bit unit address)
Data bus terminals D0-D31 122 for exchanging 1 and 32 bit data, and byte enable output terminals BE0 (-) to BE3 (indicating which 8-bit position of the data bus terminal is used to transfer valid data. -) 123
(BE0 (-) is D0-D7, BE1 (-) is D8-D
15, BE2 (-) corresponds to D16-D23, BE3 (-) corresponds to D24-D31), and a status terminal ST0 indicating the type of bus cycle (for example, memory space or I / O space). -ST21
24, a timing output terminal (BCYST (-) 125 indicating the start of a bus cycle, and a status output terminal R / W (-) 126 indicating the direction (read / write) of data transfer performed in the bus cycle.

【0048】基本的なバス・サイクルは、マイクロプロ
セッサ100のクロック入力端子128に加えれる基準
クロック信号CLKに同期した2つのステートT1,T
2で構成される。
The basic bus cycle consists of two states T1 and T1 synchronized with the reference clock signal CLK applied to the clock input terminal 128 of the microprocessor 100.
It consists of 2.

【0049】T2ステートでREADY(−)入力端子
127の状態がサンプリングされ、インアクティブであ
ればアクティブになるまでT2ステートを繰り返す。こ
のときREADY(−)入力端子127の状態がアクテ
ィブであれば、アイドル・ステートTiに遷移してバス
・サイクルを終了する。
The state of the READY (-) input terminal 127 is sampled in the T2 state, and if inactive, the T2 state is repeated until it becomes active. At this time, if the state of the READY (-) input terminal 127 is active, the idle state Ti is entered and the bus cycle ends.

【0050】図2はEU103の詳細、ならびにデータ
・バス端子122までの構成を示す図面である。
FIG. 2 is a drawing showing the details of the EU 103 and the configuration up to the data bus terminal 122.

【0051】EU103は、マイクロプログラムROM
(以下MROMと略す)202に格納され、マイクロプ
ログラム・カウンタ(以下MPCと略す)201で指定
されるアドレスに格納されているマイクロ命令で制御さ
れるマイクロマシンである。
EU103 is a microprogram ROM
A micromachine controlled by microinstructions stored in an (hereinafter abbreviated as MROM) 202 and stored at an address designated by a microprogram counter (hereinafter abbreviated as MPC) 201.

【0052】MPC201は、DU102による命令デ
コード結果により、命令実行処理の開始時に特定のマイ
クロプログラムの開始アドレスが設定され、1)分岐フ
ィールド命令が実行されて分岐する場合、2)EU10
3あるいは他ユニットからマイクロ命令の実行待合せが
要求され一時的に停止する場合、以外は1クロック毎に
1インクリメントされる。
The MPC 201 sets the start address of a specific microprogram at the start of the instruction execution process based on the instruction decoding result of the DU 102, and 1) a branch field instruction is executed and branches 2) EU 10
3 or another unit requests waiting for execution of a microinstruction and is temporarily stopped, the value is incremented by 1 every other clock.

【0053】MROM202から読み出されたマイクロ
命令は、マイクロ命令レジスタ(以下MRと略す)20
4にラッチされる。
The micro instruction read from the MROM 202 is stored in the micro instruction register (hereinafter abbreviated as MR) 20.
Latched to 4.

【0054】実行処理を実際に行うデータ・バス部(図
面下部分)には、32本の32ビット汎用レジスタ(以
下GRと略す)210、32ビット幅の算術論理演算装
置(以下ALUと略す)211、32ビット幅のシフト
演算装置(以下SHIFTと略す)220等を持つ。ま
た、乗算器、浮動小数点演算装置を持つ様な構成も考え
得る。
In the data bus section (the lower part of the drawing) for actually executing the execution processing, 32 32-bit general-purpose registers (hereinafter abbreviated as GR) 210 and a 32-bit wide arithmetic logic unit (hereinafter abbreviated as ALU) are provided. 211, a 32-bit width shift operation device (hereinafter abbreviated as SHIFT) 220 and the like. Further, a configuration having a multiplier and a floating point arithmetic unit can be considered.

【0055】データ・パスの各資源は、3本の32ビッ
ト・バスs1_bus2_bus,r_busを介して
結合される。s1_bus,s2_busはGR210
の内容を読み出し、ALU211またはSHIFT22
0に2つの被演算データを転送するためのデータ・バス
であり、それぞれ同時に同一のあるいは異なったGR2
10の内容を転送できる。
Each resource in the data path is coupled via three 32-bit buses s1_bus2_bus, r_bus. s1_bus and s2_bus are GR210
Read the contents of ALU211 or SHIFT22
0 is a data bus for transferring two operation data to 0, and the same or different GR2 at the same time.
10 contents can be transferred.

【0056】r_busはALU211またはSHIF
T220で行われた演算結果を読み出し、GR210に
書き戻すためのデータ転送に使用されるデータ・バスで
ある。
R_bus is ALU211 or SHIF
It is a data bus used for data transfer for reading the operation result performed in T220 and writing it back to GR210.

【0057】s1_busはリード・バス・サイクルの
発行結果、データ・バス端子122から入力されたリー
ド・オペランドを格納するBU105内のオペランド・
リード・レジスタ(以下OPRと略す)213にも結合
され、GR210の代りにOPR213の内容を被演算
オペランドとして使用できる。
S1_bus is the operand in the BU 105 that stores the read operand issued from the data bus terminal 122 as a result of the read bus cycle issuance.
It is also coupled to a read register (hereinafter abbreviated as OPR) 213, and the contents of OPR 213 can be used as an operand to be operated instead of GR 210.

【0058】同様にr_busはライト・バス・サイク
ルの発行時に、データ・バス端子122から出力される
ライト・オペランドを格納するBU105内のオペラン
ド・ライト・レジスタ(以下OPWと略す)214にも
結合され、GR210の代りにOPR213の内容を演
算結果の書込み先として使用できる。
Similarly, r_bus is also coupled to an operand write register (hereinafter abbreviated as OPW) 214 in the BU 105 which stores a write operand output from the data bus terminal 122 at the time of issuing a write bus cycle. , GR210, the contents of OPR213 can be used as the write destination of the operation result.

【0059】s1_busに読み出されるレジスタ資
源、およびs1_bus上のデータが書き込まれるレジ
スタ資源はs1_busデコーダ(以下S1DECと略
す)207により指定される。同様にs2_busに関
してはs2_busデコーダ(以下S2DECと略す)
208、r_busに関してはr_busデコーダ(以
下RDECと略す)209により指定される。rtrn
フィールドによるr_busを用いたデータ転送は、同
一マイクロ命令のs1trn,s2trnに対して1ク
ロック後に有効にするように、RDEC209の入力に
は遅延回路(以下MDと略す)206が接続される。
A register resource read to s1_bus and a register resource to which data on s1_bus is written are designated by an s1_bus decoder (hereinafter abbreviated as S1DEC) 207. Similarly, for s2_bus, s2_bus decoder (hereinafter abbreviated as S2DEC)
208 and r_bus are designated by an r_bus decoder (hereinafter abbreviated as RDEC) 209. rtrn
A delay circuit (hereinafter abbreviated as MD) 206 is connected to the input of the RDEC 209 so that data transfer using r_bus by the field is enabled after one clock for s1trn and s2trn of the same microinstruction.

【0060】MROM202から読み出されるマイクロ
命令203は、1)s1_busを用いた第一のオペラ
ンド転送を指定するs1trnフィールド、2)s2_
busを用いた第二のオペランド転送を指定するs2t
rnフィールド、3)r_busを用いた結果転送を指
定するrtrnフィールド、4)分岐・演算・制御の各
フィールド命令に関する信号を発生するopフィール
ド、5)opフィールドの役割を指定するopcフィー
ルド、6)分岐命令の分岐先アドレスあるいは第一/第
二オペランドで使用する定数を発生するsimmフィー
ルドによって構成される。
The microinstruction 203 read from the MROM 202 includes 1) s1trn field for specifying the first operand transfer using s1_bus, and 2) s2_.
s2t that specifies the second operand transfer using bus
rn field, 3) rtrn field that specifies result transfer using r_bus, 4) op field that generates signals related to branch, operation, and control field instructions, 5) opc field that specifies the role of the op field, 6) It is composed of a branch destination address of a branch instruction or a simm field for generating a constant used in the first / second operand.

【0061】opc,opフィールドによって表わされ
る機能を便宜上フィールド命令と呼び、分岐・演算・制
御等のフィールド命令に分類される。
The function represented by the opc and op fields is called a field instruction for convenience, and is classified into field instructions such as branch, operation, and control.

【0062】s1trn,s2trn,rtrnの各転
送フィールドは、転送元(ソース)と転送先(デスティ
ネーション)のレジスタ資源を指定するサブ・フィール
ドを含んでいる。前述のようにソース・サブフィールド
で指定されたレジスタ資源の内容が各データ・バス上に
読み出されると同時に、デスティネーション・サブフィ
ールドで指定されたレジスタ資源に各データ・バス上の
値を書き込むことで転送を行う。
Each transfer field of s1trn, s2trn, and rtrn includes subfields for specifying register resources of a transfer source (source) and a transfer destination (destination). As described above, the contents of the register resource specified by the source subfield are read onto each data bus, and at the same time, the value on each data bus is written into the register resource specified by the destination subfield. To transfer.

【0063】各フィールドの値は、それぞれs1_bu
s,s2_bus,r_busに対応するデコーダS1
DEC207,S2DEC208,RDEC209によ
って解析され、各データ・バス上のレジスタ資源に対す
る読出信号および書込信号を発生する。
The value of each field is s1_bu.
Decoder S1 corresponding to s, s2_bus, r_bus
Analyzed by DEC 207, S2 DEC 208, RDEC 209 to generate read and write signals for register resources on each data bus.

【0064】図9にフィールド命令の分類と、opcフ
ィールドによるopフィールドの割当を示すように、各
フィールド命令ごとにopフィールドの役割が異なる。 (1) 分岐フィールド命令は、“cccc”で指定さ
れた分岐条件が“f”で指定される値(真または偽)で
あれば指定されたアドレス(分岐先アドレス)にマイク
ロ命令の制御を移す。
As shown in FIG. 9 which shows the classification of field instructions and the assignment of op fields by opc fields, the role of the op field is different for each field instruction. (1) The branch field instruction transfers the control of the micro instruction to the designated address (branch destination address) if the branch condition designated by "cccc" is the value (true or false) designated by "f". .

【0065】分岐先アドレスは、“aaa”およびsi
mmフィールドの値を連結して指定され、MPC201
に設定され新たな命令シーケンスのマイクロ命令がMR
OM202から読み出される。
The branch destination addresses are "aaa" and si
It is specified by concatenating the values in the mm field, and MPC201
The new instruction sequence of micro instruction is set to MR
It is read from the OM 202.

【0066】“d”は分岐フィールド命令の実行により
新たな命令シーケンスが読み出されるまでに、MROM
202から読み出される分岐フィールド命令に引続くマ
イクロ命令の実行を有効/無効にすることを指定する。
有効にすることで、マイクロ命令の実行をまったく無効
にすることなしに分岐フィールド命令を実行できる“遅
延分岐”機能を実現する。 (2) 制御フィールド命令は、“nnnnnn”で指
定された制御信号を発生する。 (3) ALU演算フィールド命令は、ALU211に
おける演算を指定する。
"D" is the MROM until a new instruction sequence is read by executing the branch field instruction.
Specifies to enable / disable the execution of the microinstruction following the branch field instruction read from 202.
By enabling it, a "delayed branch" function that can execute a branch field instruction without invalidating the execution of microinstructions is realized. (2) The control field instruction generates a control signal designated by "nnnnnn". (3) The ALU operation field instruction specifies the operation in the ALU 211.

【0067】“oooooo”は演算の種類(ex.加
算/減算/比較/論理和/論理積/排他的論理和/論理
否定)を、“tttt”は演算のデータタイプ(ex.
8/16/32ビット)、“i”は演算の種類を“oo
oooo”で指定する直接演算またはDU102の命令
デコード結果に基づいて指定する間接演算を指定し、
“ss”,“dd”は演算に使用する2つのオペランド
・データを指定する。ALU211で演算の対象になる
のは、図面では省略しているがs1_bus,s2_b
usに接続された4本のテンポラリ・レジスタのうち、
2本が用いられる。
"Oooooo" is the type of operation (ex. Addition / subtraction / comparison / logical sum / logical product / exclusive logical sum / logical negation), and "tttt" is the data type of the operation (ex.
8/16/32 bits), "i" indicates the type of operation is "oo"
Direct operation specified by "oooo" or indirect operation specified based on the instruction decoding result of the DU 102 is specified.
"Ss" and "dd" specify two operand data used for the operation. Although not shown in the drawing, the target of calculation in the ALU 211 is s1_bus, s2_b.
Of the four temporary registers connected to us,
Two are used.

【0068】ALU演算フィールド命令で指定されたA
LU演算は、次にALU演算フィールド命令が実行され
るまで保持され、ALU211は最新の指定により演算
を繰返し行う。 (4) シフタ演算フィールド命令は、SHIFT22
0における演算を指定する。“ooo”は演算の種類
(右論理シフト/左論理シフト/右算術シフト)を、
“w”はシフトするビット数をEU103内で得るかE
U103外部から得るかを指定する。
A specified by the ALU operation field instruction
The LU operation is held until the next ALU operation field instruction is executed, and the ALU 211 repeats the operation according to the latest designation. (4) The shifter operation field instruction is SHIFT22
Specifies the operation at 0. “OOO” indicates the type of operation (right logical shift / left logical shift / right arithmetic shift)
"W" is the number of bits to shift in EU103
U103 Specifies whether to obtain from outside.

【0069】各フィールド命令は、opc,opフィー
ルドの値をデコーダするフィールド命令デコーダ(以下
MDECと略す)205によって解析され、制御され
る。
Each field command is analyzed and controlled by a field command decoder (hereinafter abbreviated as MDEC) 205 which decodes the values of the opc and op fields.

【0070】SHIFT220は、以下の補助的なレジ
スタを持つ。
The SHIFT 220 has the following auxiliary registers.

【0071】シフト演算レジスタ(以下SOPRと略
す)221は、SHIFT220が行うシフト演算の種
類を保持するレジスタで、シフタ演算フィールド命令が
実行された時“ooo”をラッチする。
A shift operation register (hereinafter abbreviated as SOPR) 221 is a register that holds the type of shift operation performed by SHIFT 220, and latches "ooo" when a shifter operation field instruction is executed.

【0072】シフト・ビット数レジスタ(以下SBと略
す)222は“w”がシフト・ビット数を保持するレジ
スタで、シフタ演算フィールド命令が実行された時
“w”がシフト・ビット数をEU103内から得るよう
に指定された場合にSHIFT220に通知される。
A shift bit number register (abbreviated as SB hereinafter) 222 is a register in which "w" holds the shift bit number, and "w" indicates the shift bit number in the EU 103 when the shifter operation field instruction is executed. The SHIFT 220 is notified when it is specified to obtain from the.

【0073】図3はSHIFT220、ならびにSHI
FT220の制御に関する構成を、より詳細に示した図
面である。
FIG. 3 shows the SHIFT 220 and the SHI.
6 is a drawing showing in more detail the configuration related to control of the FT 220.

【0074】シフタ演算はSHIFT220の入力に接
続された入力レジスタ(以下SHIFTIと略す)22
4に保持された、32ビットまでの任意長のビット数分
左または右にシフトして、出力レジスタ(以下SHIF
TOと略す)226に32ビット・データを得るもので
ある。バレル・シフタ本体(以下BSHIFTと略す)
225は、SHIFTI224に格納された32ビット
・データを1)論理右シフト(SHR)、2)論理左シ
フト(SHL)、3)算術右シフト(SAR)、半クロ
ック期間でシフトするシフタである。BSHIFT22
5へシフタ演算の種類は3ビットの演算指定信号OP
R、シフト・ビット数の指定は6ビットのビット数指定
信号BITSにより加えられる。
The shifter operation is performed by an input register (hereinafter abbreviated as SHIFTI) 22 connected to the input of the SHIFT 220.
4 is shifted to the left or right by the number of bits of arbitrary length up to 32 bits held in 4, and output register (hereinafter referred to as SHIF
32 bits of data are obtained at 226. Barrel shifter body (hereinafter abbreviated as BSHIFT)
A shifter 225 shifts the 32-bit data stored in the SHIFTI 224 by 1) logical right shift (SHR), 2) logical left shift (SHL), 3) arithmetic right shift (SAR), and half clock period. BSHIFT22
5 types of shifter operation are 3-bit operation designation signal OP
The designation of R and the number of shift bits is added by a bit number designation signal BITS of 6 bits.

【0075】SHIFTI224へのデータ設定は、s
1trnフィールドまたはs2trnフィールドのデス
ティネーション・サブフィールドに“SFTI”を記述
することで(この場合、S1DEC207がデコード信
号SHIFTIWSIを発生するか、S2DEC208
がデコード信号SHIFTIWS2を発生する)、s1
_busあるいはs2_busを経由して設定される。
The data setting to SHIFTI 224 is s
By describing "SFTI" in the destination subfield of the 1trn field or the s2trn field (in this case, the S1DEC 207 generates the decode signal SHIFTIWSI or the S2DEC208
Generates a decode signal SHIFTIWS2), s1
_Bus or s2_bus.

【0076】SHIFTO226からの演算結果の読出
しは、rtrnフィールドのソース・サブフィールドに
“SFTO”を記述することで(この場合、RDEC2
09はデコード信号SHIFTORRを発生する)、S
HIFTO226の内容がトライステート・バッファ2
27を介してrtrnに読み出される。
To read the operation result from the SHIFTO 226, describe "SFTO" in the source subfield of the rtrn field (in this case, RDEC2
09 generates a decode signal SHIFTORR), S
The contents of HIFTO 226 are tristate buffer 2
It is read to rtrn via 27.

【0077】OPR信号は、シフタ演算フィールド命令
がopcフィールドで指定されたことをopcフィール
ド・デコーダ(以下OPCDECと略す)215が検知
したことによってMSHIFT信号が発生すると、op
フィールドの値をラッチするSOPR221から供給さ
れる。OPR信号は、シフタ演算フィールド命令の“o
oo”に相当する部分が供給される。
The OPR signal is an opr signal when the MSSHIFT signal is generated by the opc field decoder (hereinafter abbreviated as OPCDEC) 215 detecting that the shifter operation field instruction is designated in the opc field.
Supplied from SOPR 221 which latches the value of the field. The OPR signal is "o" of the shifter operation field instruction.
A portion corresponding to "oo" is supplied.

【0078】SOPR221にラッチされているシフタ
演算フィールド命令の“w”に相当する部分は、MPS
EL信号として、マルチプレクサ(以下SBMPXと略
す)223の入力を選択する。
The portion corresponding to "w" of the shifter operation field instruction latched by the SOPR 221 is MPS.
An input of a multiplexer (hereinafter abbreviated as SBMPX) 223 is selected as the EL signal.

【0079】MPSEL信号は0bの場合(シフト・ビ
ット数をEU103内で得るように指定された場合)B
ITSにSB222の出力SBB信号を選択出力し、1
bの場合(シフト・ビット数をEU103以外で得るよ
うに指定された場合)アライン・ビット生成回路(以下
ALBGENと略す)228の出力ALB信号を選択出
力する。
MPSEL signal is 0b (when the shift bit number is specified to be obtained in EU 103) B
Select the output SBB signal of SB222 to ITS and output 1
In the case of b (when the shift bit number is specified to be obtained by other than the EU 103), the output ALB signal of the align bit generation circuit (hereinafter abbreviated as ALBGEN) 228 is selectively output.

【0080】SB222の入力はs2_busに接続さ
れ、s2trnフィールドのデスティネーション・サブ
フィールドに“SFTB”を記述することで(この場
合、S2DEC208がデコード信号SBWS2を発生
する)、s2_busの値(下位6ビット)が設定され
る。
The input of SB222 is connected to s2_bus, and "SFTB" is described in the destination subfield of the s2trn field (in this case, S2DEC 208 generates the decode signal SBWS2), and the value of s2_bus (lower 6 bits) ) Is set.

【0081】以上説明したように、1回のシフト演算を
行うためには1)SHIFTI220の設定(s1tr
n/s2trnフィールドの指定)、2)OPR信号に
よるシフタ演算の種類指定(シフタ演算フィールド命令
の指定)、3)BITS信号によるシフト・ビット数の
指定、4)演算結果の読出し(rtrnフィールドの指
定)、の各ステップが必要である。
As described above, in order to perform the shift operation once, 1) the setting of SHIFTI 220 (s1tr
n / s2trn field specification), 2) shifter operation type specification by OPR signal (shifter operation field instruction specification), 3) shift bit number specification by BITS signal, 4) operation result read (rtrn field specification) ), Each step is required.

【0082】論理右シフト/論理左シフト/算術右シフ
トの各シフト命令を処理するマイクロプロセッサを例
に、SHIFT220の動作を説明する。
The operation of SHIFT 220 will be described by taking as an example a microprocessor that processes each shift instruction of logical right shift / logical left shift / arithmetic right shift.

【0083】論理右シフト命令、論理左シフト命令、算
術右シフト命令のそれぞれは、記述するマイクロプログ
ラムは次の様に1行のマイクロ命令で記述できる。
Each of the logical right shift instruction, the logical left shift instruction, and the arithmetic right shift instruction can be described by a one-line microinstruction as follows.

【0084】SFTI=DST;SFTB=BITS;
SHR/SHL/SAR(W);DST=SFTOf;
ENDM;“;”はそれぞれのフィールドを分離するた
めの記述である。左からs1trnフィールド、s2t
rnフィールド、opcおよびopフィールド、rtr
nフィールドに対応する。最右フィールド(“END
M;”)の意味については、後述する。
SFTI = DST; SFTB = BITS;
SHR / SHL / SAR (W); DST = SFTOf;
ENDM; “;” is a description for separating each field. From left, s1trn field, s2t
rn field, opc and op field, rtr
Corresponds to n fields. Rightmost field ("END
The meaning of M; ") will be described later.

【0085】各フィールドは、左から以下のような動作
指定の意味を持つ。 SFTI=DST: DSTで表わされる被
シフト・データを指定するレジスタ資源の内容を、s1
_busを介してSHIFTI224に転送する。 SFTB=BITS: BITSで表わされる
シフト・ビット数を指定するレジスタ資源の内容を、s
2_busを介してSB222に転送する。 SHR/SHL/SAR(W):シフタ演算としてSH
R,SHLまたはSARをSOPR221に指定し、シ
フト・ビット数としてSB222に設定された値を用い
る(“(W)”の記述により、“w”部分が0bにな
る)。 DST/SFTOf: SHIFTO226の
出力(シフタ演算結果)を、r_busを介してDST
で表わされるレジスタ資源(被シフト・データを格納し
ていた資源と同一)に転送する。
Each field has the following meanings of operation designation from the left. SFTI = DST: s1 is the content of the register resource that designates the shifted data represented by DST.
Transfer to SHIFTI 224 via _bus. SFTB = BITS: s is the content of the register resource that specifies the number of shift bits represented by BITS
Transfer to SB 222 via 2_bus. SHR / SHL / SAR (W): SH as shifter operation
R, SHL or SAR is specified in the SOPR 221, and the value set in the SB 222 is used as the number of shift bits (the description of "(W)" makes the "w" portion 0b). DST / SFTOf: The output of SHIFTO 226 (shifter operation result) is DST via r_bus.
Transfer to the register resource represented by (the same as the resource storing the shifted data).

【0086】“SFTO”にfが付加されていることに
より、シフタ演算結果が図面では省略されているPSW
(Processor Status Word)の状
態フラグを変化させるように指定される。 ENDM: マイクロプログラムが
このマイクロ命令で終了すること意味する。
Since f is added to "SFTO", the shifter operation result is not shown in the drawing.
It is specified to change the status flag of (Processor Status Word). ENDM: Means that the microprogram ends with this microinstruction.

【0087】図5に示すタイミングチャートを用いて、
本マイクロプログラムの記述を説明する。
Using the timing chart shown in FIG.
The description of this microprogram will be described.

【0088】“パイプライン動作”の行は、マイクロプ
ロセッサ100パイプライン処理の順序を示す。マイク
ロプロセッサ100では、次の基本パイプライン・ステ
ージを持つ。ALとWBステージは半クロック、それら
以外は1クロックで処理を行う。 IF(命令フェッチ): 16/32ビット長の
命令コードをIU101からフェッチする。 AL(命令アライン): IU101の出力で、
16/32ビット長混在の命令コードのLSB位置を揃
える。 ID(命令デコード): DU102が命令コー
ドをデコードし、各種信号を発生する。 MA(マイクロ命令アクセス):IDステージのデコー
ド結果にもとずき、MPC201を初期化し、MROM
202をアクセスする。 MI(マイクロ命令実行): MROM202の出力
をMR204にラッチする。EU103内の簡単な制御
信号の発生や、制御用レジスタの設定、分岐動作を行
う。 EX(命令実行): EU103で演算、内
部データ転送を実行する。前半の半クロックはs1_b
us,s2_busを用いた各レジスタ資源間どおし/
演算装置へのデータ転送を処理する。後半の半クロック
では演算装置による演算を行う。 WB(結果書戻し): r_bus用いた演算
装置から各レジスタ資源へのデータ(結果)転送を行
う。
The row of "pipeline operation" indicates the order of the pipeline processing of the microprocessor 100. The microprocessor 100 has the following basic pipeline stages. The AL and WB stages perform processing in a half clock, and the others perform processing in one clock. IF (Instruction Fetch): An instruction code of 16/32 bit length is fetched from the IU 101. AL (Instruction Align): With the output of IU101,
Align the LSB positions of the 16 / 32-bit mixed instruction code. ID (Instruction Decode): The DU 102 decodes the instruction code and generates various signals. MA (micro instruction access): Based on the decoding result of the ID stage, the MPC 201 is initialized and the MROM
Access 202. MI (Micro instruction execution): The output of the MROM 202 is latched in the MR 204. It generates a simple control signal in the EU 103, sets a control register, and branches. EX (execution of instruction): Calculation and internal data transfer are executed by the EU 103. The first half clock is s1_b
Between each register resource using us, s2_bus /
Handles the data transfer to the computing device. In the latter half of the half clock, the calculation by the calculation device is performed. WB (result return): Data (result) is transferred from the arithmetic unit using r_bus to each register resource.

【0089】さらに、後述する図6,7では次のパイプ
ライン・ステージが記述されるが、先に説明しておく。 EA(実効アドレス): AU104がメモリ・
オペランドのアドレスを計算し、BU105に通知す
る。オペランド・アドレスは、命令コードが指定する汎
用レジスタの値(ベース値)に、命令コードが含むディ
スプレースメント値を加算することで得られる。本ステ
ージは、LOADおよびSTORE命令を検知すること
で、IDステージの後半の半クロックから始まる。
Further, the following pipeline stages are described in FIGS. 6 and 7 which will be described later, which will be described first. EA (effective address): AU104 is a memory
The operand address is calculated and notified to the BU 105. The operand address is obtained by adding the displacement value included in the instruction code to the value (base value) of the general-purpose register specified by the instruction code. The present stage starts from the latter half clock of the ID stage by detecting the LOAD and STORE instructions.

【0090】図5からわかるように、シフト命令のパイ
プライン処理は、IF→AL→ID→MA→MI→EX
→WBのステージで構成される。
As can be seen from FIG. 5, the pipeline processing of the shift instruction is IF → AL → ID → MA → MI → EX.
→ It consists of WB stage.

【0091】MIステージでSHR/SHL/SAR
(W)フィールド命令は、MR204にラッチされたマ
イクロ命令がシフタ演算命令であることがOPDEC2
15により検知されMSHIFT信号が発生することに
より、“ooo”および“w”がSOPR221にラッ
チされる。BSHIFT225にはOPR221の“o
oo”をラッチした部分の出力OPRが通知され、SH
R,SHLまたはSARが指定される。
SHR / SHL / SAR at MI stage
In the (W) field instruction, it is OPDEC2 that the micro instruction latched by the MR 204 is a shifter operation instruction.
When "15" is detected by 15, and the MSSHIFT signal is generated, "ooo" and "w" are latched in the SOPR 221. For BSHIFT 225, "o" of OPR221
The output OPR of the part where "oo" is latched is notified, and SH
R, SHL or SAR is specified.

【0092】s1trnフィールドに記述された転送フ
ィールド命令は、S1DEC207によりSHIFTW
S1信号を発生し、DSTで記述された被シフト・オペ
ランドを保持するレジスタ資源の内容が出力されている
s1_busの値をSHIFTI224にラッチする。
The transfer field instruction described in the s1trn field is transferred by the S1DEC 207 to SHIFTW.
The S1 signal is generated, and the value of s1_bus in which the content of the register resource holding the shifted operand described in DST is output is latched in SHIFTI 224.

【0093】s2trnフィールドに記述された転送フ
ィールド命令は、S2DEC208によりSBWS2信
号を発生し、BITSで記述されたシフト・ビット数を
保持するレジスタ資源の内容が出力されているs2_b
usの値をSBB222にラッチする。
In the transfer field instruction described in the s2trn field, the SBWS2 signal is generated by the S2DEC 208, and the content of the register resource holding the shift bit number described in BITS is output s2_b.
The value of us is latched in SBB222.

【0094】SOPR221に保持された“w”をラッ
チした部分の出力MPSELは、シフタ演算命令が
“(W)”を記述しているため0bとなり、SBMPX
223の出力BITSにはSB222の出力SBが出力
され、BSHIFT225に通知される。
The output MPSEL of the portion latching "w" held in the SOPR 221 becomes 0b because the shifter operation instruction describes "(W)", and SBMPX
The output SB of the SB 222 is output to the output BITS of 223 and is notified to the BSHIFT 225.

【0095】BSHIFT225の演算入力となるSH
IFTI224、制御入力となるBITS,OPR信号
が確定するとBSHIFT225は半クロックで、SH
IFTI224に保持されたデータに対し、OPR信号
で指定されるシフタ演算をBITS信号出指定されるビ
ット数だけ行い、結果がSHIFTO226にラッチす
る。
SH which is the operation input of BSHIFT 225
When the IFTI 224 and the BITS and OPR signals to be the control inputs are determined, the BSHIFT 225 is a half clock and SH
The shifter operation designated by the OPR signal is performed on the data held in the IFTI 224 by the number of bits designated by the BITS signal, and the result is latched in the SHIFTO 226.

【0096】rtrnフィールドに記述された転送フィ
ールド命令は、WBステージでRDEC209によりS
HIFTORR信号を発生し、SHIFTO226の内
容がトライステート・バッファ227からr_busに
読み出され、DSTで記述された被シフト・オペランド
を保持していたレジスタ資源の内容を書き換える。同時
に図面では省略しているが、シフト結果の状態を解析す
る回路によりオーバフロー、桁あふれ、符号の状態が解
析され、PSWの内容を更新する。
The transfer field instruction described in the rtrn field is S by the RDEC 209 at the WB stage.
A HIFTOR signal is generated, the contents of SHIFTO 226 are read from the tri-state buffer 227 into r_bus, and the contents of the register resource holding the shifted operand described in DST are rewritten. At the same time, although omitted in the drawing, the circuit for analyzing the state of the shift result analyzes the overflow, the overflow, and the state of the code, and updates the contents of the PSW.

【0097】次にLOAD命令に関して、これを処理す
る1行で記述される次のマイクロプログラムを例に、S
HIFT220の動作を説明する。
Next, regarding the LOAD instruction, the following microprogram described in one line for processing the LOAD instruction is taken as an example, and S
The operation of the HIFT 220 will be described.

【0098】SFTI=OPR;SAR(A);DST
=SFTO;ENDM;各フィールドは、左から以下の
ような動作指定の意味を持つ。 SFTI=OPR: リード・メモリ・オペランドを
格納するOPR213の内容を、s1_busを介して
SHIFTI224に転送する。 SAR(A): シフタ演算としてSARをSO
PR221に指定し、シフト・ビット数としてALBG
EN228で生成された値を用いる(“(A)”の記述
により、“w”部分が1bになる)。 DST=SFTO: SHIFTO226の出力(シ
フタ演算結果)を、r_busを介してDSTで表わさ
れるレジスタ資源に転送する。 ENDM: マイクロプログラムがこのマイ
クロ命令で終了すること意味する。
SFTI = OPR; SAR (A); DST
= SFTO; ENDM; Each field has the following meanings of operation designation from the left. SFTI = OPR: Transfer the contents of the OPR 213 storing the read memory operand to the SHIFTI 224 via s1_bus. SAR (A): SO is used as shifter operation
Specified in PR221, ALBG as the number of shift bits
The value generated in EN 228 is used (the description of “(A)” makes the “w” part 1b). DST = SFTO: The output of the SHIFTO 226 (shifter operation result) is transferred to the register resource represented by DST via r_bus. ENDM: Means that the microprogram ends with this microinstruction.

【0099】図6に示すタイミングチャートを用いて、
本マイクロプログラムの記述を説明する。図面からわか
るように、LOAD命令のパイプライン処理は、IF→
AL→ID→MA→MI→EX→WBのステージを持つ
とともに、EAステージと実行が待ち合わされる(E
X)ステージを持つことが特徴である。
Using the timing chart shown in FIG. 6,
The description of this microprogram will be described. As can be seen from the drawing, the pipeline processing of the LOAD instruction is
It has AL, ID, MA, MI, EX, and WB stages, and the EA stage and execution are waited for (E
X) It is characterized by having a stage.

【0100】AU104がEAステージでオペランド・
アドレス(32ビットの内部アドレスIA0−IA3
1)を計算すると、BU105に対してバス・サイクル
(メモリ・リード)が起動される。バス・サイクルはT
1,T2ステートで構成され、T2ステートの終了時に
データ・バス端子122の値がOPR213にラッチさ
れる。
The AU 104 operates the operand at the EA stage.
Address (32-bit internal address IA0-IA3
When 1) is calculated, a bus cycle (memory read) is activated for the BU 105. Bus cycle is T
1, T2 state, and the value of the data bus terminal 122 is latched in the OPR 213 at the end of the T2 state.

【0101】図面に示すように、起動されたリード・バ
ス・サイクルが終了しないために、2つのEXステージ
(“(EX)”)が待合わせされる。また、EXステー
ジではバス・サイクルを終了してもよい事を示すREA
DY(−)127端子入力の状態(レディ状態)を監視
し、レディ状態でなければWBステーシに遷移しないよ
うに制御する。
As shown in the drawing, two EX stages ("(EX)") are queued because the activated read bus cycle does not end. In addition, REA indicating that the bus cycle may be ended in the EX stage
The state of the DY (-) 127 terminal input (ready state) is monitored, and control is performed so as not to transition to the WB stace unless it is in the ready state.

【0102】MIステージでSAR(A)フィールド命
令は、MR204にラッチされたマイクロ命令がシフタ
演算命令であることがOPDEC215により検知され
MSHIFT信号が発生することにより、“ooo”お
よび“w”がSOPR221にラッチされる。BSHI
FT225にはOPR221の“ooo”をラッチした
部分の出力OPRが通知され、SARが指定される。
In the MI stage, the SAR (A) field instruction detects that the micro instruction latched in the MR 204 is a shifter operation instruction by the OPDEC 215 and generates the MSSHIFT signal, so that "oo" and "w" are SOPR221. Latched on. BSHI
The FT 225 is notified of the output OPR of the portion where “ooo” of the OPR 221 is latched, and the SAR is designated.

【0103】s1trnフィールドに記述された転送フ
ィールド命令は、S1DEC207によりSHIFTW
S1信号を発生し、OPR213の内容をs1_bus
を介してSHIFTI224にラッチしようとする。図
面では省略しているが、BU105はリード・バス・サ
イクルが終了していないことが通知されると、EU10
3はOPR213をアクセスしようとする転送フィール
ド命令の記述(“=OPR”)を検出し、EXステージ
の実行を待ち合わせるよう、マイクロ命令の実行を制御
する。
The transfer field instruction described in the s1trn field is transferred by the S1DEC 207 to SHIFTW.
S1 signal is generated and the contents of OPR213 are s1_bus
Attempt to latch into SHIFTI 224 via. Although not shown in the drawing, when the BU 105 is notified that the read bus cycle has not ended, the EU 105
3 detects the description (“= OPR”) of the transfer field instruction that tries to access the OPR 213, and controls the execution of the micro instruction so as to wait for the execution of the EX stage.

【0104】SOPR221に保持された“w”をラッ
チした部分の出力MPSELは、シフタ演算命令が
“(A)”を記述しているため1bとなり、SBMPX
223の出力BITSにはALBGEN228の出力A
LBが出力され、BSHIFT225に通知される。
The output MPSEL of the portion latching "w" held in the SOPR 221 becomes 1b because the shifter operation instruction describes "(A)", and SBMPX.
223 output BITS to ALBGEN 228 output A
LB is output and notified to BSHIFT 225.

【0105】BSHIFT225の演算入力となるSH
IFTI224がリード・バス・サイクルの終了により
確定し、制御入力となるBITS,OPR信号が確定す
るとBSHIFT225は半クロックで、SHIFTI
224に保持されたデータに対し、SAR演算をBIT
S信号出指定されるビット数だけ行い、結果がSHIF
TO226にラッチされる。
SH which is the operation input of BSHIFT 225
When the IFTI 224 is determined by the end of the read bus cycle and the BITS and OPR signals to be the control inputs are determined, the BSHIFT 225 is a half clock and the SHIFT
SAR operation is performed on the data held in 224
S signal is output for the specified number of bits, and the result is SHIF
Latched to TO226.

【0106】rtrnフィールドに記述された転送フィ
ールド命令は、WBステージRDEC209によりSH
IFTORR信号を発生し、SHIFTO226の内容
がトライステート・バッファ227からr_busに読
み出され、DSTで記述されたメモリ・オペランドを転
送すべきレジスタ資源の内容を書き換える。
The transfer field instruction described in the rtrn field is SH by the WB stage RDEC209.
The IFTORR signal is generated, the contents of SHIFTO 226 are read from the tri-state buffer 227 to r_bus, and the contents of the register resource to which the memory operand described by DST is to be transferred are rewritten.

【0107】ここで、ALBGEN228の動作につい
て説明する。
The operation of ALBGEN 228 will be described below.

【0108】IDステージで命令デコードが完了する
と、これから実行する命令がメモリ・オペランドを使用
するかどうか、またそのオペランドのデータ・タイプが
判定できる。DTYP0−DTY01信号は、IU10
2が検知したオペランドのデータ・タイプを示し、00
bならば8ビット、01bならば16ビット、1Xbな
らば32ビット幅であることを意味する。
When the instruction decoding is completed in the ID stage, it is possible to determine whether the instruction to be executed hereafter uses the memory operand and the data type of the operand. DTYP0-DTY01 signals are IU10
2 indicates the data type of the detected operand, 00
b means 8 bits, 01b means 16 bits, and 1Xb means 32 bits.

【0109】一方、EAステージで内部アドレスの計算
が終了すると、その最下位2ビット(IA0−IA1)
も確定し、ALBGEN228に通知される。
On the other hand, when the calculation of the internal address is completed in the EA stage, the least significant 2 bits (IA0-IA1) of the internal address are calculated.
Is also determined and ALBGEN 228 is notified.

【0110】SHIFT220でSAR演算を用いてデ
ータ・アライン機能(メモリ→汎用レジスタ)を実現す
るためには、データ・タイプならびに内部アドレスにし
たがって第六図(3)に示すビット数分の右シフトを行
えば良い。
In order to realize the data align function (memory → general-purpose register) by using the SAR operation in the SHIFT220, the right shift for the number of bits shown in FIG. 6 (3) is performed according to the data type and the internal address. Just go.

【0111】右シフトにSHLではなくSARを使用し
ているのは、メモリから汎用レジスタへの転送の際に符
号拡張をするためであり、他のマイクロプロセッサでは
ゼロ拡張するためにSHLを使用することも考えられ
る。
The reason why the SAR is used instead of the SHL for the right shift is to sign-extend the transfer from the memory to the general-purpose register, and other microprocessors use the SHL for the zero-extension. It is also possible.

【0112】6ビット幅のALB(ALB(0)〜AL
B(5))は、次のような簡単な論理式で計算できる、 ALB(5)=0b; ALB(4)=IA1*DTYP1’; ALB(3)=IA0*DTYP1’*DTYP0’; ALB(2)=0b; ALB(1)=0b; ALB(0)=0b; この式で、“DTYP0’”,“DTYP1”の表現
は、それぞれDTYP0,DTYPの論理反転をとった
ものである。
6-bit wide ALB (ALB (0) to AL
B (5)) can be calculated by the following simple logical expression: ALB (5) = 0b; ALB (4) = IA1 * DTYP1 ′; ALB (3) = IA0 * DTYP1 ′ * DTYP0 ′; ALB (2) = 0b; ALB (1) = 0b; ALB (0) = 0b; In this expression, the expressions "DTYP0 '" and "DTYP1" are logical inversions of DTYP0 and DTYP, respectively.

【0113】次にSTORE命令に関して、これを処理
する1行で記述される次のマイクロプログラムを例に、
SHIFT220の動作を説明する。SHIFT220
でSAR演算を用いてデータ・アライン機能(汎用レジ
スタ→メモリ)を実現するためには、データ・タイプな
らびに内部アドレスにしたがって図10に示すビット数
分の左シフトを行えば良い。
Next, regarding the STORE instruction, taking the following microprogram described in one line for processing this as an example,
The operation of SHIFT 220 will be described. SHIFT220
In order to realize the data align function (general-purpose register → memory) by using the SAR operation, the left shift for the number of bits shown in FIG. 10 may be performed according to the data type and the internal address.

【0114】SFTI=SRC;SHL(A);OPW
=SFTO;ENDM; 各フィールドは、左から以下のような動作指定の意味を
持つ。 SFTI=SRC: SRCで表わされるレジスタ資
源の内容を、s1 busを介してSHIFTI224
に転送する。 SHL(A): シフタ演算としてSHLをSO
PR221に指定し、シフト・ビット数としてALBG
EN228で生成された値を用いる(“(A)”の記述
により、“w”部分が1bになる)。 OPW=SFTO: SHIFTO226の出力(シ
フタ演算結果)を、r_busを介してOPW214に
転送する。 ENDM: マイクロプログラムがこのマイ
クロ命令で終了すること意味する。
SFTI = SRC; SHL (A); OPW
= SFTO; ENDM; Each field has the following action specification from the left. SFTI = SRC: The contents of the register resource represented by SRC are transferred to SHIFTI 224 via s1 bus.
Transfer to. SHL (A): SHL is SO as shifter operation
Specified in PR221, ALBG as the number of shift bits
The value generated in EN 228 is used (the description of “(A)” makes the “w” part 1b). OPW = SFTO: The output of the SHIFTO 226 (shifter operation result) is transferred to the OPW 214 via r_bus. ENDM: Means that the microprogram ends with this microinstruction.

【0115】図7に示すタイミングチャートを用いて、
本マイクロプログラムの記述を説明する。図面からわか
るように、STORE命令のパイプライン処理は、IF
→AL→ID→MA→MI→EX→WBのステージを持
つとともに、EAステージを持つことが特徴である。
Using the timing chart shown in FIG. 7,
The description of this microprogram will be described. As can be seen from the drawing, the pipeline processing of the STORE instruction is
The feature is that it has an EA stage as well as an AL → ID → MA → MI → EX → WB stage.

【0116】AU104がEAステージでオペランド・
アドレス(32ビットの内部アドレスIA0−IA3
1)を計算されても直ちに、BU105に対してバス・
サイクル(メモリ・ライト)が起動されない。処理がW
Bステージに進むと、T1,T2のステートから成るラ
イト・バス・サイクルが起動され、OPW214の内容
がデータ・バス端子122に出力される。
The AU 104 operates as an operand at the EA stage.
Address (32-bit internal address IA0-IA3
Immediately after calculating 1), the bus
Cycle (memory write) is not activated. Processing is W
When proceeding to the B stage, the write bus cycle consisting of the states T1 and T2 is activated, and the contents of OPW 214 are output to the data bus terminal 122.

【0117】MIステージでSHL(A)フィールド命
令は、MR204にラッチされたマイクロ命令がシフタ
演算命令であることがOPDEC215により検知され
MSHIFT信号が発生することにより、“ooo”お
よび“w”がSOPR221にラッチされる。BSHI
FT225にはOPR221の“ooo”をラッチした
部分の出力OPRが通知され、SHLが指定される。
In the MI stage, in the SHL (A) field instruction, the OPEEDC 215 detects that the micro instruction latched by the MR 204 is a shifter operation instruction and generates an MSSHIFT signal, so that "oo" and "w" are SOPR221. Latched on. BSHI
The FT 225 is notified of the output OPR of the portion of the OPR 221 where "ooo" is latched, and SHL is designated.

【0118】s1trnフィールドに記述された転送フ
ィールド命令は、S1DEC207によりSHIFTW
S1信号を発生し、メモリ・オペランドとして転送しよ
うとするSRCで表現されるレジスタ資源の内容をs1
busを介してSHIFTI224にラッチする。
The transfer field command described in the s1trn field is transferred to the SHIFTW by the S1DEC 207.
S1 signal is generated and the contents of the register resource represented by SRC which is to be transferred as a memory operand is s1
Latch to SHIFTI 224 via bus.

【0119】SOPR221に保持された“w”をラッ
チした部分の出力MPSELは、シフタ演算命令が
“(A)”を記述しているため1bとなり、SBMPX
223の出力BITSにはALBGEN228の出力A
LBが出力され、BSHIFT225に通知される。
The output MPSEL of the portion latching "w" held in the SOPR 221 becomes 1b because the shifter operation instruction describes "(A)", and SBMPX.
223 output BITS to ALBGEN 228 output A
LB is output and notified to BSHIFT 225.

【0120】BSHIFT225の演算入力となるSH
IFTI224、制御入力となるBITS,OPR信号
が確定するとBSHIFT225は半クロックで、SH
IFTI224に保持されたデータに対し、SHL演算
をBITS信号出指定されるビット数だけ行い、結果が
SHIFTO226にラッチする。
SH which is the operation input of BSHIFT 225
When the IFTI 224 and the BITS and OPR signals to be the control inputs are determined, the BSHIFT 225 is a half clock and SH
The data held in the IFTI 224 is subjected to SHL calculation by the number of bits designated by the BITS signal, and the result is latched in the SHIFTO 226.

【0121】rtrnフィールドに記述された転送フィ
ールド命令は、WBステージでRDEC209によりS
HIFTORR信号を発生し、SHIFTO226の内
容がトライステート・バッファ227からr_busに
読み出され、OPW214に転送される。
The transfer field instruction described in the rtrn field is S by the RDEC 209 at the WB stage.
A HIFTORR signal is generated, the contents of SHIFTO 226 are read from tristate buffer 227 into r_bus, and transferred to OPW 214.

【0122】ここで、ALBGEN228の動作につい
ては、LOAD命令と同様に図10に示すものと同一で
ある。
Here, the operation of ALBGEN 228 is the same as that shown in FIG. 10 like the LOAD instruction.

【0123】[0123]

【発明の効果】以上説明したように、シフト命令を実行
処理するためのシフタを用いることで、LOAD命令お
よびSTORE命令で必要なデータ・アライン機能を容
易に実現できる。
As described above, by using the shifter for executing the shift instruction, the data align function required for the LOAD instruction and the STORE instruction can be easily realized.

【0124】シフト命令で用いるシフタの機能と、デー
タ・アライン機能を実現するために必要なシフタの機能
は、ほとんど同一のハードウェアで共用化できる。この
ため、本発明を用いることで、データ・アライン機能に
専用のハードウェアを必要としないマイクロプロセッサ
を実現できる。
The function of the shifter used for the shift instruction and the function of the shifter required to realize the data align function can be shared by almost the same hardware. Therefore, by using the present invention, it is possible to realize a microprocessor that does not require dedicated hardware for the data align function.

【0125】本発明でデータ・アライン機能実現のため
だけに専用に必要な機能としては、1)シフタに通知す
るシフト・ビット数を計算する機能、2)前記シフト・
ビット数を用いたシフタ演算機能だけであり、データ・
アライン機能実現のためのオーバヘッドは小さいことが
容易に理解できる。
In the present invention, the functions necessary only for realizing the data align function are 1) a function for calculating the number of shift bits to be notified to the shifter, and 2) the shift
Only the shifter operation function using the number of bits
It can be easily understood that the overhead for realizing the align function is small.

【0126】さらに、通常の命令実行処理のための通常
のデータ・パスを使用するため、データ・アライン処理
のための動作速度の低下を回避できる。
Further, since the normal data path for the normal instruction execution processing is used, it is possible to avoid the reduction of the operation speed for the data align processing.

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

【図1】本発明を用いたマイクロプロセッサの実施例の
概要構成を示す図である。
FIG. 1 is a diagram showing a schematic configuration of an embodiment of a microprocessor using the present invention.

【図2】図1における命令実行ユニットの構成を示す図
である。
FIG. 2 is a diagram showing a configuration of an instruction execution unit in FIG.

【図3】図2におけるシフタならびにその周辺の構成を
示す図である。
FIG. 3 is a diagram showing a configuration of a shifter in FIG. 2 and its peripherals.

【図4】従来のマイクロプロセッサと外部メモリの接続
を示す図である。
FIG. 4 is a diagram showing a connection between a conventional microprocessor and an external memory.

【図5】実施例におけるシフト命令の動作タイミングを
示す図である。
FIG. 5 is a diagram showing an operation timing of a shift instruction in the embodiment.

【図6】実施例におけるLOAD命令の動作タイミング
を示す図である。
FIG. 6 is a diagram showing an operation timing of a LOAD instruction in the embodiment.

【図7】実施例におけるSTORE命令の動作タイミン
グを示す図である。
FIG. 7 is a diagram showing an operation timing of a STORE instruction in the embodiment.

【図8】図4におけるメモリ・バンクのアクセス動作を
示す図である。
FIG. 8 is a diagram showing an access operation of the memory bank in FIG.

【図9】実施例におけるフィールド命令のフォーマット
を示す図である。
FIG. 9 is a diagram showing a format of a field instruction in the embodiment.

【図10】実施例におけるアライン・ビット生成回路の
論理を示す図である。
FIG. 10 is a diagram showing the logic of the align bit generation circuit in the embodiment.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 データ・バス幅のビット長より小さなビ
ット長を持つデータを外部メモリと転送するマイクロプ
ロセッサのデータ・アライン装置において、命令実行の
際にデータ転送を行う内部データ・バス、前記内部デー
タ・バスに接続されたシフト演算装置、およびアクセス
すべき外部メモリへのアドレスの一部分およびデータの
ビット長によりアラインすべきビット数を生成する手段
を有し、前記ビット数生成手段により生成されたビット
数に従い、前記データ・バスを介して転送されるデータ
を前記シフト演算装置によりシフトすることを特徴とす
るデータ・アライン装置。
1. An internal data bus for transferring data when an instruction is executed in a data aligning device of a microprocessor for transferring data having a bit length smaller than a bit length of a data bus width to an external memory, the internal data bus. A shift arithmetic unit connected to the data bus, and means for generating the number of bits to be aligned according to a part of the address to the external memory to be accessed and the bit length of the data are generated by the bit number generating means. A data aligning device, wherein the data transferred via the data bus is shifted by the shift operation device according to the number of bits.
【請求項2】 請求1記載のデータ・アライン装置にお
いて、さらに、マイクロプログラムを格納する手段、お
よびマイクロプログラム制御手段を有し、前記格納手段
に格納されたマイクロプログラムを前記制御手段により
命令実行処理を行うとともに前記シフト動作を制御する
ことを特徴とするデータ・アライン装置。
2. The data aligning apparatus according to claim 1, further comprising a means for storing a microprogram, and a microprogram control means, and the microprogram stored in the storage means is executed by the control means to execute an instruction. And a data aligning device for controlling the shift operation.
【請求項3】 請求2記載のデータ・アライン装置にお
いて、さらに、少なくとも3組の内部データ・バスを有
し、同時に独立した3組のデータ転送を行うことを特徴
とするデータ・アライン装置。
3. The data aligning device according to claim 2, further comprising at least three sets of internal data buses, and performing independent three sets of data transfer at the same time.
JP3184254A 1991-07-24 1991-07-24 Data alignment equipment Expired - Lifetime JP3003292B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3184254A JP3003292B2 (en) 1991-07-24 1991-07-24 Data alignment equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3184254A JP3003292B2 (en) 1991-07-24 1991-07-24 Data alignment equipment

Publications (2)

Publication Number Publication Date
JPH0528032A true JPH0528032A (en) 1993-02-05
JP3003292B2 JP3003292B2 (en) 2000-01-24

Family

ID=16150096

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3184254A Expired - Lifetime JP3003292B2 (en) 1991-07-24 1991-07-24 Data alignment equipment

Country Status (1)

Country Link
JP (1) JP3003292B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62174842A (en) * 1986-01-29 1987-07-31 Hitachi Ltd Data processor
JPS6462742A (en) * 1987-09-03 1989-03-09 Agency Ind Science Techn Storage device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62174842A (en) * 1986-01-29 1987-07-31 Hitachi Ltd Data processor
JPS6462742A (en) * 1987-09-03 1989-03-09 Agency Ind Science Techn Storage device

Also Published As

Publication number Publication date
JP3003292B2 (en) 2000-01-24

Similar Documents

Publication Publication Date Title
EP0019392B1 (en) Instruction register sequence decoder for microprogrammed data processor and method
US4338661A (en) Conditional branch unit for microprogrammed data processor
EP0996057B1 (en) Data processor with an instruction unit having a cache and a ROM
JP2616182B2 (en) Data processing device
US4312034A (en) ALU and Condition code control unit for data processor
US4897787A (en) Data processing system
EP0011412B1 (en) Bipartite control store for microprogrammed data processor
JP2718292B2 (en) Microprocessor
JPH10228376A (en) Method and program for processing multiple-register instruction
JP2000322259A (en) Data processing device
EP0338564B1 (en) Microprogram branching method and microsequencer employing the method
JP2556182B2 (en) Data processing device
US5742842A (en) Data processing apparatus for executing a vector operation under control of a master processor
JP3003292B2 (en) Data alignment equipment
JP2520882B2 (en) Data processing device and data processing method
US20030009652A1 (en) Data processing system and control method
US5187782A (en) Data processing system
EP0573071A2 (en) A microprocessor
US5784634A (en) Pipelined CPU with instruction fetch, execution and write back stages
JP2636821B2 (en) Parallel processing unit
JPH0524537B2 (en)
JP4702004B2 (en) Microcomputer
JPS63293638A (en) data processing equipment
JP2785820B2 (en) Parallel processing unit
JP2927281B2 (en) Parallel processing unit

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19991019

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

Free format text: PAYMENT UNTIL: 20071119

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20081119

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20081119

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20091119

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20091119

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20101119

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20101119

Year of fee payment: 11

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20101119

Year of fee payment: 11

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20111119

Year of fee payment: 12

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111119

Year of fee payment: 12