JPH1185677A - Bus interface unit - Google Patents

Bus interface unit

Info

Publication number
JPH1185677A
JPH1185677A JP9247064A JP24706497A JPH1185677A JP H1185677 A JPH1185677 A JP H1185677A JP 9247064 A JP9247064 A JP 9247064A JP 24706497 A JP24706497 A JP 24706497A JP H1185677 A JPH1185677 A JP H1185677A
Authority
JP
Japan
Prior art keywords
data
bus
bit
circuit
output
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
JP9247064A
Other languages
Japanese (ja)
Other versions
JP3269435B2 (en
Inventor
Sachiko Okayama
幸子 岡山
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 JP24706497A priority Critical patent/JP3269435B2/en
Publication of JPH1185677A publication Critical patent/JPH1185677A/en
Application granted granted Critical
Publication of JP3269435B2 publication Critical patent/JP3269435B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To eliminate an instruction code or processing time with processing for masking an excessive data part after reading the data of bit width narrower than that of a general-purpose register by an instruction for performing code expansion from a peripheral I/O. SOLUTION: When reading 16-bit data on an external memory through an external data bus 60 as 32-bit data, the 1st and 0th bits of an address are detected by an address decoder 49. Thus, the data on an external data bus are stored in the loworder 16 bits of a read buffer in a first bus cycle, and the data outputted by a high-order bit setting circuit are stored in the high-order 16 bits of the read buffer in a second bus cycle.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、バス・インターフ
ェース・ユニットに関し、特に外部バスのビット幅より
も大きいビット幅をもつレジスタにデータを格納するバ
ス・インターフェース・ユニットに関する。
The present invention relates to a bus interface unit, and more particularly to a bus interface unit for storing data in a register having a bit width larger than the bit width of an external bus.

【0002】[0002]

【従来の技術】近年マイクロプロセッサは、その機能を
多様化するために種々の周辺装置と接続されている。そ
のため、マイクロプロセッサ内の汎用レジスタのビット
幅と外部バスのビット幅とが異なる場合が生じている。
2. Description of the Related Art In recent years, microprocessors have been connected to various peripheral devices in order to diversify their functions. Therefore, the bit width of the general-purpose register in the microprocessor may be different from the bit width of the external bus.

【0003】このようなビット幅の違いを統一するため
にマイクロプロセッサの汎用レジスタにデータが格納さ
れる形態には、読み出したデータの最上位ビットを符号
ビットとして汎用レジスタのデータ長まで拡張する符号
拡張と、読み出したデータより上位のビットを“0”で
汎用レジスタのビット幅まで拡張する零拡張がある。
In order to unify such a difference in bit width, data is stored in a general-purpose register of a microprocessor. A code that extends to the data length of the general-purpose register using the most significant bit of the read data as a code bit is used. There is an extension and a zero extension that extends a higher-order bit of the read data to “0” to the bit width of the general-purpose register.

【0004】16ビットのデータを周辺I/Oから読み
出してマイクロプロセッサ内の32ビットの汎用レジス
タにデータを格納する場合を例に符号拡張と零拡張を説
明する。
[0004] Sign extension and zero extension will be described by taking as an example a case where 16-bit data is read from a peripheral I / O and stored in a 32-bit general-purpose register in a microprocessor.

【0005】まず、符号拡張を説明する。First, the sign extension will be described.

【0006】ビット0からビット15までで構成された
16ビット・データの最上位ビットはビット15で、こ
れが当データの符号を表わす符号ビットとなる。符号拡
張の場合は、符号ビットの状態で、32ビットの汎用レ
ジスタの上位16ビットのデータが決まる。
The most significant bit of 16-bit data composed of bits 0 to 15 is bit 15, which is a sign bit representing the sign of the data. In the case of sign extension, upper 16-bit data of a 32-bit general-purpose register is determined by the state of the sign bit.

【0007】符号ビットが“1”であるデータ、例え
ば、読み出した周辺I/Oデータが8000H(Hはh
exadecimal[16進数]表示を表す。)とす
ると、符号ビットを32ビットの汎用レジスタの上位1
6ビットに拡張し、汎用レジスタにはFFFF8000
Hが格納される。符号ビットが“0”であるデータ、例
えば7000Hを読み出したとすると、汎用レジスタに
は00007000Hが格納される。
The data whose code bit is "1", for example, the read peripheral I / O data is 8000H (H is h
Represents an exadecimal [hex] representation. ), The sign bit is the upper one of the 32-bit general-purpose register.
Expanded to 6 bits, FFFF8000 in general-purpose register
H is stored. Assuming that data with a sign bit of “0”, for example, 7000H, is read, 00007000H is stored in the general-purpose register.

【0008】零拡張の場合は、符号ビットに関わらず、
汎用レジスタの上位16ビットに“0”を拡張する。例
えば、A000Hを読み出したとすると、0000A0
00Hが汎用レジスタに格納される。
In the case of zero extension, regardless of the sign bit,
"0" is extended to the upper 16 bits of the general-purpose register. For example, if A000H is read, 0000A0
00H is stored in the general-purpose register.

【0009】RISCアーキテクチャを採用したマイク
ロプロセッサでは、命令数を最小限にするために、命令
数が限られている。このため、データの読み出し命令に
は符号拡張しか用意されていないマイクロプロセッサも
多い。
In a microprocessor employing the RISC architecture, the number of instructions is limited in order to minimize the number of instructions. For this reason, many microprocessors are provided with only a sign extension for data read instructions.

【0010】符号拡張する読み出し命令しかないマイク
ロプロセッサが32ビットの汎用レジスタに符号ビット
が“1”の16ビット・データを読み出したのであれ
ば、格納される32ビット・データのうち上位16ビッ
トが“1”となる。このため、即値データとの比較など
の処理では、上位16ビットを“0”にしてから、デー
タ処理を行う必要がある。
If a microprocessor having only a read instruction for sign extension reads 16-bit data whose sign bit is "1" in a 32-bit general-purpose register, the upper 16 bits of the 32-bit data stored are It becomes “1”. Therefore, in processing such as comparison with immediate data, it is necessary to set the upper 16 bits to “0” before performing data processing.

【0011】従来においては、汎用レジスタに格納され
ている32ビットのデータのうち上位16ビットを
“0”にする(以下、“0”にマスクするという)方法
が取られていた。この種のバス・インターフェース・ユ
ニット(以下、BIUと示す)は、第1の従来例に示す
ように、処理を行っている。
Conventionally, a method has been adopted in which the upper 16 bits of 32-bit data stored in a general-purpose register are set to "0" (hereinafter, masked to "0"). This type of bus interface unit (hereinafter, referred to as BIU) performs processing as shown in the first conventional example.

【0012】図7は、従来例1として示す符号拡張する
命令しか持たないマイクロプロセッサのシステムを示す
ブロック図である。599はマイクロプロセッサ、10
はCPU、20は32ビットの汎用レジスタ群、530
はBIU、80はA/Dコンバータ回路部、89は16
ビットA/Dコンバータ、81〜84は各々16ビット
のA/D変換結果レジスタ、32は32ビットの内部バ
ス、60は16ビットの外部データ・バス、70は32
ビットの外部アドレス・バスである。CPU10は、B
IU530と内部バス32で接続されている。
FIG. 7 is a block diagram showing a microprocessor system having only the instruction for sign extension shown as the first conventional example. 599 is a microprocessor, 10
Is a CPU, 20 is a 32-bit general-purpose register group, and 530
Is BIU, 80 is A / D converter circuit section, 89 is 16
Bit A / D converters, 81 to 84 are 16-bit A / D conversion result registers, 32 is a 32-bit internal bus, 60 is a 16-bit external data bus, and 70 is 32
External address bus for bits. The CPU 10
The IU 530 is connected to the internal bus 32.

【0013】BIU530には、図8に示す、データ入
力部540を備えている。
The BIU 530 includes a data input unit 540 shown in FIG.

【0014】同図において42は入力制御部、41は3
2ビットのリード・バッファ、544は外部アドレス・
バスのビット1(以下、A1信号とする)、43はリー
ド信号(以下、RD信号とする)である。
In FIG. 1, reference numeral 42 denotes an input control unit;
A 2-bit read buffer 544 has an external address
Bits 1 (hereinafter referred to as A1 signal) and 43 of the bus are read signals (hereinafter referred to as RD signals).

【0015】データ入力部540の機能を説明する。外
部データ・バス60上の16ビット・データは、RD信
号43が“1”であるとき、入力制御回路42からリー
ド・バッファ41に出力される。A1信号44が“0”
であるとき、入力制御回路42の出力をリード・バッフ
ァ41の下位16ビットに格納する。反対に、A1信号
44が“1”であるとき、入力制御回路42の出力をリ
ード・バッファ41の上位16ビットに格納する。
The function of the data input unit 540 will be described. The 16-bit data on the external data bus 60 is output from the input control circuit 42 to the read buffer 41 when the RD signal 43 is “1”. A1 signal 44 is "0"
, The output of the input control circuit 42 is stored in the lower 16 bits of the read buffer 41. Conversely, when the A1 signal 44 is "1", the output of the input control circuit 42 is stored in the upper 16 bits of the read buffer 41.

【0016】入力制御回路42は、RD信号43が
“1”であるときに外部データ・バス60の内容をリー
ド・バッファ41へ出力する。また、RD信号43が
“0”のときは、入力制御回路42の出力はハイ・イン
ピーダンスとなる。
The input control circuit 42 outputs the contents of the external data bus 60 to the read buffer 41 when the RD signal 43 is "1". When the RD signal 43 is "0", the output of the input control circuit 42 has high impedance.

【0017】今後、4バイト(32ビット)構成のデー
タをワード、2バイト(16ビット)構成のデータをハ
ーフワードと呼ぶ。また、図8において、92はハーフ
ワード・アクセス信号、93はワード・アクセス信号、
94は第2サイクル信号であり、いずれもBIU530
内の図示されていない制御回路からアドレス出力回路6
00へ出力されている。また、アドレス出力回路600
は内部バス32からCPU10で計算されたアドレスを
加工して外部アドレス・バス70へ出力している。
Hereinafter, data having a 4-byte (32-bit) structure is called a word, and data having a 2-byte (16-bit) structure is called a halfword. 8, 92 is a half word access signal, 93 is a word access signal,
94 is a second cycle signal, both of which are BIU530
From the control circuit (not shown) to the address output circuit 6
00 is output. Also, the address output circuit 600
Processes the address calculated by the CPU 10 from the internal bus 32 and outputs the processed address to the external address bus 70.

【0018】ハーフワード・アクセス命令がマイクロプ
ロセッサで実行されるとハーフワード・アクセス信号9
2が“1”となり、ハーフワード・アクセスであること
を表す。同様にワード・アクセス命令が実行されるとワ
ード・アクセス信号93が“1”となり、ワード・アク
セスであることを表す。第2サイクル信号94が“1”
であるときは第2サイクルであることを表している。
When a halfword access instruction is executed by the microprocessor, a halfword access signal 9 is output.
2 becomes "1", indicating that it is a halfword access. Similarly, when the word access instruction is executed, the word access signal 93 becomes "1", indicating that the access is the word access. When the second cycle signal 94 is "1"
Indicates that it is the second cycle.

【0019】データ入力部540は、図9に示す、アド
レス出力回路600を備えている。アドレス出力回路6
00を説明する。
The data input section 540 includes an address output circuit 600 shown in FIG. Address output circuit 6
00 will be described.

【0020】図9において、602と604は2入力の
AND回路、601は2入力のNOR回路、603はイ
ンバータ、605は2入力OR回路、716は内部バス
32のビット0(以下、O_A0信号)、717は内部
バス32のビット1(以下、O_A1信号)である。
In FIG. 9, 602 and 604 are 2-input AND circuits, 601 is a 2-input NOR circuit, 603 is an inverter, 605 is a 2-input OR circuit, and 716 is bit 0 of the internal bus 32 (hereinafter, O_A0 signal). , 717 are bit 1 of the internal bus 32 (hereinafter, O_A1 signal).

【0021】アドレス出力回路600の接続を説明す
る。NOR回路601はハーフワード・アクセス信号9
2と、ワード・アクセス信号93との否定論理和をと
り、その結果をAND回路602の一方の入力へ出力し
ている。AND回路602はO_A0信号716とNO
R回路601の出力の論理積をとり、その結果を外部ア
ドレス・バス70のビット0として出力する。インバー
タ603はワード・アクセス信号93の否定をAND回
路604の一方の入力へ出力している。AND回路60
4はインバータ603の出力とO_A1信号717との
論理積をとって、その結果をOR回路605の一方の入
力へ出力している。OR回路605はAND回路604
の出力と第2サイクル信号94との論理和をとって、そ
の結果を外部アドレス・バス70のビット1、つまりA
1信号44として出力する。
The connection of the address output circuit 600 will be described. The NOR circuit 601 receives the halfword access signal 9
2 and the word access signal 93 are NORed, and the result is output to one input of an AND circuit 602. The AND circuit 602 outputs the O_A0 signal 716 and NO
The logical product of the output of the R circuit 601 is obtained, and the result is output as bit 0 of the external address bus 70. Inverter 603 outputs the negation of word access signal 93 to one input of AND circuit 604. AND circuit 60
4 takes the logical product of the output of the inverter 603 and the O_A1 signal 717, and outputs the result to one input of the OR circuit 605. OR circuit 605 is AND circuit 604
Of the external address bus 70, that is, A
Output as one signal 44.

【0022】つぎに、アドレス出力回路600の機能を
説明する。
Next, the function of the address output circuit 600 will be described.

【0023】まず、ハーフワード・アクセス信号92が
“1”であるときは、アドレス出力回路600は内部バ
ス32のビット0を“0”にマスクした結果を外部アド
レス・バス70に出力する。
First, when the halfword access signal 92 is "1", the address output circuit 600 outputs the result of masking bit 0 of the internal bus 32 to "0" to the external address bus 70.

【0024】ワード・アクセス信号93が“1”である
ときは、アドレス出力回路600は32ビット・アドレ
スのビット0とビット1を“0”にマスクした結果を外
部アドレス・バス70に出力する。
When the word access signal 93 is "1", the address output circuit 600 outputs the result of masking bit 0 and bit 1 of the 32-bit address to "0" to the external address bus 70.

【0025】ハーフワード・アクセス信号92、ワード
・アクセス信号93が両方とも“0”であるときは、ア
ドレス出力回路600はCPU10で生成された32ビ
ット・アドレスをそのまま外部アドレス・バス70に出
力する。また、第2サイクル信号94が“1”であると
きは、O_A1信号716の状態にかかわらず、外部ア
ドレス・バス70のビット1は“1”となる。
When both the halfword access signal 92 and the word access signal 93 are "0", the address output circuit 600 outputs the 32-bit address generated by the CPU 10 to the external address bus 70 as it is. . When the second cycle signal 94 is "1", the bit 1 of the external address bus 70 is "1" regardless of the state of the O_A1 signal 716.

【0026】次に、汎用レジスタ群にA/D変換結果レ
ジスタの内容が格納される動作を図7、8、9を使って
説明する。
Next, the operation of storing the contents of the A / D conversion result register in the general-purpose register group will be described with reference to FIGS.

【0027】A/Dコンバータ89のA/D変換結果
は、A/Dコンバータ回路部80内の制御によってA/
D変換結果レジスタ81に格納されている。16ビット
のA/D変換結果レジスタ81〜84のアドレスは、F
FFFF390HからFFFFF39CHまでのワード
境界、すなわちFFFFF390H,FFFFF394
H,FFFFF398H,FFFFF39CHに割り付
けられている。ただし、A/D変換結果レジスタに割り
当てられていないアドレスを読み出すと、不定のデータ
が読み出される構成となっているものとする。
The result of the A / D conversion by the A / D converter 89 is controlled by the control in the A / D converter circuit section 80.
It is stored in the D conversion result register 81. The addresses of the 16-bit A / D conversion result registers 81 to 84 are F
Word boundaries from FFFF390H to FFFFF39CH, that is, FFFFF390H, FFFFF394
H, FFFFF398H and FFFFF39CH. However, when an address that is not assigned to the A / D conversion result register is read, indefinite data is read.

【0028】まず、CPU10がハーフワード・アクセ
スでA/D変換結果レジスタ81を読み出す場合を説明
する。ハーフワード・アクセスであるので、ハーフワー
ド・アクセス信号92が“1”となる。このとき、ワー
ド・アクセス信号93は“0”である。アドレス出力回
路600は外部アドレス・バス70にFFFFF390
Hを出力する。
First, the case where the CPU 10 reads the A / D conversion result register 81 by half word access will be described. Since the access is a halfword access, the halfword access signal 92 becomes "1". At this time, the word access signal 93 is "0". The address output circuit 600 connects the external address bus 70 to the FFFFF390
H is output.

【0029】RD信号43が“1”、A1信号44が
“0”となって、外部データ・バス60のデータがリー
ド・バッファ41の下位16ビットに格納される。リー
ド・バッファ41から内部データ・バス32を介して、
CPU10にリード・バッファ41の下位16ビットが
出力される。CPU10では、内部データ・バス32の
15ビット目を上位16ビットに符号拡張して汎用レジ
スタに格納する。
The RD signal 43 becomes "1" and the A1 signal 44 becomes "0", and the data on the external data bus 60 is stored in the lower 16 bits of the read buffer 41. From the read buffer 41 via the internal data bus 32,
The lower 16 bits of the read buffer 41 are output to the CPU 10. In the CPU 10, the 15th bit of the internal data bus 32 is sign-extended to the upper 16 bits and stored in a general-purpose register.

【0030】次に、CPU10がワード・アクセスでA
/D変換レジスタ81を読み出す場合を説明する。
Next, the CPU 10 executes A by word access.
The case where the / D conversion register 81 is read will be described.

【0031】外部データ・バス60は16ビット幅であ
るため、32ビット・データを読み出すために、バス・
サイクルは、2回起動される。1回目のバス・サイクル
ではFFFFF390Hから16ビットのデータを読み
出し、2回目のバス・サイクルでFFFFF392Hか
ら16ビットのデータを読み出す制御が行われる。この
際、第2サイクル信号94は1回目のバス・サイクルで
は“0”を、2回目のバス・サイクルでは“1”のレベ
ルとなる。そのため、1回目のバス・サイクルではA1
信号44は“0”、2回目のバス・サイクルではA1信
号44は“1”が出力されている。
Since the external data bus 60 has a width of 16 bits, the bus bus is used to read out 32-bit data.
The cycle is started twice. In the first bus cycle, 16-bit data is read from FFFFF390H, and in the second bus cycle, 16-bit data is read from FFFFF392H. At this time, the second cycle signal 94 becomes "0" in the first bus cycle and "1" in the second bus cycle. Therefore, in the first bus cycle, A1
The signal 44 outputs "0" and the A1 signal 44 outputs "1" in the second bus cycle.

【0032】また、ワード・アクセスであるので、ワー
ド・アクセス信号93が“1”であり、ハーフワード・
アクセス信号92は“0”である。
Since word access is used, the word access signal 93 is "1" and the half word access signal 93 is "1".
The access signal 92 is “0”.

【0033】1回目のバス・サイクルでA1信号は
“0”、RD信号43が“1”となって、外部データ・
バス60からFFFFF390Hから16ビットのデー
タをリード・バッファ41が下位16ビットに格納す
る。2回目のバス・サイクルで、第2サイクル信号94
が“1”となるので、A1信号44が“1”となる。続
いて、RD信号43が“1”となって、FFFFF39
2Hから16ビットの不定のデータをリード・バッファ
41の上位16ビットに格納する。リード・バッファ4
1から内部データ・バス32を介して、CPU10がリ
ード・バッファ41の内容を入力する。CPU10は、
上位16ビットが不定であるデータを汎用レジスタに格
納する。
In the first bus cycle, the A1 signal becomes "0", the RD signal 43 becomes "1", and the external data
The read buffer 41 stores 16-bit data from the FFFFF 390H from the bus 60 in the lower 16 bits. In the second bus cycle, the second cycle signal 94
Becomes "1", so that the A1 signal 44 becomes "1". Subsequently, the RD signal 43 becomes “1” and the FFFFF 39
Undefined data of 16 bits from 2H is stored in the upper 16 bits of the read buffer 41. Read buffer 4
The CPU 10 inputs the contents of the read buffer 41 from 1 through the internal data bus 32. CPU 10
Data whose upper 16 bits are undefined are stored in a general-purpose register.

【0034】このように32ビットの汎用レジスタに1
6ビット・データを格納するときに、上位16ビットに
不要な不定データが入ってしまう。そこで、ソフトウエ
アで上位16ビットをマスクする処理が必要となる。
As described above, 1 is stored in the 32-bit general-purpose register.
When storing 6-bit data, unnecessary indefinite data is stored in the upper 16 bits. Therefore, processing for masking the upper 16 bits by software is required.

【0035】周辺I/Oからデータを読み出してマスク
する処理としては、以下のような処理が挙げられる。
The processing for reading data from the peripheral I / O and masking includes the following processing.

【0036】命令(1):周辺I/Oから16ビット・
データを読み出して汎用レジスタAに格納する。
Instruction (1): 16 bits from peripheral I / O
The data is read and stored in the general-purpose register A.

【0037】命令(2):0000FFFFHと汎用レ
ジスタAの内容と論理積を取った結果を汎用レジスタA
に格納する処理を行う。
Instruction (2): The result of taking the logical product of 0000FFFFH and the contents of general-purpose register A is applied to general-purpose register A
Perform the process of storing in.

【0038】このように周辺I/Oから16ビット・デ
ータを読み出すたびに、命令(2)で行われる処理が必
要となる。
As described above, every time 16-bit data is read from the peripheral I / O, the processing performed by the instruction (2) is required.

【0039】第2の従来例は、特開平2−116938
号公報“可変語長メモリ装置”に示されるように、8ビ
ット・データを32ビット・データに変換するための機
能を備えている。処理対象となるデータを保持するメモ
リと、このメモリに対するマイクロプロセッサのアドレ
ス割り付けを変更してマイクロプロセッサから見た前記
メモリのデータ幅を変更自在にするアドレス変換回路
と、このアドレス変換回路によるビット幅変更処理に対
応してデータの符号長処理を選択的に行う符号拡張回路
を備えている。
A second conventional example is disclosed in Japanese Patent Laid-Open No. 2-116938.
As disclosed in Japanese Unexamined Patent Application Publication No. H10-171, "variable word length memory device", a function for converting 8-bit data into 32-bit data is provided. A memory for holding data to be processed, an address conversion circuit for changing the address assignment of the microprocessor to the memory to freely change the data width of the memory as viewed from the microprocessor, and a bit width by the address conversion circuit A code extension circuit for selectively performing code length processing of data in response to the change processing is provided.

【0040】第2の従来例の構成を図10に示す。同図
において、メモリとマイクロプロセッサとのデータ入出
力を行う8ビットの双方向バッファ606と、制御回路
(図示していない)からの符号拡張信号が“0”である
ときには接地電圧を取り込んで“0”を出力し、前記制
御回路からの符号拡張信号が“1”であるときにはメモ
リから読み出されたデータの最上位ビット、つまり符号
ビットを取り込んで、これを出力するデータセレクタ6
07と、このデータセレクタ607から出力される
“0”または“1”をデータの上位24ビットとしてマ
イクロプロセッサに供給する単方向バッファ608とを
備えている。
FIG. 10 shows the configuration of the second conventional example. In the figure, an 8-bit bidirectional buffer 606 for inputting / outputting data between a memory and a microprocessor, and when a sign extension signal from a control circuit (not shown) is "0", the ground voltage is taken in. 0 ". When the sign extension signal from the control circuit is" 1 ", the most significant bit of the data read from the memory, that is, the sign bit, is taken in, and the data selector 6 which outputs it.
07 and a unidirectional buffer 608 for supplying "0" or "1" output from the data selector 607 to the microprocessor as upper 24 bits of data.

【0041】符号拡張信号が“0”であるときに、メモ
リから8ビット・データが読み出されたときには、双方
向バッファ608によってこれを取り込んで32ビット
・データの下位8ビットとして前記マイクロプロセッサ
に供給する。また、データセレクタから出力される
“0”に基づき、単方向バッファ608から前記32ビ
ット・データの上位24ビットとして、“0”をマイク
ロプロセッサに出力する。
When 8-bit data is read from the memory when the sign extension signal is "0", the 8-bit data is fetched by the bidirectional buffer 608 and sent to the microprocessor as the lower 8 bits of 32-bit data. Supply. Further, based on “0” output from the data selector, the unidirectional buffer 608 outputs “0” to the microprocessor as the upper 24 bits of the 32-bit data.

【0042】符号拡張信号が“1”であるときに、メモ
リから8ビット・データが読み出されたときには、双方
向バッファ608によってこれを取り込んで32ビット
・データの下位8ビットとして前記マイクロプロセッサ
に供給する。また、データセレクタから出力される最上
位ビットに基づき、単方向バッファ608から、前記3
2ビット・データの上位24ビットとして、符号ビット
を32ビットまでに拡張してマイクロプロセッサに出力
する。
When 8-bit data is read from the memory when the sign extension signal is "1", the 8-bit data is fetched by the bidirectional buffer 608 and is sent to the microprocessor as lower 8 bits of 32-bit data. Supply. Also, based on the most significant bit output from the data selector, the unidirectional buffer 608 outputs
The sign bit is extended to 32 bits as the upper 24 bits of the 2-bit data and output to the microprocessor.

【0043】[0043]

【発明が解決しようとする課題】第1の従来例では、汎
用レジスタの上位16ビットをマスクするための命令コ
ードと処理時間がオーバーヘッドとなっていた。
In the first conventional example, the instruction code for masking the upper 16 bits of the general-purpose register and the processing time are overhead.

【0044】その理由は、16ビットの周辺I/Oを1
6ビット、32ビットのどちらでデータを読み出して
も、上位16ビットには余分なデータを含むデータとし
て、32ビットの汎用レジスタに格納されることにあ
る。
The reason is that 16-bit peripheral I / O is set to 1
Regardless of whether data is read out of 6 bits or 32 bits, the upper 16 bits are stored in a 32-bit general-purpose register as data containing extra data.

【0045】第2の従来例では、符号拡張回路によっ
て、メモリのデータを符号拡張したり、追加するデータ
部分に“0”を出力する構成にしたため、従来から、問
題になっていたデータ幅の変換に対するソフトウエアの
オーバーヘッドがなくなる。
In the second conventional example, the data in the memory is sign-extended by the sign extension circuit or "0" is output to the data portion to be added. Eliminate software overhead for conversion.

【0046】しかし、第1の従来例にみられる外部デー
タ・バス60のビット幅が16ビットであり、かつ汎用
レジスタのビット幅が32ビットであるマイクロプロセ
ッサにおいては、外部データ・バス60を介して32ビ
ット・データを2回のバス・サイクルで読み出してい
る。このような場合については第2の従来例の構成は外
部の8ビット・データを32ビット・データに変換する
ために、上位ビットを付加するだけのデータ幅の変換し
か行わない。このため、32ビット・データを読み出す
ことには対処できない。
However, in a microprocessor in which the bit width of the external data bus 60 is 16 bits and the bit width of the general-purpose register is 32 bits, the external data bus 60 is used. Thus, 32-bit data is read in two bus cycles. In such a case, the configuration of the second conventional example converts only 8-bit data externally into 32-bit data, so that only the data width is converted by adding upper bits. Therefore, it is not possible to cope with reading 32-bit data.

【0047】本発明の目的は、上記問題点を解消して、
リード・バッファの上位16ビットに“0”を出力させ
て、特定のアドレスから16ビット・データをワード・
アクセスで読み出した時に、符号拡張されていない16
ビット・データを汎用レジスタに格納できるバス・イン
ターフェース・ユニットを提供することにある。
An object of the present invention is to solve the above problems,
By outputting “0” to the upper 16 bits of the read buffer, 16-bit data from a specific address is read out of the word buffer.
When read by access, 16 is not sign-extended
A bus interface unit capable of storing bit data in a general-purpose register.

【0048】[0048]

【課題を解決するための手段】上記の課題を解決するた
めに、本発明のバス・インターフェース・ユニットは、
第1のビット幅を有する第1のデータバスとこの第1の
データバスよりもビット幅の小さい第2のビット幅を有
する第2のデータバスとに接続され前記第2のデータバ
スからデータを読み出す読出回路と、前記読み出される
データのアドレスを検出する検出回路と、前記読み出し
たデータをバッファに格納して前記第1のデータバスに
転送する転送回路と、前記検出手段が前記読み出される
データのアドレスが所定のアドレスであることを検出し
たとき、前記読出手段は1回目のサイクルで読み出した
データを前記バッファの対応する下位ビットに格納し、
2回目のサイクルでは予め定められた値を前記バッファ
の対応する上位ビットに格納することを特徴とする。
In order to solve the above-mentioned problems, a bus interface unit of the present invention comprises:
A data bus is connected to a first data bus having a first bit width and a second data bus having a second bit width smaller than the first data bus and having a second bit width. A read circuit for reading, a detection circuit for detecting an address of the data to be read, a transfer circuit for storing the read data in a buffer and transferring the read data to the first data bus; When detecting that the address is a predetermined address, the reading means stores the data read in the first cycle in a corresponding lower bit of the buffer,
In a second cycle, a predetermined value is stored in a corresponding upper bit of the buffer.

【0049】このような構成によって、予め第2のデー
タバスのデータに対してデータ処理を行うことができる
ため、第1のデータバスに読み出されたデータを汎用レ
ジスタに格納した後にソフトウエアによって処理する必
要はなくなり、処理時間および命令コードの増加を防ぐ
ことができる。
With such a configuration, data processing can be performed on the data on the second data bus in advance, so that the data read on the first data bus is stored in a general-purpose register, and then the data is processed by software. There is no need to perform processing, and it is possible to prevent an increase in processing time and instruction codes.

【0050】[0050]

【発明の実施の形態】前述の通り、第1の従来例では、
読み出したデータのアドレスに関わらず、A1信号44
の値が“1”のときは、外部データ・バス60の値をリ
ード・バッファ41の上位16ビットに格納していた。
しかし、本実施例では、特定のアドレスのメモリから1
6ビット・データをワード・アクセスで読み出した場合
は、A1信号44の値が“1”のときにリード・バッフ
ァ41の上位16ビットに“0”を格納する構成として
いる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS As described above, in the first conventional example,
Regardless of the address of the read data, the A1 signal 44
Is "1", the value of the external data bus 60 is stored in the upper 16 bits of the read buffer 41.
However, in the present embodiment, 1
When 6-bit data is read by word access, “0” is stored in the upper 16 bits of the read buffer 41 when the value of the A1 signal 44 is “1”.

【0051】以下、本発明の実施例について図面を参照
して説明する。図1は、本発明の一実施例によるマイク
ロプロセッサ・システムの構成を示すブロック図であ
る。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a microprocessor system according to one embodiment of the present invention.

【0052】図1において、99はマイクロプロセッ
サ、10はCPU、20は32ビットの汎用レジスタ
群、30はBIU、89は16ビットA/Dコンバー
タ、80はA/Dコンバータ回路部、81〜84は各々
16ビットのA/D変換結果レジスタ、32は32ビッ
トの内部バス、60は16ビットの外部データ・バス、
70は32ビットの外部アドレス・バスである。CPU
10は、BIU30と内部バス32で接続されている。
In FIG. 1, 99 is a microprocessor, 10 is a CPU, 20 is a 32-bit general-purpose register group, 30 is a BIU, 89 is a 16-bit A / D converter, 80 is an A / D converter circuit, and 81 to 84. Is a 16-bit A / D conversion result register, 32 is a 32-bit internal bus, 60 is a 16-bit external data bus,
70 is a 32-bit external address bus. CPU
Reference numeral 10 is connected to the BIU 30 via an internal bus 32.

【0053】BIU30は、図2に示すデータ入力部4
0を図7のデータ入力部540の代わりに備えている。
これからデータ入力部40の説明をする。
BIU 30 is connected to data input unit 4 shown in FIG.
0 is provided instead of the data input unit 540 of FIG.
The data input unit 40 will now be described.

【0054】図2において42は入力制御部、41は3
2ビットのリード・バッファ、44は外部アドレス・バ
スのビット1であるA1信号、43はRD信号、45、
47は2入力のAND回路、46はインバーター、49
はアドレスデコーダ、48は零拡張指定番号、100は
上位ビット設定回路、92はハーフワード・アクセス信
号、93はワード・アクセス信号、94は第2サイクル
信号、321は32ビットの内部アドレス・バス、32
2は32ビットの内部データ・バスである。
In FIG. 2, reference numeral 42 denotes an input control unit;
A 2-bit read buffer, 44 is an A1 signal which is bit 1 of the external address bus, 43 is an RD signal, 45,
47 is a 2-input AND circuit, 46 is an inverter, 49
Is an address decoder, 48 is a zero extension designation number, 100 is an upper bit setting circuit, 92 is a halfword access signal, 93 is a word access signal, 94 is a second cycle signal, 321 is a 32-bit internal address bus, 32
2 is a 32-bit internal data bus.

【0055】入力制御回路42は、その入力が“1”で
あるときに外部データ・バス60上のデータをリード・
バッファ41に出力する。また、入力が“0”であると
きは、入力制御回路41はハイ・インピーダンスを出力
する。
The input control circuit 42 reads data on the external data bus 60 when its input is "1".
Output to the buffer 41. When the input is “0”, the input control circuit 41 outputs high impedance.

【0056】A1信号44は、リード・バッファ41と
AND回路47に出力されている。A1信号44が
“0”であるとき、入力制御回路42の出力をリード・
バッファ41の下位16ビットに格納する。反対に、A
1信号44が“1”であるとき、入力制御回路42の出
力をリード・バッファ41の上位16ビットに格納す
る。
The A1 signal 44 is output to the read buffer 41 and the AND circuit 47. When the A1 signal 44 is "0", the output of the input control circuit 42 is read.
The data is stored in the lower 16 bits of the buffer 41. Conversely, A
When the 1 signal 44 is “1”, the output of the input control circuit 42 is stored in the upper 16 bits of the read buffer 41.

【0057】アドレスデコーダ49は、ワード境界に設
定されている16ビット・データのうち零拡張で読み出
したいアドレスを入力したときに、零拡張指定信号48
が“1”となる構成となっている。
When the address decoder 49 inputs an address to be read with zero extension among 16-bit data set at a word boundary, the zero extension designation signal 48
Is "1".

【0058】AND回路45はRD信号43とインバー
タ46の出力の論理積をとって、その結果を入力制御回
路42の入力へ出力している。
The AND circuit 45 takes the logical product of the RD signal 43 and the output of the inverter 46, and outputs the result to the input of the input control circuit 42.

【0059】AND回路47は、A1信号44と零拡張
指定信号48との論理積をとって、その結果を上位ビッ
ト設定回路100とインバータ46に出力する。
The AND circuit 47 takes the logical product of the A1 signal 44 and the zero extension designation signal 48, and outputs the result to the upper bit setting circuit 100 and the inverter 46.

【0060】インバータ46はAND回路47の出力の
論理の反転をとって、その結果をAND回路45の一方
の入力に出力している。
The inverter 46 inverts the logic of the output of the AND circuit 47 and outputs the result to one input of the AND circuit 45.

【0061】上位ビット設定回路100は入力が“1”
であるとき、リード・バッファ41に0000Hを出力
する構成である。入力が“0”であるとき、上位ビット
設定回路100の出力はハイ・インピーダンスである。
The input of the upper bit setting circuit 100 is "1".
, 0000H is output to the read buffer 41. When the input is “0”, the output of the upper bit setting circuit 100 is high impedance.

【0062】データ入力部40はアドレス出力回路60
0を備えているが、図8のアドレス出力回路600と同
一である。アドレス出力回路600を説明する。
The data input section 40 has an address output circuit 60
0, but the same as the address output circuit 600 of FIG. The address output circuit 600 will be described.

【0063】図9において、602と604は2入力の
AND回路、601は2入力のNOR回路、603はイ
ンバータ、605は2入力OR回路、716は内部バス
32のビット0(以下、O_A0信号)、717は内部
バス32のビット1(以下、O_A1信号)である。
In FIG. 9, 602 and 604 are 2-input AND circuits, 601 is a 2-input NOR circuit, 603 is an inverter, 605 is a 2-input OR circuit, and 716 is bit 0 of the internal bus 32 (hereinafter, O_A0 signal). , 717 are bit 1 of the internal bus 32 (hereinafter, O_A1 signal).

【0064】アドレス出力回路600の接続を説明す
る。NOR回路601はハーフワード・アクセス信号9
2と、ワード・アクセス信号93との否定論理和をと
り、その結果をAND回路602の一方の入力へ出力し
ている。AND回路602はO_A0信号716とNO
R回路601の出力の論理積をとり、その結果を外部ア
ドレス・バス70のビット0として出力する。インバー
タ603はワード・アクセス信号93の否定をAND回
路604の一方の入力へ出力している。AND回路60
4はインバータ603の出力とO_A1信号717との
論理積をとって、その結果をOR回路605の一方の入
力へ出力している。OR回路605はAND回路604
の出力と第2サイクル信号94との論理和をとって、そ
の結果を外部アドレス・バス70のビット1、つまりA
1信号44として出力する。
The connection of the address output circuit 600 will be described. The NOR circuit 601 receives the halfword access signal 9
2 and the word access signal 93 are NORed, and the result is output to one input of an AND circuit 602. The AND circuit 602 outputs the O_A0 signal 716 and NO
The logical product of the output of the R circuit 601 is obtained, and the result is output as bit 0 of the external address bus 70. Inverter 603 outputs the negation of word access signal 93 to one input of AND circuit 604. AND circuit 60
4 takes the logical product of the output of the inverter 603 and the O_A1 signal 717, and outputs the result to one input of the OR circuit 605. OR circuit 605 is AND circuit 604
Of the external address bus 70, that is, A
Output as one signal 44.

【0065】つぎに、アドレス出力回路600の機能を
説明する。
Next, the function of the address output circuit 600 will be described.

【0066】ハーフワード・アクセス信号92が“1”
であるときは、アドレス出力回路600は内部アドレス
・バス321のビット0を“0”にマスクした結果を外
部アドレス・バス70に出力する。
When the halfword access signal 92 is "1"
, The address output circuit 600 outputs the result of masking bit 0 of the internal address bus 321 to “0” to the external address bus 70.

【0067】ワード・アクセス信号93が“1”である
ときは、アドレス出力回路600は32ビット・アドレ
スのビット0とビット1を“0”にマスクした結果を外
部アドレス・バス70に出力する。
When the word access signal 93 is "1", the address output circuit 600 outputs the result obtained by masking bit 0 and bit 1 of the 32-bit address to "0" to the external address bus 70.

【0068】ハーフワード・アクセス信号92、ワード
・アクセス信号93が両方とも“0”であるときは、ア
ドレス出力回路600はCPU10で生成された32ビ
ット・アドレスをそのまま外部アドレス・バス70に出
力する。
When both the half word access signal 92 and the word access signal 93 are "0", the address output circuit 600 outputs the 32-bit address generated by the CPU 10 to the external address bus 70 as it is. .

【0069】また、第2サイクル信号94が“1”であ
るときは、O_A1信号716の状態にかかわらず、外
部アドレス・バス70のビット1は“1”となる。
When the second cycle signal 94 is "1", the bit 1 of the external address bus 70 becomes "1" regardless of the state of the O_A1 signal 716.

【0070】図2を参照して、A/D変換結果レジスタ
81を読み出す説明をする。BIU30の制御によっ
て、外部アドレス・バス70にFFFFF390Hが出
力され、A/D変換レジスタ81のデータが外部データ
・バス60上に、出力されているとする。
Referring to FIG. 2, a description will be given of reading the A / D conversion result register 81. It is assumed that the FFFFF390H is output to the external address bus 70 under the control of the BIU 30 and the data of the A / D conversion register 81 is output to the external data bus 60.

【0071】まず、ハーフワード・アクセスでA/D変
換結果レジスタを読み出す場合を説明する。
First, a case where the A / D conversion result register is read by halfword access will be described.

【0072】リード・サイクルで、ハーフワード・アク
セス信号92が“1”となる。また、アドレスデコーダ
49が有効になって零拡張指定信号48が“1”、A1
信号44が“0”となって、AND回路47の出力は
“0”となる。このため、上位ビット設定回路100は
無効である。このとき、AND回路47の出力の反転は
“1”となる。また、RD信号43が“1”になるの
で、AND回路45の出力は“1”となる。したがっ
て、外部データ・バス60のデータがリード・バッファ
41の下位16ビットに格納される。リード・バッファ
41から内部データ・バスを介して、CPU10にリー
ド・バッファ41の下位16ビットが出力される。CP
U10では、内部データ・バス322の15ビット目を
上位16ビットに符号拡張して、汎用レジスタ群20の
うちの指定された汎用レジスタに格納する。
In the read cycle, the half word access signal 92 becomes "1". Further, the address decoder 49 becomes valid and the zero extension designation signal 48 becomes "1", A1
The signal 44 becomes "0", and the output of the AND circuit 47 becomes "0". Therefore, the upper bit setting circuit 100 is invalid. At this time, the output of the AND circuit 47 is inverted to “1”. Further, since the RD signal 43 becomes “1”, the output of the AND circuit 45 becomes “1”. Therefore, the data on the external data bus 60 is stored in the lower 16 bits of the read buffer 41. The lower 16 bits of the read buffer 41 are output from the read buffer 41 to the CPU 10 via the internal data bus. CP
In U10, the 15th bit of the internal data bus 322 is sign-extended to the upper 16 bits and stored in the designated general-purpose register of the general-purpose register group 20.

【0073】次に、ワード・アクセスでA/D変換結果
レジスタを読み出す場合を図2、3を用いて説明する。
Next, the case where the A / D conversion result register is read by word access will be described with reference to FIGS.

【0074】外部データ・バス60は16ビット幅であ
るため、32ビット・データを読み出すために、バス・
サイクルは2回起動される。従来例1と同じに、1回目
のバス・サイクルではA1信号542は“0”、2回目
のバス・サイクルではA1信号44は“1”が出力され
ている。
Since the external data bus 60 has a width of 16 bits, the bus bus is used to read out 32-bit data.
The cycle is started twice. As in the first conventional example, the A1 signal 542 is "0" in the first bus cycle, and the A1 signal 44 is "1" in the second bus cycle.

【0075】図3において、1回目のバス・サイクル
は、T1、T2期間である。そして、2回目のバス・サ
イクルはT1S、T2S期間である。また、図2には示
していないが、各機能はクロック信号(図3中、CLK
と示す)のタイミングにより動作する。
In FIG. 3, the first bus cycle is a period of T1 and T2. The second bus cycle is a T1S and T2S period. Although not shown in FIG. 2, each function is performed by a clock signal (CLK in FIG. 3).
).

