JPH11184748A - Information processor and method therefor - Google Patents

Information processor and method therefor

Info

Publication number
JPH11184748A
JPH11184748A JP35170897A JP35170897A JPH11184748A JP H11184748 A JPH11184748 A JP H11184748A JP 35170897 A JP35170897 A JP 35170897A JP 35170897 A JP35170897 A JP 35170897A JP H11184748 A JPH11184748 A JP H11184748A
Authority
JP
Japan
Prior art keywords
data
transfer
address
width
read
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
JP35170897A
Other languages
Japanese (ja)
Inventor
Yuichi Hirai
雄一 平井
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP35170897A priority Critical patent/JPH11184748A/en
Publication of JPH11184748A publication Critical patent/JPH11184748A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To improve the ratio of a long word access to a whole memory access. SOLUTION: At the time of transferring data between arbitrary two points in an address space, a data latch 107 latches transfer data, and a subtracter 105 calculates shit amounts from the lower 2 bits of the read and write address of the transfer data segmented into byte units. A barrier shifter 106 shifts the transfer data by the byte units based on the shift amounts, and a data latch 109 latches the shifted transfer data. A state controlling part 102 controls the width of the data-transferred data to the data bus width or byte width based on the shift amounts and the write address of the transfer data.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は情報処理装置および
その制御方法に関し、例えば、アドレス空間における任
意の二点間においてデータ転送を行う情報処理装置およ
びその制御方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus and a control method therefor, and more particularly to an information processing apparatus for transferring data between any two points in an address space and a control method therefor.

【0002】[0002]

【従来の技術】MPU、ROM、RAMおよび周辺装置などで構
成される情報処理装置においては、一般に、ROMやRAMな
どに格納されたデータを転送するためのバスは共通であ
る。これらのメモリ、ASIC内のレジスタ、周辺デバイス
ポートには、MPUからみたアドレッシング(領域割付
け)がなされている。もっとも、周辺装置のローカルな
データ処理においては、別途、バスが構成される場合も
ある。
2. Description of the Related Art In general, an information processing apparatus including an MPU, a ROM, a RAM, and a peripheral device has a common bus for transferring data stored in the ROM, the RAM, and the like. These memories, registers in the ASIC, and peripheral device ports are addressed (addressed) from the viewpoint of the MPU. However, in local data processing of the peripheral device, a bus may be separately configured.

【0003】情報処理装置は、MPUの動作を軸に、各周
辺デバイスとのデータ交換が成り立つように構成されて
いる。そのような構成の中で、デバイス同士のデータ交
換を高速に行う方法として、MPUを介さずに、デバイス
同士が直接データのやり取りを行うDMAがある。このと
き、MPUはバスの使用権を放棄し、外部とのデータ交換
を行わない。
[0005] The information processing apparatus is configured so that data exchange with each peripheral device is established based on the operation of the MPU. In such a configuration, as a method of exchanging data between devices at high speed, there is a DMA in which devices exchange data directly without using an MPU. At this time, the MPU relinquishes the right to use the bus and does not exchange data with the outside.

【0004】近年、情報処理装置においては、莫大な量
のデータを速やかに処理するために、システムクロック
の向上およびバス幅の拡大が続けられている。しかしな
がら、すべての動作が最高速のスペックで実行されるわ
けではない。例えば、DMAにしても、32ビット幅や64ビ
ット幅のデータ転送が要求されているが、データそのも
のは、バイト単位やワード単位で取り扱われることが多
い。具体例をあげれば、32ビット幅のバスでは、その32
ビット幅を四分割(各1バイト)して使用する場合があ
り、そのときは、アドレスの下位2ビットで32ビット幅
を四分割するアドレス制御が行われる。データの格納順
は、4バイトを一つにまとめた32ビット幅内において、
バイト単位のビッグエンディアン(big-endian)であった
りリトルエンディアン(little-endian)であったりす
る。
In recent years, in information processing apparatuses, the system clock and the bus width have been continuously increased in order to process an enormous amount of data quickly. However, not all operations are performed with the fastest specifications. For example, DMA requires 32-bit or 64-bit data transfer, but data itself is often handled in byte units or word units. To give a concrete example, in a 32-bit bus,
In some cases, the bit width is used by dividing it into four (one byte each), and in this case, address control is performed to divide the 32-bit width into four by the lower two bits of the address. The storage order of the data is within a 32-bit width that combines 4 bytes into one.
It can be big-endian or little-endian in bytes.

【0005】[0005]

【発明が解決しようとする課題】ある記憶領域にあるデ
ータを、他の記憶領域に移動させるような処理は頻繁
に、かつ、スループットの向上に重要な個所で多用され
ている。前述したように、半導体技術の向上により情報
処理装置のスペックは年々向上しているが、さらに、シ
ステム全体のスループットの向上を目指して、MPUを介
在させないデータのアクセス(以下DMAと呼ぶ)におい
てはデータバスのバス幅をフルに使いたい。なお、以下
の説明では、データバスのバス幅を32ビットのロングワ
ード(Long Word: LW)として説明するが、本発明はこれ
に限定されるものではない。
The process of moving data in a certain storage area to another storage area is frequently used and frequently used in places important for improving the throughput. As mentioned above, the specifications of information processing equipment have been improving year by year due to the improvement of semiconductor technology. However, in order to improve the throughput of the whole system, in data access without MPU (hereinafter referred to as DMA), I want to use the full width of the data bus. In the following description, the bus width of the data bus will be described as a 32-bit long word (Long Word: LW), but the present invention is not limited to this.

【0006】データの転送は、そのデータの加工の有無
によらず、装置全体のスループットを向上させることを
考慮してDMAに頼る傾向にある。そのため、バスアービ
タと連動する回路構成は複雑になる。近年の回路設計に
おいては、例えばVHDLやVerilog HDLなどの論理記述言
語で表現される回路を、論理合成を用いてデバイスにイ
ンプリメントする手法が用いられる。この設計手法のメ
リットは、設計期間を短縮できることや、デバイス選定
の自由度が向上するなどを挙げることができる。一方、
この設計手法は、回路遅延、回路面積などを言語記述上
でも考慮しなければならない。前述したような、バイト
アクセスや、LWアクセスが渾然一体となったような記述
で、例えばステートマシンをそのまま記述してしまって
は、その動作ステートにおける条件分岐の内容が増え、
後の論理合成には適さないといった問題を引き起こす。
[0006] Data transfer tends to rely on DMA, regardless of whether the data is processed or not, in order to improve the throughput of the entire apparatus. Therefore, the circuit configuration linked to the bus arbiter becomes complicated. 2. Description of the Related Art In recent circuit design, a method of implementing a circuit expressed by a logic description language such as VHDL or Verilog HDL in a device using logic synthesis is used. The merits of this design method include that the design period can be shortened and the degree of freedom in selecting devices can be improved. on the other hand,
In this design method, the circuit delay, the circuit area, and the like must be considered in the language description. As described above, byte access and LW access are described in a unified manner.For example, if a state machine is described as it is, the content of conditional branches in the operation state increases,
This causes a problem that it is not suitable for later logic synthesis.

【0007】このような問題を解決して、装置全体のス
ループットを向上するために、バイトアクセス、LWアク
セスを明確に切り分け、とくにメモリアクセス全体に対
するLWアクセスの比率を向上させることが望まれる。
In order to solve such a problem and improve the throughput of the entire apparatus, it is desired to clearly separate byte access and LW access, and particularly to improve the ratio of LW access to the entire memory access.

【0008】本発明は、上述の問題を解決するためのも
のであり、データ転送されるデータの幅を制御すること
ができる情報処理装置およびその方法を提供することを
目的とする。
An object of the present invention is to solve the above-mentioned problem, and an object of the present invention is to provide an information processing apparatus capable of controlling the width of data to be transferred and a method thereof.

【0009】[0009]

【課題を解決するための手段】本発明は、前記の目的を
達成する一手段として、以下の構成を備える。
The present invention has the following configuration as one means for achieving the above object.

