JP2003015861A - Semiconductor integrated circuit and computer readable recording medium - Google Patents

Semiconductor integrated circuit and computer readable recording medium

Info

Publication number
JP2003015861A
JP2003015861A JP2001195807A JP2001195807A JP2003015861A JP 2003015861 A JP2003015861 A JP 2003015861A JP 2001195807 A JP2001195807 A JP 2001195807A JP 2001195807 A JP2001195807 A JP 2001195807A JP 2003015861 A JP2003015861 A JP 2003015861A
Authority
JP
Japan
Prior art keywords
data
shift
shift operation
address
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
JP2001195807A
Other languages
Japanese (ja)
Inventor
Toru Ichien
亨 一圓
Tatsuro Nishino
辰郎 西野
Kenichi Ishibashi
謙一 石橋
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.)
Hitachi Ltd
Renesas Semiconductor Package and Test Solutions Co Ltd
Original Assignee
Hitachi Hokkai Semiconductor Ltd
Hitachi 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 Hitachi Hokkai Semiconductor Ltd, Hitachi Ltd filed Critical Hitachi Hokkai Semiconductor Ltd
Priority to JP2001195807A priority Critical patent/JP2003015861A/en
Publication of JP2003015861A publication Critical patent/JP2003015861A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a shift operation module capable of performing a shift operation without using an exclusive shift operation instruction of a plurality of optional bits. SOLUTION: The shift operation module (6) is provided with a data register (31) to store data to be shifted and can be accessed by a data transfer instruction such as a load/store instruction of a CPU. The shift operation module is provided with a barrel shifter (32) as a shift operation circuit to vary shift quantity by a reading address of shift data. A plurality of reading addresses of the shift data are allocated according to variation of the shift quantity. The shift operation circuit is realized as a peripheral I/O module of a CPU core without depending on architecture of the CPU. In addition, no change is required for the architecture of the existing CPU.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、シフト演算モジュ
ールを有する半導体集積回路、及びシフト演算モジュー
ルの設計用データがコンピュータにより読取り可能に記
憶された記録媒体に関し、例えばマイクロコンピュータ
に適用して有効な技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a semiconductor integrated circuit having a shift calculation module and a recording medium in which design data of the shift calculation module is stored so that it can be read by a computer, and is effective when applied to, for example, a microcomputer. Regarding technology.

【0002】[0002]

【従来の技術】浮動小数点演算における正規化のような
桁合わせ等のためにバレルシフタを用いてデータの複数
ビットシフトを行なうことができる。バレルシフタは例
えばシフト量がnビットの2進数Sn-1Sn-2…S0で表
現されるならバレルシフタは各ビットn段のトランスフ
ァゲートを用いて実現できる。バレルシフタを内蔵する
マイクロコンピュータは、バレルシフタを用いたシフト
演算を高速に実行可能にするための任意複数ビットシフ
ト命令(バレルシフト命令)を命令セットに備えてい
る。
2. Description of the Related Art A barrel shifter can be used to shift a plurality of bits of data for digit alignment such as normalization in floating point arithmetic. For example, if the shift amount is represented by a binary number Sn-1Sn-2 ... S0 of n bits, the barrel shifter can be realized by using transfer gates of n stages for each bit. A microcomputer incorporating a barrel shifter has an instruction set with an arbitrary multiple bit shift instruction (barrel shift instruction) for enabling a shift operation using the barrel shifter to be executed at high speed.

【0003】尚、バレルシフタについては特開平8−2
21257、特開平5−73516、特表2000−5
03146、特開平9−198232等の各号公報に記
載がある。
A barrel shifter is disclosed in Japanese Patent Laid-Open No. 8-2.
21257, Japanese Patent Laid-Open No. 5-73516, Special Table 2000-5
03146, JP-A-9-198232 and the like.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、命令セ
ットにバレルシフト命令を持つということは、CPUの
元々のアーキテクチャがバレルシフタに対応していなけ
ればならないということである。だが、1ビットシフト
及び2ビットシフトのシフト命令しかサポートしていな
いCPUの場合には、任意ビットのシフトを行なうには
1ビットシフト及び2ビットシフト命令を何回か組合わ
せて実行しなけばならない。そのような既存のCPUに
対し、任意複数ビットのシフト演算を実行できる命令を
命令セットに追加しようとすると、CPUのハードウェ
ア変更はもとより、それに付随するアセンブラ、及び高
級言語コンパイラなどのソフトウェアの変更も必要にな
り、容易に実現できない場合の多いことが本発明者によ
り明らかにされた。
However, having the barrel shift instruction in the instruction set means that the original architecture of the CPU must be compatible with the barrel shifter. However, in the case of a CPU that supports only shift instructions of 1-bit shift and 2-bit shift, in order to shift an arbitrary bit, it is necessary to combine 1-bit shift and 2-bit shift instructions several times. I won't. If an instruction that can execute an arbitrary multi-bit shift operation is added to such an existing CPU in the instruction set, not only the hardware of the CPU is changed but also the software of the assembler and the high-level language compiler accompanying it is changed. It has been clarified by the inventor of the present invention that it is often necessary and often not easily realized.

【0005】本発明の目的は、任意複数ビットの専用シ
フト演算命令を用いること無く当該シフト演算を行なう
ことができるシフト演算モジュールの提供を可能にする
ことにある。
An object of the present invention is to make it possible to provide a shift operation module capable of performing the shift operation without using a dedicated shift operation instruction of arbitrary plural bits.

【0006】本発明の別の目的はCPUで実行するデー
タ転送命令を流用して任意複数ビットのシフト演算を行
なうことができるシフト演算モジュールを備えた半導体
集積回路を提供することにある。
Another object of the present invention is to provide a semiconductor integrated circuit equipped with a shift operation module capable of performing a shift operation of arbitrary plural bits by diverting a data transfer instruction executed by a CPU.

【0007】本発明のその他の目的は、前記任意複数ビ
ットのシフト演算可能なシフト演算モジュールを採用し
た半導体集積回路の設計を容易化することにある。
Another object of the present invention is to facilitate the design of a semiconductor integrated circuit which employs the shift operation module capable of performing the shift operation of arbitrary plural bits.

【0008】本発明の前記並びにその他の目的と新規な
特徴は本明細書の記述及び添付図面から明らかになるで
あろう。
The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

【0009】[0009]

【課題を解決するための手段】〔1〕本願において開示
される発明のうち代表的なものの概要を簡単に説明すれ
ば下記の通りである。
Means for Solving the Problems [1] The outline of representative ones of inventions disclosed in the present application will be briefly described as follows.

【0010】すなわち、複数ビットシフト命令を持たな
いCPUにおいて、CPUコアそのものには一切変更を
加えず、外付けのコプロセッサとしてシフト演算を実行
するシフト演算モジュールを備えて半導体集積回路を構
成する。
That is, in a CPU having no multi-bit shift instruction, the CPU core itself is not changed at all, and a semiconductor integrated circuit is provided with a shift operation module for executing a shift operation as an external coprocessor.

【0011】シフト演算モジュールは、シフトするデー
タを格納するデータレジスタを備え、CPUのロード/
ストア命令のようなデータ転送命令によってアクセス可
能とされる。シフトデータの読み出しアドレスによって
シフト量を変化するシフト演算回路としてのバレルシフ
タを有する。この形態では、シフトデータの読み出しア
ドレスはシフト量のバリエーションに応じて複数個割当
てられることになる。
The shift operation module is provided with a data register for storing data to be shifted, and loads / loads the CPU.
It is made accessible by a data transfer instruction such as a store instruction. It has a barrel shifter as a shift operation circuit that changes the shift amount according to the read address of the shift data. In this form, a plurality of shift data read addresses are assigned according to variations in shift amount.

【0012】シフト演算回路の別の形態として、シフト
量の指定にモードレジスタを用いる。バレルシフタに対
する演算指定はシフトデータの読み出しアドレスによっ
て行われる。この場合のシフトデータの読み出しアドレ
スは一つ割当てられればよい。
As another form of the shift operation circuit, a mode register is used to specify the shift amount. The operation designation for the barrel shifter is performed by the read address of the shift data. In this case, one read address of the shift data may be assigned.

【0013】上記より、CPUの特別なアーキテクチャ
に依存せずに、外付けのI/Oデバイスとしてシフト演
算回路を実現できる。また、既存のCPUのアーキテク
チャに一切変更を要しない。従来、1ビット又は2ビッ
トシフト演算命令を複数個組み合わせて行っていた任意
ビットのシフト演算が、外付けのシフト演算回路で実行
できるため、プログラムの実行速度を向上できる。CP
Uの変更が必要ないため、データ転送命令をサポートす
る殆どのCPUに対して、後付で任意ビットシフト演算
回路を追加することができる。
As described above, the shift arithmetic circuit can be realized as an external I / O device without depending on the special architecture of the CPU. Also, no changes are required to the existing CPU architecture. Conventionally, a shift operation of an arbitrary bit, which is conventionally performed by combining a plurality of 1-bit or 2-bit shift operation instructions, can be executed by an external shift operation circuit, so that the program execution speed can be improved. CP
Since there is no need to change U, an arbitrary bit shift arithmetic circuit can be added later to most CPUs that support data transfer instructions.

【0014】〔2〕本発明を具体的な態様に分けて更に
詳述する。本発明の第1の観点による半導体集積回路
は、CPUと、シフト演算モジュールと、前記CPUと
シフト演算モジュールとを接続するバスとを一つの半導
体チップに含む。前記シフト演算モジュールは、前記バ
スからのデータをラッチするデータレジスタと、データ
レジスタにラッチされたデータをシフト演算してシフト
データを出力可能なバレルシフタとを有する。前記バレ
ルシフタは、CPUがシフトデータの読み出しアドレス
を指定してデータ転送命令を実行したとき、CPUがバ
スに出力するシフトデータの読み出しアドレスに応じた
シフト量でシフト演算を行なう。この態様においてシフ
トデータの読み出しアドレスは、命令のアドレシングモ
ードに従ったデータ転送命令におけるアドレス指定フィ
ールドの記述に従って決まる。
[2] The present invention will be described in more detail with reference to specific embodiments. A semiconductor integrated circuit according to a first aspect of the present invention includes a CPU, a shift operation module, and a bus connecting the CPU and the shift operation module in one semiconductor chip. The shift operation module includes a data register for latching data from the bus, and a barrel shifter capable of performing a shift operation on the data latched in the data register and outputting shift data. When the CPU specifies a read address of shift data and executes a data transfer instruction, the barrel shifter performs a shift operation with a shift amount according to the read address of the shift data output by the CPU to the bus. In this aspect, the read address of the shift data is determined according to the description of the address designation field in the data transfer instruction according to the addressing mode of the instruction.

【0015】本発明の第2の観点による半導体集積回路
は、CPUと、シフト演算モジュールと、前記CPUと
シフト演算モジュールとを接続するバスとを一つの半導
体チップに含む。前記シフト演算モジュールは、前記バ
スからのデータをラッチするデータレジスタと、データ
レジスタにラッチされたデータをシフト演算してシフト
データを出力可能なバレルシフタと、モードレジスタと
を有する。前記バレルシフタは、CPUがシフトデータ
の読み出しアドレスを指定してデータ転送命令を実行し
たとき、モードレジスタの設定値に応じたシフト量でシ
フト演算を行なう。この態様においてシフト量はモード
レジスタへの設定値によって決まる。
A semiconductor integrated circuit according to a second aspect of the present invention includes a CPU, a shift operation module, and a bus connecting the CPU and the shift operation module in one semiconductor chip. The shift operation module includes a data register for latching data from the bus, a barrel shifter capable of performing a shift operation on the data latched in the data register and outputting shift data, and a mode register. When the CPU specifies a read address of shift data and executes a data transfer instruction, the barrel shifter performs a shift operation with a shift amount according to the set value of the mode register. In this mode, the shift amount is determined by the set value in the mode register.

