JPH0522152A - Msb/lsb conversion circuit - Google Patents

Msb/lsb conversion circuit

Info

Publication number
JPH0522152A
JPH0522152A JP19580291A JP19580291A JPH0522152A JP H0522152 A JPH0522152 A JP H0522152A JP 19580291 A JP19580291 A JP 19580291A JP 19580291 A JP19580291 A JP 19580291A JP H0522152 A JPH0522152 A JP H0522152A
Authority
JP
Japan
Prior art keywords
data
msb
lsb
drive circuit
register
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.)
Withdrawn
Application number
JP19580291A
Other languages
Japanese (ja)
Inventor
Yasutaka Tono
安隆 東野
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP19580291A priority Critical patent/JPH0522152A/en
Publication of JPH0522152A publication Critical patent/JPH0522152A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To reduce a hardware and to enable high-speed conversion concerning the MSB/LSB conversion circuit to exchange the MSB and LSB of data having (n) bits. CONSTITUTION:This MSB/LSB conversion circuit to convert and output the MSB and LSB of data in respect to the data of the (n) bits is equipped with a register 1 to store the data of the (n) bits and a drive circuit 2 to drive the parallel output of the register 1 and to output it to a parallel signal line 5. The register 1 and the drive circuit 2 or the drive circuit 2 and the parallel signal line 5 are related so as to exchange the positions of the MSB and the LSB in the data of the (n) bits.

Description

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

【0001】 (目次) 産業上の利用分野 従来の技術(図3) 発明が解決しようとする課題 課題を解決するための手段(図1) 作用 実施例 (a) 一実施例の説明(図1) (b) 他の実施例の説明(図2) 発明の効果[0001] (table of contents) Industrial applications Conventional technology (Fig. 3) Problems to be Solved by the Invention Means for Solving the Problems (FIG. 1) Action Example (a) Description of one embodiment (FIG. 1) (b) Description of another embodiment (FIG. 2) The invention's effect

【0002】[0002]

【産業上の利用分野】本発明は、nビットのデータのM
SBとLSBとを入れ換えるMSB−LSB変換回路に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention
The present invention relates to an MSB-LSB conversion circuit that interchanges SB and LSB.

【0003】近年のコンピュータの発達に伴い、各種の
CPU、周辺回路を組み合わせて、装置を構成すること
が行われている。このように組み合わせて構成する場合
に、1のメーカーの回路と、他のメーカーの回路とを組
み合わせて使用する場合がある。
With the recent development of computers, various CPUs and peripheral circuits have been combined to form devices. In the case of such a combination, the circuit of one manufacturer and the circuit of another manufacturer may be used in combination.

【0004】この場合に、1のメーカーの回路と、他の
メーカーの回路とで、データのMSB(Most Significa
nt Bit) とLSB(Least Significant Bit) の位置が全
く逆のものがある。
In this case, the data of the MSB (Most Significa
There is a completely opposite position of nt Bit) and LSB (Least Significant Bit).

【0005】例えば、モトローラ社のCPUでは、7ビ
ット目がMSBであり、0ビット目がLSBであるが、
インテル社の周辺回路では、7ビット目がLSBであ
り、0ビット目がMSBである。このような回路を組み
合わせて、データのやり取りを行わせるには、データの
MSBとLSBの位置を変換するMSB−LSB変換回
路が必要となる。
For example, in the Motorola CPU, the 7th bit is the MSB and the 0th bit is the LSB.
In the peripheral circuit of Intel Corporation, the 7th bit is the LSB and the 0th bit is the MSB. In order to exchange data by combining such circuits, an MSB-LSB conversion circuit that converts the positions of MSB and LSB of data is required.

【0006】[0006]

【従来の技術】図3は従来技術の説明図である。図3
(A)に示すように、例えば、8ビットのデータに対
し、7ビット目をMSB、0ビット目をLSBとする
と、変換するには、7〜0ビットを0〜7ビットに入れ
換える必要がある。
2. Description of the Related Art FIG. 3 is an explanatory diagram of a conventional technique. Figure 3
As shown in (A), for example, for 8-bit data, if the 7th bit is MSB and the 0th bit is LSB, it is necessary to replace 7-0 bits with 0-7 bits for conversion. .