【0010】本発明にかかる情報処理装置は、データ転
送の制御情報が設定される保持手段と、保持される制御
情報に基づきデータ転送を制御する制御手段と、転送デ
ータのリードおよびライトアドレスを記憶する記憶手段
と、データを連続して転送するための次アドレスを演算
するアドレス演算手段とを備え、アドレス空間における
任意の二点間においてデータ転送を行う情報処理装置で
あって、データ転送用バスの幅に関連する最小単位で、
データ転送されるデータをシフトするシフト手段と、前
記シフト手段に入出力されるデータそれぞれをラッチす
るラッチ手段と、前記最小単位に区切った転送データの
リードおよびライトアドレスの所定下位ビットから前記
シフト手段のシフト量を演算する演算手段とを有し、前
記制御手段は、前記ラッチ手段および前記シフト手段を
経由するデータ転送を制御するとともに、前記演算手段
により演算されたシフト量および前記転送データのライ
トアドレスに基づき、データ転送されるデータの幅を制
御することを特徴とする。
[0010] An information processing apparatus according to the present invention stores holding means for setting data transfer control information, control means for controlling data transfer based on the held control information, and stores read and write addresses of transfer data. An information processing device for performing data transfer between any two points in an address space, the storage device comprising: a storage unit for performing data transfer; and an address calculation unit for calculating a next address for continuously transferring data. The smallest unit associated with the width of
Shift means for shifting data to be transferred, latch means for latching data input / output to / from the shift means, and shift means for determining read and write addresses of transfer data divided into the minimum units from predetermined lower bits. Calculating means for calculating the shift amount of the data, wherein the control means controls data transfer via the latch means and the shift means, and writes the shift amount calculated by the calculating means and the transfer data. The width of data to be transferred is controlled based on the address.

【0011】本発明にかかる制御方法は、データ転送の
制御情報が設定される保持手段と、保持される制御情報
に基づきデータ転送を制御する制御手段と、転送データ
のリードおよびライトアドレスを記憶する記憶手段と、
データを連続して転送するための次アドレスを演算する
アドレス演算手段とを備え、アドレス空間における任意
の二点間においてデータ転送を行う情報処理装置の制御
方法であって、転送データをラッチし、データ転送用バ
スの幅に関連する最小単位に区切った転送データのリー
ドおよびライトアドレスの所定下位ビットからシフト量
を演算し、演算されるシフト量に基づき、前記最小単位
で、前記ラッチされる転送データをシフトし、シフトさ
れた転送データをラッチし、演算されるシフト量および
前記転送データのライトアドレスに基づき、データ転送
されるデータの幅を制御することを特徴とする。
According to the control method of the present invention, a holding unit in which control information for data transfer is set, a control unit for controlling data transfer based on the held control information, and a read and write address of transfer data are stored. Storage means;
Address operation means for calculating a next address for continuously transferring data, a method for controlling an information processing apparatus for performing data transfer between any two points in an address space, wherein the transfer data is latched, The shift amount is calculated from predetermined lower bits of read and write addresses of transfer data divided into minimum units related to the width of the data transfer bus, and the latched transfer is performed in the minimum unit based on the calculated shift amount. The data is shifted, the shifted transfer data is latched, and the width of the data to be transferred is controlled based on the calculated shift amount and the write address of the transfer data.

【0012】[0012]

【発明の実施の形態】データの配列を変換するような目
的で行われる記憶領域内でのデータ転送の例として、プ
リンタの受信バッファから印刷バッファへの印刷データ
の展開をあげることができる。図1はこのような例を示
すプリンタコントローラの構成例を示すブロック図であ
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS As an example of data transfer in a storage area for the purpose of converting an array of data, there is the development of print data from a reception buffer of a printer to a print buffer. FIG. 1 is a block diagram showing a configuration example of a printer controller showing such an example.

【0013】図1に示すプリンタコントローラは、イン
タフェイス505により外部装置、主にホストコンピュー
タから受信される印刷情報を、最終的に、印刷ヘッド機
構51へ出力して印刷を行うものである。インタフェイス
505を介して受信される信号は、信号レベルの調整や波
形整形を行うためのバスドライバ503を経由して、コン
トローラ510へ入力される。コントローラ510は、RAM502
をバッファとして利用し、入力されるデータをRAM502に
一旦格納し、RAM502に格納したデータから印刷情報を生
成し、生成した印刷情報をRAM502に一旦格納する。その
ため、コントローラ510の内部には、インタフェイスス
テータス制御に関わるIF制御部5101、印刷制御、データ
展開、MPU、RAMおよびROMに係わるバスアービタ5102、
印刷ヘッド機構51を制御するヘッド制御部5104、並び
に、印刷ヘッドを駆動するためのデータを生成するバッ
ファ展開制御部5103を有する。
The printer controller shown in FIG. 1 prints print information received from an external device, mainly a host computer, through an interface 505 to a print head mechanism 51 for printing. Interface
A signal received via the 505 is input to the controller 510 via a bus driver 503 for adjusting a signal level and performing waveform shaping. Controller 510 is RAM502
Is used as a buffer, the input data is temporarily stored in the RAM 502, print information is generated from the data stored in the RAM 502, and the generated print information is temporarily stored in the RAM 502. Therefore, inside the controller 510, an IF control unit 5101 related to interface status control, a bus arbiter 5102 related to print control, data development, MPU, RAM and ROM,
A head control unit 5104 that controls the print head mechanism 51 and a buffer development control unit 5103 that generates data for driving the print head are provided.

【0014】また、プリンタシステムの制御は、ROM501
に格納された制御プログラムおよびシステムにユニーク
なプログラムに基づき、MPU500により行われる。
The printer system is controlled by a ROM 501.
Is performed by the MPU 500 based on the control program stored in the MPU and the program unique to the system.

【0015】プリンタのような周辺装置においては、受
信される処理データを受信バッファへ一旦格納する。そ
の際、ホストコンピュータをその印刷処理から短時間に
解放するために、受信バッファの許容範囲まで連続して
処理データを受信する。印刷処理の場合、受信される処
理データには、コマンド、画像データおよび文字コード
などの各種属性のデータが含まれるが、これらが解析さ
れ、その解析結果に従い、印刷データが印刷バッファに
展開される。
In a peripheral device such as a printer, received processing data is temporarily stored in a reception buffer. At that time, in order to release the host computer from the printing processing in a short time, the processing data is continuously received up to the allowable range of the receiving buffer. In the case of print processing, received process data includes data of various attributes such as commands, image data, and character codes. These data are analyzed, and the print data is expanded in a print buffer according to the analysis result. .

【0016】この受信バッファの処理データから印刷デ
ータを生成し印刷バッファへ展開する処理も、MPU500を
介在させずに、DMAで行う方が効率がよい。とくにビッ
トマップデータのような画像データが連続するようなデ
ータにおいては、印刷バッファへ連続的に印刷データを
展開した方が、装置全体のスループットを向上させるこ
とができる。
The process of generating print data from the processing data of the reception buffer and developing the print data in the print buffer is more efficient if performed by DMA without the intervention of the MPU 500. In particular, for data such as bitmap data in which image data is continuous, it is possible to improve the throughput of the entire apparatus by continuously developing print data in a print buffer.

【0017】図2はLWをバイト単位に分割したデータを
転送する一例を示す図である。図中、case_1はLW転送可
能な場合である。図に示すように、データバス幅を32ビ
ットとすると、ソース側アドレス、デスティネーション
側アドレスともカレントアドレスが32ビットの基底値、
すなわちリトルエンディアン時は下位2ビットが‘00’
であれば、そのままバス幅一杯にリード/ライトを行え
る。
FIG. 2 is a diagram showing an example of transferring data obtained by dividing LW into byte units. In the figure, case_1 is a case where LW transfer is possible. As shown in the figure, if the data bus width is 32 bits, the current address of both the source side address and the destination side address is a base value of 32 bits,
That is, the lower two bits are '00' at little endian
If this is the case, you can read / write the entire bus width as it is.

【0018】しかし、図中、case_2で示すように、デス
ティネーション側の転送開始位置が基底値アドレスでは
ない場合、ソース-デスティネーション間の相対位置
(カレントバイト)が異なる分、バイト単位でアドレス
をシフトする必要がある。このような場合、DMA転送
を、LW単位ではなく、バイト単位で行う必要があり、設
定された転送回数が終了するまで、DMA転送をバイト単
位で行うことが要求される。勿論、ソース側のデータが
端数バイトで始まる場合も、バイト単位でアドレスをシ
フトすることになり、バイト単位のDMA転送が要求され
る。
However, when the transfer start position on the destination side is not the base value address as shown by case_2 in the figure, the address is transferred in byte units because the relative position (current byte) between the source and destination is different. Need to shift. In such a case, it is necessary to perform the DMA transfer in byte units, not in LW units, and it is required to perform the DMA transfer in byte units until the set number of transfers is completed. Of course, even when the data on the source side starts with a fractional byte, the address is shifted in byte units, and a DMA transfer in byte units is required.

【0019】このようなバイト単位のデータ転送を行う
率が高ければ、折角、広いバス幅を有するシステムで
も、処理効率が低下し、スループットの向上は望めな
い。この、バイト単位の処理を軽減するために、最小処
理単位(ここではバイト単位)ごとのバレルシフタをソ
ース側のデータバッファとデスティネーション側のデー
タバッファとの間に挿入する方法がある。
If the rate of performing such byte-by-byte data transfer is high, even in a system having a wide angle and a wide bus width, the processing efficiency is reduced, and an improvement in throughput cannot be expected. In order to reduce the processing in units of bytes, there is a method of inserting a barrel shifter for each minimum processing unit (here, in units of bytes) between the data buffer on the source side and the data buffer on the destination side.