【0076】T1期間より、アドレス出力回路600よ
り外部アドレス・バス70にFFFFF390Hが出力
される。同時にアドレスデコーダ49が有効になって零
拡張指定信号48が“1”、A1信号44が“0”とな
って、AND回路47の出力は“0”となる。このた
め、上位ビット設定回路100は無効であり、入力制御
回路42の出力がリード・バッファ41に格納される。
このとき、インバータ46の出力は“1”となる。ま
た、T2期間でRD信号43が“1”になるので、AN
D回路45の出力は“1”となる。したがって、外部デ
ータ・バス60のデータがリード・バッファ41の下位
16ビットに格納される。
During the period T1, the address output circuit 600 outputs FFFFF390H to the external address bus 70. At the same time, the address decoder 49 becomes valid, the zero extension designation signal 48 becomes "1", the A1 signal 44 becomes "0", and the output of the AND circuit 47 becomes "0". Therefore, the upper bit setting circuit 100 is invalid, and the output of the input control circuit 42 is stored in the read buffer 41.
At this time, the output of the inverter 46 becomes "1". Further, since the RD signal 43 becomes “1” in the T2 period,
The output of the D circuit 45 becomes "1". Therefore, the data on the external data bus 60 is stored in the lower 16 bits of the read buffer 41.