【0007】このため、従来は、図3(B)に示すよう
に、一対のシフトレジスタ10、11を設け、図3
(A)の8ビットのデータをシフトレジスタ10にセッ
トした後、シフトレジスタ10を右方向に、シフトレジ
スタ11を左方向にシフトし、シフトレジスタ10の左
端のデータを、シフトレジスタ11の左端に入力するこ
とにより、シフトレジスタ11にビット位置の入れ換え
たデータを形成し、シフトレジスタ11を読み出すよう
にしていた。
Therefore, conventionally, as shown in FIG. 3B, a pair of shift registers 10 and 11 are provided, and
After the 8-bit data of (A) is set in the shift register 10, the shift register 10 is shifted to the right and the shift register 11 is shifted to the left, and the data at the left end of the shift register 10 is shifted to the left end of the shift register 11. By inputting, the shift register 11 forms data with the bit positions interchanged, and the shift register 11 is read.

【0008】又、他の従来の技術として、図3(C)に
示すように、メモリ12に、元のデータに対するMS
B、LSBを入れ換えた変換データを格納したテーブル
を設け、元のデータに対応する変換データをテーブルか
ら読み出して、MSB、LSBを入れ換えた変換データ
を得るようにしていた。
As another conventional technique, as shown in FIG. 3 (C), an MS for original data is stored in the memory 12.
A table storing conversion data in which B and LSB are exchanged is provided, conversion data corresponding to original data is read from the table, and conversion data in which MSB and LSB are exchanged is obtained.

【0009】[0009]

【発明が解決しようとする課題】しかしながら、従来技
術では、次の問題があった。前者の従来技術では、デ
ータがnビットとすると、n回のシフト動作を要するた
め、高速な変換ができない。
However, the prior art has the following problems. In the former conventional technique, if the data has n bits, a shift operation is required n times, so that high-speed conversion cannot be performed.

【0010】後者の従来技術では、データのビット数
に従ったメモリ容量を必要とし、データが16ビットで
は、膨大なメモリ容量を要し、ハードウェアが増加し、
価格も高くなる。従って、本発明は、少ないハードウェ
アで済み且つ高速の変換を可能とするMSB−LSB変
換回路を提供することを目的とする。
In the latter prior art, a memory capacity corresponding to the number of bits of data is required, and if the data is 16 bits, a huge memory capacity is required and the hardware increases.
The price will also increase. Therefore, it is an object of the present invention to provide an MSB-LSB conversion circuit which requires less hardware and enables high-speed conversion.

【0011】[0011]

【課題を解決するための手段】図1は本発明の原理図兼
一実施例回路図である。本発明の請求項1は、nビット
のデータに対し、該データのMSBとLSBとを変換し
て出力するMSB−LSB変換回路において、該nビッ
トのデータを記憶するレジスタ1と、該レジスタ1の並
列出力をドライブして、並列信号線5に出力するドライ
ブ回路2とを有し、該レジスタ1と該ドライブ回路2と
の接続関係又は該ドライブ回路2と該並列信号線5との
接続関係を、該nビットのデータにおけるMSBの位置
とLSBの位置が入れ代わるように構成したことを特徴
とする。本発明の請求項2は、請求項1において、前記
並列信号線5が、CPU4のバスであり、前記レジスタ
1が、前記バスに接続されたことを特徴とする。
FIG. 1 is a principle diagram of the present invention and a circuit diagram of an embodiment. According to claim 1 of the present invention, in an MSB-LSB conversion circuit which converts MSB and LSB of n-bit data and outputs the same, a register 1 for storing the n-bit data and the register 1 And a drive circuit 2 for driving the parallel output of the drive circuit 2 and outputting the parallel output to the parallel signal line 5, and the connection relationship between the register 1 and the drive circuit 2 or the connection relationship between the drive circuit 2 and the parallel signal line 5. Is configured such that the MSB position and the LSB position in the n-bit data are replaced with each other. According to a second aspect of the present invention, in the first aspect, the parallel signal line 5 is a bus of the CPU 4, and the register 1 is connected to the bus.

【0012】[0012]