【0020】図3はバイト単位のバレルシフトを説明す
る図で、401がバイト単位のバレルシフタ(以下では単
に「バレルシフタ」と呼ぶ)である。バレルシフタ401
は、必要なシフト量が入力される入力ポート、シフトさ
れる32ビットデータが入力される入力ポート、および、
シフトに際して補完する(シフト時に保留となった)キ
ャリーデータが入力される入力ポートを備える。そし
て、バレルシフタ401は、キャリーデータをアドレスの
基底位置に配置し、続いて、入力される32ビットデータ
をシフトした有効データ(3バイト)を配置した32ビッ
トバレルアウトデータを出力ポートから出力するととも
に、今回のバレルアウトでは出力保留となったデータ
(1バイト)を次のバレルアウトのためにキャリーアウ
トデータ出力ポートから分離出力する。
FIG. 3 is a diagram for explaining the barrel shift in byte units. Reference numeral 401 denotes a barrel shifter in byte units (hereinafter, simply referred to as "barrel shifter"). Barrel shifter 401
Is an input port for inputting a required shift amount, an input port for inputting 32-bit data to be shifted, and
An input port is provided for inputting carry data that is complemented during the shift (held during the shift). Then, the barrel shifter 401 arranges the carry data at the base position of the address, and then outputs from the output port 32-bit barrel-out data in which valid data (3 bytes) obtained by shifting the input 32-bit data is arranged. In this barrel out, the output pending data (1 byte) is separated and output from the carry out data output port for the next barrel out.

【0021】図3において、カレントデータは、ソース
側のデータ列が[data_e, data_f, data_g, data_h]であ
り、これを1バイトシフトすると、デスティネーション
側ではデータ列[data_d, data_e, data_f, data_g]が得
られる。このときのキャリーアウトデータは[data_h]で
ある。バレルシフタ401のキャリーアウト出力としては3
バイト幅の[‘00’,‘00’, data_h]になる。もし、シ
フト量が2の場合はキャリーアウト出力は[‘00’, data
_g, data_h]、シフト量が3の場合は[data_f, data_g, d
ata_h]になる。
In FIG. 3, the current data is such that the data string on the source side is [data_e, data_f, data_g, data_h], and when this is shifted by 1 byte, the data string on the destination side is [data_d, data_e, data_f, data_g]. ] Is obtained. The carry-out data at this time is [data_h]. The carry-out output of barrel shifter 401 is 3
It becomes ['00', '00', data_h] of byte width. If the shift amount is 2, the carry-out output is ['00', data
_g, data_h], [data_f, data_g, d when the shift amount is 3
ata_h].

【0022】図4はバッファ内のデータ配列の一例を示
す図である。ソースバッファのデータ列[data_e, data_
f, data_g, data_h]がバレルシフトされて、[data_d, d
ata_e, data_f, data_g]としてタデスティネーションバ
ッファに収まっている。
FIG. 4 is a diagram showing an example of a data array in the buffer. Source buffer data string [data_e, data_
f, data_g, data_h] are barrel-shifted to [data_d, d
ata_e, data_f, data_g] in the destination buffer.

【0023】ソースバッファとデスティネーションバッ
ファとのLW単位におけるシフト量、(デスティネーショ
ン側のアドレスの下位2ビット)-(ソース側のアドレス
の下位2ビット)が零より大きければ、読込んだLW単位
のデータをシフト量に従いバレルシフトすることで、所
望のLW単位のデータを得ることが可能である。ただし、
デスティネーション側の書込み先頭位置における、LWの
端数になるバイト、図4に示す[data_a, data_b, data_
c]に関しては、ソース側のデータをバイト単位で読込
み、シフトし、デスティネーション側にバイト単位で書
込むことが要求される。
If the shift amount between the source buffer and the destination buffer in LW units, (the lower 2 bits of the destination address) − (the lower 2 bits of the source address) is greater than zero, the read LW unit By barrel-shifting the data according to the shift amount, it is possible to obtain desired data in LW units. However,
Bytes that are fractions of LW at the write start position on the destination side, [data_a, data_b, data_
Regarding c], it is required to read and shift the data on the source side in byte units, and write the data on the destination side in byte units.

【0024】上述したように、データバスの幅が大きい
情報処理装置における任意のメモリ領域間転送、とくに
DMAのようなバスの利用効率を上げるための制御におい
ては、データの転送単位がデータバス幅に対して小さい
場合、および、ソース側のデータ配列とデスティネーシ
ョン側のデータ配列とが、データバス幅を単位として一
致しない場合は、そのデータバス幅でのデータ転送が不
可能である。
As described above, transfer between arbitrary memory areas in an information processing apparatus having a large data bus width, in particular,
In the control for increasing the bus utilization efficiency such as DMA, when the data transfer unit is smaller than the data bus width, and when the data array on the source side and the data array on the destination side are , The data transfer with the data bus width is impossible.

【0025】上記では、情報処理装置が扱うデータの単
位として8ビット(1バイト)、バス幅として32ビットを
例にあげた。この例では、バレルシフタを用いて、ソー
ス側とデスティネーション側とのシフト量を(デスティ
ネーション側のアドレスの下位2ビット)-(ソース側の
アドレスの下位2ビット)とする場合、シフト量>0が成
立すれば、データバス幅での転送アクセスが可能にな
る。この条件は、1バンドの開始位置に関して、ソース
側とデスティネーション側との相対位置関係を制約す
る。すなわち、データ格納位置に制限を設けることがで
きないシステムにおいては、バレルシフタは実用的では
ない。
In the above description, the unit of data handled by the information processing apparatus is 8 bits (1 byte) and the bus width is 32 bits. In this example, using a barrel shifter, if the shift amount between the source side and the destination side is (lower 2 bits of the address on the destination side) − (lower 2 bits of the address on the source side), the shift amount is greater than 0. Holds, the transfer access with the data bus width becomes possible. This condition restricts the relative positional relationship between the source side and the destination side with respect to the start position of one band. In other words, the barrel shifter is not practical in a system in which the data storage position cannot be restricted.

【0026】[0026]

【第1実施形態】以下、本発明にかかる一実施形態の情
報処理装置を図面を参照して詳細に説明する。
First Embodiment Hereinafter, an information processing apparatus according to an embodiment of the present invention will be described in detail with reference to the drawings.

【0027】[構成]本実施形態においては、図5に示
すような構成でデータの転送を制御することにより、上
記の制約を解決して、任意位置に格納されたデータを、
データバスの幅をフルに利用して転送する。
[Structure] In this embodiment, by controlling the data transfer with the structure as shown in FIG. 5, the above-mentioned restriction is solved, and the data stored at an arbitrary position can be changed.
Transfer using the full width of the data bus.

【0028】図5に示す構成は、制御情報レジスタ101、
状態制御部102、アドレス記憶部103、アドレス演算部10
4、減算器105、バレルシフタ106、データラッチ107、デ
ータラッチ108およびデータラッチ109が存在する。すな
わち、メモリ領域上の二点間におけるデータ転送(また
はデータ展開)を行う、データラッチ107およびデータラ
ッチ109を用いた二段階ラッチ、並びに、キャリーデー
タラッチを含むバレルシフタ106の制御を、状態制御部1
02により有効バス幅制御を行いながら、有効バス幅が実
際のバス幅と等しい状態を最大にする。この制御は、減
算器105の出力を状態制御部102へ還することで実現され
る。
The configuration shown in FIG. 5 includes a control information register 101,
State control unit 102, address storage unit 103, address calculation unit 10
4. There are a subtractor 105, a barrel shifter 106, a data latch 107, a data latch 108, and a data latch 109. That is, the two-stage latch using the data latch 107 and the data latch 109 for performing data transfer (or data expansion) between two points in the memory area, and the barrel shifter 106 including the carry data latch are controlled by the state control unit. 1
02 performs the effective bus width control, and maximizes the state in which the effective bus width is equal to the actual bus width. This control is realized by returning the output of the subtractor 105 to the state control unit 102.

【0029】ここで、図5の各構成の機能について簡単
に説明する。制御情報レジスタ101は、図示しないマイ
クロプロセッサ(MPU)に設定されるソースアドレス、デ
スティネーションアドレスの設定値を保持するほかに、
例えば、DMAを実行するときの展開データ量や、データ
領域の展開禁止区間の設定値を保持するためのものであ
る。さらに、特殊用途の機能を実現する場合には、その
モード切替スイッチの情報を保持するのも制御情報レジ
スタ101である。なお、特殊用途の機能とは、例えば、
二点間の通常のデータ転送に加えて、ソース側の圧縮デ
ータをデスティネーション側に伸長しながら書き込むよ
うなモード、などである。
Here, the function of each configuration in FIG. 5 will be briefly described. The control information register 101 holds a set value of a source address and a destination address set in a microprocessor (MPU) not shown,
For example, it is used to hold the amount of data to be expanded when executing DMA and the set value of the expansion prohibited section of the data area. Further, when a function for a special use is realized, the control information register 101 holds information on the mode changeover switch. In addition, the function of the special use is, for example,
In addition to normal data transfer between two points, there is a mode in which compressed data on the source side is written to the destination side while being expanded.

