JP2014048954A - Data transfer device, and data transfer method - Google Patents

Data transfer device, and data transfer method Download PDF

Info

Publication number
JP2014048954A
JP2014048954A JP2012192287A JP2012192287A JP2014048954A JP 2014048954 A JP2014048954 A JP 2014048954A JP 2012192287 A JP2012192287 A JP 2012192287A JP 2012192287 A JP2012192287 A JP 2012192287A JP 2014048954 A JP2014048954 A JP 2014048954A
Authority
JP
Japan
Prior art keywords
data transfer
data
dma
dma device
counters
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.)
Pending
Application number
JP2012192287A
Other languages
Japanese (ja)
Inventor
Hiroshi Ichimura
啓 市村
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 JP2012192287A priority Critical patent/JP2014048954A/en
Publication of JP2014048954A publication Critical patent/JP2014048954A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a data transfer device in which while suppressing increase in a circuit size or wiring, DMA transfer executed by a plurality of programs in a concurrent and parallel manner is performed.SOLUTION: Data transfer between a memory storing data and a DMA device is performed by a plurality of programs as follows: A data transfer command instructed from the CPU is stored in a storage medium, and addresses of the storage means, in which data transfer commands respectively corresponding to a plurality of programs are stored, are set in a plurality of counters. While changing over a plurality of counters on the basis of a data transfer request from a DMA device, DMA data transfer between a memory and the DMA device is performed in accordance with the data transfer command stored in the storage means by using addresses set in the plurality of counters. At this occasion, a counter identifier of a counter storing an address of a data transfer command to be executed is output to the DMA device.

Description

本発明はデータ転送装置及びデータ転送方法に関し、特に、DMAデータ転送を行うデータ転送装置及びデータ転送方法に関する。   The present invention relates to a data transfer apparatus and a data transfer method, and more particularly to a data transfer apparatus and a data transfer method for performing DMA data transfer.

CPUに負荷をかけることなくデータを転送するために、従来、ダイレクトメモリアクセス(DMA)を採用した装置が提案されている。例えば、特許文献1に開示されているデータ転送装置には、図7に示すように3つのプログラムカウンタ(PC)3−1、3−2、3−3とこれらに格納された3つのアドレスのいずれかを選択するPC選択部4が備えられている。そして、PC選択部4で選択されたアドレスに格納されている命令は一度、命令メモリ5に格納され、命令デコード部6でその命令がデコードされる。その命令に基づいて、データ転送実行部7がDMAポート7−1もしくは7−2を介してDMAデバイス1−1もしくは1−2にデータを転送する。   In order to transfer data without imposing a load on the CPU, a device employing direct memory access (DMA) has been proposed. For example, the data transfer device disclosed in Patent Document 1 includes three program counters (PC) 3-1, 3-2, and 3-3 and three addresses stored in these as shown in FIG. A PC selection unit 4 for selecting either one is provided. The instruction stored at the address selected by the PC selection unit 4 is once stored in the instruction memory 5, and the instruction decoding unit 6 decodes the instruction. Based on the command, the data transfer execution unit 7 transfers data to the DMA device 1-1 or 1-2 via the DMA port 7-1 or 7-2.

この構成では、複数のPCとそれに対応した複数のDMAポートを用いることで、複数のプログラムを同時並行的に実行し、プログラムに従ったデータ転送を行うことができる。   In this configuration, by using a plurality of PCs and a plurality of DMA ports corresponding to the plurality of PCs, a plurality of programs can be executed in parallel and data transfer according to the programs can be performed.

特開2005−352594号公報JP 2005-352594 A

しかしながら、特許文献1に開示されたような従来例では、複数のプログラムで同時並行的にデータ転送を行うため、各プログラムにそれぞれ割当てられた複数のDMAポートを用いる必要がある。また、複数のDMAポートを備えた場合、各DMAポートに接続されたDMAデバイスに対して共通バスに接続する際は、各DMAデバイスへの配線や制御回路が必要となってしまう。このように、DMAポートの増大は回路規模や配線が増加してしまうという課題がある。   However, in the conventional example as disclosed in Patent Document 1, since data transfer is performed in parallel by a plurality of programs, it is necessary to use a plurality of DMA ports assigned to each program. In addition, when a plurality of DMA ports are provided, wiring to the DMA devices and a control circuit are required when connecting the DMA devices connected to the DMA ports to the common bus. Thus, the increase in the DMA port has a problem that the circuit scale and wiring increase.

本発明は上記従来例に鑑みてなされたもので、回路規模や配線増大を抑制しつつ複数のプログラムによる同時並行的なDMAデータ転送が可能なデータ転送装置及びデータ転送方法とを提供することを目的とする。   The present invention has been made in view of the above-described conventional example, and provides a data transfer apparatus and a data transfer method capable of simultaneous DMA data transfer by a plurality of programs while suppressing an increase in circuit scale and wiring. Objective.

上記目的を達成するために本発明のデータ転送装置は、次のような構成を有する。   In order to achieve the above object, a data transfer apparatus of the present invention has the following configuration.