【作用】本発明の請求項1では、nビットのデータを記
憶するレジスタ1と、レジスタ1の並列出力をドライブ
して、並列信号線5に出力するドライブ回路2とを有
し、レジスタ1とドライブ回路2との接続関係又はドラ
イブ回路2と並列信号線5との接続関係を、nビットの
データにおけるMSBの位置とLSBの位置が入れ代わ
るように構成したので、レジスタ1へのデータのライト
と、ドライブ回路2のリードの2ステップで変換でき、
高速の変換が可能となり、しかも少ないハードウェアで
実現できる。
According to the first aspect of the present invention, the register 1 for storing n-bit data and the drive circuit 2 for driving the parallel output of the register 1 to output to the parallel signal line 5 are provided. Since the connection relationship between the drive circuit 2 or the connection relationship between the drive circuit 2 and the parallel signal line 5 is configured such that the MSB position and the LSB position in the n-bit data are interchanged, it is possible to write the data to the register 1. , Can be converted in 2 steps of reading the drive circuit 2,
High-speed conversion is possible, and it can be realized with less hardware.

【0013】本発明の請求項2では、並列信号線5が、
CPU4のバスであり、レジスタ1が、バスに接続され
ているので、CPU4が必要な時点で、高速に変換デー
タを得ることができる。
In claim 2 of the present invention, the parallel signal line 5 is
Since the register 1 is the bus of the CPU 4 and is connected to the bus, the conversion data can be obtained at high speed at the time when the CPU 4 needs it.

【0014】[0014]

【実施例】(a)一実施例の説明 本発明の一実施例を、図1により説明する。図1におい
て、CPU4は、8ビットのバス5(D7〜D0)によ
り、他の周辺回路に接続されている。
EXAMPLES (a) Description of an Example An example of the present invention will be described with reference to FIG. In FIG. 1, the CPU 4 is connected to other peripheral circuits by an 8-bit bus 5 (D7 to D0).

【0015】MSB−LSB変換回路3は、1つのLS
Iで構成されており、8ビットのフリップフロップ1
と、8ビットのドライブ回路2で構成されている。8ビ
ットのフリップフロップ1は、上から順に、バス5のD
0〜D7に接続されており、CPU4からのライト信号
WRITEにより、バス5のD0〜D7のデータを記憶
する。
The MSB-LSB conversion circuit 3 has one LS.
8-bit flip-flop 1 composed of I
And an 8-bit drive circuit 2. The 8-bit flip-flop 1 is the D of the bus 5 in order from the top.
It is connected to 0 to D7 and stores the data of D0 to D7 of the bus 5 by the write signal WRITE from the CPU 4.

【0016】8ビットのドライブ回路2は、フリップフ
ロップ1のデータをCPU4からのリード信号READ
により、ドライブして、バス5に出力し、バス5とは、
データD0がバス5のD7に、データD1がバス5のD
6に、データD2がバス5のD5に、データD3がバス
5のD4に、データD4がバス5のD3に、データD5
がバス5のD2に、データD6がバス5のD1に、デー
タD7がバス5のD0に接続されている。
The 8-bit drive circuit 2 transfers the data of the flip-flop 1 to the read signal READ from the CPU 4.
Drive and output to bus 5,
The data D0 is D7 of the bus 5 and the data D1 is D of the bus 5.
6, data D2 to D5 of bus 5, data D3 to D4 of bus 5, data D4 to D3 of bus 5, data D5
Is connected to D2 of the bus 5, data D6 is connected to D1 of the bus 5, and data D7 is connected to D0 of the bus 5.

【0017】従って、CPU4は、変換すべきデータを
バス5に送出し、ライト信号WRITEを発行すると、
バス5のデータがフリップフロップ1に記憶され、次に
リード信号READを発生すると、ドライブ回路2によ
り、バス5に変換されたデータが出力され、これを取り
込むことができる。
Therefore, when the CPU 4 sends the data to be converted to the bus 5 and issues the write signal WRITE,
When the data on the bus 5 is stored in the flip-flop 1 and then the read signal READ is generated, the drive circuit 2 outputs the converted data to the bus 5, and the data can be fetched.