【0030】MPUにより制御レジスタ101に設定された情
報を参照して、回路の状態を制御するのが状態制御部10
2である。状態制御部102は、制御状態のタイミングを生
成する機能を受けもつ。本実施形態においては、MPUに
より制御情報レジスタ101に書き込まれた制御情報であ
るステータス(MPU_STATUS)をスタートトリガとして、そ
のタイミングを示すスタートトリガ(START_TRIGGER)が
状態制御部102に伝達される。このスタートトリガを受
けた状態制御部102は、図示しないメモリ部へステータ
ス(MEMORY_STSTUS)を送ったり、他ブロックがデータ転
送に介在するのであれば、そのブロックへリクエスト(D
ATA_REQUEST)を送る。また、状態制御部102は、図示し
ないソースバッファからのデータ(リクエスト)アクノ
リッジ(DATA_ACKNOWLEDGE)を受信すると、ソースバッフ
ァからデータを受信する。
The state control unit 10 controls the circuit state by referring to the information set in the control register 101 by the MPU.
2 The state control unit 102 has a function of generating a control state timing. In the present embodiment, the status (MPU_STATUS), which is control information written into the control information register 101 by the MPU, is used as a start trigger, and a start trigger (START_TRIGGER) indicating the timing is transmitted to the state control unit 102. Upon receiving this start trigger, the state control unit 102 sends a status (MEMORY_STSTUS) to a memory unit (not shown), or sends a request (D
ATA_REQUEST). When receiving a data (request) acknowledgment (DATA_ACKNOWLEDGE) from a source buffer (not shown), the state control unit 102 receives data from the source buffer.

【0031】データ(SOURCE_DTAT_IN)は、データラッチ
107を介して(ラッチされて)、データの最小単位であ
るバイト単位でデータを移送するバレルシフタ106に被
シフトデータ(BARREL_IN)として入力される。バレルシ
フタ106は、シフト量(SHIFT)に従うキャリー情報(CARR
Y)の補完を必要とするが、キャリーデータの保持は、デ
ータラッチ108により行われる。32ビット幅のバレルシ
フタ106では、シフト量3、つまり3バイトのシフトが最
大であり、CARRY_OUTの最大データサイズは24ビットで
ある。これに合わせて、データラッチ108のデータサイ
ズも24ビットにする。
Data (SOURCE_DTAT_IN) is a data latch
Via (latched) 107, the data is input as the data to be shifted (BARREL_IN) to the barrel shifter 106 which transfers the data in the byte unit which is the minimum unit of the data. The barrel shifter 106 carries carry information (CARR) according to the shift amount (SHIFT).
Although the complement of Y) is required, the carry data is held by the data latch 108. In the barrel shifter 106 having a 32-bit width, the shift amount is 3, that is, the shift of 3 bytes is the maximum, and the maximum data size of CARRY_OUT is 24 bits. In accordance with this, the data size of the data latch 108 is also set to 24 bits.

【0032】シフト量は、初期アドレス設定値から演算
される。減算器に105は、ソースアドレスと、デスティ
ネーションアドレスの初期値とが入力される。といって
も、シフト量は、デスティネーションアドレスの下位2
ビットからソースアドレスの下位2ビット値を減算する
だけであるから、下位2ビットの初期値のみを入力すれ
ばよい。同じ理由から、デスティネーション側へのデー
タ書込みを開始する時点で、キャリーデータが必要にな
るソース側およびデスティネーション側の位置関係であ
る場合はシフト量は負数になり、ハードウェアとして
は、減算器105の出力は3ビットで構成する必要がある。
計算されたシフト量は、バレルシフタ106へシフト量と
して出力されるとともに、アドレス制御情報として状態
制御部102にフィードバックされる。
The shift amount is calculated from the initial address set value. The source address and the initial value of the destination address are input to the subtractor 105. However, the shift amount is the lower 2 bits of the destination address.
Since only the lower 2 bits of the source address are subtracted from the bits, only the initial values of the lower 2 bits need to be input. For the same reason, when data writing to the destination side is started, if the positional relationship between the source side and the destination side that requires carry data is used, the shift amount becomes a negative number, and the hardware uses a subtractor. The output of 105 must consist of 3 bits.
The calculated shift amount is output as a shift amount to the barrel shifter 106, and is fed back to the state control unit 102 as address control information.

【0033】また、データアクノリッジ(DATA_ACKNOWL
EDGE: 以降「Ack」と略す)の受信によって、ソースデ
ータ(SOURCE_DATA_IN)がデータラッチ107にラッチされ
たことを確認した状態制御部102は、デスティネーショ
ンへ転送するデータをデータラッチ109に保持し、デス
ティネーション領域へのメモリアクセスを行う。
Also, a data acknowledge (DATA_ACKNOWL)
Upon receiving EDGE: (hereinafter abbreviated as “Ack”), the state control unit 102 confirming that the source data (SOURCE_DATA_IN) has been latched by the data latch 107 holds the data to be transferred to the destination in the data latch 109, Performs memory access to the destination area.

【0034】アドレス記憶部103は、ソース側およびデ
スティネーション側のアドレスを、そのアクセス時に切
替えて出力する。ただし、ソース側およびデスティネー
ション側のアドレスを独立に出力する構成としても何ら
問題はない。アドレス演算部104は、アドレス記憶部103
から入力されるカレントアドレス(CURRENT_ADDRESS)を
メモリヘ出力する際に、次のアドレス(NEXT_ADDRESS)を
演算し(アドレス値を更新し)、アドレス記憶部103へ
戻す。本実施形態におけるLWアクセスとバイトアクセス
を例にとるならは、バイトアクセスにおいては「1」
を、LWアクセスにおいては「4」(‘100’)を加算するこ
とになる。
The address storage unit 103 outputs the addresses on the source side and the destination side by switching at the time of access. However, there is no problem even if the configuration is such that the addresses on the source side and the destination side are output independently. The address calculation unit 104 includes an address storage unit 103
When outputting the current address (CURRENT_ADDRESS) input from the memory to the memory, the next address (NEXT_ADDRESS) is calculated (the address value is updated) and returned to the address storage unit 103. If LW access and byte access in the present embodiment are taken as an example, "1" is used for byte access.
And "4"('100') in the LW access.

【0035】[動作]次に、図6に示すフローチャート
を用いて、図5に示すデータ転送制御部の動作を説明す
る。以下の説明においては、例として、システムバスの
幅を32ビット、最小データ幅を8ビットにする。システ
ムの構成としては、ソース側のバッファに対してLW固定
長でリードアクセスを行い、デスティネーション側のバ
ッファに対してLW幅およびバイト幅でライトアクセスを
行うものとする。
[Operation] Next, the operation of the data transfer control unit shown in FIG. 5 will be described with reference to the flowchart shown in FIG. In the following description, as an example, assume that the width of the system bus is 32 bits and the minimum data width is 8 bits. As a system configuration, it is assumed that read access is performed with a fixed LW length to a buffer on the source side, and write access is performed with a LW width and a byte width on a buffer on the destination side.

【0036】図6はLW幅固定でソース側をリードアクセ
スする場合のDMAを示すフローチャートである。
FIG. 6 is a flowchart showing DMA in the case where the LW width is fixed and the source side is read-accessed.

【0037】アドレス記憶部103には、制御レジスタ101
を介して、MPUによりソースおよびデスティネーション
アドレスの初期値が設定される(ステップS601)。それ
ぞれのアドレスの下位2ビットが確定したことにより、
減算器105によりシフト量が演算される(ステップS60
2)。まず、ソースデータのリードであるが、LW幅固定
のリードだけであるから、シフト量に関係なくLWリード
のリクエストをメモリ(または他の介在ブロック)に対
して送信する(ステップS603)。データリードの確定を
示すAckの受信を待ち(ステップS604)、Ackが受信され
るとLWデータがデータラッチ107に格納される(ステッ
プSS605)。
The address storage unit 103 has a control register 101
, The initial values of the source and destination addresses are set by the MPU (step S601). By determining the lower 2 bits of each address,
The shift amount is calculated by the subtractor 105 (step S60)
2). First, since the source data is read only with a fixed LW width, an LW read request is transmitted to the memory (or another intervening block) regardless of the shift amount (step S603). Waiting for the reception of Ack indicating the determination of the data read (step S604), when the Ack is received, the LW data is stored in the data latch 107 (step SS605).