即ち、複数のプログラムによるDMAデータ転送を制御するデータ転送装置であって、データを格納するメモリと、CPUから指示されたデータ転送命令を格納する格納手段と、前記複数のプログラムそれぞれに対応するデータ転送命令が格納された前記格納手段のアドレスがセットされた複数のカウンタと、前記複数のカウンタのカウンタ識別子それぞれに対応させた、アドレスを格納する複数のレジスタを備えたDMAデバイスと、前記DMAデバイスからのデータ転送要求に基いて、前記複数のカウンタを切り替えながら、前記複数のカウンタにセットされたアドレスを用いて前記格納手段に格納されたデータ転送命令に従って前記メモリと前記DMAデバイスとの間でのDMAデータ転送を実行するとともに、実行する前記データ転送命令のアドレスを格納するカウンタのカウンタ識別子を前記DMAデバイスに出力する実行手段とを有することを特徴とする。   That is, a data transfer device for controlling DMA data transfer by a plurality of programs, which is a memory for storing data, storage means for storing a data transfer instruction instructed by a CPU, and data corresponding to each of the plurality of programs A DMA device having a plurality of counters in which addresses of the storage means storing transfer instructions are set; a plurality of registers for storing addresses corresponding to the counter identifiers of the plurality of counters; and the DMA device In accordance with a data transfer request from the memory device and the DMA device according to a data transfer instruction stored in the storage means using addresses set in the plurality of counters while switching the plurality of counters. The DMA data transfer is executed and the data transfer to be executed is executed. And having a running means for outputting the counter identifier for the counter that stores the address of the instruction to the DMA device.

従って本発明によれば、複数のプログラムに従ったデータを転送する際に、共通のポートを介してDMAデバイスに転送できるので、回路の規模や配線の増大を抑制しつつ複数のプログラムに従った同時並行的なデータ転送を行うことができる。   Therefore, according to the present invention, when data according to a plurality of programs is transferred, the data can be transferred to the DMA device via a common port. Therefore, the plurality of programs are obeyed while suppressing an increase in circuit scale and wiring. Simultaneous data transfer can be performed.

本発明の実施形態であるデータ転送部を含んだデータ処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the data processing apparatus containing the data transfer part which is embodiment of this invention. データ転送部の構成を示すブロック図である。It is a block diagram which shows the structure of a data transfer part. データ転送部の動作手順を示すフローチャートである。It is a flowchart which shows the operation | movement procedure of a data transfer part. データ転送部とDMAデバイス間の信号プロトコルを示すタイミングチャートである。It is a timing chart which shows the signal protocol between a data transfer part and a DMA device. DMAデバイスからのデータ転送時におけるデータ転送部の動作手順を示すフローチャートである。It is a flowchart which shows the operation | movement procedure of the data transfer part at the time of the data transfer from a DMA device. DMAデバイスからのデータ転送時におけるDMAデバイスの動作手順を示すフローチャートである。It is a flowchart which shows the operation | movement procedure of the DMA device at the time of the data transfer from a DMA device. 従来技術に従うデータ転送装置の構成を示すブロック図である。It is a block diagram which shows the structure of the data transfer apparatus according to a prior art.

以下添付図面を参照して本発明の実施形態の一例について詳細に説明する。   Hereinafter, an example of an embodiment of the present invention will be described in detail with reference to the accompanying drawings.

なお、この明細書において、「記録」(以下、「プリント」とも称する)とは、文字、図形等有意の情報を形成する場合のみならず、有意無意を問わず、広く記録媒体上に画像、模様、パターン等を形成する、又は媒体の加工を行う場合も表すものとする。また、人間が視覚で知覚し得るように顕在化したものであるか否かを問わない。   In this specification, “recording” (hereinafter also referred to as “printing”) is not only for forming significant information such as characters and figures, but also for images on a wide range of recording media, regardless of significance. A case where a pattern, a pattern, or the like is formed or a medium is processed is also expressed. It does not matter whether it has been made obvious so that humans can perceive it visually.

また、「記録媒体」とは、一般的な記録装置で用いられる紙のみならず、広く、布、プラスチック・フィルム、金属板、ガラス、セラミックス、木材、皮革等、インクを受容可能なものも表すものとする。   “Recording medium” refers not only to paper used in general recording apparatuses but also widely to cloth, plastic film, metal plate, glass, ceramics, wood, leather, and the like that can accept ink. Shall.

図1は、本発明の実施形態であるデータ転送部を含んだデータ処理装置101のブロック図である。   FIG. 1 is a block diagram of a data processing apparatus 101 including a data transfer unit according to an embodiment of the present invention.

図1において、CPU102は内蔵ROM(不図示)に格納されたプログラムに従ってデータ処理を行う演算回路として動作する。データ転送部105は内蔵されたメモリ(不図示)に記憶されたプログラムに従って、メモリ104とDMAデバイス106との間のDMAデータ転送を制御する。CPU102はデータ転送部105にも接続され、データ転送の開始や終了などのメッセージとデータ転送部105へのプログラムの転送を行う。   In FIG. 1, a CPU 102 operates as an arithmetic circuit that performs data processing according to a program stored in a built-in ROM (not shown). The data transfer unit 105 controls DMA data transfer between the memory 104 and the DMA device 106 according to a program stored in a built-in memory (not shown). The CPU 102 is also connected to the data transfer unit 105, and transfers messages such as data transfer start and end and a program to the data transfer unit 105.

データ転送部105はプログラム(スレッド)を所定の単位で切り替えながら異なるデータを転送する。これにより見かけ上、複数の異なるデータが同時並行的に処理されることになる。データ転送部105は処理対象のデータを転送する際、当該データの転送に同期させて、当該データに対応したプログラム(スレッド)を識別する情報(PGNum)を転送する。   The data transfer unit 105 transfers different data while switching programs (threads) in predetermined units. As a result, a plurality of different data are apparently processed in parallel. When transferring data to be processed, the data transfer unit 105 transfers information (PGNum) for identifying a program (thread) corresponding to the data in synchronization with the transfer of the data.