【0016】本発明の第3の観点による半導体集積回路
は、CPUと、シフト演算モジュールと、前記CPUと
シフト演算モジュールとを接続するバスとを一つの半導
体チップに含む。前記シフト演算モジュールは、前記バ
スからのデータをラッチするデータレジスタと、データ
レジスタにラッチされたデータをシフト演算してシフト
データを出力可能なバレルシフタとを有する。前記バレ
ルシフタは、CPUがシフトデータの第1の読み出しア
ドレスを指定してデータ転送命令を実行したとき、CP
Uがバスに出力するシフトデータの読み出しアドレスに
応じたシフト量でシフト演算を行ない、CPUがシフト
データの第2の読み出しアドレスを指定してデータ転送
命令を実行したとき、モードレジスタの設定値に応じた
シフト量でシフト演算を行なう。要するに、第1態様で
のシフト量指定と第2態様でのシフト量指定とを選択可
能になっている。
A semiconductor integrated circuit according to a third aspect of the present invention includes a CPU, a shift operation module, and a bus connecting the CPU and the shift operation module in one semiconductor chip. The shift operation module includes a data register for latching data from the bus, and a barrel shifter capable of performing a shift operation on the data latched in the data register and outputting shift data. When the CPU designates the first read address of the shift data and executes the data transfer instruction, the barrel shifter outputs CP
When the CPU performs a shift operation with a shift amount according to the read address of the shift data output to the bus, and the CPU executes the data transfer instruction by designating the second read address of the shift data, the set value of the mode register is set. A shift operation is performed with a corresponding shift amount. In short, the shift amount designation in the first mode and the shift amount designation in the second mode can be selected.

【0017】〔3〕上記第3の態様を更に別の観点から
把握した半導体集積回路は、CPUと、シフト演算モジ
ュールと、前記CPUとシフト演算モジュールとを接続
するバスとを一つの半導体チップに含む。前記シフト演
算モジュールは、データレジスタと、バレルシフタと、
モードレジスタと、制御部とを有する。前記シフト演算
モジュールは、CPUのアドレス空間における所定アド
レスエリアに割当てられ、所定アドレスエリアには、デ
ータレジスタに割当てられるアドレス、モードレジスタ
に割当てられるアドレス、シフト量に割当てられる複数
アドレス、及び特定シフト動作に割当てられるアドレス
を含む。前記制御部は、前記シフト量に割当てられる複
数アドレスの内の一つが前記バスから入力されるのに応
答して、そのアドレスが指定するシフト量で前記バレル
シフタに前記データレジスタのデータをバレルシフト動
作させ、バレルシフト動作されたデータを前記バスに出
力させ、また、前記特定シフト動作に割当てられるアド
レスが前記バスから入力されるのに応答して、前記モー
ドレジスタの第1設定値で指定されるシフト量で前記バ
レルシフタに前記データレジスタのデータをバレルシフ
ト動作させ、バレルシフト動作されたデータを前記バス
に出力させる。
[3] A semiconductor integrated circuit which grasps the above-mentioned third aspect from still another viewpoint is a semiconductor chip in which a CPU, a shift operation module, and a bus connecting the CPU and the shift operation module are included in one semiconductor chip. Including. The shift operation module includes a data register, a barrel shifter, and
It has a mode register and a control unit. The shift operation module is assigned to a predetermined address area in the CPU address space, and the predetermined address area has an address assigned to a data register, an address assigned to a mode register, a plurality of addresses assigned to a shift amount, and a specific shift operation. Contains the address assigned to. The controller barrel shifts the data in the data register to the barrel shifter in a shift amount designated by the address in response to one of a plurality of addresses assigned to the shift amount being input from the bus. Then, the data subjected to the barrel shift operation is output to the bus, and the address assigned to the specific shift operation is designated by the first set value of the mode register in response to the input from the bus. The barrel shifter causes the data in the data register to be barrel-shifted by the shift amount, and the barrel-shifted data is output to the bus.

【0018】このとき、前記モードレジスタは、その第
2設定値により、バレルシフタによるバレルシフト動作
が論理シフト動作であるか算術シフト動作であるかを指
定するものとしてよい。前記CPUは、例えば、ソース
オペランド指定フィールドに前記シフト量に割当てられ
るアドレスが記述されたデータ転送命令を実行して、シ
フト量に対応するアドレスを前記バスに出力可能であ
る。また、前記CPUは、例えば、ソースオペランド指
定フィールドに特定シフト動作に割当てられるアドレス
が記述されたデータ転送命令を実行して、特定シフト動
作に対応するアドレスを前記バスに出力可能である。
At this time, the mode register may specify whether the barrel shift operation by the barrel shifter is a logical shift operation or an arithmetic shift operation according to the second set value. For example, the CPU can execute a data transfer instruction in which an address assigned to the shift amount is described in a source operand designation field, and output an address corresponding to the shift amount to the bus. Further, the CPU can execute, for example, a data transfer instruction in which an address assigned to a specific shift operation is described in a source operand designation field, and output an address corresponding to the specific shift operation to the bus.

【0019】〔4〕上記シフト演算モジュールを採用し
た半導体集積回路の設計を容易化するという観点によ
る、コンピュータ読取り可能な記録媒体は、半導体チッ
プに形成されるべき半導体集積回路を設計するための回
路モジュールデータがコンピュータにより読取り可能に
記録されている。前記記録媒体に記憶された回路モジュ
ールデータは、データレジスタ、バレルシフタ、モード
レジスタ及び制御部から成るシフト演算モジュールを前
記半導体チップに形成する為の図形パターンデータ又は
機能記述データを含む。前記制御部は、データレジスタ
に割当てられるアドレス、モードレジスタに割当てられ
るアドレス、及びシフト量に割当てられる複数アドレス
を含むアドレスエリアに対するアドレスデコード手段を
有し、前記アドレスデコード手段により前記シフト量に
割当てられる複数アドレスの一つが前記バスから入力さ
れるのを検出することに応答して、そのアドレスが指定
するシフト量で前記バレルシフタに前記データレジスタ
のデータをバレルシフト動作させ、バレルシフト動作さ
れたデータを前記バスに出力させるものである。
[4] A computer-readable recording medium is a circuit for designing a semiconductor integrated circuit to be formed on a semiconductor chip, from the viewpoint of facilitating the design of a semiconductor integrated circuit employing the shift operation module. Module data is recorded so that it can be read by a computer. The circuit module data stored in the recording medium includes graphic pattern data or function description data for forming a shift operation module including a data register, a barrel shifter, a mode register and a control unit on the semiconductor chip. The control unit has an address decoding unit for an address area including an address assigned to a data register, an address assigned to a mode register, and a plurality of addresses assigned to a shift amount, and the address decoding unit assigns the shift amount. In response to detecting that one of the plurality of addresses is input from the bus, the barrel shifter causes the data in the data register to perform a barrel shift operation by the shift amount designated by the address, and the barrel-shifted data is transferred. The data is output to the bus.

【0020】前記記録媒体に記録された別の回路モジュ
ールデータに応ずるシフト演算モジュールにおける制御
部は、データレジスタに割当てられるアドレス、モード
レジスタに割当てられるアドレス、及びシフト動作に割
当てられるアドレスを含むアドレスエリアに対するアド
レスデコード手段を有し、前記アドレスデコード手段に
より前記シフト動作に割当てられるアドレスが前記バス
から入力されるのを検出することに応答して、前記モー
ドレジスタの第1設定値で指定されるシフト量で前記バ
レルシフタに前記データレジスタのデータをバレルシフ
ト動作させ、バレルシフト動作されたデータを前記バス
に出力させるものである。
The control unit in the shift operation module corresponding to another circuit module data recorded on the recording medium is an address area including an address assigned to the data register, an address assigned to the mode register, and an address assigned to the shift operation. To the shift designated by the first set value of the mode register in response to detecting by the address decode means that the address assigned to the shift operation is input from the bus. The barrel shifter causes the data in the data register to be barrel-shifted by an amount, and the barrel-shifted data is output to the bus.

【0021】前記記録媒体に記録された更に別の回路モ
ジュールデータに応ずるシフト演算モジュールにおける
制御部は、データレジスタに割当てられるアドレス、モ
ードレジスタに割当てられるアドレス、シフト量に割当
てられる複数アドレス、及び特定シフト動作に割当てら
れるアドレスを含むアドレスエリアに対するアドレスデ
コード手段を有し、前記アドレスデコード手段により前
記シフト量に割当てられる複数アドレスの一つが前記バ
スから入力されるのを検出することに応答して、そのア
ドレスが指定するシフト量で前記バレルシフタに前記デ
ータレジスタのデータをバレルシフト動作させ、バレル
シフト動作されたデータを前記バスに出力させ、また、
前記特定シフト動作に割当てられるアドレスが前記バス
から入力されるのに応答して、前記モードレジスタの第
1設定値で指定されるシフト量で前記バレルシフタに前
記データレジスタのデータをバレルシフト動作させ、バ
レルシフト動作されたデータを前記バスに出力させるも
のである。
The control unit in the shift operation module corresponding to the further circuit module data recorded on the recording medium includes an address assigned to the data register, an address assigned to the mode register, a plurality of addresses assigned to the shift amount, and a specific value. Responsive to detecting that one of a plurality of addresses assigned to the shift amount is input from the bus by the address decoding means, the address decoding means having an address area including an address assigned to a shift operation, The barrel shifter causes the data in the data register to perform a barrel shift operation by the shift amount designated by the address, and the barrel-shifted data is output to the bus.
In response to the address assigned to the specific shift operation being input from the bus, the barrel shifter causes the data in the data register to perform a barrel shift operation by a shift amount specified by the first setting value of the mode register, The barrel-shifted data is output to the bus.

【0022】[0022]

【発明の実施の形態】図2には本発明に係る半導体集積
回路の一例であるデータプロセッサ1が示される。同図
に示されるデータプロセッサ1は、例えばCMOS集積
回路製造技術により単結晶シリコンのような1個の半導
体基板(半導体チップ)に形成される。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 2 shows a data processor 1 which is an example of a semiconductor integrated circuit according to the present invention. The data processor 1 shown in the figure is formed on one semiconductor substrate (semiconductor chip) such as single crystal silicon by a CMOS integrated circuit manufacturing technique, for example.