【0038】なお、図5の記載において、状態制御部102
から出力される制御信号は、外部ブロックヘ出力される
本発明に特徴的な信号以外は省略されている。実際に
は、制御を必要とするそれぞれのブロックへ制御信号が
出力される。つまり、各データラッチがデータをラッチ
するタイミングは、状態制御部102から出力される制御
信号により制御され、ステップS603からS605でソースデ
ータがラッチされる。
It should be noted that in the description of FIG.
The control signals output from the control unit are omitted except for the signals characteristic of the present invention which are output to the external block. In practice, a control signal is output to each block that requires control. That is, the timing at which each data latch latches data is controlled by the control signal output from the state control unit 102, and the source data is latched in steps S603 to S605.

【0039】デスティネーション側のシフト量に関わら
ず、LW幅のデータをリードするので、バイト処理かどう
かは、デスティネーション側のカレントアドレスの下位
2ビットにより判断される(ステップS606)。つまり、
下位2ビットが‘00’であれば、一挙に、LW幅でライト
アクセスが可能であり、‘01’‘10’または‘11’の端
数であれば、まず、それに対応するバイトにバイト幅で
ライトアクセスする必要がある。
The data of the LW width is read regardless of the shift amount on the destination side.
The determination is made based on two bits (step S606). That is,
If the lower 2 bits are '00', write access is possible at once with the LW width, and if it is a fraction of '01''10' or '11', first the corresponding byte is written in byte width. Write access is required.

【0040】一回の転送量が多いバースト転送モードに
おいては、最大で、最初および終了時の3バイト(合計6
バイト)についてバイト幅でライトアクセスを要し、後
はすべてLW幅でライトアクセスすることができる。LW幅
のライトアクセスにおいては、ソースアドレスを「+4」
(‘100’)し(ステップS607)、シフト量が「0」でなけ
ればバレルシフタ106によりバレルシフトする(ステッ
プS608)。勿論、シフト量が「0」であれば、図5におけ
るBARREL_in_data=BARREL_out_dataになる。ステップSS
606の判断の結果、バイト処理であればソースアドレス
を「+1」し(ステップS610)、転送用のバイトデータを
セットする(ステップS611)。
In the burst transfer mode in which the amount of one transfer is large, a maximum of 3 bytes at the beginning and end (total of 6 bytes)
Write access is required for byte (byte) width, and all write access can be performed for LW width thereafter. For write access of LW width, set the source address to "+4"
('100') (step S607), and if the shift amount is not "0", barrel shift is performed by the barrel shifter 106 (step S608). Of course, if the shift amount is “0”, BARREL_in_data = BARREL_out_data in FIG. Step SS
As a result of the determination in 606, if it is byte processing, the source address is incremented by "1" (step S610), and byte data for transfer is set (step S611).

【0041】デスティネーション側へ送られるデータは
データラッチ109へ格納される。LW幅でリードされたデ
ータは、バイト幅のライトアクセスであっても、バレル
シフタ106を経由してデータラッチ109に保持される。し
かしながら、データラッチ107からデスティネーション
側へ送るデータの出力パスを設けても、新規にバイトア
クセス用のラッチを設けたとしても、本発明の特徴には
何ら影響しない。つまり、本発明の特徴はアドレス操作
にある。
Data sent to the destination side is stored in the data latch 109. The data read in the LW width is held in the data latch 109 via the barrel shifter 106 even in the case of a byte-width write access. However, even if an output path for data to be sent from the data latch 107 to the destination side is provided or a new byte access latch is provided, the characteristics of the present invention are not affected at all. That is, the feature of the present invention lies in the address operation.

【0042】減算器105の出力は、シフト量としてバレ
ルシフタ106へ入力されるとともに、状態制御部102へ戻
される。シフト量>0の状態では、アドレス演算部104か
ら出力される更新アドレスを、素直に、次アドレスとし
てアドレス記憶部103に格納することができない場合が
存在する。ソースデータのリード時においては、カレン
トアドレスの下位2ビットが‘00’‘01’‘10’‘11’
のどの値であったとしても、リードのカレントアドレス
は‘00’(基底値)を示さなければならない。
The output of the subtractor 105 is input to the barrel shifter 106 as a shift amount and is returned to the state control unit 102. In the state where the shift amount is greater than 0, there are cases where the update address output from the address calculation unit 104 cannot be stored in the address storage unit 103 as the next address. When reading source data, the lower 2 bits of the current address are set to '00' 01 '10' 11 '
, The current address of the read must indicate '00' (base value).

【0043】そこで、本実施形態では、まずLW幅のリー
ドアクセスに際しては、その開始時のカレントアドレス
の下位2ビットをアドレス記憶部103に保存し、減算器10
5からアドレス記憶部103から読み出されるアドレスの下
位2ビットの値を無効にする信号(IGNORE)を出力させ
る。以降、アドレス演算部104から出力される下位2ビッ
トは‘00’になる。そして、データ転送の終了時に、実
際に転送(展開)の終了しているバイト位置へ、LW幅の
リードアクセス開始時におけるアドレスの下位2ビット
がアドレス記憶部103から出力されるように、状態制御
部102から信号(UPDATE)を出力する。
Therefore, in the present embodiment, first, at the time of read access of the LW width, the lower 2 bits of the current address at the start are stored in the address storage unit 103, and the subtracter 10
A signal (IGNORE) for invalidating the value of the lower 2 bits of the address read from the address storage unit 103 from 5 is output. Thereafter, the lower two bits output from the address operation unit 104 become “00”. At the end of the data transfer, the state control is performed such that the lower two bits of the address at the start of the read access of the LW width are output from the address storage unit 103 to the byte position at which the transfer (expansion) has actually been completed. The signal (UPDATE) is output from the unit 102.

【0044】ソースから有効なデータがリードされる
と、デスティネーションへカレントアドレスを出力する
とともに、デスティネーションバッファヘライトリクエ
ストを送信し(ステップS609)、デスティネーション側
からAckが受信されるのを待つ(ステップS612)。Ackが
受信されると、ステップS613でバイト処理か否かを判断
するが、この処理もソース側と同様にアドレス更新処理
のことを指す。実際のデスティネーションバッファのア
クセスにおけるバイト処理かLW処理かの判断は、デステ
ィネーション側のカレントアドレスポインタの下位2ビ
ットが‘00’であるか、残る転送データ量が4バイト以
上ある場合はすべてLW処理とされる。
When valid data is read from the source, the current address is output to the destination, a write request is transmitted to the destination buffer (step S609), and the reception of an Ack from the destination is waited. (Step S612). When the Ack is received, it is determined in step S613 whether or not byte processing is to be performed. This processing also indicates address update processing as in the case of the source side. Whether to perform byte processing or LW processing in actual destination buffer access is determined by LW if the lower 2 bits of the current address pointer on the destination side are '00' or the remaining transfer data amount is 4 bytes or more. Processing.

【0045】そして、LW処理であればデスティネーショ
ンアドレスを「+4」し(ステップS614)、データの転送
(展開)量も4バイトとしてカウント(または、残るデ
ータ量を「-4」)する(ステップS615)。また、バイト
処理であればデスティネーションアドレスを「+1」し
(ステップS616)、データ転送(展開)量を1バイトと
してカウント(または、残るデータ量を「-1」)する
(ステップS617)。このデータ転送(展開)量またはデ
ータ残量は、ステップS618のデータ転送の終了判定に用
いられる。設定されたデータ量のDMA転送を実行したな
らは、DMAは終了であり、残りがあるならばステップS60
3へ処理を戻す。
In the LW process, the destination address is incremented by "4" (step S614), and the amount of data transferred (developed) is counted as 4 bytes (or the remaining data amount is "-4") (step S614). Step S615). In the case of byte processing, the destination address is incremented by "+1" (step S616), and the data transfer (development) amount is counted as one byte (or the remaining data amount is "-1") (step S617). The data transfer (development) amount or the remaining data amount is used for determining the end of the data transfer in step S618. If the DMA transfer of the set amount of data has been performed, the DMA has been completed.
Return to step 3.

【0046】本実施形態における、ソース側をLW幅のリ
ードアクセスし、デスティネーション側へバイト幅でラ
イトアクセスする処理においては、LW幅のリードデータ
中、目標バイトデータのみをライトすると、残る3バイ
トデータは破棄し、新たに同じLW幅のデータをリードす
る。
In the processing for performing read access of the LW width on the source side and write access of the destination side in the byte width in the present embodiment, if only the target byte data is written in the LW width read data, the remaining 3 bytes Data is discarded, and data with the same LW width is newly read.

【0047】[0047]

【第2実施形態】本発明にかかる第2実施形態において
は、LW処理の際のシフト量の変化を負方向だけに抑え込
む方法を説明する。なお、装置の構成は、第1実施形態
と同様であり、その制御フローを図7および図8を用いて
説明する。
[Second Embodiment] In a second embodiment according to the present invention, a method for suppressing a change in the shift amount during the LW process in only the negative direction will be described. The configuration of the device is the same as that of the first embodiment, and the control flow will be described with reference to FIGS. 7 and 8.