DMAデバイス106はデータ転送部105からデータ及びPGNumを受信し、その受信データを及びPGNumに従ってIP_A107、IP_B108、IP_C109に転送する機能を有している。IP_A107、IP_B108、IP_C109は所定の画像処理を実行するプロセッサ(Image Processor)であり、それぞれ異なる画像処理を実行可能な機能ブロック(処理ユニット)である。   The DMA device 106 has a function of receiving data and PGNum from the data transfer unit 105 and transferring the received data to IP_A 107, IP_B 108, and IP_C 109 according to PGNum. IP_A 107, IP_B 108, and IP_C 109 are processors (Image Processors) that execute predetermined image processing, and are functional blocks (processing units) that can execute different image processing.

ここで、DMAデバイス106の動作について説明する。   Here, the operation of the DMA device 106 will be described.

DMAデバイス106は、IP_A107、IP_B108、IP_C109と接続されており、IP107〜109のアドレス空間は分離するようにマッピングされている。DMAデバイス106は、プログラムカウンタ番号ごとにアドレスを管理するレジスタ110、111、112を備えており、CPU102により各IP107〜109に対応したアドレスが書き込まれる。レジスタ110、111、112には夫々、アドレスA、アドレスB、アドレスCがセットされる。DMAデバイス106は処理対象のデータとともに送られてくるPGNumによって受信したデータがどのプログラムに対応したものであるかが分かるので、それに従ったIPにデータを転送する。   The DMA device 106 is connected to IP_A 107, IP_B 108, and IP_C 109, and the address spaces of IP 107 to 109 are mapped so as to be separated. The DMA device 106 includes registers 110, 111, and 112 for managing addresses for each program counter number, and addresses corresponding to the IPs 107 to 109 are written by the CPU 102. Addresses A, B, and C are set in the registers 110, 111, and 112, respectively. The DMA device 106 knows which program corresponds to the received data by the PGNum sent together with the data to be processed, and transfers the data to the corresponding IP.

データ処理装置101は、例えば、インクジェット記録ヘッドを搭載した記録装置に適用される。この記録装置は、インクジェット記録ヘッドを搭載したキャリッジを往復走査して記録媒体にインクを吐出するエンジン部と、ホストと接続して画像データを受信し、画像処理や記録制御を行う印刷制御部と備える。この印刷制御部は、CPUやメモリやホストとのインタフェースを備えるが、このメモリへのデータの入出力にDMA転送が用いられ処理の高速化が図られている。この印刷制御部にデータ処理装置101が組み込まれ、データ転送の高速化を図っているものである。特に、記録媒体のサイズがA0、B0サイズなどの大判の記録用紙を用いる場合、この記録装置が扱う画像データ量も膨大になり、ここで説明するようなDMA転送を実行するデータ処理装置を適用することにより処理の高速化の点で効果は著しい。記録媒体のサイズがA4、B4サイズのオフィス用、個人用のインクジェット記録装置にも、このデータ処理装置が適用可能である。   The data processing apparatus 101 is applied to, for example, a recording apparatus equipped with an inkjet recording head. The recording apparatus includes an engine unit that reciprocally scans a carriage on which an inkjet recording head is mounted and ejects ink onto a recording medium; a print control unit that receives image data by connecting to a host and performs image processing and recording control; Prepare. The print control unit includes an interface with a CPU, a memory, and a host. However, DMA transfer is used for inputting / outputting data to / from the memory to increase the processing speed. A data processing apparatus 101 is incorporated in the print control unit to speed up data transfer. In particular, when a large-sized recording sheet having a recording medium size of A0, B0 or the like is used, the amount of image data handled by the recording apparatus becomes enormous, and a data processing apparatus that executes DMA transfer as described here is applied. By doing so, the effect is remarkable in terms of speeding up the processing. This data processing apparatus can also be applied to office and personal inkjet recording apparatuses having a recording medium size of A4 or B4.

なお、適用される記録装置は、上記構成のインクジェット記録装置のみならず、電子写真方式、昇華方式、熱転写方式など、他の記録方式を適用した多くの種類の記録装置に及ぶ。   Note that the recording apparatus to be applied covers not only the ink jet recording apparatus having the above-described configuration, but also a wide variety of recording apparatuses to which other recording systems such as an electrophotographic system, a sublimation system, and a thermal transfer system are applied.

図2はデータ転送部105の詳細な構成を示すブロック図である。ここでは、特に、DMAデバイス106への出力転送を例に図示している。   FIG. 2 is a block diagram showing a detailed configuration of the data transfer unit 105. Here, in particular, output transfer to the DMA device 106 is illustrated as an example.

図2において、プログラムカウンタ(PC)更新部200によりプログラムカウンタ(PC)201、202、203にセットされたアドレスは、メモリ206に格納された転送命令のアドレスを示すものである。プログラムカウンタ(PC)選択部204はプログラムカウンタ201、202、203のいずれか値をデータ転送実行部208からの制御信号に基づいて選択する。   In FIG. 2, the addresses set in the program counters (PC) 201, 202, 203 by the program counter (PC) update unit 200 indicate the addresses of transfer instructions stored in the memory 206. A program counter (PC) selection unit 204 selects any one of the program counters 201, 202, and 203 based on a control signal from the data transfer execution unit 208.