【0018】このようにして、少ないハードウェアで、
高速な変換が可能となり、特にCPU4の制御に従った
変換動作が可能となる。又、フリップフロップ1とドラ
イブ回路2は、汎用のLSIであり、バス5との結線を
設定するだけで実現でき、安価にしかも容易に実現でき
る。
In this way, with less hardware,
High-speed conversion becomes possible, and particularly conversion operation under the control of the CPU 4 becomes possible. The flip-flop 1 and the drive circuit 2 are general-purpose LSIs and can be realized simply by setting the connection with the bus 5, and can be realized easily at low cost.

【0019】(b)他の実施例の説明 図2は本発明の他の実施例回路図である。図中、図1で
示したものと同一のものは、同一の記号で示してある。
この例では、ドライブ回路2とバス5の接続を変える代
わりに、フリップフロップ1とドライブ回路2との接続
を変えたものである。
(B) Description of another embodiment FIG. 2 is a circuit diagram of another embodiment of the present invention. In the figure, the same components as those shown in FIG. 1 are designated by the same symbols.
In this example, instead of changing the connection between the drive circuit 2 and the bus 5, the connection between the flip-flop 1 and the drive circuit 2 is changed.

【0020】即ち、フリップフロップ1とドライブ回路
2との接続関係において、フリップフロップのデータD
0がドライブ回路2のD7に、データD1がドライブ回
路2のD6に、データD2がドライブ回路2のD5に、
データD3がドライブ回路2のD4に、データD4がド
ライブ回路2のD3に、データD5がドライブ回路2の
D2に、データD6がドライブ回路2のD1に、データ
D7がドライブ回路2のD0に接続したものである。
That is, in the connection relationship between the flip-flop 1 and the drive circuit 2, the data D of the flip-flop is
0 is D7 of the drive circuit 2, data D1 is D6 of the drive circuit 2, data D2 is D5 of the drive circuit 2,
The data D3 is connected to D4 of the drive circuit 2, the data D4 is connected to D3 of the drive circuit 2, the data D5 is connected to D2 of the drive circuit 2, the data D6 is connected to D1 of the drive circuit 2, and the data D7 is connected to D0 of the drive circuit 2. It was done.

【0021】このようにしても、図1の実施例と同様の
効果を奏するが、但し汎用のLSIは使用できない。上
述の実施例の他に、本発明は、次のような変形が可能で
ある。上述の実施例では、データを8ビットとしてい
るが、16ビット等他のビット数であっても良く、ビッ
ト数が多い程より効果が大きい。
Even in this case, the same effect as that of the embodiment of FIG. 1 can be obtained, but a general-purpose LSI cannot be used. In addition to the above-described embodiment, the present invention can be modified as follows. In the above embodiment, the data is 8 bits, but other numbers of bits such as 16 bits may be used, and the larger the number of bits, the greater the effect.

【0022】CPU4の周辺回路として用いる例で説
明したが、他の用途に用いてもよい。以上、本発明を実
施例により説明したが、本発明の主旨の範囲内で種々の
変形が可能であり、これらを本発明の範囲から排除する
ものではない。
Although the example of using it as the peripheral circuit of the CPU 4 has been described, it may be used for other purposes. Although the present invention has been described with reference to the embodiments, various modifications are possible within the scope of the gist of the present invention, and these modifications are not excluded from the scope of the present invention.

【0023】[0023]

【発明の効果】以上説明したように、本発明によれば、
次の効果を奏する。レジスタ1とドライブ回路2との
接続関係又はドライブ回路2と並列信号線5との接続関
係を、nビットのデータにおけるMSBの位置とLSB
の位置が入れ代わるように構成したので、レジスタ1へ
のデータのライトと、ドライブ回路2のリードの2ステ
ップで変換でき、高速の変換が可能となり、しかも少な
いハードウェアで実現できる。しかもレジスタ1とド
ライブ回路2の制御により、変換動作のタイミングを制
御でき、所望のタイミングで変換データを得ることがで
きる。
As described above, according to the present invention,
It has the following effects. The connection relationship between the register 1 and the drive circuit 2 or the connection relationship between the drive circuit 2 and the parallel signal line 5 is determined by the MSB position and the LSB in the n-bit data.
Since the positions are changed, the data can be converted in two steps of writing the data to the register 1 and reading the drive circuit 2, which enables high-speed conversion and can be realized with less hardware. Moreover, the timing of the conversion operation can be controlled by controlling the register 1 and the drive circuit 2, and the conversion data can be obtained at a desired timing.

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