【0048】アドレスの初期値を設定し(ステップS70
1)、シフト量を演算し(ステップS702)、その後、デ
スティネーション側のカレントバイト位置を検出する。
デスティネーション側のカレントバイトが基底位置(下
位2ビットが‘00’)ならばソースデータのLW幅のリー
ドアクセス処理に分岐し、そうでなければソースデータ
のバイト幅のリードアクセス処理に分岐する(ステップ
S703)。
The initial value of the address is set (step S70)
1) The shift amount is calculated (step S702), and then the current byte position on the destination side is detected.
If the current byte on the destination side is the base position (the lower 2 bits are '00'), the process branches to read access processing of the LW width of the source data; otherwise, it branches to read access processing of the byte width of the source data ( Steps
S703).

【0049】本実施形態では、デスティネーション側の
カレントバイト位置を基底位置へもっていき、そのとき
のソース側のリードアドレスとの差をとることにより、
(デスティネーション側のアドレスの下位2ビット)-
(ソース側のアドレスの下位2ビット)で表されるシフ
ト量を必ず負(または零)にする。
In the present embodiment, the current byte position on the destination side is moved to the base position, and the difference from the read address on the source side at that time is calculated.
(Lower 2 bits of destination address)
The shift amount represented by (lower 2 bits of source address) must be negative (or zero).

【0050】ソース側のバイト処理では、バイトリード
リクエストを出力し(ステップS704)、Ackが受信され
るのを待ち(ステップS705)、Ackが受信されソースデ
ータが確定すると、ソースデータをデータラッチ107に
ラッチして、ソースアドレスを「+1」する(ステップS7
06)。そして、ソースデータをデスティネーションデー
タとしてデータラッチ109にセットし(ステップS70
7)、デスティネーション側にバイトライトリクエスト
を出力し(ステップS708)、デスティネーション側から
Ackが受信されるのを待つ(ステップS709)。Ackが受信
されると、デスティネーションのカレントアドレスを
「+1」し(ステップS710)、データ転送(展開)量を1
バイトとしてカウント(または、残るデータ量を「-
1」)する(ステップS711)。設定されたデータ量のDMA
転送(展開)が終了した場合はDMAは終了であり、残り
があればステップS702へ戻る(ステップS725)。
In the byte processing on the source side, a byte read request is output (step S704), and the process waits until an Ack is received (step S705). When the Ack is received and the source data is determined, the source data is latched by the data latch 107. And the source address is incremented by 1 (step S7).
06). Then, the source data is set as the destination data in the data latch 109 (step S70).
7), a byte write request is output to the destination side (step S708), and the destination side
Wait for Ack to be received (step S709). When the Ack is received, the current address of the destination is incremented by "1" (step S710), and the data transfer (development) amount is set to 1
Count as bytes (or
1 ") (step S711). DMA of set data amount
If the transfer (deployment) has been completed, the DMA has been completed, and if there is any remaining, the process returns to step S702 (step S725).

【0051】ステップS702に戻ると、シフト量の再演算
が行われるが、前述したようにデスティネーションの下
位2ビットが‘00’になるまではバイト処理が行われ
る。シフト量が負(または零)になるとLW処理へ移る
(ステップS703)。
Returning to step S702, recalculation of the shift amount is performed. As described above, byte processing is performed until the lower two bits of the destination become "00". When the shift amount becomes negative (or zero), the process proceeds to the LW process (step S703).

【0052】LW処理では、ソースデータのリードアクセ
スも、デスティネーションへのデータライトアクセスも
LW幅で行う。まず、ソースデータのリードリクエストを
出力し(ステップS712)、Ackが受信されるのを待つ
(ステップS713)。Ackが受信されるとソースデータを
データラッチ107にラッチさせ、ソース側のアドレスを
「+4」し(ステップS714)、先に算出されたシフト量
分、ソースデータをバレルシフトする(ステップS71
5)。その後、バレルシフトされたLW幅のデータをデス
ティネーションへ送るデータとしてデータラッチ109に
ラッチさせるとともに、キャリアウトデータをデータラ
ッチ108にラッチさせる(ステップS716)。
In the LW processing, both the read access of the source data and the data write access to the destination are performed.
Perform with LW width. First, a read request for the source data is output (step S712), and an Ack is received (step S713). When the Ack is received, the source data is latched in the data latch 107, the address on the source side is incremented by "+4" (step S714), and the source data is barrel-shifted by the previously calculated shift amount (step S71).
Five). Thereafter, the data of the barrel-shifted LW width is latched by the data latch 109 as data to be sent to the destination, and the carry-out data is latched by the data latch 108 (step S716).

【0053】次に、ステップS717で、ソースアドレスの
下位2ビットを調べ、基底位置か否かを判定する、本実
施形態に特徴的な制御を行う。前述したように、バレル
シフトにおけるシフト量は負か零である。シフトが負方
向の場合、LW処理の最初においてはキャリーデータが用
意されていない。そこで、ステップS717でシフト量が
負、つまりソースアドレスが基底位置ではない場合、ス
テップS726でステップS712からS716の処理を行うことに
よりLWデータをリードアクセスして、先のキャリーアウ
トデータをカレントのキャリーデータに回す。シフト量
が零、つまりソースアドレスが基底位置の場合はキャリ
ーデータは不要であるからステップS726は実行しない。
Next, in step S717, the lower two bits of the source address are examined to determine whether or not it is at the base position. As described above, the shift amount in the barrel shift is negative or zero. If the shift is in the negative direction, no carry data is prepared at the beginning of the LW process. Therefore, if the shift amount is negative in step S717, that is, if the source address is not at the base position, LW data is read-accessed by performing the processing of steps S712 to S716 in step S726, and the previous carry-out data is replaced with the current carry-out data. Turn to data. If the shift amount is zero, that is, if the source address is at the base position, step S726 is not executed because carry data is unnecessary.

【0054】続いて、データラッチ109にラッチされたL
W幅のデータをデスティネーションデータとして出力可
能な状態にし(ステップS718)、デスティネーションへ
LW幅のライトリクエストを送信し(ステップS719)、Ac
kが受信されるのを待つ(ステップS720)。Ackが受信さ
れデータライトが正常に終了したことを確認した後、デ
スティネーション側のアドレスを「+4」し(ステップS7
21)、データ転送(展開)量を「+4」(または、残るデ
ータ量を「-4」)する(ステップS722)。
Subsequently, the L latched by the data latch 109
Make the W-width data ready for output as destination data (step S718) and go to the destination
An LW width write request is transmitted (step S719), and Ac
Wait for k to be received (step S720). After confirming that the Ack has been received and that the data write has been completed normally, the destination side address is incremented by "+4" (step S7).
21), the data transfer (development) amount is set to “+4” (or the remaining data amount is set to “−4”) (step S722).

【0055】設定されたデータ量をDMA転送(展開)す
ればDMAは終了であるが(ステップS723)、そうでなけ
れば転送データの残りが4バイトよりもすくなくなるま
でLW処理を繰返すためステップS726へ戻る(ステップS7
24)。なお、これ以降のLW処理においては前回のキャリ
ーデータが充填される。
If the set amount of data is DMA-transferred (developed), the DMA is terminated (step S723). If not, the LW process is repeated until the remaining transfer data becomes less than 4 bytes in step S726. Return to (Step S7
twenty four). In the LW processing thereafter, the previous carry data is filled.

【0056】転送データの残りが4バイト未満になると
(ステップS724)、再び、バイト処理が必要になる。こ
のとき、ソースアドレスは、LW処理でキャリーに詰めた
分、オーバランしているので、オーバーラン分のアドレ
スの戻す制御が必要になる。この制御はステップS704で
実行するのがよい。つまり、
When the remaining transfer data is less than 4 bytes (step S724), byte processing is required again. At this time, since the source address is overrun by the amount packed in the carry in the LW process, it is necessary to control the return of the address corresponding to the overrun. This control is preferably executed in step S704. That is,

【0057】演算結果受信格納前のカレントアドレスを
保存しておき、
The current address before receiving and storing the operation result is stored.

【0058】LW処理の最後においてはアドレス演算部10
4の演算結果を無視し、保存されたアドレスを採用す
る。そして、アドレスの下位2ビットは初期設定値に戻
すことで、次のアクセスアドレスを示すことが可能であ
る。
At the end of the LW process, the address operation unit 10
Ignore the operation result of 4 and adopt the saved address. Then, by returning the lower 2 bits of the address to the initial setting value, it is possible to indicate the next access address.