【0023】データプロセッサ1は、中央処理装置(C
PU)2、DMAコントローラ(DMAC)3、CPU
2の処理プログラムなどを格納するプログラムメモリで
あるリードオンリメモリ(ROM)4、CPU2の作業
領域並びにデータの一時記憶に利用されるランダムアク
セスメモリ(RAM)5、任意複数ビットシフト演算が
可能なシフト演算モジュール6、バスコントローラ7、
クロック発生回路(CPG)8、割込みコントローラ1
0、タイマカウンタ(TMR)11、シリアルコミュニ
ケーションインタフェースコントローラ(SCI)1
2、ディジタルアナログ変換器(D/A)13、アナロ
グディジタル変換器(A/D)14、パルスワイズモジ
ュレータ(PWM)16、ウォッチドッグタイマ(WD
T)17、及び入出力ポート(PORT)18〜20を
有する。前記CPU2、DMAC3、ROM4、RAM
5、シフト演算モジュール6及びバスコントローラ7は
CPUバス21に接続される。このCPUバス21はバ
スコントローラ7を介して周辺バス22にインタフェー
スされ、周辺バス22には、周辺回路として、前記割込
みコントローラ10、TMR11、SCI12、D/A
13、A/D14、PWM16、及びWDT17が接続
される。前記CPUバス21及び周辺バス22は夫々、
データバス、アドレスバス及びコントロールバス(制御
信号バス)を含んでいる。前記周辺バス22は入出力ポ
ート18を介して外部バス(図示せず)とインタフェー
スされ、CPUバス21はバスコントローラ7を介して
周辺バス22、更には入出力ポート18を介して外部バ
スとインタフェースされる。入出力ポート19,20は
周辺回路のための外部インタフェースバッファとして機
能される。
The data processor 1 comprises a central processing unit (C
PU) 2, DMA controller (DMAC) 3, CPU
A read only memory (ROM) 4, which is a program memory for storing the processing program of 2, a random access memory (RAM) 5 used for temporary storage of data and a work area of the CPU 2, and a shift capable of performing an arbitrary multi-bit shift operation Arithmetic module 6, bus controller 7,
Clock generation circuit (CPG) 8, interrupt controller 1
0, timer counter (TMR) 11, serial communication interface controller (SCI) 1
2, digital-to-analog converter (D / A) 13, analog-to-digital converter (A / D) 14, pulse-wise modulator (PWM) 16, watchdog timer (WD)
T) 17 and input / output ports (PORT) 18 to 20. CPU2, DMAC3, ROM4, RAM
5, the shift operation module 6 and the bus controller 7 are connected to the CPU bus 21. The CPU bus 21 is interfaced with the peripheral bus 22 via the bus controller 7, and the peripheral bus 22 has the interrupt controller 10, TMR 11, SCI 12, D / A as peripheral circuits.
13, A / D 14, PWM 16, and WDT 17 are connected. The CPU bus 21 and the peripheral bus 22 are respectively
It includes a data bus, an address bus and a control bus (control signal bus). The peripheral bus 22 is interfaced with an external bus (not shown) via the input / output port 18, the CPU bus 21 is interfaced with the peripheral bus 22 via the bus controller 7, and further with the external bus via the input / output port 18. To be done. The input / output ports 19 and 20 function as external interface buffers for peripheral circuits.

【0024】データプロセッサ1においてバスマスタモ
ジュールは、前記CPU2及びDMAC3である。前記
CPU2は、例えばROM4から命令をフェッチし、取
り込んだ命令を解読する命令制御部と、命令制御部によ
る命令解読結果に従って汎用レジスタや算術論理演算器
などを用いて演算処理を行なう実行部とを有する。DM
AC3はCPU2によりデータ転送条件が初期設定さ
れ、周辺回路などからのデータ転送要求に応答して、デ
ータ転送制御を行う。
The bus master module in the data processor 1 is the CPU 2 and the DMAC 3. The CPU 2 has, for example, an instruction control unit that fetches an instruction from the ROM 4 and decodes the fetched instruction, and an execution unit that performs arithmetic processing using a general-purpose register or an arithmetic logic unit according to the instruction decoding result by the instruction control unit. Have. DM
The data transfer condition of the AC3 is initialized by the CPU 2, and the data transfer control is performed in response to a data transfer request from a peripheral circuit or the like.

【0025】バスコントローラ7は、バスマスタモジュ
ールであるCPU2、DMAC7、及び外部バスマスタ
との間のバス権要求の競合に対する調停を行う。調停論
理は例えば優先順位に基づく調停制御である。調停の結
果、バス権が与えられたバスマスタモジュールは、バス
コマンドを出力し、バスコントローラ7は、このバスコ
マンドに基づいてバスの制御を行なう。バスコントロー
ラ7は、バスマスタモジュールの出力するアドレス信号
がデータプロセッサ1の外部アドレス空間を意味する場
合には、入出力ポート18を介して外部にアドレス信号
及びアクセスストローブ信号を出力する。
The bus controller 7 arbitrates the competition of the bus right request among the bus master module CPU 2, the DMAC 7, and the external bus master. The arbitration logic is, for example, arbitration control based on priority. As a result of the arbitration, the bus master module to which the bus right is given outputs a bus command, and the bus controller 7 controls the bus based on this bus command. When the address signal output from the bus master module means the external address space of the data processor 1, the bus controller 7 outputs the address signal and the access strobe signal to the outside through the input / output port 18.

【0026】割り込みコントローラ10は、周辺バス2
2に接続されるSCI12等の回路モジュールから出力
される割込み要求信号(図示せず)を入力し、入力され
た割込み要求信号に対して優先制御及びマスク制御を行
って、割り込み要求を受け付ける。割込みコントローラ
10は、割込みを受付けると、CPU2に割込要求信号
(図示せず)を出力する。CPU2に割込要求信号が与
えられると、CPU2は実行中の処理を中断して、割込
み要因に応じた所定の処理ルーチンに分岐する。分岐先
の処理ルーチンの最後では、復帰命令が実行され、この
命令を実行することによって前記中断した処理が再開可
能にされる。
The interrupt controller 10 uses the peripheral bus 2
An interrupt request signal (not shown) output from a circuit module such as the SCI 12 connected to 2 is input, priority control and mask control are performed on the input interrupt request signal, and the interrupt request is accepted. Upon accepting the interrupt, the interrupt controller 10 outputs an interrupt request signal (not shown) to the CPU 2. When the interrupt request signal is given to the CPU 2, the CPU 2 interrupts the process being executed and branches to a predetermined processing routine corresponding to the interrupt factor. At the end of the processing routine at the branch destination, a return instruction is executed, and by executing this instruction, the interrupted processing can be restarted.

【0027】その他にデータプロセッサ1は電源端子と
して、グランドレベル(Vss)及び電源電圧レベル
(Vcc)などの外部端子を有し、その他に専用制御端
子として、リセット入力(RES)、スタンバイ(入力
STBY)、モード制御入力(MD0、MD1)、クロ
ック入力(EXTAL、XTAL)の各端子を有する。
In addition, the data processor 1 has external terminals such as a ground level (Vss) and a power supply voltage level (Vcc) as power supply terminals, and also has a reset input (RES) and a standby (input STBY) as dedicated control terminals. ), Mode control inputs (MD0, MD1), and clock inputs (EXTAL, XTAL).

【0028】前記CPG8は、特に制限されないが、端
子EXTAL、XTALに接続される水晶発振子または
EXTAL端子に入力される外部クロック信号に基づい
てシステムクロック信号φを生成する。
The CPG 8 generates a system clock signal φ based on an external clock signal input to a crystal oscillator connected to the terminals EXTAL and XTAL or an EXTAL terminal, although not particularly limited.

【0029】データプロセッサ1にリセット信号RES
が与えられると、CPU2等のオンチップ回路モジュー
ルはリセット状態とされる。このリセット信号RESに
よるリセット状態が解除されると、CPU2は所定のス
タートアドレスから命令をリードし、プログラムの実行
を開始し、それに従って、例えば、RAM5からデータ
をフェッチし、フェッチしたデータの演算処理を行い、
処理結果に基づいて、SCI12などを使用して、外部
と信号入出力を行って、各種の機器制御を行う。
Reset signal RES to data processor 1
Is given, the on-chip circuit module such as the CPU 2 is reset. When the reset state by the reset signal RES is released, the CPU 2 reads an instruction from a predetermined start address and starts executing the program, and accordingly, for example, fetches data from the RAM 5 and arithmetically processes the fetched data. And then
Based on the processing result, the SCI 12 or the like is used to perform signal input / output with the outside to control various devices.

【0030】図1には前記シフト演算モジュール6の一
例が示される。前記シフト演算モジュール6は、特に制
限されないが、制御部30、データレジスタ31、バレ
ルシフタ32、モードレジスタ33を有し、それらはモ
ジュール内バス34に共通接続される。前記制御部30
はCPUバス21に接続される。前記データレジスタ3
1はモジュール内バス34から与えられるバレルシフト
対象データをラッチする。バレルシフタ32はデータレ
ジスタ31から与えられるデータを複数ビットシフト
(バレルシフト)し、シフトデータをモジュール内バス
34に出力する。バレルシフタ32によるシフトビット
数は制御部30から指示される。モードレジスタ33は
バレルシフタ32によるシフト動作が算術シフトである
か論理シフトであるかの区別を信号S1によって指示す
る。
FIG. 1 shows an example of the shift calculation module 6. Although not particularly limited, the shift operation module 6 has a control unit 30, a data register 31, a barrel shifter 32, and a mode register 33, which are commonly connected to the in-module bus 34. The control unit 30
Is connected to the CPU bus 21. The data register 3
1 latches the barrel shift target data given from the in-module bus 34. The barrel shifter 32 shifts the data supplied from the data register 31 by a plurality of bits (barrel shift), and outputs the shift data to the in-module bus 34. The number of shift bits by the barrel shifter 32 is designated by the control unit 30. The mode register 33 indicates by a signal S1 whether the shift operation by the barrel shifter 32 is an arithmetic shift or a logical shift.

【0031】論理シフト演算では、図3及び図4に例示
されるように、元のデータを符号なし32ビットの整数
と見た場合、ビットのオーバフロー、アンダフローが無
い限り、Nビット左シフトが2のN乗倍、右シフトが2
のN乗分の一の符号なし算術演算と一致するようにな
る。
In the logical shift operation, as shown in FIGS. 3 and 4, when the original data is regarded as an unsigned 32-bit integer, an N-bit left shift is performed unless bit overflow or underflow occurs. 2 times N, right shift is 2
It corresponds to the unsigned arithmetic operation of 1 / N.

【0032】算術シフト演算では、図5及び図6に例示
されるように、元のデータを符号付き32ビットの整数
と見た場合、ビットのオーバフロー、アンダフローが無
い限り、Nビット左シフトが2のN乗倍、右シフトが2
のN乗分の一の符号付き算術演算と一致するようにな
る。
In the arithmetic shift operation, as shown in FIGS. 5 and 6, when the original data is regarded as a signed 32-bit integer, an N-bit left shift is performed unless there is a bit overflow or underflow. 2 times N, right shift is 2
It corresponds to a signed arithmetic operation of 1 / N.

【0033】更にシフト演算モジュール6について詳述
する。CPU2はシフト演算モジュール6をメモリマッ
プドIOのようにアクセスし、前記制御部30はそのア
クセス制御に応答して内部の初期設定動作及びバレルシ
フト動作を制御する。
Further, the shift calculation module 6 will be described in detail. The CPU 2 accesses the shift operation module 6 like a memory-mapped IO, and the control unit 30 controls internal initialization operation and barrel shift operation in response to the access control.

【0034】前記CPUバス21はデータバスIDB、
コントロールバスICB及びアドレスバスIABを含ん
でいる。CPU2はロード命令やストア命令等のデータ
転送命令を実行するとき、コントロールバスICBにリ
ード動作を指示するリード信号、ライト動作を指示する
ライト信号などのストローブ信号を出力する。これと共
に、CPU2はアクセスアドレスを示すアドレス信号を
アドレスバスIABに出力する。リード動作であればC
PU2はアクセス対象回路からデータバスIDBに出力
されたデータを取込み、ライト動作であればCPU2は
ライトすべきデータをデータバスIDBに出力する。例
えばCPU2がデータレジスタ31のアドレスを指定し
てストア命令を実行することにより、データレジスタ3
1にデータバスIDBからシフト演算対象データがセッ
トされる(PS1)。CPU2がモードレジスタ33の
アドレスを指定してストア命令を実行することにより、
モードレジスタ33にデータバスIDBから制御データ
がセットされる(PS3)。CPU2がシフト演算結果
データの読み出しアドレスを指定してロード命令を実行
することにより、シフト演算結果データがデータバスI
DBに出力される。
The CPU bus 21 is a data bus IDB,
It includes a control bus ICB and an address bus IAB. When executing a data transfer instruction such as a load instruction or a store instruction, the CPU 2 outputs strobe signals such as a read signal instructing a read operation and a write signal instructing a write operation to the control bus ICB. At the same time, the CPU 2 outputs an address signal indicating the access address to the address bus IAB. C for read operation
PU2 takes in the data output to the data bus IDB from the circuit to be accessed, and if it is a write operation, the CPU 2 outputs the data to be written to the data bus IDB. For example, when the CPU 2 specifies the address of the data register 31 and executes the store instruction, the data register 3
Data for shift operation is set to 1 from the data bus IDB (PS1). By the CPU 2 specifying the address of the mode register 33 and executing the store instruction,
Control data is set in the mode register 33 from the data bus IDB (PS3). When the CPU 2 executes the load instruction by designating the read address of the shift operation result data, the shift operation result data is transferred to the data bus I.
It is output to DB.