【0077】T1S期間も引き続きアドレスデコーダ4
9が有効になって、零拡張指定信号48が“1”とな
る。T1S,T2S期間は、第2サイクル信号94が
“1”となって、A1信号44が“1”となる。よっ
て、AND回路47の出力は“1”となる。このため、
上位ビット設定回路100は有効であり、リード・バッ
ファ41に0000Hが出力される。一方、インバータ
46の出力は“0”となる。そのため、T2S期間でR
D信号43が“1”になっても、AND回路45の出力
は“0”となって、入力制御回路42の出力はハイ・イ
ンピーダンスとなる。したがって、0000Hがリード
・バッファ41の上位16ビットに格納される。
The address decoder 4 continues during the T1S period.
9 becomes valid, and the zero extension designation signal 48 becomes "1". In the T1S and T2S periods, the second cycle signal 94 becomes "1" and the A1 signal 44 becomes "1". Therefore, the output of the AND circuit 47 becomes “1”. For this reason,
The upper bit setting circuit 100 is valid, and 0000H is output to the read buffer 41. On the other hand, the output of the inverter 46 becomes "0". Therefore, in the T2S period, R
Even if the D signal 43 becomes "1", the output of the AND circuit 45 becomes "0" and the output of the input control circuit 42 becomes high impedance. Therefore, 0000H is stored in the upper 16 bits of the read buffer 41.