【0059】以上説明したように、データバス幅が大き
い情報処理装置において、任意のメモリ領域間でデータ
を転送するDMAのようなバスの利用効率を上げるための
制御では、例えば、データ単位がデータバス幅に対して
小さい場合、また、ソース側のデータ配列をシフトさせ
てデスティネーション側へ送るような場合、そのデータ
バス幅でのデータ転送は不可能である。これに対して、
上述した各実施形態によれば、任意のデータ格納位置に
おいて、データバス幅をフルに利用したデータ転送が可
能になる。
As described above, in an information processing apparatus having a large data bus width, in a control for increasing the use efficiency of a bus such as a DMA for transferring data between arbitrary memory areas, for example, a data unit is a data unit. If the data width is small with respect to the bus width, or if the data array on the source side is shifted and sent to the destination side, data transfer with the data bus width is impossible. On the contrary,
According to each of the above-described embodiments, it is possible to perform data transfer at an arbitrary data storage position by making full use of the data bus width.

【0060】各実施形態の特徴は、メモリ領域上の二点
間のデータ転送において、データラッチ107およびデー
タラッチ109からなる二段階ラッチ、並びに、キャリー
データラッチ108を含むバレルシフタ106の制御を状態制
御部102が行うとととに、転送データのデータ幅を制御
しながら、そのデータ幅がデータバス幅と等しくなる期
間を最大にすることにある。この制御は、減算器105の
出力が状態制御部102へ帰還されてること実現される。
The feature of each embodiment is that, in data transfer between two points on a memory area, state control of a two-stage latch including a data latch 107 and a data latch 109 and a barrel shifter 106 including a carry data latch 108 are performed. What the part 102 does is to maximize the period during which the data width is equal to the data bus width while controlling the data width of the transfer data. This control is realized when the output of the subtractor 105 is fed back to the state control unit 102.

【0061】[0061]

【他の実施形態】なお、本発明は、複数の機器(例えば
ホストコンピュータ,インタフェイス機器,リーダ,プ
リンタなど)から構成されるシステムに適用しても、一
つの機器からなる装置(例えば、複写機,ファクシミリ
装置など)に適用してもよい。
[Other Embodiments] Even if the present invention is applied to a system including a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), an apparatus (for example, a copying machine) Machine, facsimile machine, etc.).

【0062】また、本発明の目的は、前述した実施形態
の機能を実現するソフトウェアのプログラムコードを記
録した記憶媒体を、システムあるいは装置に供給し、そ
のシステムあるいは装置のコンピュータ(またはCPUやM
PU)が記憶媒体に格納されたプログラムコードを読出し
実行することによっても、達成されることは言うまでも
ない。この場合、記憶媒体から読出されたプログラムコ
ード自体が前述した実施形態の機能を実現することにな
り、そのプログラムコードを記憶した記憶媒体は本発明
を構成することになる。また、コンピュータが読出した
プログラムコードを実行することにより、前述した実施
形態の機能が実現されるだけでなく、そのプログラムコ
ードの指示に基づき、コンピュータ上で稼働しているOS
(オペレーティングシステム)などが実際の処理の一部
または全部を行い、その処理によって前述した実施形態
の機能が実現される場合も含まれることは言うまでもな
い。
Further, an object of the present invention is to provide a storage medium storing program codes of software for realizing the functions of the above-described embodiments to a system or an apparatus, and to provide a computer (or a CPU or M
Needless to say, this can also be achieved by the PU) reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium implements the functions of the above-described embodiment, and the storage medium storing the program code constitutes the present invention. When the computer executes the readout program code, not only the functions of the above-described embodiments are realized, but also the OS running on the computer based on the instructions of the program code.
It goes without saying that an (operating system) performs a part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.

【0063】さらに、記憶媒体から読出されたプログラ
ムコードが、コンピュータに挿入された機能拡張カード
やコンピュータに接続された機能拡張ユニットに備わる
メモリに書込まれた後、そのプログラムコードの指示に
基づき、その機能拡張カードや機能拡張ユニットに備わ
るCPUなどが実際の処理の一部または全部を行い、その
処理によって前述した実施形態の機能が実現される場合
も含まれることは言うまでもない。
Further, after the program code read from the storage medium is written into the memory provided in the function expansion card inserted into the computer or the function expansion unit connected to the computer, based on the instruction of the program code, It goes without saying that the CPU included in the function expansion card or the function expansion unit performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.

【0064】[0064]

【発明の効果】以上説明したように、本発明によれば、
データ転送されるデータの幅を制御する情報処理装置お
よびその方法を提供することができ、例えば、装置全体
のスループットを向上するために、バイトアクセス、LW
アクセスを明確に切り分け、とくにメモリアクセス全体
に対するLWアクセスの比率を向上させることができる。
As described above, according to the present invention,
An information processing apparatus and a method for controlling the width of data to be transferred can be provided.For example, in order to improve the throughput of the entire apparatus, byte access, LW
The access can be clearly separated, and in particular, the ratio of LW access to the entire memory access can be improved.

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

【図1】プリンタコントローラの構成例を示すブロック
図、
FIG. 1 is a block diagram illustrating a configuration example of a printer controller.

【図2】ロングワードをバイト単位に分割したデータを
転送する一例を示す図、
FIG. 2 is a diagram illustrating an example of transferring data obtained by dividing a long word into bytes.

【図3】バイト単位のバレルシフトを説明する図、FIG. 3 is a diagram illustrating barrel shift in byte units;

【図4】バッファ内のデータ配列の一例を示す図、FIG. 4 is a diagram showing an example of a data array in a buffer.

【図5】本発明にかかるデータ転送制御部の構成例を示
す図、
FIG. 5 is a diagram showing a configuration example of a data transfer control unit according to the present invention;

【図6】ロングワード固定幅のリードアクセスによるDM
Aの一例を示すフローチャート、
[Fig. 6] DM by read access with longword fixed width
Flowchart showing an example of A,

【図7】ダミーリードアクセスを伴うDMAの一例を示す
フローチャート、
FIG. 7 is a flowchart showing an example of DMA with dummy read access;

【図8】ダミーリードアクセスを伴うDMAの一例を示す
フローチャートである。
FIG. 8 is a flowchart illustrating an example of DMA with dummy read access.

Claims (11)