【0035】前記バレルシフトモジュール6におけるレ
ジスタ空間は図7に例示されるアドレスマッピングを有
する。図7より明らかなように、データレジスタ31の
マッピングアドレス(0x000FF00)を中心に上
位側に32個の仮想的な左シフトデータレジスタ(LS
T1〜LST32)がマッピングされ、下位側に32個
の仮想的な右シフトデータレジスタ(RST1〜RST
32)がマッピングされる。詳細は後述するが、個々の
仮想的なシフトデータレジスタは、レジスタアドレスに
シフト量を対応させるために、仮想的に定義されたレジ
スタとされる。例えば左シフトデータレジスタ(LST
32)を指定するアドレス0x000FF80は、その
レジスタアドレスを指定したシフトデータの読み出し動
作においてシフトビット数を左方向32ビットと指定す
る。
The register space in the barrel shift module 6 has the address mapping illustrated in FIG. As is clear from FIG. 7, 32 virtual left shift data registers (LS) are arranged on the upper side around the mapping address (0x000FF00) of the data register 31.
T1 to LST32) are mapped to 32 virtual right shift data registers (RST1 to RST) on the lower side.
32) is mapped. As will be described later in detail, each virtual shift data register is a virtually defined register in order to correspond the shift amount to the register address. For example, left shift data register (LST
The address 0x000FF80 designating 32) designates the number of shift bits as 32 bits to the left in the read operation of the shift data designating the register address.

【0036】前記制御部30は図7のマッピングアドレ
スを識別するためのアドレスデコード論理を備えたアド
レスデコーダ35を有し、図7のマッピングアドレスの
どのアドレス信号が入力されたかを判別する。アドレス
デコーダ35は、前記CPUバス(IAB,ICB,I
DB)21を通してCPU2からのアクセスがあると、
アドレスバスIABから入力されたアドレス信号をデコ
ードして、図7のどのレジスタへのアクセスかを判別す
る。
The control unit 30 has an address decoder 35 having an address decoding logic for identifying the mapping address of FIG. 7, and determines which address signal of the mapping address of FIG. 7 is input. The address decoder 35 uses the CPU bus (IAB, ICB, I
When there is access from the CPU 2 through the DB) 21,
The address signal input from the address bus IAB is decoded to determine which register in FIG. 7 is accessed.

【0037】データレジスタ31とモードレジスタ33
は、データを記憶する記憶回路を現実に備えており、C
PU2からのリード及びライトアクセスに対して実際に
レジスタ動作する。要するに、アドレスデコーダ35が
データレジスタ31又はモードレジスタ33に対するア
クセスを検出すると、制御部30は、データレジスタ3
1又はモードレジスタ33に対する図示を省略するレジ
スタ選択信号を選択レベルとし、同じくリード又はライ
ト動作の指示に応じて図示を省略するレジスタ入出力制
御信号によりレジスタ出力動作又はレジスタ入力動作を
指示する。
Data register 31 and mode register 33
Actually has a memory circuit for storing data, and C
Register operation is actually performed for read and write access from PU2. In short, when the address decoder 35 detects access to the data register 31 or the mode register 33, the control unit 30 causes the data register 3
1 or a register selection signal (not shown) for the mode register 33 is set to a selection level, and a register output operation or a register input operation is instructed by a register input / output control signal (not shown) in accordance with a read or write operation instruction.

【0038】データレジスタ31とモードレジスタ33
以外のシフトデータレジスタ(左シフトデータレジスタ
LST1〜LST32及び右シフトデータレジスタRS
T1〜RST32を総称して単にシフトレジスタと呼
ぶ)は、現実の記憶回路を有しない。そのシフトレジス
タがCPU2からの読み出しアクセス対象アドレスとし
て指定されると、指定されたアドレスに対応するシフト
量のデータN[6:0]がバレルシフタ32に与えら
れ、データレジスタ31に貯えられた値がそのシフト量
で複数ビットシフトとされ、シフト演算結果がバス34
に出力される。即ち、CPU2より前記何れかのシフト
レジスタに対するリードアクセスがあると、アドレスデ
コーダ35はそのシフトレジスタのアドレスを指し示す
アドレスバスIABの値をデコードして、そのリードア
クセスが指示されたことを検出する。これにより、制御
部30は、データレジスタ31に記憶されている32ビ
ットのデータを、DI[31:0]としてバレルシフタ
32に供給する。これと共にアドレスデコーダ35は、
そのシフトレジスタのアドレスを指し示すアドレスバス
IAB上の値のデコード結果からシフト量N[6:0]
を生成して、バレルシフタ32に供給する。
Data register 31 and mode register 33
Other shift data registers (left shift data registers LST1 to LST32 and right shift data register RS
T1 to RST32 are collectively referred to as a shift register), and do not have an actual memory circuit. When the shift register is designated as a read access target address from the CPU 2, the shift amount data N [6: 0] corresponding to the designated address is given to the barrel shifter 32, and the value stored in the data register 31 is changed. A plurality of bits are shifted by the shift amount, and the shift operation result is stored in the bus 34.
Is output to. That is, when the CPU 2 makes a read access to any one of the shift registers, the address decoder 35 decodes the value of the address bus IAB indicating the address of the shift register and detects that the read access is instructed. As a result, the control unit 30 supplies the 32-bit data stored in the data register 31 to the barrel shifter 32 as DI [31: 0]. Along with this, the address decoder 35
From the decoding result of the value on the address bus IAB indicating the address of the shift register, the shift amount N [6: 0]
Is generated and supplied to the barrel shifter 32.

【0039】シフト演算の範囲は、左シフトが1ビット
〜32ビット、右シフトが1ビット〜32ビットの64
通りなので、シフト量Nは6ビットのデータ量があれば
十分であるが、シフトしない場合のN=0を加えて65
通りとなるので、7ビットのデータ量を割り当てる。
The shift operation range is 1 bit to 32 bits for left shift and 64 bits for right shift of 1 bit to 32 bits.
Therefore, the shift amount N is sufficient if there is a data amount of 6 bits, but N = 0 in the case of no shift is added to 65.
Therefore, a data amount of 7 bits is assigned.

【0040】図7のように、起点となるデータレジスタ
31から、アドレス空間の上位側へ向かって左シフトデ
ータレジスタLST1〜LST32を、アドレス空間の
下位側へ向かって右シフトデータレジスタRST1〜R
ST32を配置した場合、シフト量N[6:0]は、N
[6:0]=(IAB−@データレジスタ)/4の式で
求めることができる。“@データレジスタ”とはデータ
レジスタ31のマッピングアドレスを意味する。要する
に、CPU2が読み出し要求を出したシフトレジスタの
アドレスがアドレスバスIABを介して入力されている
ので、アドレスバスIABの値から、起点となるデータ
レジスタ31のアドレスを減じ、レジスタのサイズ4バ
イト(32ビット)で割ると、シフト量が求まる。アドレ
スはバイト単位のアドレス(バイトアドレス)を想定し
ている。例えば、CPUが右シフトレジスタRST3か
らの読み出しを要求した場合、アドレスバスIABに
は、右シフトレジスタRST3のアドレスが供給され
る。右シフトレジスタRST3のアドレスとデータレジ
スタ31のアドレスは、12だけ異なり、右シフトレジ
スタRST3のアドレスの方が小さな値である。このた
め、(IAB−@データレジスタ)=−12となり、こ
れを4で割って、N[6:0]=−3と求まる。Nの値
が負の場合には右シフト、正の場合には左シフト演算を
指示する。
As shown in FIG. 7, from the starting data register 31, the left shift data registers LST1 to LST32 are moved toward the upper side of the address space, and the right shift data registers RST1 to R are moved toward the lower side of the address space.
When ST32 is arranged, the shift amount N [6: 0] is N
[6: 0] = (IAB- @ data register) / 4 can be obtained. “@Data register” means a mapping address of the data register 31. In short, since the address of the shift register for which the CPU 2 has issued the read request is input via the address bus IAB, the address of the data register 31 as the starting point is subtracted from the value of the address bus IAB, and the register size is 4 bytes ( Divide by 32 bits) to obtain the shift amount. The address is assumed to be a byte unit address (byte address). For example, when the CPU requests reading from the right shift register RST3, the address of the right shift register RST3 is supplied to the address bus IAB. The address of the right shift register RST3 and the address of the data register 31 differ by 12 and the address of the right shift register RST3 has a smaller value. Therefore, (IAB- @ data register) =-12, which is divided by 4 to obtain N [6: 0] =-3. When the value of N is negative, right shift operation is instructed, and when it is positive, left shift operation is instructed.

【0041】バレルシフタ32は、シフト演算対象デー
タDI[31:0]、シフト量N[6:0]、及び論理
/算術シフト信号S1から、データレジスタ31の値D
I[31:0]にシフト演算を施したデータをモジュー
ル内バス34へ出力する。制御部30は、モジュール内
バス34に出力されたデータを内部データバスIDBに
出力し、CPU2の読み出し要求に対してシフト演算の
結果を返す。前記論理/算術シフト信号S1は、モード
レジスタ33内に割り当てられたビットの値で、例え
ば、論理値“0”のとき論理シフト演算を、論理値
“1”のとき算術シフト演算を指示するものとする。
The barrel shifter 32 receives the value D of the data register 31 from the shift operation target data DI [31: 0], the shift amount N [6: 0], and the logical / arithmetic shift signal S1.
The data obtained by shifting I [31: 0] is output to the in-module bus 34. The control unit 30 outputs the data output to the in-module bus 34 to the internal data bus IDB, and returns the result of the shift operation in response to the read request from the CPU 2. The logical / arithmetic shift signal S1 is a value of a bit assigned in the mode register 33, and indicates a logical shift operation when the logical value is "0" and an arithmetic shift operation when the logical value is "1", for example. And