【0078】続いて、リード・バッファ41から内部デ
ータ・バス32を介して、CPU10にリード・バッフ
ァ41の内容が出力される。CPU10は、上位16ビ
ットが“0”であるデータを汎用レジスタ群20のうち
指定されている汎用レジスタに格納する。
Subsequently, the contents of the read buffer 41 are output from the read buffer 41 to the CPU 10 via the internal data bus 32. The CPU 10 stores the data whose upper 16 bits are “0” in the designated general-purpose register of the general-purpose register group 20.

【0079】図2のアドレスデコーダ49に零拡張しな
いアドレスが入力された場合についても説明しておく。
零拡張指定信号48が“0”である場合である。
The case where an address that is not zero-extended is input to the address decoder 49 of FIG. 2 will also be described.
This is the case where the zero extension designation signal 48 is “0”.

【0080】ハーフワード・アクセスで読み出す場合は
実施例1と同様である。ワード・アクセスでA/D変換
結果レジスタを読み出す場合を図2、3を用いて説明す
る。
The case of reading by halfword access is the same as in the first embodiment. The case where the A / D conversion result register is read by word access will be described with reference to FIGS.

【0081】T1期間より、アドレス出力回路600よ
り外部アドレス・バス70に零拡張を指定しないアドレ
スが出力される。同時にアドレスデコーダ49が無効に
なって零拡張指定信号48が“0”、A1信号44が
“0”となって、AND回路47の出力は“0”とな
る。このため、上位ビット設定回路100は無効であ
る。このとき、インバータ46の出力は“1”となる。
また、T2期間でRD信号43が“1”になるので、A
ND回路45の出力は“1”となる。したがって、外部
データ・バス60のデータがリード・バッファ41の下
位16ビットに格納される。
During the period T1, the address output circuit 600 outputs an address to the external address bus 70 which does not designate zero extension. At the same time, the address decoder 49 becomes invalid, the zero extension designation signal 48 becomes "0", the A1 signal 44 becomes "0", and the output of the AND circuit 47 becomes "0". Therefore, the upper bit setting circuit 100 is invalid. At this time, the output of the inverter 46 becomes "1".
Further, since the RD signal 43 becomes “1” in the T2 period, A
The output of the ND circuit 45 becomes "1". Therefore, the data on the external data bus 60 is stored in the lower 16 bits of the read buffer 41.