【特許請求の範囲】[Claims] 【請求項1】 データ転送の制御情報が設定される保持
手段と、保持される制御情報に基づきデータ転送を制御
する制御手段と、転送データのリードおよびライトアド
レスを記憶する記憶手段と、データを連続して転送する
ための次アドレスを演算するアドレス演算手段とを備
え、アドレス空間における任意の二点間においてデータ
転送を行う情報処理装置であって、 データ転送用バスの幅に関連する最小単位で、データ転
送されるデータをシフトするシフト手段と、 前記シフト手段に入出力されるデータそれぞれをラッチ
するラッチ手段と、 前記最小単位に区切った転送データのリードおよびライ
トアドレスの所定下位ビットから前記シフト手段のシフ
ト量を演算する演算手段とを有し、 前記制御手段は、前記ラッチ手段および前記シフト手段
を経由するデータ転送を制御するとともに、前記演算手
段により演算されたシフト量および前記転送データのラ
イトアドレスに基づき、データ転送されるデータの幅を
制御することを特徴とする情報処理装置。
1. A storage unit in which control information for data transfer is set, a control unit for controlling data transfer based on the held control information, a storage unit for storing read and write addresses of transfer data, Address processing means for calculating a next address for continuous transfer, and an information processing device for transferring data between any two points in the address space, wherein the minimum unit related to the width of the data transfer bus A shift unit for shifting data to be transferred, a latch unit for latching each of data input and output to and from the shift unit, and a read and write address of the transfer data divided into the minimum units. Computing means for computing the shift amount of the shifting means, wherein the control means comprises: the latch means and the shift means. Controls data transfer via the means, based on the calculated shift amount and the write address of the transfer data by the calculating means, the information processing apparatus characterized by controlling the width of data to be data transferred.
【請求項2】 前記データ転送は、前記制御手段により
前記データ転送用バスの最大幅、または、前記最小単位
で行われることを特徴とする請求項1に記載された情報
処理装置。
2. The information processing apparatus according to claim 1, wherein the data transfer is performed by the control unit in a maximum width of the data transfer bus or in the minimum unit.
【請求項3】 前記最小単位は、前記装置の処理に有効
な最小データ単位であり、前記データ転送用バスの幅を
W、前記最小単位をUとする場合、W/Uの剰余が零となる
正の整数値であることを特徴とする請求項1または請求
項2に記載された情報処理装置。
3. The minimum unit is a minimum data unit effective for processing of the device, and sets a width of the data transfer bus.
3. The information processing apparatus according to claim 1, wherein when W is the minimum unit, the remainder of W / U is a positive integer value of zero.
【請求項4】 前記シフト手段のシフト量は可変であ
り、転送データおよびシフト分のキャリーを入力し、シ
フト後のデータおよびキャリーを出力することを特徴と
する請求項1から請求項3の何れかに記載された情報処理
装置。
4. The apparatus according to claim 1, wherein the shift amount of the shift means is variable, and the transfer data and the carry for the shift are input, and the shifted data and the carry are output. An information processing device according to any one of the above.
【請求項5】 前記制御手段は、前記データ転送用バス
の幅に等しい幅で転送データをリードし、前記データ転
送用バスの幅または前記最小単位にデータ幅を切替えて
前記転送データをライトすることを特徴とする請求項1
から請求項4の何れかに記載された情報処理装置。
5. The control means reads the transfer data with a width equal to the width of the data transfer bus, and writes the transfer data by switching the data width to the width of the data transfer bus or the minimum unit. Claim 1 characterized by the following:
The information processing device according to any one of claims 1 to 4.
【請求項6】 前記最小単位のデータ幅によるライトア
クセスが複数回連続する場合、そのライトアクセスの回
数分、転送データの供給側の同一アドレスをリードアク
セスすることを特徴とする請求項5に記載された情報処
理装置。
6. The method according to claim 5, wherein when the write access using the minimum unit data width is performed a plurality of times, the same address on the transfer data supply side is read-accessed by the number of write accesses. Information processing device.
【請求項7】 前記シフト量は、前記転送データのリー
ドアドレスおよびライトアドレスにおける、前記データ
転送用バスの幅内において前記最小単位のデータを格納
する位置を決定可能な所定の下位ビット同士の差分をと
ることにより演算され、 前記制御手段は、演算されるシフト量が零ではない場
合、前記データ転送用バスの幅による転送データのリー
ドアクセスを一回した後の二回目のリードアクセスか
ら、転送データのライトアクセスを開始することを特徴
とする請求項1から請求項4の何れかに記載された情報処
理装置。
7. The shift amount is a difference between predetermined lower-order bits in a read address and a write address of the transfer data, which can determine a position for storing the minimum unit of data within a width of the data transfer bus. When the calculated shift amount is not zero, the control means performs the transfer from the second read access after performing one read access of the transfer data by the width of the data transfer bus. 5. The information processing apparatus according to claim 1, wherein write access to data is started.
【請求項8】 前記制御手段は、リードされた転送デー
タの内容をコマンドとして解読し、そのコマンドが示す
指示に基づき転送データを転送先にデータ展開するとと
もに、所定の指示を示すコマンドの場合は、指示される
供給側のデータを繰返し転送先にデータ展開することを
特徴とする請求項1から請求項4の何れかに記載された情
報処理装置。
8. The control means decodes the contents of the read transfer data as a command, expands the transfer data to a transfer destination based on an instruction indicated by the command, and, if the command indicates a predetermined instruction, 5. The information processing apparatus according to claim 1, wherein the data on the specified supply side is repeatedly developed to the transfer destination.
【請求項9】 前記制御手段は、リードされた転送デー
タの内容をコマンドとして解読し、そのコマンドが示す
指示に基づき、リードされる情報圧縮されたデータを伸
長して転送先にデータ展開することを特徴とする請求項
1から請求項4の何れかに記載された情報処理装置。
9. The control means decodes the content of the read transfer data as a command, and expands the read information compressed data and expands the data to a transfer destination based on an instruction indicated by the command. Claims characterized by the following:
5. The information processing device according to claim 1, wherein:
【請求項10】 データ転送の制御情報が設定される保
持手段と、保持される制御情報に基づきデータ転送を制
御する制御手段と、転送データのリードおよびライトア
ドレスを記憶する記憶手段と、データを連続して転送す
るための次アドレスを演算するアドレス演算手段とを備
え、アドレス空間における任意の二点間においてデータ
転送を行う情報処理装置の制御方法であって、 転送データをラッチし、 データ転送用バスの幅に関連する最小単位に区切った転
送データのリードおよびライトアドレスの所定下位ビッ
トからシフト量を演算し、 演算されるシフト量に基づき、前記最小単位で、前記ラ
ッチされる転送データをシフトし、 シフトされた転送データをラッチし、 演算されるシフト量および前記転送データのライトアド
レスに基づき、データ転送されるデータの幅を制御する
ことを特徴とする制御方法。
10. A storage unit in which control information for data transfer is set, a control unit for controlling data transfer based on the stored control information, a storage unit for storing read and write addresses of transfer data, Address processing means for calculating a next address for continuous transfer, and a method for controlling an information processing device for performing data transfer between any two points in an address space, wherein the transfer data is latched, The shift amount is calculated from predetermined lower bits of read and write addresses of transfer data divided into minimum units related to the width of the bus for use, and the transfer data latched in the minimum unit is calculated based on the calculated shift amount. The transfer data is shifted, the shifted transfer data is latched, and the shift data is calculated based on the calculated shift amount and the write address of the transfer data. The control method characterized by controlling the width of data to be data transferred.
【請求項11】 データ転送の制御情報が設定される保
持手段と、保持される制御情報に基づきデータ転送を制
御する制御手段と、転送データのリードおよびライトア
ドレスを記憶する記憶手段と、データを連続して転送す
るための次アドレスを演算するアドレス演算手段とを備
え、アドレス空間における任意の二点間においてデータ
転送を行う情報処理装置の制御方法のプログラムコード
が記録された記録媒体であって、 転送データをラッチするステップのコードと、 データ転送用バスの幅に関連する最小単位に区切った転
送データのリードおよびライトアドレスの所定下位ビッ
トからシフト量を演算するステップのコードと、、 演算されるシフト量に基づき、前記最小単位で、前記ラ
ッチされる転送データをシフトするステップのコード
と、 シフトされた転送データをラッチするステップのコード
と、 演算されるシフト量および前記転送データのライトアド
レスに基づき、データ転送されるデータの幅を制御する
ステップのコードとを有することを特徴とする記録媒
体。
11. A storage unit for setting data transfer control information, a control unit for controlling data transfer based on the held control information, a storage unit for storing read and write addresses of transfer data, Address calculation means for calculating a next address for continuous transfer, wherein a program code for a control method of an information processing apparatus for performing data transfer between any two points in an address space is recorded. A code of a step of latching the transfer data, and a code of a step of calculating the shift amount from predetermined lower bits of the read and write addresses of the transfer data divided into the minimum units related to the width of the data transfer bus. Code of the step of shifting the latched transfer data in the minimum unit based on the shift amount And a code of a step of latching the shifted transfer data; and a code of a step of controlling the width of data to be transferred based on a calculated shift amount and a write address of the transfer data. Recording medium.
JP35170897A 1997-12-19 1997-12-19 Information processor and method therefor Withdrawn JPH11184748A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35170897A JPH11184748A (en) 1997-12-19 1997-12-19 Information processor and method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35170897A JPH11184748A (en) 1997-12-19 1997-12-19 Information processor and method therefor

Publications (1)

Publication Number Publication Date
JPH11184748A true JPH11184748A (en) 1999-07-09

Family

ID=18419086

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35170897A Withdrawn JPH11184748A (en) 1997-12-19 1997-12-19 Information processor and method therefor

Country Status (1)

Country Link
JP (1) JPH11184748A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030077862A (en) * 2002-03-27 2003-10-04 삼성전자주식회사 Optimized data shift-load method for data window and data processing processor for executing the same method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030077862A (en) * 2002-03-27 2003-10-04 삼성전자주식회사 Optimized data shift-load method for data window and data processing processor for executing the same method

Similar Documents

Publication Publication Date Title
KR100708128B1 (en) An apparatus and method for controlling nand flash memory
EP0333594B1 (en) Direct memory access controller
US7380115B2 (en) Transferring data using direct memory access
WO2005091812A2 (en) Pvdm (packet voice data module) generic bus protocol
US6907514B2 (en) Microcomputer and microcomputer system
JP2001216194A (en) Arithmetic processor
US6728797B2 (en) DMA controller
JP3619532B2 (en) Semiconductor integrated circuit device
KR19980015209A (en) A DMA DATA TRANSFERRING METHOD USING A PRE-LOADING OF DMA INSTRUCTION USING PRE-
US20020019905A1 (en) Flexible memory channel
JP4373255B2 (en) Direct memory access control apparatus and method
JPH07225727A (en) Computer system
JP4829408B2 (en) Image processing method and image processing apparatus
EP1408508A1 (en) Storage device
US20020018238A1 (en) Printer, print control apparatus and method
JPH11184748A (en) Information processor and method therefor
JP2017156924A (en) Information processor, data transfer device, control method for data transfer device, and program
US20040162924A1 (en) Apparatus and method for transmitting data by means of direct memory access medium
JP2002215562A (en) Unit and method for dma control
JP2000099452A (en) Dma control device
JP2594611B2 (en) DMA transfer control device
JP2006004340A (en) Dma transfer controller
JP2003187583A (en) Semiconductor memory device and controller
JPS6031647A (en) Data processor
JP2005190496A (en) Data transfer method and device

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