【図1】本発明の原理図兼一実施例回路図である。FIG. 1 is a principle diagram of the present invention and a circuit diagram of an embodiment.

【図2】本発明の他の実施例回路図である。FIG. 2 is a circuit diagram of another embodiment of the present invention.

【図3】従来技術の説明図である。FIG. 3 is an explanatory diagram of a conventional technique.

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

1 レジスタ 2 ドライブ回路 3 MSB−LSB変換回路 4 CPU 5 バス 1 register 2 drive circuit 3 MSB-LSB conversion circuit 4 CPU 5 buses

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 nビットのデータに対し、該データのM
SBとLSBとを変換して出力するMSB−LSB変換
回路において、 該nビットのデータを記憶するレジスタ(1)と、該レ
ジスタ(1)の並列出力をドライブして、並列信号線
(5)に出力するドライブ回路(2)とを有し、 該レジスタ(1)と該ドライブ回路(2)との接続関係
又は該ドライブ回路(2)と該並列信号線(5)との接
続関係を、該nビットのデータにおけるMSBの位置と
LSBの位置が入れ代わるように構成したことを特徴と
するMSB−LSB変換回路。
1. For n-bit data, M of the data
In an MSB-LSB conversion circuit which converts SB and LSB and outputs the same, a register (1) for storing the n-bit data and a parallel output of the register (1) are driven to drive a parallel signal line (5). And a drive circuit (2) for outputting to the register, the connection relationship between the register (1) and the drive circuit (2) or the connection relationship between the drive circuit (2) and the parallel signal line (5), An MSB-LSB conversion circuit, characterized in that the MSB position and the LSB position in the n-bit data are replaced.
【請求項2】 前記並列信号線(5)が、CPU(4)
のバスであり、前記レジスタ(1)が、前記バスに接続
されたことを特徴とする請求項1のMSB−LSB変換
回路。
2. The parallel signal line (5) is a CPU (4)
The MSB-LSB conversion circuit according to claim 1, wherein the register (1) is connected to the bus.
JP19580291A 1991-07-10 1991-07-10 Msb/lsb conversion circuit Withdrawn JPH0522152A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19580291A JPH0522152A (en) 1991-07-10 1991-07-10 Msb/lsb conversion circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19580291A JPH0522152A (en) 1991-07-10 1991-07-10 Msb/lsb conversion circuit

Publications (1)

Publication Number Publication Date
JPH0522152A true JPH0522152A (en) 1993-01-29

Family

ID=16347225

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19580291A Withdrawn JPH0522152A (en) 1991-07-10 1991-07-10 Msb/lsb conversion circuit

Country Status (1)

Country Link
JP (1) JPH0522152A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008125001A (en) * 2006-11-15 2008-05-29 Fujitsu Ltd Serial data receiving circuit and serial data receiving method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008125001A (en) * 2006-11-15 2008-05-29 Fujitsu Ltd Serial data receiving circuit and serial data receiving method

Similar Documents

Publication Publication Date Title
CN101313290B (en) Performing an N-bit write access to an MxN-bit-only peripheral
JPH04362759A (en) Central processing unit
JPH0522152A (en) Msb/lsb conversion circuit
JPH05210601A (en) Method and device for transmitting signal
JP3043861B2 (en) Data processing device
CN116700795B (en) Bit operation control system and control method
JP2517154B2 (en) Data processing device
JPS61223964A (en) Data transfer device
JPH031394A (en) Storage device
JP2905989B2 (en) I / O controller
JPS63245568A (en) Picture converter
JPS61112270A (en) Byte converter
JPH0311448A (en) Direct memory access control system
JPS63142446A (en) Address generating system
JP2731025B2 (en) Display control device
JPH0713765A (en) Fast data transfer device
JPH07105080A (en) Semi-conductor integrated circuit
JPH04333954A (en) Information processor
KR20000074477A (en) Bus converter
JPH03235184A (en) Image memory controller
JPH04101213A (en) Display memory control device
JPS63205767A (en) Bit reversing device
JPH05197668A (en) Address generation circuit
JPS6331087A (en) Memory access circuit
JPH02244350A (en) Main storage device access system

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19981008