【0082】T1S期間も引き続きアドレスデコーダ4
9が無効になって、零拡張指定信号48が“0”とな
る。T1S,T2S期間は、第2サイクル信号94が
“1”となって、A1信号44が“1”となる。よっ
て、AND回路47の出力は“0”となる。上位ビット
設定回路100は無効である。一方、インバータ46の
出力は“1”となる。そのため、T2S期間でRD信号
43が“1”になると、AND回路45の出力は“1”
となる。したがって、入力制御回路42は、外部データ
・バス60の内容を出力する。
The address decoder 4 continues during the T1S period.
9 becomes invalid, and the zero extension designation signal 48 becomes “0”. In the T1S and T2S periods, the second cycle signal 94 becomes "1" and the A1 signal 44 becomes "1". Therefore, the output of the AND circuit 47 becomes “0”. The upper bit setting circuit 100 is invalid. On the other hand, the output of the inverter 46 becomes "1". Therefore, when the RD signal 43 becomes “1” during the T2S period, the output of the AND circuit 45 becomes “1”.
Becomes Therefore, input control circuit 42 outputs the contents of external data bus 60.

【0083】続いて、リード・バッファ41から内部デ
ータ・バス32を介して、CPU10にリード・バッフ
ァ41の内容が出力される。CPU10は、外部データ
・バスに2回に分けて出力された32ビットのデータを
汎用レジスタ群20のうち指定されている汎用レジスタ
に格納する。
Subsequently, the contents of the read buffer 41 are output from the read buffer 41 to the CPU 10 via the internal data bus 32. The CPU 10 stores the 32-bit data output to the external data bus twice in a designated general-purpose register in the general-purpose register group 20.

【0084】第1の実施例ではA/D変換レジスタ81
〜84のアドレスは、ワード境界上に配置されていた。
しかし、ハーフワード境界上にも、A/D変換レジスタ
のアドレスを配置したい場合がある。このような場合
に、対処したのが、実施例2である。
In the first embodiment, the A / D conversion register 81
Addresses ~ 84 were located on word boundaries.
However, there are cases where it is desired to arrange the address of the A / D conversion register on a halfword boundary. The second embodiment addresses such a case.

【0085】第1の実施例は、指定された32ビット・
アドレスのビット1およびビット0を0にマスクしたア
ドレスを、外部アドレス・バス70に出力するBIUで
ある。このため、ワード・アクセスはワード境界上のア
ドレスしか使用できない。
In the first embodiment, a designated 32-bit
A BIU that outputs an address obtained by masking bit 1 and bit 0 of the address to 0 to the external address bus 70. Therefore, word access can use only addresses on word boundaries.

【0086】実施例2ではワード・アクセスはハーフワ
ード境界上のデータもワード・アクセスできるよう、指
定された32ビット・アドレスのビット0のみマスクし
たアドレスを外部アドレス・バスに出力でき、かつ、ワ
ード・アクセス時の1回目のサイクルにおいて、リード
・バッファの下位16ビットに外部データ・バス60の
データを格納する構成である。
In the second embodiment, an address obtained by masking only bit 0 of a designated 32-bit address can be output to an external address bus so that data on a halfword boundary can be accessed by word access. In the first cycle at the time of access, the data of the external data bus 60 is stored in the lower 16 bits of the read buffer.