【0042】図1に例示されるシフト演算モジュール6
によれば、CPU2は、シフトしようとするデータをシ
フト演算モジュール6のデータレジスタ31へ書き込
み、シフト量Nビットに対して、(@データレジスタ+
N×4)で示されるアドレスからデータを読み出すだけ
で、任意の複数ビットシフト演算を施したデータを得る
ことができる。このとき、Nの値の正負によって、N>
0のとき左シフト、N<0のとき右シフトしたデータを
得ることができる。CPU2は、任意アドレスの読み出
し、書き込みアクセスさえできればよく、CPU2の特
別なアーキテクチャに依存しない周辺回路としてシフト
演算モジュール6を実現することができる。
The shift calculation module 6 illustrated in FIG.
According to the above, the CPU 2 writes the data to be shifted into the data register 31 of the shift operation module 6, and for the shift amount N bits, (@data register +
By simply reading the data from the address indicated by (N × 4), it is possible to obtain the data that has been subjected to an arbitrary multi-bit shift operation. At this time, depending on whether the value of N is positive or negative, N>
It is possible to obtain data that is left-shifted when 0 and right-shifted when N <0. The CPU 2 only needs to be able to read and write an arbitrary address, and can implement the shift operation module 6 as a peripheral circuit that does not depend on the special architecture of the CPU 2.

【0043】図8には別のシフト演算モジュール6Aの
例を示す。図1の構成では、データを読み出すアドレス
によって、シフト量を変化させたが、ここでは、新た
に、シフト演算結果を格納する仮想的なレジスタ(結果
レジスタRLT)を設け、モードレジスタ33にはシフ
ト量を示す情報を設定可能とする。前記結果レジスタR
LTを指定した読み出し動作では、モードレジスタ33
に設定されたシフト量を用いる複数ビットシフト演算の
結果がバレルシフタ32からモジュール内バス34に出
力される。この時も、図1と同様に、モードレジスタ3
3から与えられる論理/算術シフト信号S1によって、
論理シフトと算術シフトが選択可能にされる。図9には
図8のシフト演算モジュール6Aにおけるレジスタのア
ドレスマッピングが例示される。この例ではアドレスデ
コーダ35Aは図9に示されるマッピングアドレスの入
力を検出すればよい。仮想的なシフトデータレジスタL
ST1〜LST32,RST1〜RST32のマッピン
グは必要ない。
FIG. 8 shows an example of another shift operation module 6A. In the configuration of FIG. 1, the shift amount is changed depending on the address for reading the data, but here, a virtual register (result register RLT) for storing the shift operation result is newly provided, and the mode register 33 has the shift value. Information that indicates the amount can be set. The result register R
In the read operation in which LT is designated, the mode register 33
The result of the multi-bit shift operation using the shift amount set to is output from the barrel shifter 32 to the in-module bus 34. At this time also, as in FIG. 1, the mode register 3
By the logical / arithmetic shift signal S1 given from 3,
Logical shift and arithmetic shift are made selectable. FIG. 9 illustrates the address mapping of the register in the shift operation module 6A of FIG. In this example, the address decoder 35A may detect the input of the mapping address shown in FIG. Virtual shift data register L
Mapping of ST1 to LST32 and RST1 to RST32 is not necessary.

【0044】図8のシフト演算モジュール6Aにおい
て、シフト演算実行時には、まず、CPU2がデータレ
ジスタ31にシフトしたいもとのデータを書き込む(P
S1)。次に、CPU2は、シフト量とともに論理/算
術シフトの種別をモードレジスタ33に書き込む(PS
2)。その後、CPU2が、前記結果レジスタRLTの
アドレスを読み出しアドレスとするロード命令を実行す
ると、シフト演算モジュール6Aでは、データレジスタ
31の値と、モードレジスタ33のシフト量に基づいて
バレルシフタ32が複数ビットシフト演算を実行し、そ
のシフト演算結果をモジュール内バス34に読み出すこ
とができる(PS2)。
In the shift operation module 6A of FIG. 8, when executing the shift operation, the CPU 2 first writes the original data to be shifted into the data register 31 (P
S1). Next, the CPU 2 writes the type of logical / arithmetic shift together with the shift amount in the mode register 33 (PS
2). After that, when the CPU 2 executes a load instruction using the address of the result register RLT as a read address, in the shift operation module 6A, the barrel shifter 32 shifts a plurality of bits based on the value of the data register 31 and the shift amount of the mode register 33. It is possible to execute the operation and read the shift operation result to the in-module bus 34 (PS2).

【0045】図10には更に別のシフト演算モジュール
6Bの例を示す。図10の構成は図1及び図8の双方の
構成を備え、データ読み出しアドレスのデコード結果に
応じて生成されるシフト量N[6:0]と、モードレジ
スタ33の設定値で指定されるシフト量N[6:0]と
を選択してバレルシフタ32に与えるセレクタ36を有
する。このシフト演算モジュール6Bにおけるレジスタ
マッピングは図7を基準に、前記シフト演算結果を格納
する仮想的なレジスタ(結果レジスタRLT)がアドレ
ス0x0000FE08に配置されたアドレスマッピン
グを有する。データレジスタ31とモードレジスタ33
は、何れからのシフト量を用いる場合も同じである。セ
レクタ36の選択信号S2はアドレスデコーダ35Bが
出力する。アドレスデコーダ35Bは、CPU2による
リードサイクルにおいて、アドレスバスIABからのア
ドレスにより結果レジスタRLTの指定を検出したとき
に、信号S2でモードレジスタ33からのシフト量を選
択させて、バレルシフタ32に与える。図10の構成
は、データ読み出しアドレスを仮想的なシフトデータレ
ジスタLST1〜LST32,RST1〜RST32の
中から選ぶか、或は仮想的な結果レジスタRLTにする
のかに応じて、図1の構成に依存するバレルシフト動作
又は図8の構成に依存するバレルシフト動作を、任意に
選択する事ができる。
FIG. 10 shows another example of the shift operation module 6B. The configuration of FIG. 10 has both configurations of FIG. 1 and FIG. 8, and the shift amount N [6: 0] generated according to the decoding result of the data read address and the shift specified by the set value of the mode register 33. It has a selector 36 which selects the quantity N [6: 0] and supplies it to the barrel shifter 32. The register mapping in this shift calculation module 6B has an address mapping in which a virtual register (result register RLT) for storing the shift calculation result is arranged at address 0x0000FE08 based on FIG. Data register 31 and mode register 33
Is the same regardless of which shift amount is used. The address decoder 35B outputs the selection signal S2 of the selector 36. In the read cycle by the CPU 2, when the address decoder 35B detects the designation of the result register RLT by the address from the address bus IAB, the address decoder 35B selects the shift amount from the mode register 33 by the signal S2 and supplies it to the barrel shifter 32. The configuration of FIG. 10 depends on the configuration of FIG. 1 depending on whether the data read address is selected from the virtual shift data registers LST1 to LST32, RST1 to RST32, or the virtual result register RLT. The barrel shift operation performed or the barrel shift operation depending on the configuration of FIG. 8 can be arbitrarily selected.

【0046】図11にはバレルシフト命令を持たないC
PU2がシフト演算モジュールを用いずに、CPUの1
ビット又は2ビットシフト演算命令を用いて、定数のシ
フト演算(例えば9ビット右シフト)を実行する場合の
プログラムが例示される。
FIG. 11 shows C having no barrel shift instruction.
PU2 does not use shift operation module
A program for executing a constant shift operation (for example, 9-bit right shift) using a bit or 2-bit shift operation instruction is illustrated.

【0047】CPU2には、1ビットまたは2ビットシ
フト可能な右シフト命令(SHR)があるものとしてい
る。この例では、4ステップで9ビット右シフトを演算
終了することができる。
It is assumed that the CPU 2 has a right shift instruction (SHR) capable of shifting 1 bit or 2 bits. In this example, the 9-bit right shift operation can be completed in 4 steps.

【0048】図12には図1のシフト演算モジュール6
を用いて定数のシフト演算(例えば9ビット右シフト演
算)を行なうためのプログラムが例示される。データレ
ジスタ31のアドレスはDATAREGというラベルで
示されている。図7のアドレスマップに従えば、プログ
ラム上の何れかの場所で、DATAREGというラベル
に対して、対応するアドレス0x0000FF00を割
り当てておく必要がある。この図1のシフト演算モジュ
ール6を用いる第1の動作形態では、読み出しアドレス
によって、シフト量が変化するので、DATAREGか
らのオフセットであらかじめ9ビット右シフトとなるア
ドレスからデータを読み出せばよい。図1のシフト演算
モジュール6を用いれば、図11において4ステップ必
要だった9ビット右シフト演算を2ステップで終了する
ことができる。
FIG. 12 shows the shift calculation module 6 of FIG.
A program for performing a constant shift operation (for example, a 9-bit right shift operation) is illustrated. The address of the data register 31 is indicated by the label DATAREG. According to the address map of FIG. 7, it is necessary to assign the corresponding address 0x0000FF00 to the label DATAREG at any place on the program. In the first operation mode using the shift operation module 6 of FIG. 1, since the shift amount changes depending on the read address, it is only necessary to read the data from the address that shifts to the right by 9 bits by the offset from DATAREG. By using the shift operation module 6 of FIG. 1, the 9-bit right shift operation, which requires 4 steps in FIG. 11, can be completed in 2 steps.

【0049】図13は図8のシフト演算モジュール6A
を用いて定数のシフト演算(例えば9ビット右シフト演
算)を行なうためのプログラムが例示される。シフト演
算モジュール6Aのデータレジスタ31のアドレスをD
ATAREG、モードレジスタ33のアドレスをMOD
EREG、演算結果を格納する結果レジスタRLTのア
ドレスをRSLTREGというラベルで示している。図
9のアドレスマップに従えば、プログラム上のいずれか
の場所で、DATAREGというラベルに対してアドレ
ス0x0000FF00を、MODEREGというラベ
ルに対してアドレス0x0000FF04を、RSLT
REGというラベルに対してアドレス0x0000FF
08を、割り当てておく必要がある。
FIG. 13 shows the shift operation module 6A of FIG.
A program for performing a constant shift operation (for example, a 9-bit right shift operation) is illustrated. Set the address of the data register 31 of the shift operation module 6A to D
MOD of ATAREG and mode register 33 address
The address of the result register RLT for storing the EREG and the operation result is shown by the label RSLTREG. According to the address map of FIG. 9, the address 0x0000FF00 for the label DATAREG, the address 0x0000FF04 for the label MODEREG, and RSLT
Address 0x0000FF for the label REG
It is necessary to allocate 08.

【0050】元となるデータをDATAREGに書き込
み、次に、右(マイナス)方向への9ビットシフトを示
す即値−9を、モードレジスタ33に書き込む。この状
態で結果レジスタRLTを読み出すと、データレジスタ
31の値を9ビット右シフトした値が読み出される。
The original data is written to DATAREG, and then the immediate value -9 indicating a 9-bit shift to the right (minus) direction is written to the mode register 33. When the result register RLT is read in this state, a value obtained by shifting the value of the data register 31 by 9 bits to the right is read.

【0051】図8のシフト演算モジュール6Aを用いる
第2の動作形態では、本発明を実施しなかった図11の
場合と同じく、4ステップを要する。図8の形態では、
効果が無いように見えるが、図8の第2の動作形態の利
点は、次に例示するように、任意のNビットシフトを行
なったときに最大限発揮される。
The second operation mode using the shift operation module 6A of FIG. 8 requires four steps as in the case of FIG. 11 in which the present invention is not implemented. In the form of FIG.
Although it appears ineffective, the advantages of the second mode of operation of FIG. 8 are maximized when any N-bit shift is performed, as illustrated below.

【0052】図14には、バレルシフト命令を持たない
CPU2がシフト演算モジュールを用いずに、CPUの
1ビット又は2ビットシフト演算命令を用いて、任意の
Nビットシフト演算を実行する場合のプログラムが例示
される。この例では、シフト量NをCPUのレジスタR
0に、シフトする元データをR1に格納してあり、演算
結果をR1に求めている。また、シフト量Nが、N>0
なら左シフト、N<0なら右シフトを演算する。プログ
ラムは、指定された回数Nだけ、1ビット右シフト命令
SHR、又は1ビット左シフト命令SHLを繰り返し実
行している。本発明を実施しないこの例では、Nビット
のシフト演算に分岐命令を含む、3+4*Nステップを
要する。記号*は積を意味する。
FIG. 14 shows a program in which the CPU 2 having no barrel shift instruction executes an arbitrary N-bit shift operation using the 1-bit or 2-bit shift operation instruction of the CPU without using the shift operation module. Is exemplified. In this example, the shift amount N is set to the register R of the CPU.
The original data to be shifted is stored in R1, and the calculation result is obtained in R1. In addition, the shift amount N is N> 0
If so, a left shift is calculated, and if N <0, a right shift is calculated. The program repeatedly executes the 1-bit right shift instruction SHR or the 1-bit left shift instruction SHL a specified number of times N. In this example, which does not implement the invention, the N-bit shift operation requires 3 + 4 * N steps, including branch instructions. The symbol * means product.

【0053】図15には図1のシフト演算モジュール6
を用いて任意のNビットシフト演算を実行する場合のプ
ログラム例が示される。ビットシフト数Nは任意であ
り、それに応ずる仮想のシフトデータレジスタLST1
〜LST32,RST1〜RSL32の内の何れかのア
ドレスを命令のオペランド指定フィールドに直接記述す
ることはできない。図12の場合の定数ビットシフトの
場合とはこの点で相違する。したがって、シフト演算対
象になるデータをデータレジスタ31へ書き込んだ後、
シフト量Nから、対応するレジスタのアドレスを求める
ためのアドレス演算が続く。1つのレジスタは4バイト
の記憶領域を採るため、シフト量Nから、該当するレジ
スタアドレスを得るにはNを4倍する必要がある。今、
Nの値はR0に格納されており、4倍するという演算は
2ビット左シフトと同じなので、まず、R0レジスタを
左に2ビットシフトするSHL命令を実行する。加算命
令ADDを使って、Nを4倍した値R0にDATARE
Gで示されるデータレジスタのアドレスを加算するとア
ドレスが計算できる。計算したアドレスから値を読み出
せば、それがNビットシフトした値になる。この場合、
シフト量Nによらず、4ステップで任意のNビットシフ
トが終了する。
FIG. 15 shows the shift operation module 6 of FIG.
An example of a program for executing an arbitrary N-bit shift operation by using is shown. The number N of bit shifts is arbitrary, and a virtual shift data register LST1 corresponding thereto is used.
~ LST32 or RST1 to RSL32 cannot directly describe the address in the operand specification field of the instruction. This point is different from the case of the constant bit shift in the case of FIG. Therefore, after writing the data to be shifted in the data register 31,
From the shift amount N, the address calculation for obtaining the address of the corresponding register follows. Since one register has a storage area of 4 bytes, it is necessary to multiply N by 4 to obtain the corresponding register address from the shift amount N. now,
Since the value of N is stored in R0 and the operation of multiplying by 4 is the same as the 2-bit left shift, the SHL instruction for shifting the R0 register left by 2 bits is executed first. DATA is added to the value R0 that is four times N using the addition instruction ADD.
The address can be calculated by adding the addresses of the data registers indicated by G. If a value is read from the calculated address, it becomes a value shifted by N bits. in this case,
Regardless of the shift amount N, arbitrary N-bit shift is completed in 4 steps.

【0054】図16には図8のシフト演算モジュール6
Aを用いて任意のNビットシフト演算を実行する場合の
プログラム例が示される。シフトすべきデータがR1に
格納されているので、これをデータレジスタ31に書き
込む。同様に、シフト量Nをモードレジスタ33に書き
込む。最後に、結果レジスタRLTを読み出せば、それ
がNビットシフトした値となる。図16の例では、図1
5の例より少ない3ステップでシフト演算が終了する。
FIG. 16 shows the shift operation module 6 of FIG.
A program example for executing an arbitrary N-bit shift operation by using A is shown. Since the data to be shifted is stored in R1, it is written in the data register 31. Similarly, the shift amount N is written in the mode register 33. Finally, when the result register RLT is read, it has a value shifted by N bits. In the example of FIG. 16, FIG.
The shift operation is completed in 3 steps, which is less than the example of 5.

【0055】図11乃至図16の説明より明らかなよう
に、定数のシフトには図1で説明した複数ビットシフト
の演算形態が有利であり、任意ビットのシフトには図8
で説明した複数ビットシフトの演算形態が有利である。
この意味において、図10で説明した複数ビットシフト
の演算形態を選択可能な構成は、演算内容に応じて最適
なシフト演算を動的に若しくはソフトウェアで選択する
ことが可能である。これにより、複数ビットシフト演算
を伴う演算処理効率を更に向上させることが可能にな
る。尚、図1、図8、図10の何れの場合でも、バレル
シフト命令を持たないCPUがシフト演算モジュールを
用いずにCPUの1ビット又は2ビットシフト演算命令
を用いて行なうシフト演算に比べれば、定数シフトであ
ろうと任意複数ビットシフトであろうと性能向上を期待
できることは言うまでもない。
As is apparent from the description of FIGS. 11 to 16, the arithmetic form of the multiple bit shift described in FIG. 1 is advantageous for the constant shift, and the arbitrary bit shift shown in FIG.
The multi-bit shift operation form described in 1 above is advantageous.
In this sense, the configuration capable of selecting the operation form of the multiple bit shift described in FIG. 10 can dynamically or optimally select the optimum shift operation according to the operation content. As a result, it is possible to further improve the operation processing efficiency that involves a multi-bit shift operation. It should be noted that, in any of FIG. 1, FIG. 8 and FIG. 10, compared to the shift operation performed by the CPU not having the barrel shift instruction using the 1-bit or 2-bit shift operation instruction of the CPU without using the shift operation module. It goes without saying that performance improvement can be expected regardless of whether it is a constant shift or an arbitrary multiple bit shift.

【0056】次に、上述の半導体集積回路化されたデー
タプロセッサ若しくはシフト演算モジュールの設計を容
易化するという観点より、上述したシフト演算モジュー
ル6,6A,6Bの設計データを、所謂IPモジュール
として提供することについて説明する。
Next, from the viewpoint of facilitating the design of the data processor or the shift operation module integrated into the semiconductor circuit, the design data of the shift operation modules 6, 6A and 6B described above is provided as a so-called IP module. What to do is explained.

【0057】IPモジュールとして提供する回路モジュ
ールデータは、少なくとも前記シフト演算モジュールを
前記半導体チップに形成する為の図形パターンデータ若
しくはHDL(ハードウェア・ディスクリプション・ラ
ンゲージ)によるRTL(レジスタ・トランスファ・レ
ベル)などによる機能記述データを含む。図形パターン
データは、マスクパターンデータ或いは電子線描画デー
タなどである。機能記述データは、所謂プログラムデー
タであり、所定の設計ツールに読み込むことによってシ
ンボル表示で回路等を特定する事ができる。
Circuit module data provided as an IP module is at least graphic pattern data for forming the shift operation module on the semiconductor chip or RTL (register transfer level) by HDL (hardware description language). Including function description data such as. The figure pattern data is mask pattern data or electron beam drawing data. The function description data is so-called program data, and a circuit or the like can be specified by symbol display by reading it into a predetermined design tool.

【0058】そのようなIPモジュールのデータは、図
17に例示されるように、半導体チップに形成されるべ
き集積回路を設計ツールのようなコンピュータ40を用
いて設計するためのデータであって、前記コンピュータ
40により読取り可能に、磁気テープ、フレキシブルデ
ィスク、ハードディスク、CD−ROM、MO(マグネ
ット・オプチカル・ディスク)などの記録媒体41に、
コンピュータ40によって読取り可能に記録されてい
る。記録媒体41はコンピュータ40の周辺装置である
ディスクドライブ装置40Aに装着され、その状態で記
録情報がコンピュータ40のメモリ等に読み込まれる。
記録媒体41に記録されたシフト演算モジュールに対応
されるIPモジュールのデータは、マスクパターンを特
定可能なハードIPモジュールと、機能レベルで回路を
特定するソフトIPモジュールに大別される。ハードI
Pモジュールのデータは、前記シフト演算モジュールを
構成する為のマスクパターンデータD1、そのシフト演
算モジュールの機能記述データD2、及び当該シフト演
算モジュールのIPモジュールのデータを適用してLS
Iを設計したとき、その他のモジュールとの関係を考慮
したシミュレーションを可能にしたりする為の検証用デ
ータD3を有する。ソフトIPモジュールのデータは前
記シフト演算モジュールの機能記述データD2を少なく
とも備える。
The data of such an IP module is data for designing an integrated circuit to be formed on a semiconductor chip by using a computer 40 such as a design tool, as shown in FIG. A recording medium 41, such as a magnetic tape, a flexible disk, a hard disk, a CD-ROM, an MO (magnet optical disk), which can be read by the computer 40,
It is recorded so that it can be read by the computer 40. The recording medium 41 is attached to a disk drive device 40A that is a peripheral device of the computer 40, and in that state, the recording information is read into the memory or the like of the computer 40.
The data of the IP module corresponding to the shift calculation module recorded in the recording medium 41 is roughly classified into a hard IP module that can specify a mask pattern and a soft IP module that specifies a circuit at a function level. Hard I
As the data of the P module, the mask pattern data D1 for forming the shift operation module, the function description data D2 of the shift operation module, and the data of the IP module of the shift operation module are applied and the LS is applied.
When I is designed, it has verification data D3 for enabling simulation in consideration of the relationship with other modules. The data of the soft IP module includes at least the function description data D2 of the shift calculation module.

【0059】図18には設計データなどを記録した記録
媒体とコンピュータとの別の関係が例示される。記録媒
体41はIPモジュールデータの提供に供されるサーバ
(IP提供用サーバ)42に保持されている。サーバ4
2はインタネットなどのネットワーク43を介してエン
ジニアリングワークステーションなどのコンピュータ4
0に接続される。記録媒体41に格納されている設計デ
ータはネットワーク43を介してコンピュータ40にダ
ウンロードされる。ダウンロードされた設計データはコ
ンピュータ40のローカルなハードディスク或はメモリ
にストアされて、半導体集積回路の設計に用いられる。
FIG. 18 illustrates another relationship between a computer and a recording medium recording design data and the like. The recording medium 41 is held by a server (IP providing server) 42 used for providing IP module data. Server 4
2 is a computer 4 such as an engineering workstation through a network 43 such as the Internet
Connected to 0. The design data stored in the recording medium 41 is downloaded to the computer 40 via the network 43. The downloaded design data is stored in a local hard disk or memory of the computer 40 and used for designing a semiconductor integrated circuit.

【0060】上記記録媒体41に格納されて提供される
シフト演算モジュールのデータを用いることにより、C
PUで実行するデータ転送命令を流用して任意複数ビッ
トのシフト演算を効率的に行なうことができる半導体集
積回路の設計を容易化することができる。
By using the data of the shift operation module stored and provided in the recording medium 41, C
It is possible to facilitate the design of a semiconductor integrated circuit that can efficiently perform a shift operation of arbitrary plural bits by diverting a data transfer instruction executed by PU.

【0061】以上本発明者によってなされた発明を実施
形態に基づいて具体的に説明したが、本発明はそれに限
定されるものではなく、その要旨を逸脱しない範囲にお
いて種々変更可能であることは言うまでもない。
Although the invention made by the present inventor has been specifically described based on the embodiments, the present invention is not limited thereto, and it goes without saying that various modifications can be made without departing from the scope of the invention. Yes.

【0062】例えば、データプロセッサにオンチップさ
れる回路モジュールは図1に限定されず適宜変更可能で
ある。また、データ転送命令はMOV命令に限定されな
い。STORE、LOAD等のニーモニックを有する命
令であっても、或はその他の命令であってもよい。
For example, the circuit module on-chip in the data processor is not limited to that shown in FIG. 1 and can be changed as appropriate. The data transfer instruction is not limited to the MOV instruction. The instruction may have a mnemonic such as STORE or LOAD, or may be another instruction.

【0063】[0063]

【発明の効果】本願において開示される発明のうち代表
的なものによって得られる効果を簡単に説明すれば下記
の通りである。
The effects obtained by the typical ones of the inventions disclosed in the present application will be briefly described as follows.

【0064】すなわち、シフトデータの読み出しアドレ
スによって演算指定を行ない且つシフト量を変化させ、
また、シフトデータの読み出しアドレスによって演算指
定を行ないシフト量の指定にはモードレジスタの設定値
を用いる手段をシフト演算モジュールに採用したから、
CPUの特別なアーキテクチャに依存せずに、外付けの
I/Oデバイスとしてシフト演算回路を実現できる。ま
た、既存のCPUのアーキテクチャに一切変更を要しな
い。従来、1ビット又は2ビットシフト演算命令を複数
個組み合わせて行っていた任意ビットのシフト演算が、
外付けのシフト演算回路で実行できるため、プログラム
の実行速度を向上できる。CPUの変更が必要ないた
め、データ転送命令をサポートする殆どのCPUに対し
て、後付で任意ビットシフト演算回路を追加することが
できる。要するに、任意複数ビットの専用シフト演算命
令を用いること無く当該シフト演算を行なうことができ
るシフト演算モジュールの提供が可能になる。
That is, the operation is designated by the read address of the shift data and the shift amount is changed,
In addition, since the shift calculation module adopts means for using the set value of the mode register to specify the shift amount by specifying the calculation according to the read address of the shift data,
The shift arithmetic circuit can be realized as an external I / O device without depending on the special architecture of the CPU. Also, no changes are required to the existing CPU architecture. Conventionally, a shift operation of an arbitrary bit, which is performed by combining a plurality of 1-bit or 2-bit shift operation instructions,
Since it can be executed by an external shift arithmetic circuit, the program execution speed can be improved. Since it is not necessary to change the CPU, an arbitrary bit shift arithmetic circuit can be added later to most of the CPUs that support the data transfer instruction. In short, it becomes possible to provide a shift operation module that can perform the shift operation without using a dedicated shift operation instruction of arbitrary plural bits.

【0065】また、上記シフト演算モジュールのマスク
パターン又は機能記述による設計データをコンピュータ
読取り可能な記録媒体に記録して提供することにより、
前記任意複数ビットのシフト演算可能なシフト演算モジ
ュール、更にはそのようなシフト演算モジュールを採用
した半導体集積回路の設計を容易化することができる。
Further, by designing the mask pattern or the functional description of the shift operation module described above in a computer-readable recording medium and providing it,
It is possible to facilitate the design of the shift operation module capable of performing the shift operation of arbitrary plural bits and further the semiconductor integrated circuit adopting such a shift operation module.

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

【図1】シフト演算モジュールの一例を示すブロック図
である。
FIG. 1 is a block diagram illustrating an example of a shift calculation module.

【図2】データプロセッサの一例を示すブロック図であ
る。
FIG. 2 is a block diagram showing an example of a data processor.

【図3】論理左シフト演算動作の説明図である。FIG. 3 is an explanatory diagram of a logical shift left operation.

【図4】論理右シフト演算動作の説明図である。FIG. 4 is an explanatory diagram of a logical right shift arithmetic operation.

【図5】算術左シフト演算動作の説明図である。FIG. 5 is an explanatory diagram of an arithmetic left shift calculation operation.

【図6】算術右シフト演算動作の説明図である。FIG. 6 is an explanatory diagram of arithmetic right shift operation.

【図7】シフト演算モジュールにおけるレジスタ空間を
例示するアドレスマッピング図である。
FIG. 7 is an address mapping diagram illustrating a register space in the shift operation module.

【図8】別のシフト演算モジュールの例を示すブロック
図である。
FIG. 8 is a block diagram showing an example of another shift calculation module.

【図9】図8のシフト演算モジュールにおけるレジスタ
空間を例示するアドレスマッピング図である。
9 is an address mapping diagram illustrating a register space in the shift operation module of FIG.

【図10】更に別のシフト演算モジュールの例を示すブ
ロック図である。
FIG. 10 is a block diagram showing an example of still another shift calculation module.

【図11】バレルシフト命令を持たないCPUがシフト
演算モジュールを用いずに、CPUの1ビット又は2ビ
ットシフト演算命令を用いて、定数のシフト演算を実行
する場合のプログラム例を示す説明図である。
FIG. 11 is an explanatory diagram showing a program example when a CPU having no barrel shift instruction executes a constant shift operation using a 1-bit or 2-bit shift operation instruction of the CPU without using a shift operation module. is there.

【図12】図1のシフト演算モジュールを用いて定数の
シフト演算を行なうためのプログラム例を示す説明図で
ある。
12 is an explanatory diagram showing an example of a program for performing a constant shift operation using the shift operation module of FIG.

【図13】図8のシフト演算モジュールを用いて定数の
シフト演算を行なうためのプログラムを例示する説明図
である。
13 is an explanatory diagram exemplifying a program for performing a constant shift operation using the shift operation module of FIG.

【図14】バレルシフト命令を持たないCPUがシフト
演算モジュールを用いずに、CPUの1ビット又は2ビ
ットシフト演算命令を用いて、任意のNビットシフト演
算を実行する場合のプログラム例を示す説明図である。
FIG. 14 is an explanatory diagram showing a program example in the case where a CPU having no barrel shift instruction executes an arbitrary N-bit shift operation using a 1-bit or 2-bit shift operation instruction of the CPU without using a shift operation module. It is a figure.

【図15】図1のシフト演算モジュールを用いて任意の
Nビットシフト演算を実行する場合のプログラム例を示
す説明図である。
FIG. 15 is an explanatory diagram showing a program example when an arbitrary N-bit shift operation is executed using the shift operation module of FIG.

【図16】図8のシフト演算モジュールを用いて任意の
Nビットシフト演算を実行する場合のプログラム例を示
す説明図である。
16 is an explanatory diagram showing a program example in the case of performing an arbitrary N-bit shift operation using the shift operation module of FIG.

【図17】シフト演算モジュールのIPモジュールデー
タを記録した記録媒体とコンピュータとの関係を例示す
る説明図である。
FIG. 17 is an explanatory diagram illustrating the relationship between a computer and a recording medium that records IP module data of a shift calculation module.

【図18】シフト演算モジュールのIPモジュールデー
タを記録した記録媒体とコンピュータとの別の関係を例
示する説明図である。
FIG. 18 is an explanatory diagram illustrating another relationship between a computer and a recording medium that records IP module data of a shift calculation module.

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

1 データプロセッサ 2 CPU 6,6A,6B シフト演算モジュール 21 CPUバス IAB アドレスバス IDB データバス ICB コントロール 30,30A,30B 制御部 31 データレジスタ 32 バレルシフタ 33 モードレジスタ 34 モジュール内バス 35,35A,35B アドレスデコーダ 36 セレクタ LST1〜LST32,RST1〜RST32 シフト
データレジスタ RLT 結果レジスタ 40 コンピュータ 41 記録媒体
1 Data Processor 2 CPU 6, 6A, 6B Shift Operation Module 21 CPU Bus IAB Address Bus IDB Data Bus ICB Control 30, 30A, 30B Control Unit 31 Data Register 32 Barrel Shifter 33 Mode Register 34 Module Bus 35, 35A, 35B Address Decoder 36 selectors LST1 to LST32, RST1 to RST32 shift data register RLT result register 40 computer 41 recording medium

───────────────────────────────────────────────────── フロントページの続き (72)発明者 西野 辰郎 北海道亀田郡七飯町字中島145番地 日立 北海セミコンダクタ株式会社内 (72)発明者 石橋 謙一 北海道亀田郡七飯町字中島145番地 日立 北海セミコンダクタ株式会社内 Fターム(参考) 5B022 AA05 BA00 CA01 DA01 DA09 DA10 EA03 FA12    ─────────────────────────────────────────────────── ─── Continued front page    (72) Inventor Tatsuro Nishino             Hitachi, 145 Nakajima, Nanae-cho, Kameda-gun, Hokkaido             Inside North Sea Semiconductor Co., Ltd. (72) Inventor Kenichi Ishibashi             Hitachi, 145 Nakajima, Nanae-cho, Kameda-gun, Hokkaido             Inside North Sea Semiconductor Co., Ltd. F-term (reference) 5B022 AA05 BA00 CA01 DA01 DA09                       DA10 EA03 FA12

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 CPUと、シフト演算モジュールと、前
記CPUとシフト演算モジュールとを接続するバスとを
一つの半導体チップに含み、 前記シフト演算モジュールは、前記バスからのデータを
ラッチするデータレジスタと、データレジスタにラッチ
されたデータをシフト演算してシフトデータを出力可能
なバレルシフタとを有し、 前記バレルシフタは、CPUがシフトデータの読み出し
アドレスを指定してデータ転送命令を実行したとき、C
PUがバスに出力するシフトデータの読み出しアドレス
に応じたシフト量でシフト演算を行なうものであること
を特徴とする半導体集積回路。
1. A semiconductor chip including a CPU, a shift operation module, and a bus connecting the CPU and the shift operation module, wherein the shift operation module includes a data register for latching data from the bus. , A barrel shifter capable of performing a shift operation on the data latched in the data register and outputting the shift data. The barrel shifter has a C when a CPU specifies a read address of the shift data and executes a data transfer instruction.
A semiconductor integrated circuit, wherein a PU performs a shift operation with a shift amount according to a read address of shift data output to a bus.
【請求項2】 CPUと、シフト演算モジュールと、前
記CPUとシフト演算モジュールとを接続するバスとを
一つの半導体チップに含み、前記シフト演算モジュール
は、前記バスからのデータをラッチするデータレジスタ
と、データレジスタにラッチされたデータをシフト演算
してシフトデータを出力可能なバレルシフタと、モード
レジスタとを有し、 前記バレルシフタは、CPUがシフトデータの読み出し
アドレスを指定してデータ転送命令を実行したとき、モ
ードレジスタの設定値に応じたシフト量でシフト演算を
行なうものであることを特徴とする半導体集積回路。
2. A CPU, a shift operation module, and a bus connecting the CPU and the shift operation module are included in one semiconductor chip, and the shift operation module includes a data register for latching data from the bus. , A barrel shifter capable of performing a shift operation on the data latched in the data register and outputting the shift data, and a mode register, wherein the CPU executes a data transfer instruction by designating a read address of the shift data by the CPU. At this time, the semiconductor integrated circuit is characterized in that a shift operation is performed with a shift amount according to the set value of the mode register.
【請求項3】 CPUと、シフト演算モジュールと、前
記CPUとシフト演算モジュールとを接続するバスとを
一つの半導体チップに含み、 前記シフト演算モジュールは、前記バスからのデータを
ラッチするデータレジスタと、データレジスタにラッチ
されたデータをシフト演算してシフトデータを出力可能
なバレルシフタとを有し、 前記バレルシフタは、CPUがシフトデータの第1の読
み出しアドレスを指定してデータ転送命令を実行したと
き、CPUがバスに出力するシフトデータの読み出しア
ドレスに応じたシフト量でシフト演算を行ない、CPU
がシフトデータの第2の読み出しアドレスを指定してデ
ータ転送命令を実行したとき、モードレジスタの設定値
に応じたシフト量でシフト演算を行なうものであること
を特徴とする半導体集積回路。
3. A semiconductor chip including a CPU, a shift operation module, and a bus connecting the CPU and the shift operation module, wherein the shift operation module includes a data register for latching data from the bus. A barrel shifter capable of performing a shift operation on the data latched in the data register and outputting the shift data, wherein the barrel shifter executes a data transfer instruction by the CPU designating a first read address of the shift data. , The CPU performs the shift operation with the shift amount according to the read address of the shift data output to the bus.
When the data transfer instruction is executed by designating the second read address of the shift data, the semiconductor integrated circuit performs a shift operation with a shift amount according to the set value of the mode register.
【請求項4】 CPUと、シフト演算モジュールと、前
記CPUとシフト演算モジュールとを接続するバスとを
一つの半導体チップに含み、前記シフト演算モジュール
は、データレジスタと、バレルシフタと、モードレジス
タと、制御部とを有し、 前記シフト演算モジュールは、CPUのアドレス空間に
おける所定アドレスエリアに割当てられ、所定アドレス
エリアには、データレジスタに割当てられるアドレス、
モードレジスタに割当てられるアドレス、シフト量に割
当てられる複数アドレス、及び特定シフト動作に割当て
られるアドレスを含み、 前記制御部は、前記シフト量に割当てられる複数アドレ
スの内の一つが前記バスから入力されるのに応答して、
そのアドレスが指定するシフト量で前記バレルシフタに
前記データレジスタのデータをバレルシフト動作させ、
バレルシフト動作されたデータを前記バスに出力させ、
また、前記特定シフト動作に割当てられるアドレスが前
記バスから入力されるのに応答して、前記モードレジス
タの第1設定値で指定されるシフト量で前記バレルシフ
タに前記データレジスタのデータをバレルシフト動作さ
せ、バレルシフト動作されたデータを前記バスに出力さ
せる、ものであることを特徴とする半導体集積回路。
4. A semiconductor chip including a CPU, a shift operation module, and a bus connecting the CPU and the shift operation module, wherein the shift operation module includes a data register, a barrel shifter, and a mode register. And a control unit, wherein the shift operation module is assigned to a predetermined address area in the address space of the CPU, and the predetermined address area has an address assigned to a data register,
The control unit includes an address assigned to a mode register, a plurality of addresses assigned to a shift amount, and an address assigned to a specific shift operation. One of the plurality of addresses assigned to the shift amount is input from the bus to the control unit. In response to
Barrel shift the data of the data register to the barrel shifter by the shift amount specified by the address,
Output the barrel-shifted data to the bus,
Further, in response to the address assigned to the specific shift operation being input from the bus, the data of the data register is barrel-shifted to the barrel shifter by a shift amount designated by the first set value of the mode register. The semiconductor integrated circuit is characterized in that the data subjected to the barrel shift operation is output to the bus.
【請求項5】 前記モードレジスタは、その第2設定値
により、バレルシフタによるバレルシフト動作が論理シ
フト動作であるか算術シフト動作であるかを指定するも
のであることを特徴とする請求項4記載の半導体集積回
路。
5. The mode register specifies whether the barrel shift operation by the barrel shifter is a logical shift operation or an arithmetic shift operation, according to a second set value of the mode register. Semiconductor integrated circuit.
【請求項6】 前記CPUは、ソースオペランド指定フ
ィールドに前記シフト量に割当てられるアドレスが記述
されたデータ転送命令を実行して、シフト量に対応する
アドレスを前記バスに出力可能であることを特徴とする
請求項4記載の半導体集積回路。
6. The CPU can execute a data transfer instruction in which an address assigned to the shift amount is described in a source operand designation field, and output an address corresponding to the shift amount to the bus. The semiconductor integrated circuit according to claim 4.
【請求項7】 前記CPUは、ソースオペランド指定フ
ィールドに特定シフト動作に割当てられるアドレスが記
述されたデータ転送命令を実行して、特定シフト動作に
対応するアドレスを前記バスに出力可能であることを特
徴とする請求項4記載の半導体集積回路。
7. The CPU can execute a data transfer instruction in which an address assigned to a specific shift operation is described in a source operand designation field, and output an address corresponding to the specific shift operation to the bus. The semiconductor integrated circuit according to claim 4, which is characterized in that:
【請求項8】 半導体チップに形成されるべき半導体集
積回路を設計するための回路モジュールデータがコンピ
ュータにより読取り可能に記録された記録媒体であっ
て、前記記録媒体に記憶された回路モジュールデータ
は、データレジスタ、バレルシフタ、モードレジスタ及
び制御部から成るシフト演算モジュールを前記半導体チ
ップに形成する為の図形パターンデータ又は機能記述デ
ータを含み、 前記制御部は、データレジスタに割当てられるアドレ
ス、モードレジスタに割当てられるアドレス、及びシフ
ト量に割当てられる複数アドレスを含むアドレスエリア
に対するアドレスデコード手段を有し、前記アドレスデ
コード手段により前記シフト量に割当てられる複数アド
レスの一つが前記バスから入力されるのを検出すること
に応答して、そのアドレスが指定するシフト量で前記バ
レルシフタに前記データレジスタのデータをバレルシフ
ト動作させ、バレルシフト動作されたデータを前記バス
に出力させるものである、ことを特徴とするコンピュー
タ読取り可能な記録媒体。
8. A recording medium in which circuit module data for designing a semiconductor integrated circuit to be formed on a semiconductor chip is recorded so that it can be read by a computer, and the circuit module data stored in the recording medium is: Includes graphic pattern data or function description data for forming a shift operation module consisting of a data register, a barrel shifter, a mode register and a control unit on the semiconductor chip, the control unit assigning an address assigned to the data register and a mode register A plurality of addresses assigned to the shift amount and an address decoding unit for an address area including a plurality of addresses assigned to the shift amount, and detecting one of the plurality of addresses assigned to the shift amount from the bus by the address decoding unit. In response to The address barrel shifting operation of the data of the data register to said barrel shifter by the shift amount specified, in which to output the barrel shift operation data to the bus, a computer readable recording medium characterized in that.
【請求項9】 半導体チップに形成されるべき半導体集
積回路を設計するための回路モジュールデータがコンピ
ュータにより読取り可能に記憶された記録媒体であっ
て、前記記録媒体に記憶された回路モジュールデータ
は、データレジスタ、バレルシフタ、モードレジスタ及
び制御部から成るシフト演算モジュールを前記半導体チ
ップに形成する為の図形パターンデータ又は機能記述デ
ータを含み、 前記制御部は、データレジスタに割当てられるアドレ
ス、モードレジスタに割当てられるアドレス、及びシフ
ト動作に割当てられるアドレスを含むアドレスエリアに
対するアドレスデコード手段を有し、前記アドレスデコ
ード手段により前記シフト動作に割当てられるアドレス
が前記バスから入力されるのを検出することに応答し
て、前記モードレジスタの第1設定値で指定されるシフ
ト量で前記バレルシフタに前記データレジスタのデータ
をバレルシフト動作させ、バレルシフト動作されたデー
タを前記バスに出力させるものである、ことを特徴とす
るコンピュータ読取り可能な記録媒体。
9. A recording medium in which circuit module data for designing a semiconductor integrated circuit to be formed on a semiconductor chip is stored so that it can be read by a computer, and the circuit module data stored in the recording medium is: Includes graphic pattern data or function description data for forming a shift operation module consisting of a data register, a barrel shifter, a mode register and a control unit on the semiconductor chip, the control unit assigning an address assigned to the data register and a mode register The address assigned to the shift operation is detected by the address decoding means for the address area including the address assigned to the shift operation and the address area assigned to the shift operation. , Said Mo Computer reading, wherein the barrel shifter causes the barrel shifter to perform a barrel shift operation on the data in the data register, and outputs the barrel shifted data to the bus. Possible recording medium.
【請求項10】 半導体チップに形成されるべき半導体
集積回路を設計するための回路モジュールデータがコン
ピュータにより読取り可能に記憶された記録媒体であっ
て、前記記録媒体に記憶された回路モジュールデータ
は、データレジスタ、バレルシフタ、モードレジスタ及
び制御部から成るシフト演算モジュールを前記半導体チ
ップに形成する為の図形パターンデータ又は機能記述デ
ータを含み、 前記制御部は、データレジスタに割当てられるアドレ
ス、モードレジスタに割当てられるアドレス、シフト量
に割当てられる複数アドレス、及び特定シフト動作に割
当てられるアドレスを含むアドレスエリアに対するアド
レスデコード手段を有し、前記アドレスデコード手段に
より前記シフト量に割当てられる複数アドレスの一つが
前記バスから入力されるのを検出することに応答して、
そのアドレスが指定するシフト量で前記バレルシフタに
前記データレジスタのデータをバレルシフト動作させ、
バレルシフト動作されたデータを前記バスに出力させ、
また、前記特定シフト動作に割当てられるアドレスが前
記バスから入力されるのに応答して、前記モードレジス
タの第1設定値で指定されるシフト量で前記バレルシフ
タに前記データレジスタのデータをバレルシフト動作さ
せ、バレルシフト動作されたデータを前記バスに出力さ
せるものである、ことを特徴とするコンピュータ読取り
可能な記録媒体。
10. A recording medium in which circuit module data for designing a semiconductor integrated circuit to be formed on a semiconductor chip is stored so that it can be read by a computer, and the circuit module data stored in the recording medium is: Includes graphic pattern data or function description data for forming a shift operation module consisting of a data register, a barrel shifter, a mode register and a control unit on the semiconductor chip, the control unit assigning an address assigned to the data register and a mode register Address address, a plurality of addresses assigned to a shift amount, and an address decoding unit for an address area including an address assigned to a specific shift operation, and one of the plurality of addresses assigned to the shift amount by the address decoding unit is the bus. In response to detecting from being et input,
Barrel shift the data of the data register to the barrel shifter by the shift amount specified by the address,
Output the barrel-shifted data to the bus,
Further, in response to the address assigned to the specific shift operation being input from the bus, the data of the data register is barrel-shifted to the barrel shifter by a shift amount designated by the first set value of the mode register. A computer-readable recording medium, characterized in that the data subjected to barrel shift operation is output to the bus.
JP2001195807A 2001-06-28 2001-06-28 Semiconductor integrated circuit and computer readable recording medium Withdrawn JP2003015861A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001195807A JP2003015861A (en) 2001-06-28 2001-06-28 Semiconductor integrated circuit and computer readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001195807A JP2003015861A (en) 2001-06-28 2001-06-28 Semiconductor integrated circuit and computer readable recording medium

Publications (1)

Publication Number Publication Date
JP2003015861A true JP2003015861A (en) 2003-01-17

Family

ID=19033726

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001195807A Withdrawn JP2003015861A (en) 2001-06-28 2001-06-28 Semiconductor integrated circuit and computer readable recording medium

Country Status (1)

Country Link
JP (1) JP2003015861A (en)

Similar Documents

Publication Publication Date Title
JP3955305B2 (en) Reduced instruction set computer microprocessor structure
US7882332B1 (en) Memory mapped register file
TWI541658B (en) Data processing apparatus and semiconductor integrated circuit device
JP4226085B2 (en) Microprocessor and multiprocessor system
US4130869A (en) Microprogram controlled system
US5410721A (en) System and method for incrementing a program counter
JP7470685B2 (en) Programming and Controlling Computational Units in Integrated Circuits
JP2006099232A (en) Semiconductor signal processor
US7376777B2 (en) Performing an N-bit write access to an M×N-bit-only peripheral
US5742842A (en) Data processing apparatus for executing a vector operation under control of a master processor
JP2004038327A (en) Data processor
JP2690406B2 (en) Processor and data processing system
US5499363A (en) Microprocessor coupled to coprocessor by coprocessor bus separate from system bus to external memory for increased efficiency
JP3650519B2 (en) Microcomputer
JP2003015861A (en) Semiconductor integrated circuit and computer readable recording medium
US6425047B1 (en) Process containing address decoders suited to improvements in clock speed
CN112540789A (en) Instruction processing device, processor and processing method thereof
WO2009004628A2 (en) Multi-core cpu
US20230367492A1 (en) Flexible provisioning of coherent memory address decoders in hardware
JP2011192305A (en) Semiconductor signal processor
JP2001216136A (en) Addition circuit and processor
JP2002278753A (en) Data processing system
JP2760808B2 (en) Data processing device
JP3647078B2 (en) Processor
JP2785820B2 (en) Parallel processing unit

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