なお、プログラムカウンタ201〜203の値(PGNum=#1、PGNum=#2、PGNum=#3)とレジスタ110〜112にセットされたアドレス(アドレスA、アドレスB、アドレスC)とは対応づけられている。即ち、PGNum=#1の場合、IP107が選択され、PGNum=#2の場合、IP108が選択され、PGNum=#3の場合、IP109が選択される。そして、PGNumによって選択されたIPに画像データが転送され、画像処理が実行される。   The values of the program counters 201 to 203 (PGNum = # 1, PGNum = # 2, PGNum = # 3) are associated with the addresses (address A, address B, address C) set in the registers 110 to 112. ing. That is, when PGNum = # 1, IP 107 is selected, when PGNum = # 2, IP 108 is selected, and when PGNum = # 3, IP 109 is selected. Then, the image data is transferred to the IP selected by PGNum, and image processing is executed.

アドレス(adr)選択部205はメモリ206へのアクセスアドレスを切り替える。CPU102からライトアクセスがある場合、CPU102からのアドレスを選択するとともに、メモリ206にデータをライトするシーケンスを発生させ(不図示)、所望のアドレスにデータをライトする。命令デコード部207はメモリ206から読み込んだデータ転送命令を解読し、データ転送方向、データ転送先、データ転送元などを判定する。   An address (adr) selection unit 205 switches an access address to the memory 206. When there is a write access from the CPU 102, an address from the CPU 102 is selected, a sequence for writing data to the memory 206 is generated (not shown), and the data is written to a desired address. The instruction decoding unit 207 decodes the data transfer instruction read from the memory 206 and determines the data transfer direction, the data transfer destination, the data transfer source, and the like.

データ転送実行部208は、命令デコード部207で解読したデータ転送命令に従ってDMAポート209もしくはCPUバス210を駆動してメモリ104とDMAデバイス106とのデータ転送を実行する。また、データ転送実行部208はデータ転送部105のプログラムカウンタ番号の管理も担っている。DMAポート209は複数のプログラムに従ったデータの転送用に共用される。   The data transfer execution unit 208 drives the DMA port 209 or the CPU bus 210 according to the data transfer instruction decoded by the instruction decoding unit 207 and executes data transfer between the memory 104 and the DMA device 106. The data transfer execution unit 208 also manages the program counter number of the data transfer unit 105. The DMA port 209 is shared for data transfer according to a plurality of programs.

なお、DMAデバイス106がデータ転送要求(DMA_Req)信号をアサートすることで、DMAポート209とDMAデバイス106との間のデータ転送が開始される。   Note that when the DMA device 106 asserts a data transfer request (DMA_Req) signal, data transfer between the DMA port 209 and the DMA device 106 is started.

次にデータ転送部の実際の動作をフローチャートを参照して説明する。   Next, the actual operation of the data transfer unit will be described with reference to a flowchart.

図3はデータ転送部105の動作概要を示すフローチャートである。   FIG. 3 is a flowchart showing an outline of the operation of the data transfer unit 105.

まず、ステップS301では、CPU102がデータ転送部105のメモリ206に、3種類のデータ転送用のプログラムを書き込む。さらに、ステップS302では、CPU102がデータ転送実行部208にプログラムを起動するように設定する。   First, in step S301, the CPU 102 writes three types of data transfer programs in the memory 206 of the data transfer unit 105. In step S302, the CPU 102 sets the data transfer execution unit 208 to start the program.

ステップS303では、データ転送実行部208はプログラムカウンタ選択部204に対して制御信号を発行し、プログラムカウンタ201を選択するよう指示する。これにより、プログラムカウンタ201の値が示すメモリ206のアドレスに格納されている命令データが読み出され、命令デコード部207へ渡される。ステップS304では、受信したデータをデコードし、データ転送命令としてデータ転送実行部208へ伝達する。   In step S303, the data transfer execution unit 208 issues a control signal to the program counter selection unit 204 to instruct the program counter 201 to be selected. As a result, the instruction data stored at the address of the memory 206 indicated by the value of the program counter 201 is read and passed to the instruction decoding unit 207. In step S304, the received data is decoded and transmitted to the data transfer execution unit 208 as a data transfer command.

ステップS305では受信したデータ転送命令に従って、データ転送実行部208は、メモリ104にリード要求を行う。ステップS306では、これに応じて、メモリ104から読み込んだ処理対象のデータを、どのプログラムに従ったデータかを識別するためのPGNumの情報とともにDMAポート209を経て、DMAデバイス106へ転送する。   In step S305, the data transfer execution unit 208 makes a read request to the memory 104 in accordance with the received data transfer command. In step S306, in response to this, the processing target data read from the memory 104 is transferred to the DMA device 106 via the DMA port 209 together with the PGNum information for identifying the data according to which program.

なお、ステップS303〜S306はパイプライン動作により実行される。例えば、ステップS303は、最初にプログラムカウンタ201を選択、次にプログラムカウンタ202を選択、その次はプログラムカウンタ203を選択というように、実行中のプログラムカウンタを順次選択していく。そして、所定単位毎に処理対象のプログラムを切り替えながら処理を進める。プログラムが最後まで実行されると、当該プログラムカウンタを除いたプログラムカウンタを順次選択し、すべてのプログラムが最後まで実行されるまで継続する。   Note that steps S303 to S306 are executed by a pipeline operation. For example, in step S303, the currently executed program counter is sequentially selected such that the program counter 201 is first selected, the program counter 202 is then selected, and then the program counter 203 is selected. Then, the process proceeds while switching the program to be processed for each predetermined unit. When the program is executed to the end, program counters excluding the program counter are sequentially selected and continued until all programs are executed to the end.

ステップS304の命令デコードについても同様にステップS303で選択されたプログラムカウンタのアドレスに格納されている命令を順次デコードする。ステップS303やステップS304はデータ転送実行部208の動作状況に応じて一時停止することが可能である。即ち、ステップS303とステップS304がパイプライン動作することで、ステップS305において命令実行のための待ち時間を少なくすることが可能である。   Similarly for the instruction decoding in step S304, the instructions stored at the address of the program counter selected in step S303 are sequentially decoded. Steps S303 and S304 can be temporarily stopped according to the operation status of the data transfer execution unit 208. That is, by performing pipeline operations in step S303 and step S304, it is possible to reduce the waiting time for instruction execution in step S305.

ステップS307ではすべてのプログラムが実行されデータが転送されたかどうかを確認する。そして、転送未完了であれば、処理はステップS303に戻るが、転送終了と判断されれば、CPU102へ割り込みをアサートし、データ転送が完了したことを通知して処理を終了する。   In step S307, it is confirmed whether all programs have been executed and data has been transferred. If the transfer is not completed, the process returns to step S303. If it is determined that the transfer is completed, an interrupt is asserted to the CPU 102 to notify that the data transfer is completed and the process ends.

図4は、データ転送実行部208のDMAポート209とDMAデバイス106との間のプロトコルを説明するタイミングチャートである。   FIG. 4 is a timing chart illustrating a protocol between the DMA port 209 and the DMA device 106 of the data transfer execution unit 208.

図4において、CLK401はデータ転送実行部208とDMAデバイス106で使用するクロック信号であり、立ち上がりエッジを利用した同期回路で構成されている。Data402はデータ転送実行部208がデータ転送のために使用するデータ、PGNum403はプログラムカウンタ201〜203のどのプログラムによってデータを転送されているかを示すプログラムカウンタ番号である。DMA_Req404はDMAデバイス106のデータ転送部105に対するデータ要求信号、DMA_Ack405はデータ転送実行部208がDMAポート209にデータを出力していることを示すデータ出力信号である。   In FIG. 4, CLK 401 is a clock signal used by the data transfer execution unit 208 and the DMA device 106, and is composed of a synchronous circuit using a rising edge. Data 402 is data used by the data transfer execution unit 208 for data transfer, and PGNum 403 is a program counter number indicating which program of the program counters 201 to 203 is used for data transfer. DMA_Req 404 is a data request signal for the data transfer unit 105 of the DMA device 106, and DMA_Ack 405 is a data output signal indicating that the data transfer execution unit 208 is outputting data to the DMA port 209.

ここで、図4に示すタイミングチャートを参照して、DMA処理フローを説明する。   Here, the DMA processing flow will be described with reference to the timing chart shown in FIG.

クロックサイクル2(CLK2)でDMAデバイス106が、DMA_Req404(データ要求信号)をアサートする。データ転送実行部208は、次のサイクル以降(CLK3以降)で転送データの出力を試みる。   In clock cycle 2 (CLK2), the DMA device 106 asserts DMA_Req 404 (data request signal). The data transfer execution unit 208 attempts to output transfer data after the next cycle (after CLK3).

図4によれば、クロックサイクル3、4(CLK3、4)では出力データの準備ができていないため、DMA_Ack405(データ出力信号)はディアサートの状態を出力している。クロックサイクル5(CLK5)で出力データの準備が完了したので、DMA_Ack405(データ出力信号)をアサートするとともに、Data402(データ)とData402(データ)のPGNum403(プログラムカウンタ番号)に#1を出力する。   According to FIG. 4, since the output data is not ready in clock cycles 3 and 4 (CLK 3 and 4), DMA_Ack 405 (data output signal) outputs a deasserted state. Since the preparation of output data is completed in clock cycle 5 (CLK5), DMA_Ack405 (data output signal) is asserted and # 1 is output to PGNum 403 (program counter number) of Data 402 (data) and Data 402 (data).

この実施形態では、プログラムカウンタ201〜203の値として、プログラムカウンタ番号#1、#2、#3が、それぞれ対応している。クロックサイクル6(CLK6)でDMAデバイス106は、DMA_Ack(データ出力信号)がアサートされていることを確認するとData402(データ)とPGNum403(プログラムカウンタ番号)を受信する。   In this embodiment, program counter numbers # 1, # 2, and # 3 correspond to the values of the program counters 201 to 203, respectively. When the DMA device 106 confirms that DMA_Ack (data output signal) is asserted at clock cycle 6 (CLK6), it receives Data 402 (data) and PGNum 403 (program counter number).

このようにしてDMA_Req404(データ要求信号)とDMA_Ack405(データ出力信号)とが同時アサートされたクロックサイクルのData402(データ)とPGNum403(プログラムカウンタ番号)を有効データとして扱うことができる。   In this way, Data 402 (data) and PGNum 403 (program counter number) in the clock cycle in which DMA_Req 404 (data request signal) and DMA_Ack 405 (data output signal) are simultaneously asserted can be handled as valid data.

次に、データ転送実行部208はクロックサイクル8(CLK8)でプログラムカウンタ202のデータを出力し、クロックサイクル9(CLK9)でDMAデバイス106がデータとプログラムカウンタ番号を受信する。同様に、クロックサイクル9(CLK9)でデータ転送実行部208が出力したデータとプログラムカウンタ番号をクロックサイクル10(CLK10)でDMAデバイス106が受信する。   Next, the data transfer execution unit 208 outputs the data of the program counter 202 at clock cycle 8 (CLK8), and the DMA device 106 receives the data and the program counter number at clock cycle 9 (CLK9). Similarly, the DMA device 106 receives the data and the program counter number output from the data transfer execution unit 208 in clock cycle 9 (CLK9) in clock cycle 10 (CLK10).

さらに図4を参照してDMAデバイス106の動作を説明する。   Further, the operation of the DMA device 106 will be described with reference to FIG.

DMAデバイス106は、クロックサイクル6(CLK6)でData402(データ)とPGNum403(プログラムカウンタ番号)を受信する。受信したプログラムカウンタ番号が#1であることからレジスタ110に格納されたアドレスAの値を参照する。DMAデバイス106は、そのアドレス値とデータ転送部105から受信したData(データ)をIP107、108、109に接続されたバス(IPバス)へ出力する。同様に、クロックサイクル9(CLK9)で受信したデータはプログラムカウンタ番号が#2であることから、レジスタ111に格納されたアドレスBの値を参照し、IPバスへ出力する。同様に、クロックサイクル10(CLK10)での受信データもレジスタ112に格納されたアドレスCの値を参照しIPバスへ出力する。   The DMA device 106 receives Data 402 (data) and PGNum 403 (program counter number) at clock cycle 6 (CLK6). Since the received program counter number is # 1, the value of the address A stored in the register 110 is referred to. The DMA device 106 outputs the address value and Data (data) received from the data transfer unit 105 to a bus (IP bus) connected to the IPs 107, 108, and 109. Similarly, since the data received in clock cycle 9 (CLK9) has the program counter number # 2, the value of address B stored in register 111 is referred to and output to the IP bus. Similarly, received data in clock cycle 10 (CLK10) is also output to the IP bus with reference to the value of address C stored in register 112.

なお、DMAデバイスからデータ転送部にデータを転送する場合にはデータ転送部105における処理動作は次のようになる。   When data is transferred from the DMA device to the data transfer unit, the processing operation in the data transfer unit 105 is as follows.

図5はDMAデバイスからデータ転送部へのデータ転送時におけるデータ転送部105における動作概要を示すフローチャートである。なお、図5において、既に図3を参照して説明したのと同じ処理ステップについては同じステップ参照番号を付してその説明は省略する。図3と図5とを比較すると分かるように、動作全体としては基本的に図3に示したものと同じであるが、ステップS304における受信したデータをデコードする処理以降のデータ転送する方向が異なっている。   FIG. 5 is a flowchart showing an outline of operation in the data transfer unit 105 at the time of data transfer from the DMA device to the data transfer unit. In FIG. 5, the same processing steps as those already described with reference to FIG. 3 are denoted by the same step reference numerals, and the description thereof is omitted. As can be seen by comparing FIG. 3 and FIG. 5, the overall operation is basically the same as that shown in FIG. 3, but the data transfer direction after the process of decoding the received data in step S304 is different. ing.

具体的には、ステップS305aではDMAデバイス106からデータリードを行い、ステップS306aでは、ステップS305aで読み込んだデータをメモリ104へ転送する。   Specifically, in step S305a, data is read from the DMA device 106, and in step S306a, the data read in step S305a is transferred to the memory 104.

次に、DMAデバイスからデータ転送部へのデータ転送時のDMAデバイスの動作について説明する。   Next, the operation of the DMA device during data transfer from the DMA device to the data transfer unit will be described.

図6はDMAデバイスからデータ転送部へのデータ転送時のDMAデバイス106における動作概要を示すフローチャートである。   FIG. 6 is a flowchart showing an outline of the operation in the DMA device 106 during data transfer from the DMA device to the data transfer unit.

ステップS601ではCPU102が、各IP107〜109からDMAデバイス106を介してデータ転送部105に転送するデータの、先頭アドレスと転送データ量をDMAデバイス106に書き込む。ステップS602では、DMAデバイス106は各IPから書き込まれたアドレス情報と転送データ量との情報をもとに、IP107〜109から読み込んだデータを格納するバッファに対して順次、データを読み込み格納する。   In step S <b> 601, the CPU 102 writes the start address and the transfer data amount of data to be transferred from the IPs 107 to 109 to the data transfer unit 105 via the DMA device 106 in the DMA device 106. In step S602, the DMA device 106 sequentially reads and stores data in a buffer that stores data read from the IPs 107 to 109, based on the address information and the amount of transfer data written from each IP.

ステップS603では、データ転送中のIPのバッファが空でないかを確認し、空であればデータの準備が完了したと判断する。ステップS604では、データ転送部105に対してDMA Req404(データ要求信号)をアサートする。   In step S603, it is confirmed whether the IP buffer during data transfer is not empty, and if it is empty, it is determined that data preparation is completed. In step S604, DMA Req 404 (data request signal) is asserted to the data transfer unit 105.

ステップS605では、データ転送部105がプログラムカウンタ番号とともにDMA_Ack405(データ出力信号)をアサートする。DMAデバイス106は、RGNum403とDMA_Ack405に従って、DMAデバイス106のレジスタに格納されたアドレス番号に対応したIPのバッファに格納されているデータを、Data402(データ)として読み出す。このようにして、プログラムカウンタ番号に対応したデータが転送される。   In step S605, the data transfer unit 105 asserts DMA_Ack405 (data output signal) together with the program counter number. The DMA device 106 reads out data stored in the IP buffer corresponding to the address number stored in the register of the DMA device 106 as Data 402 (data) according to RGNum 403 and DMA_Ack 405. In this way, data corresponding to the program counter number is transferred.

ステップS606では、ステップS601で設定された転送データ量分の転送が完了したIPがあるか確認し、完了したものがあれば、処理はステップS607に進む。そして、当該IPのバッファは空であっても問題ないため、以降のデータ準備完了判定の対象からそのIPを除外する。これに対して、ステップS601で設定された転送データ量分の転送が完了したIPがない場合、処理はステップS607をスキップする。ステップS608では、すべてのIPがステップS601で設定された転送データ量分の転送が完了したかを確認し、すべて完了していなければ再び処理はステップS602へ戻りデータ転送を継続する。すべて完了していた場合はデータ転送処理を終了する。   In step S606, it is confirmed whether there is an IP for which transfer of the transfer data amount set in step S601 has been completed. If there is an IP that has been completed, the process proceeds to step S607. Since there is no problem even if the buffer of the IP is empty, the IP is excluded from the targets for the subsequent data preparation completion determination. On the other hand, if there is no IP that has been transferred for the amount of transfer data set in step S601, the process skips step S607. In step S608, it is confirmed whether all IPs have been transferred for the amount of transfer data set in step S601. If all have not been completed, the process returns to step S602 and data transfer continues. If all have been completed, the data transfer process is terminated.

従って以上説明した実施形態によれば、データ転送部からプログラムカウンタ番号をデータと同期してDMAデバイスへ伝達することで、DMAデバイスはオーバヘッドなしにデータ転送を行ったプログラムの判定をすることができる。また、図1に示した通り、複数のIP(本実施形態では3つ)に対して、データ転送用の1つのDMAポート、1つのDMAデバイス、1つのCPUとのインタフェースでデータ転送部を実現できる。   Therefore, according to the embodiment described above, by transmitting the program counter number from the data transfer unit to the DMA device in synchronization with the data, the DMA device can determine the program that has transferred the data without overhead. . In addition, as shown in FIG. 1, a data transfer unit is realized with one DMA port for data transfer, one DMA device, and an interface with one CPU for a plurality of IPs (three in this embodiment). it can.

従って、プログラムの数に応じたDMAポートを用いるものに比べ、回路規模や信号配線数の増大を抑制できる。また、DMAポートを複数とし、1つのDMAポートを複数のプログラムによって共用するようにすれば、使用するプログラムの数よりもDMAポートの数を少なくすることができるので、この場合も回路規模や配線数の増大を抑制できる。なお、本実施形態ではプログラムに従った転送先をIPとしたが、これに限らず他の処理ユニットに置き換えることも可能である。   Therefore, an increase in the circuit scale and the number of signal wirings can be suppressed as compared with those using DMA ports according to the number of programs. In addition, if a plurality of DMA ports are used and one DMA port is shared by a plurality of programs, the number of DMA ports can be made smaller than the number of programs to be used. The increase in the number can be suppressed. In the present embodiment, the transfer destination according to the program is set to IP. However, the transfer destination is not limited to this, and can be replaced with another processing unit.

また、以上説明した実施形態ではプログラムカウンタが3つの例を用いて説明したが、本発明はこれによって限定されるものではない。他の数のプログラムカウンタを備えていても良い。また、プログラムの識別には数字以外の識別子(例えば、カウンタ識別子)を用いても構わない。さらに、データ転送部とDMAデバイスとの間でやりとりする信号についても上記説明した例は1例に過ぎず、これ以外のプロトコルも本発明に適用可能である。   In the above-described embodiment, the program counter is described using three examples, but the present invention is not limited to this. Other numbers of program counters may be provided. Further, identifiers other than numerals (for example, counter identifiers) may be used for program identification. Further, the above-described example is only one example of signals exchanged between the data transfer unit and the DMA device, and other protocols can be applied to the present invention.

Claims (5)

複数のプログラムによるDMAデータ転送を制御するデータ転送装置であって、
データを格納するメモリと、
CPUから指示されたデータ転送命令を格納する格納手段と、
前記複数のプログラムそれぞれに対応するデータ転送命令が格納された前記格納手段のアドレスがセットされた複数のカウンタと、
前記複数のカウンタのカウンタ識別子それぞれに対応させた、アドレスを格納する複数のレジスタを備えたDMAデバイスと、
前記DMAデバイスからのデータ転送要求に基いて、前記複数のカウンタを切り替えながら、前記複数のカウンタにセットされたアドレスを用いて前記格納手段に格納されたデータ転送命令に従って前記メモリと前記DMAデバイスとの間でのDMAデータ転送を実行するとともに、実行する前記データ転送命令のアドレスを格納するカウンタのカウンタ識別子を前記DMAデバイスに出力する実行手段とを有することを特徴とするデータ転送装置。
A data transfer device for controlling DMA data transfer by a plurality of programs,
Memory to store data,
Storage means for storing a data transfer instruction instructed by the CPU;
A plurality of counters set with addresses of the storage means storing data transfer instructions corresponding to the plurality of programs;
A DMA device comprising a plurality of registers for storing addresses, each corresponding to a counter identifier of the plurality of counters;
Based on a data transfer request from the DMA device, the memory, the DMA device, and the DMA device are switched according to a data transfer command stored in the storage unit using addresses set in the plurality of counters while switching the plurality of counters. A data transfer apparatus comprising: execution means for executing DMA data transfer between the two and outputting a counter identifier of a counter for storing an address of the data transfer instruction to be executed to the DMA device.
前記DMAデバイスへのデータ転送時、前記DMAデバイスは、前記カウンタ識別子とデータを受信し、前記受信したカウンタ識別子に対応するレジスタに格納されたアドレスを参照して前記受信したデータを前記アドレスに対応する処理ユニットに出力することを特徴とする請求項1に記載のデータ転送装置。   At the time of data transfer to the DMA device, the DMA device receives the counter identifier and data, refers to the address stored in the register corresponding to the received counter identifier, and corresponds the received data to the address The data transfer apparatus according to claim 1, wherein the data transfer apparatus outputs the data to a processing unit. 前記DMAデバイスからのデータ転送時、前記DMAデバイスは、前記カウンタ識別子を受信し、前記受信したカウンタ識別子に対応するレジスタに格納されたアドレスを参照して処理ユニットのバッファに格納されているデータを読み出して転送することを特徴とする請求項1又は2に記載のデータ転送装置。   At the time of data transfer from the DMA device, the DMA device receives the counter identifier, refers to the address stored in the register corresponding to the received counter identifier, and stores the data stored in the buffer of the processing unit. 3. The data transfer apparatus according to claim 1, wherein the data transfer apparatus reads and transfers the data. 前記実行手段からの制御信号に従って、前記複数のカウンタのいずれかを選択する選択手段と、
前記選択手段により選択されたカウンタにセットされたアドレスを用いて前記格納手段にアクセスして格納されたデータ転送命令を読み出してデコードするデコード手段とをさらに有することを特徴とする請求項1乃至3のいずれか1項に記載のデータ転送装置。
Selection means for selecting one of the plurality of counters according to a control signal from the execution means;
4. The apparatus according to claim 1, further comprising decoding means for accessing the storage means using an address set in the counter selected by the selection means and reading and decoding the stored data transfer instruction. The data transfer device according to any one of the above.
複数のプログラムにより、データを格納するメモリとDMAデバイスとの間でのDMAデータ転送を制御するデータ転送方法であって、
CPUから指示されたデータ転送命令を格納手段に格納する格納工程と、
前記複数のプログラムそれぞれに対応するデータ転送命令が格納された前記格納手段のアドレスを複数のカウンタにセットする設定工程と、
前記DMAデバイスからのデータ転送要求に基いて、前記複数のカウンタを切り替えながら、前記複数のカウンタにセットされたアドレスを用いて前記格納手段に格納されたデータ転送命令に従って、前記メモリと前記DMAデバイスとの間でのDMAデータ転送を実行するとともに、実行する前記データ転送命令のアドレスを格納するカウンタのカウンタ識別子を前記DMAデバイスに出力する実行工程とを有することを特徴とするデータ転送方法。
A data transfer method for controlling DMA data transfer between a memory for storing data and a DMA device by a plurality of programs,
A storage step of storing in the storage means a data transfer instruction instructed by the CPU;
A setting step of setting addresses of the storage means in which data transfer instructions corresponding to the plurality of programs are stored in a plurality of counters;
Based on a data transfer request from the DMA device, the memory and the DMA device are switched according to a data transfer instruction stored in the storage means using addresses set in the plurality of counters while switching the plurality of counters. A data transfer method comprising: executing a DMA data transfer between the first and second DMAs and outputting a counter identifier of a counter for storing an address of the data transfer command to be executed to the DMA device.
JP2012192287A 2012-08-31 2012-08-31 Data transfer device, and data transfer method Pending JP2014048954A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012192287A JP2014048954A (en) 2012-08-31 2012-08-31 Data transfer device, and data transfer method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012192287A JP2014048954A (en) 2012-08-31 2012-08-31 Data transfer device, and data transfer method

Publications (1)

Publication Number Publication Date
JP2014048954A true JP2014048954A (en) 2014-03-17

Family

ID=50608544

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012192287A Pending JP2014048954A (en) 2012-08-31 2012-08-31 Data transfer device, and data transfer method

Country Status (1)

Country Link
JP (1) JP2014048954A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111190843A (en) * 2020-01-08 2020-05-22 珠海趣印科技有限公司 Method for improving printing speed and printing effect

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111190843A (en) * 2020-01-08 2020-05-22 珠海趣印科技有限公司 Method for improving printing speed and printing effect

Similar Documents

Publication Publication Date Title
US8266340B2 (en) DMA controller
US8065448B2 (en) DMA control system, printing apparatus, transfer instruction method and computer readable medium
US20100131692A1 (en) Bus bridge apparatus and bus bridge system
JP5506304B2 (en) Data processing apparatus and data processing system
JP2001134752A (en) Graphic processor and data processing method for the same
JP4408840B2 (en) HDD controller and system equipped with the same
JP2019219803A (en) Controller, image forming apparatus, control method and control program
JP2005293596A (en) Arbitration of data request
JP2014048954A (en) Data transfer device, and data transfer method
JPH10334037A (en) Communication dma device
JP2001341363A (en) Blank page printing method for printer controller
JP5744206B2 (en) Drawing control device
JP3328246B2 (en) DMA transfer method and system
JP2014048955A (en) Data transfer device, and data transfer method
JP6206524B2 (en) Data transfer device, data transfer method, and program
KR20060004829A (en) Direct memory access device, system and method for transmitting and receiving data through direct memory access device
US7272680B2 (en) Method of transferring data between computer peripherals
EP1193605B1 (en) Apparatus and method for the transfer of signal groups between digital signal processors in a digital signal processing unit
JP2015091105A (en) Image processing system
US20220237132A1 (en) Data transmission method and ping-pong dma architecture
JP2002278922A (en) Computer bus system
JP2003308289A (en) Data processor
US7085873B1 (en) ATA device access system with surrogate registers corresponding to ATA registers
JP2008003786A (en) Logic simulation method and its device
JP2022144862A (en) Image processing controller, image forming device, and control method