【0087】以下、本発明の実施例2について図面を参
照して説明する。
Hereinafter, a second embodiment of the present invention will be described with reference to the drawings.

【0088】本実施例では、図1における第1の実施例
のデータ入力部40をデータ入力部140と入れ換えた
構成である。従ってデータ入力部140のみ説明し、ま
た、第1の実施例および第1の実施例と同一の構成に付
いては説明を省略する。
This embodiment has a configuration in which the data input unit 40 of the first embodiment in FIG. Therefore, only the data input unit 140 will be described, and the description of the first embodiment and the same configuration as the first embodiment will be omitted.

【0089】図4に第2の実施例のデータ入力部140
を示す。図4において、41は32ビットのリード・バ
ッファ、42は入力制御回路、48は零拡張指定信号、
49はアドレスデコーダ、100は上位ビット設定回路
であり、第1の実施例と同様である。
FIG. 4 shows a data input unit 140 according to the second embodiment.
Is shown. In FIG. 4, 41 is a 32-bit read buffer, 42 is an input control circuit, 48 is a zero extension designation signal,
49 is an address decoder, and 100 is an upper bit setting circuit, which is the same as in the first embodiment.

【0090】また、146、151はインバータ、14
5、147、152は2入力のAND回路、153は2
入力のOR回路、700はアドレス出力回路である。
146 and 151 are inverters, 14
5, 147 and 152 are 2-input AND circuits, 153 is 2
An input OR circuit 700 is an address output circuit.

【0091】データ入力部140内の接続を説明する。The connection in the data input section 140 will be described.

【0092】インバータ151は零拡張指定信号48の
反転を取ってAND回路152の一方の入力に出力す
る。AND回路152はA1信号144とインバータ1
51の出力の論理積をとって、その結果をOR回路15
3の一方の入力に出力する。OR回路153はAND回
路152とAND回路147の出力との論理和を取っ
て、その結果をリード・バッファ41に出力する。
The inverter 151 inverts the zero extension designating signal 48 and outputs the inverted signal to one input of the AND circuit 152. The AND circuit 152 is connected to the A1 signal 144 and the inverter 1
The logical product of the outputs of the outputs of the OR circuit 51 is obtained.
3 to one input. The OR circuit 153 calculates the logical sum of the output of the AND circuit 152 and the output of the AND circuit 147, and outputs the result to the read buffer 41.

【0093】AND回路147は零拡張指定信号48と
第2サイクル信号94との論理積をとって、その結果を
インバータ146、上位ビット設定回路100、OR回
路153の入力へそれぞれ出力する。インバータ146
はAND回路147の出力の反転をAND回路145の
一方の入力へ出力する。AND回路145はインバータ
146の出力とRD信号43の論理積をとって、その結
果を入力制御回路42に出力する。
AND circuit 147 calculates the logical product of zero extension designating signal 48 and second cycle signal 94, and outputs the result to the inputs of inverter 146, upper bit setting circuit 100, and OR circuit 153, respectively. Inverter 146
Outputs the inverted output of the AND circuit 147 to one input of the AND circuit 145. The AND circuit 145 calculates the logical product of the output of the inverter 146 and the RD signal 43, and outputs the result to the input control circuit 42.

【0094】図4のアドレス出力回路700の構成を図
5に示す。
FIG. 5 shows the configuration of the address output circuit 700 of FIG.

【0095】図5において602、723は2入力のA
ND回路、601はNOR回路、721はインバータ、
722はNAND回路、724はOR回路である。アド
レス出力回路700内の接続を説明する。
In FIG. 5, 602 and 723 are two-input A's.
ND circuit, 601 is a NOR circuit, 721 is an inverter,
722 is a NAND circuit, and 724 is an OR circuit. The connection in the address output circuit 700 will be described.

【0096】NOR回路601はハーフワード・アクセ
ス信号92と、ワード・アクセス信号93との否定論理
和をとり、その結果をAND回路602の一方の入力へ
出力している。AND回路602はO_A0信号716
とNOR回路601の出力の論理積をとり、その結果を
外部アドレス・バス70のビット0として出力する。
The NOR circuit 601 performs a NOR operation on the half word access signal 92 and the word access signal 93, and outputs the result to one input of the AND circuit 602. The AND circuit 602 outputs the O_A0 signal 716
And the output of the NOR circuit 601 and outputs the result as bit 0 of the external address bus 70.

【0097】インバータ721は零拡張指定信号48の
否定をNAND回路722の一方の入力へ出力してい
る。NAND回路722はインバータ721の出力とワ
ード・アクセス信号93との否定論理積をとって、その
結果をAND回路723の一方の入力へ出力している。
AND回路723はNAND回路722の出力とO_A
1信号717との論理積をとってその結果をOR回路7
24の一方の出力に出力している。OR回路724はA
ND回路723の出力と第2サイクル信号94との論理
和をとって、その結果を外部アドレス・バス70のビッ
ト1、つまりA1信号144として出力している。
Inverter 721 outputs negation of zero extension designation signal 48 to one input of NAND circuit 722. NAND circuit 722 performs a NAND operation on the output of inverter 721 and word access signal 93, and outputs the result to one input of AND circuit 723.
The AND circuit 723 outputs the output of the NAND circuit 722 and O_A
1 signal 717 and the result is ORed with an OR circuit 7
24 to one output. OR circuit 724 is A
The output of the ND circuit 723 is ORed with the second cycle signal 94, and the result is output as the bit 1 of the external address bus 70, that is, the A1 signal 144.

【0098】次に、アドレス出力回路700の機能を説
明する。
Next, the function of the address output circuit 700 will be described.

【0099】ハーフワード・アクセス信号92が“1”
であるときは、アドレス出力回路710は内部バスのビ
ット0を“0”にマスクした結果を外部アドレス・バス
70に出力する。ワード・アクセス信号93と外部アド
レス・バス70のビット1の関係は、零拡張指定信号4
8によって、次のように決められる。零拡張信号48が
“0”であるときの外部アドレス・バス70のビット1
は次のようになる。
When the half word access signal 92 is "1"
, The address output circuit 710 outputs the result of masking bit 0 of the internal bus to “0” to the external address bus 70. The relationship between word access signal 93 and bit 1 of external address bus 70 is as follows:
According to 8, it is determined as follows. Bit 1 of external address bus 70 when zero extension signal 48 is "0"
Is as follows.

【0100】ワード・アクセス信号93が“0”である
ときは、アドレス出力回路700は内部アドレス・バス
321のビット0とビット1をそれぞれ“0”にマスク
した結果を外部アドレス・バス70に出力する。
When word access signal 93 is "0", address output circuit 700 outputs the result of masking bit 0 and bit 1 of internal address bus 321 to "0" to external address bus 70. I do.

【0101】ワード・アクセス信号93が“1”である
ときは、アドレス出力回路700は内部アドレス・バス
321のビット0とビット1をそれぞれ“0”にマスク
した結果を外部アドレス・バス70に出力する。また、
第2サイクル信号94が“1”であるときはO_A1信
号717の状態に関わらず、外部アドレス・バス70の
ビット1は“1”となる。
When word access signal 93 is "1", address output circuit 700 outputs the result of masking bit 0 and bit 1 of internal address bus 321 to "0", respectively, to external address bus 70. I do. Also,
When the second cycle signal 94 is "1", the bit 1 of the external address bus 70 becomes "1" regardless of the state of the O_A1 signal 717.

【0102】零拡張指定信号48が“1”のときは外部
アドレス・バス70のビット1は次のようになる。
When the zero extension designation signal 48 is "1", bit 1 of the external address bus 70 is as follows.

【0103】第2サイクル信号94が“0”のときはO
_A1信号717と同じレベルが外部アドレス・バス7
0のビット1に出力される。第2サイクル信号94が
“1”のときは“1”が外部アドレス・バスのビット1
に出力される。
When the second cycle signal 94 is "0", O
_A1 signal 717 is at the same level as external address bus 7
Output to bit 1 of 0. When the second cycle signal 94 is "1", "1" is bit 1 of the external address bus.
Is output to

【0104】A/D変換結果レジスタを読み出す場合を
図4、6を用いて説明する。このとき、読み出すA/D
変換レジスタのアドレスは、FFFFF392Hであ
り、ハーフワード境界上にある。
The case of reading the A / D conversion result register will be described with reference to FIGS. At this time, read A / D
The address of the conversion register is FFFFF392H, which is on a halfword boundary.

【0105】まず、ハーフワード・アクセスでA/D変
換レジスタを読み出す場合は第1の実施例における場合
と同様であるので説明を省略する。
First, the readout of the A / D conversion register by halfword access is the same as that in the first embodiment, and a description thereof will be omitted.

【0106】ワード・アクセスでA/D変換レジスタを
読み出す場合を説明する。
The case where the A / D conversion register is read by word access will be described.

【0107】第1の実施例と同様にバス・サイクルは2
回起動される。
The bus cycle is 2 as in the first embodiment.
Will be invoked twice.

【0108】図6において、1回目のバス・サイクル
は、T1、T2期間である。そして、2回目のバス・サ
イクルはT1S、T2S期間である。また、図4には示
していないが、各機能はクロック信号(図6中、CLK
と示す)のタイミングにより動作する。
In FIG. 6, the first bus cycle is a period of T1 and T2. The second bus cycle is a T1S and T2S period. Although not shown in FIG. 4, each function is performed by a clock signal (CLK in FIG. 6).
).

【0109】T1期間より、アドレス出力回路700よ
り外部アドレス・バス70にFFFFF392Hが出力
される。同時にアドレスデコーダ49が有効になって零
拡張指定信号48が“1”となる。インバータ151の
出力は“0”となるため、AND回路152の出力も
“0”となる。このとき、A1信号144はO_A1信
号717と同レベルで“1”となる。T1,T2期間
中、第2サイクル信号は“0”であるので、AND回路
147の出力は“0”となる。このため、T1,T2期
間では上位ビット設定回路100は無効である。T1,
T2期間はインバータ146の出力は“1”となるの
で、T2期間でRD信号43が“1”になると、AND
回路145の出力は“1”となる。したがって、外部デ
ータ・バス60のデータがリード・バッファ41の下位
16ビットに格納される。
During the period T1, the address output circuit 700 outputs FFFFF392H to the external address bus 70. At the same time, the address decoder 49 becomes valid and the zero extension designation signal 48 becomes "1". Since the output of the inverter 151 is "0", the output of the AND circuit 152 is also "0". At this time, the A1 signal 144 becomes "1" at the same level as the O_A1 signal 717. Since the second cycle signal is "0" during the periods T1 and T2, the output of the AND circuit 147 becomes "0". Therefore, the upper bit setting circuit 100 is invalid during the periods T1 and T2. T1,
Since the output of the inverter 146 becomes “1” during the T2 period, when the RD signal 43 becomes “1” during the T2 period, AND
The output of the circuit 145 becomes "1". Therefore, the data on the external data bus 60 is stored in the lower 16 bits of the read buffer 41.

【0110】T1S期間も引き続きアドレスデコーダ4
9が有効になって、零拡張指定信号48が“1”とな
る。T1S,T2S期間は、第2サイクル信号94が
“1”となって、A1信号144が“1”となる。この
とき、AND回路147の出力は“1”となり、OR回
路153の出力も“1”となる。また、上位ビット設定
回路100は有効となるので、リード・バッファ41に
0000Hが出力される。一方、T1S,T2S期間
中、インバータ146の出力は“0”となって、入力制
御回路42はハイ・インピーダンスを出力する。このと
き、インバータ146の出力は“0”となる。そのた
め、T2S期間でRD信号43が“1”になっても、A
ND回路145の出力は“0”となる。したがって、入
力制御回路42は、外部データ・バス60の内容を出力
しない。代わりに、0000Hがリード・バッファ41
の上位16ビットに格納される。
The address decoder 4 continues during the T1S period.
9 becomes valid, and the zero extension designation signal 48 becomes "1". In the T1S and T2S periods, the second cycle signal 94 becomes “1” and the A1 signal 144 becomes “1”. At this time, the output of the AND circuit 147 becomes “1”, and the output of the OR circuit 153 also becomes “1”. Since the upper bit setting circuit 100 is valid, 0000H is output to the read buffer 41. On the other hand, during the periods T1S and T2S, the output of the inverter 146 is "0", and the input control circuit 42 outputs high impedance. At this time, the output of the inverter 146 becomes "0". Therefore, even if the RD signal 43 becomes “1” during the T2S period, A
The output of the ND circuit 145 becomes “0”. Therefore, input control circuit 42 does not output the contents of external data bus 60. Instead, 0000H is read buffer 41
Is stored in the upper 16 bits.

【0111】図4のアドレスデコーダ49に零拡張しな
いアドレスが入力された場合について説明しておく。零
拡張指定番号48が“0”である場合である。
A case where an address which is not zero-extended is input to the address decoder 49 of FIG. 4 will be described. This is the case where the zero extension designation number 48 is “0”.

【0112】ハーフワード・アクセスで読み出す場合は
第1の実施例と同様である。
The readout by half word access is the same as in the first embodiment.

【0113】T1期間より、アドレス出力回路600よ
り外部アドレス・バス70に零拡張を指定しないアドレ
スが出力される。同時にアドレスデコーダ49が無効に
なって零拡張指定信号48が“0”となって、インバー
タ151は“1”となる。A1信号44が“0”となっ
て、AND回路147の出力は“0”となる。インバー
タ151の出力は1であるが、A1信号144が“0”
であるので、AND回路152の出力は“0”となる。
したがって、OR回路153の出力は“0”である。ま
た、AND回路147の出力が“0”であるので、上位
ビット設定回路100は無効である。インバータ146
が“1”であるので、T2期間でRD信号43が“1”
になると、AND回路145の出力は“1”となる。し
たがって、外部データ・バス60のデータがリード・バ
ッファ41の下位16ビットに格納される。
During the period T1, an address which does not designate zero extension is output from the address output circuit 600 to the external address bus 70. At the same time, the address decoder 49 becomes invalid, the zero extension designation signal 48 becomes "0", and the inverter 151 becomes "1". The A1 signal 44 becomes “0”, and the output of the AND circuit 147 becomes “0”. The output of the inverter 151 is 1, but the A1 signal 144 is "0".
Therefore, the output of the AND circuit 152 becomes “0”.
Therefore, the output of the OR circuit 153 is “0”. Further, since the output of the AND circuit 147 is “0”, the upper bit setting circuit 100 is invalid. Inverter 146
Is “1”, the RD signal 43 becomes “1” during the T2 period.
, The output of the AND circuit 145 becomes “1”. Therefore, the data on the external data bus 60 is stored in the lower 16 bits of the read buffer 41.

【0114】T1S期間も引き続きアドレスデコーダ4
9が無効になって、零拡張指定信号48が“0”とな
る。T1S,T2S期間は、第2サイクル信号94が
“1”となって、A1信号44が“1”となる。そのた
め、AND回路152は“1”となって、OR回路15
3の出力は“1”となる。また、AND回路147の出
力は“0”であるので、上位ビット設定回路100は無
効である。一方、インバータ146の出力は“1”とな
って、入力制御回路42は外部データ・バス60の内容
を出力する。そのため、T2S期間でRD信号43が
“1”になると、AND回路45の出力は“1”とな
る。したがって、入力制御回路42は、外部データ・バ
ス60の内容を出力する。
The address decoder 4 continues during the T1S period.
9 becomes invalid, and the zero extension designation signal 48 becomes “0”. In the T1S and T2S periods, the second cycle signal 94 becomes "1" and the A1 signal 44 becomes "1". Therefore, the AND circuit 152 becomes “1”, and the OR circuit 15
The output of No. 3 is "1". Also, since the output of the AND circuit 147 is “0”, the upper bit setting circuit 100 is invalid. On the other hand, the output of inverter 146 becomes "1", and input control circuit 42 outputs the contents of external data bus 60. Therefore, when the RD signal 43 becomes “1” during the T2S period, the output of the AND circuit 45 becomes “1”. Therefore, input control circuit 42 outputs the contents of external data bus 60.

【0115】続いて、リード・バッファ41から内部デ
ータ・バス32を介して、CPU10にリード・バッフ
ァ41の内容が出力される。CPU10は、外部データ
・バスに2回に分けて出力された32ビットのデータを
汎用レジスタ群20のうち指定されている汎用レジスタ
に格納する。
Subsequently, the contents of the read buffer 41 are output from the read buffer 41 to the CPU 10 via the internal data bus 32. The CPU 10 stores the 32-bit data output to the external data bus twice in a designated general-purpose register in the general-purpose register group 20.

【0116】[0116]

【発明の効果】本発明の第1の実施例の形態の効果につ
いて説明する。本発明の第1の実施の形態は、零拡張し
たいデータのあるアドレスがワード境界上にある場合、
データをワード・アクセスで読み出すときに、外部アド
レスのビットの1の状態によって、リード・バッファに
外部データ・バスの内容を格納するかどうかを振り分け
ている。このため、汎用レジスタにデータを格納した後
に、従来行われていたソフトウエア処理が不要になり、
マイクロプロセッサ等の処理時間や命令コードを抑える
ことができる。
The effects of the first embodiment of the present invention will be described. In the first embodiment of the present invention, when an address having data to be zero-extended is on a word boundary,
When data is read by word access, whether to store the contents of the external data bus in the read buffer is determined according to the state of the bit 1 of the external address. This eliminates the need for conventional software processing after storing data in general-purpose registers.
Processing time and instruction codes of a microprocessor or the like can be reduced.

【0117】本発明の第2の実施例の形態の効果につい
て説明する。本発明の第2の実施の形態は、零拡張した
いデータのあるアドレスがハーフワード境界上にあれ
ば、データをワード・アクセスで読み出すと、外部アド
レスのビットの1の状態によって、リード・バッファに
外部データ・バスの内容を格納するかどうかを振り分け
ている。このため、周辺I/Oを効率よくアドレス配置
することができる。また、第1の実施例と同じく、汎用
レジスタにデータを格納した後に、従来行われていたソ
フトウエア処理が不要になり、マイクロプロセッサ等の
処理時間や命令コードを抑えることができる。
The effect of the second embodiment of the present invention will be described. According to the second embodiment of the present invention, if an address having data to be zero-extended is on a halfword boundary, if data is read by word access, the read buffer is read according to the state of bit 1 of the external address. Whether to store the contents of the external data bus is determined. For this reason, peripheral I / Os can be efficiently arranged in addresses. Further, similarly to the first embodiment, after storing the data in the general-purpose register, the software processing conventionally performed becomes unnecessary, and the processing time of the microprocessor or the like and the instruction code can be reduced.

【0118】以上好ましい実施例をあげて本発明を説明
したが、本発明は必ずしも上記実施例に限定されるもの
ではない。例えば、ハーフワード・アクセスの場合につ
いてのみ零拡張する構成を説明したが、バイト・アクセ
スの場合について零拡張する場合についても構成が可能
である。
Although the present invention has been described with reference to the preferred embodiments, the present invention is not necessarily limited to the above embodiments. For example, a configuration in which zero extension is performed only in the case of halfword access has been described. However, a configuration in which zero extension is performed in the case of byte access is also possible.

【0119】本発明によれば、アドレスデコーダと上位
ビット設定回路により、符号拡張命令しか持たないマイ
クロプロセッサが、外部データ・バスよりもビット幅の
大きい汎用レジスタに特定のアドレスにあるデータを格
納する際に、零拡張したデータを得られる。
According to the present invention, a microprocessor having only a sign extension instruction stores data at a specific address in a general-purpose register having a bit width larger than that of an external data bus by using an address decoder and an upper bit setting circuit. At this time, zero-extended data can be obtained.

【0120】また、零拡張したデータを得るために従来
において採用されていたようなソフトウエアを使用する
ことがないので、命令コードと処理時間を減少させるこ
とができる。したがって、命令コードの増大を抑制を重
視するマイクロプロセッサ等の情報処理装置にも採用で
きる。
Further, since the software used in the related art is not used to obtain the zero-extended data, the instruction code and the processing time can be reduced. Therefore, the present invention can be applied to an information processing apparatus such as a microprocessor that emphasizes suppression of increase in instruction codes.

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

【図1】本発明の一実施例によるマイクロプロセッサの
システム構成を示す図である。
FIG. 1 is a diagram showing a system configuration of a microprocessor according to one embodiment of the present invention.

【図2】図1に示す第1の実施例におけるデータ入力部
の詳細を示す図である。
FIG. 2 is a diagram showing details of a data input unit in the first embodiment shown in FIG. 1;

【図3】第1の実施例におけるデータ入力部のタイミン
グチャートである。
FIG. 3 is a timing chart of a data input unit in the first embodiment.

【図4】図1に示す第2の実施例におけるデータ入力部
の詳細を示す図である。
FIG. 4 is a diagram showing details of a data input unit in the second embodiment shown in FIG. 1;

【図5】図4に示す第2の実施例におけるアドレス出力
回路の詳細を示す図である。
FIG. 5 is a diagram showing details of an address output circuit in the second embodiment shown in FIG. 4;

【図6】図4に示す第2の実施例におけるデータ入力部
のタイミングチャートである。
FIG. 6 is a timing chart of a data input unit in the second embodiment shown in FIG.

【図7】第1の従来例によるマイクロプロセッサのシス
テム構成を示す図である。
FIG. 7 is a diagram showing a system configuration of a microprocessor according to a first conventional example.

【図8】図7に示す第1の従来例におけるデータ入力部
の詳細を示す図である。
FIG. 8 is a diagram showing details of a data input unit in the first conventional example shown in FIG. 7;

【図9】図8、図2におけるアドレス出力回路の詳細を
示す図である。
FIG. 9 is a diagram showing details of an address output circuit in FIGS. 8 and 2;

【図10】第2の従来例の構成を示す図である。FIG. 10 is a diagram showing a configuration of a second conventional example.

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

10 CPU 20 汎用レジスタ 30 バス・インターフェース・ユニット 41 リード・バッファ 42 入力制御回路 49 アドレスデコーダ 60 外部データ・バス 70 外部アドレス・バス 100 上位ビット設定回路 321 内部アドレス・バス 322 内部データ・バス 600 アドレス出力回路 10 CPU 20 General-purpose register 30 Bus interface unit 41 Read buffer 42 Input control circuit 49 Address decoder 60 External data bus 70 External address bus 100 Upper bit setting circuit 321 Internal address bus 322 Internal data bus 600 Address output circuit

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 第1のビット幅を有する第1のデータバ
スと前記第1のビット幅よりも小さい第2のビット幅を
有する第2のデータバスとが接続され前記第1のデータ
バスに前記第2のデータバスのデータを送出するバス・
インターフェース・ユニットにおいて、前記第2のデー
タバスに接続され第1の制御信号に応答して前記第2の
データバスのデータを出力する入力制御回路と、第2の
制御信号に応答して零拡張のためのデータを出力する設
定回路と、前記入力制御回路、前記設定回路および前記
第1のデータバスに接続され第3の制御信号に応答して
前記入力制御回路および前記設定回路からのデータを受
け取り前記第1のデータバスに出力するバッファとを備
えることを特徴とするバス・インターフェース・ユニッ
ト。
1. A first data bus having a first bit width and a second data bus having a second bit width smaller than the first bit width are connected to the first data bus. A bus for transmitting the data of the second data bus;
An interface unit, connected to the second data bus, for outputting data on the second data bus in response to a first control signal; and zero-extending in response to a second control signal. A setting circuit for outputting data for the input control circuit, the setting circuit, and the data from the input control circuit and the setting circuit in response to a third control signal connected to the first data bus. A bus interface unit comprising a buffer for receiving the data and outputting the data to the first data bus.
【請求項2】 前記第2のデータバスのデータを第2の
ビット幅を有するデータであるとして取り込む場合に
は、前記第1の制御信号および第3の制御信号が活性化
され、前記第2の制御信号が非活性化されることによ
り、前記リード・バッファの下位の前記第2のビット幅
部分に前記第2のデータバスのデータが取り込まれて前
記第1のデータバスに出力され、前記第2のデータバス
のデータを第1のビット幅を有するデータとして織り込
む場合には前記第1の制御信号を活性化および第3の制
御信号を活性化するとともに第2の制御信号を非活性化
し前記リード・バッファの下位の前記第2のビット幅部
分に前記第2のデータバスのデータが取り込まれ、続い
て前記第1の制御信号が活性化し第3の制御信号を活性
化すると共に前記第2の制御信号を活性化することによ
って前記リード・バッファの前記下位の前記第2のビッ
ト幅部分を除く上位に前記設定回路からの前記零拡張の
ためのデータを出力し前記第1のデータバスに前記零拡
張された前記第1のビット幅を有するデータとして出力
することを特徴とする請求項1記載のバス・インターフ
ェース・ユニット。
2. The method according to claim 1, wherein the first control signal and the third control signal are activated when the data of the second data bus is taken as data having a second bit width. Is deactivated, the data of the second data bus is taken into the lower second bit width portion of the read buffer and output to the first data bus, In the case of incorporating the data of the second data bus as data having a first bit width, the first control signal is activated, the third control signal is activated, and the second control signal is deactivated. The data of the second data bus is fetched into the lower second bit width portion of the read buffer, and then the first control signal is activated to activate a third control signal, and Two By activating a control signal, the data for the zero extension from the setting circuit is output to the upper part of the read buffer except the lower part of the second bit width part, and the data is output to the first data bus. 2. The bus interface unit according to claim 1, wherein the bus interface unit outputs the data having the first bit width zero-extended.
【請求項3】 第1のビット幅を有する第1のデータバ
スとこの第1のデータバスよりもビット幅の小さい第2
のビット幅を有する第2のデータバスとに接続され前記
第2のデータバスからデータを読み出す読出回路と、前
記読み出されるデータのアドレスを検出する検出回路
と、前記読み出したデータをバッファに格納して前記第
1のデータバスに転送する転送回路と、前記検出手段が
前記読み出されるデータのアドレスが所定のアドレスで
あることを検出したとき、前記読出手段は1回目のサイ
クルで読み出したデータを前記バッファの対応する下位
ビットに格納し、2回目のサイクルでは予め定められた
値を前記バッファの対応する上位ビットに格納すること
を特徴とするバス・インターフェース・ユニット。
3. A first data bus having a first bit width and a second data bus having a smaller bit width than the first data bus.
A read circuit connected to a second data bus having a bit width of, and reading data from the second data bus; a detection circuit for detecting an address of the read data; and storing the read data in a buffer. A transfer circuit that transfers the read data to the first data bus, and when the detection means detects that the address of the data to be read is a predetermined address, the read means reads the data read in a first cycle. A bus interface unit storing in a corresponding lower bit of a buffer and storing a predetermined value in a corresponding upper bit of the buffer in a second cycle.
JP24706497A 1997-09-11 1997-09-11 Bus interface unit Expired - Fee Related JP3269435B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24706497A JP3269435B2 (en) 1997-09-11 1997-09-11 Bus interface unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24706497A JP3269435B2 (en) 1997-09-11 1997-09-11 Bus interface unit

Publications (2)

Publication Number Publication Date
JPH1185677A true JPH1185677A (en) 1999-03-30
JP3269435B2 JP3269435B2 (en) 2002-03-25

Family

ID=17157895

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24706497A Expired - Fee Related JP3269435B2 (en) 1997-09-11 1997-09-11 Bus interface unit

Country Status (1)

Country Link
JP (1) JP3269435B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5960547A (en) * 1982-09-29 1984-04-06 Hitachi Ltd Interface converting device
JPS59229637A (en) * 1983-06-10 1984-12-24 Hitachi Micro Comput Eng Ltd Transfer circuit of data
JPS63118966A (en) * 1986-11-07 1988-05-23 Nec Corp Data transfer controller
JPH02116938A (en) * 1988-10-27 1990-05-01 Toshiba Corp Variable word length memory device
JPH05250309A (en) * 1992-03-04 1993-09-28 Mitsubishi Electric Corp Bus adapter device
JPH06161954A (en) * 1992-11-20 1994-06-10 Fujitsu Ltd Data width converting buffer device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5960547A (en) * 1982-09-29 1984-04-06 Hitachi Ltd Interface converting device
JPS59229637A (en) * 1983-06-10 1984-12-24 Hitachi Micro Comput Eng Ltd Transfer circuit of data
JPS63118966A (en) * 1986-11-07 1988-05-23 Nec Corp Data transfer controller
JPH02116938A (en) * 1988-10-27 1990-05-01 Toshiba Corp Variable word length memory device
JPH05250309A (en) * 1992-03-04 1993-09-28 Mitsubishi Electric Corp Bus adapter device
JPH06161954A (en) * 1992-11-20 1994-06-10 Fujitsu Ltd Data width converting buffer device

Also Published As

Publication number Publication date
JP3269435B2 (en) 2002-03-25

Similar Documents

Publication Publication Date Title
US4839797A (en) Microprocessor compatible with any software represented by different types of instruction formats
JP2504206B2 (en) Bus controller
US5710914A (en) Digital signal processing method and system implementing pipelined read and write operations
EP0250952B1 (en) Microcomputer
JPH0869377A (en) Electronic circuit and method for use of coprocessor
US5301338A (en) System including central processing unit
JP3269435B2 (en) Bus interface unit
JPH027097B2 (en)
US6425047B1 (en) Process containing address decoders suited to improvements in clock speed
US7228367B2 (en) Direct memory access controller for carrying out data transfer by determining whether or not burst access can be utilized in an external bus and access control method thereof
JP3154542B2 (en) Data processing device
JP3242474B2 (en) Data processing device
JP2581484B2 (en) Data processing system
JPH05225122A (en) Burst transfer system of dma
JP3182497B2 (en) Arithmetic processing unit and instruction conversion unit
JPH0212358A (en) Data transfer system
JP3003292B2 (en) Data alignment equipment
JPH04112251A (en) Microcomputer
JP3787951B2 (en) Code conversion method and code conversion apparatus using the same
JPH09505431A (en) A microcontroller that conditionally skips the MSB update latch of the memory address and directly drives the LSB.
JPH0344748A (en) Read control system for memory data
JPS63271652A (en) Dma controller
JPH05120205A (en) Processor system with address conversion device for dma transfer and dma transfer method
JPH08263367A (en) Integrated circuit
JP2001100991A (en) Digital signal processor

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: 20011218

LAPS Cancellation because of no payment of annual fees