JP2018085003A - Data processing device - Google Patents

Data processing device Download PDF

Info

Publication number
JP2018085003A
JP2018085003A JP2016228442A JP2016228442A JP2018085003A JP 2018085003 A JP2018085003 A JP 2018085003A JP 2016228442 A JP2016228442 A JP 2016228442A JP 2016228442 A JP2016228442 A JP 2016228442A JP 2018085003 A JP2018085003 A JP 2018085003A
Authority
JP
Japan
Prior art keywords
address
control unit
bus
dma
external bus
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
JP2016228442A
Other languages
Japanese (ja)
Inventor
清紀 松本
Kiyonori Matsumoto
清紀 松本
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 JP2016228442A priority Critical patent/JP2018085003A/en
Publication of JP2018085003A publication Critical patent/JP2018085003A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To achieve mutual notification of an interruption of DMA transfer with low latency.SOLUTION: A data processing device includes: a first system having a first control part, a first DMA control part, and a first external bus conversion part for converting an external bus and an internal bus; and a second system having a second control part, a second DMA control part, and a second external bus conversion part for converting the external bus and the internal bus. The first system and the second system are mutually connected by the external bus accessible to an address space on the internal bus, and the first system has a first address determination part for comparing the last address of data transferred by the second DMA control part notified from the second system via the external bus with an internal bus address outputted by the first external bus control part, and notifying the first control part of an interruption in accordance with the result.SELECTED DRAWING: Figure 1

Description

本発明はデータ処理装置に関する。   The present invention relates to a data processing apparatus.

近年、ビッグデータの処理に代表されるように、大量のデータ処理行う集積回路システムの必要性が増してきている。多量のデータを高速に処理するためには、個々にメモリを持つ複数の集積回路が連携して動作する事が欠かせない。そのためには、連携して動作する複数の集積回路が別々に持つデータを、高速に低レイテンシーで送受信する事が求められている。集積回路において、データの転送には一般的にDMAコントローラと呼ばれるメモリ転送制御装置が利用される。特許文献1には、DMAコントローラを用いてDMA転送を行い、その転送完了を割り込みとしてCPUへ通知する手法が記載されている。   In recent years, as represented by big data processing, the need for integrated circuit systems for processing large amounts of data has increased. In order to process a large amount of data at high speed, it is essential that a plurality of integrated circuits each having a memory operate in cooperation. For this purpose, it is required to transmit / receive data separately possessed by a plurality of integrated circuits operating in cooperation with each other at high speed and with low latency. In an integrated circuit, a memory transfer control device called a DMA controller is generally used for data transfer. Japanese Patent Application Laid-Open No. 2004-228561 describes a method of performing DMA transfer using a DMA controller and notifying the CPU of the completion of the transfer as an interrupt.

一方近年の技術の普及により、複数の集積回路間のデータ転送にPCIやPCI Express(以下PCIeと称す)に代表される、汎用的かつ接続されているデバイスのアドレス空間へアクセスできるようなバスが利用されつつある。   On the other hand, with the spread of technology in recent years, a bus that can access the address space of a general-purpose and connected device represented by PCI or PCI Express (hereinafter referred to as PCIe) for data transfer between a plurality of integrated circuits. It is being used.

特開2004−287654号公報JP 2004-287654 A

特許文献1に示されるように、DMA転送の完了をCPUに通知するためには一般的に割り込み信号が利用される。割り込み信号を受け取ったCPUは、DMA転送によるデータが全てそろったと判断し、それらのデータに対して処理を実施する。しかしながら、PCIにおいては、割り込み信号をPCIデバイスからPCIホストの単一方向にしか伝達する事が出来ない。同様にPCIeにおいては、割り込み信号をEnd Point(以下EP)から、Root Complex(以下RCと称す)の単一方向にしか伝送する事が出来ない。   As shown in Patent Document 1, an interrupt signal is generally used to notify the CPU of completion of DMA transfer. The CPU that has received the interrupt signal determines that all of the data from the DMA transfer is available, and performs processing on the data. However, in PCI, an interrupt signal can only be transmitted from a PCI device to the PCI host in a single direction. Similarly, in PCIe, an interrupt signal can be transmitted only in a single direction from End Point (hereinafter referred to as EP) to Root Complex (hereinafter referred to as RC).

そのため、EPないしデバイスとして接続された集積回路が持つCPUに対して、RCないしホストによるDMA転送の完了を通知できないという課題があった。   Therefore, there is a problem that the completion of DMA transfer by the RC or the host cannot be notified to the CPU of the integrated circuit connected as the EP or device.

そこで、本発明の目的は、PCIやPCIeに代表される、デバイスのアドレス空間へアクセスできるようなバスで複数の集積回路が接続されている構成において、DMA転送の割り込みを相互に、かつ低レイテンシーで通知可能な装置を提供する事にある。   SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide DMA transfer interrupts to each other and with low latency in a configuration in which a plurality of integrated circuits are connected by a bus that can access the device address space represented by PCI and PCIe. It is to provide a device that can be notified by.

上記目的を達成するために、本発明のデータ処理装置は、第1の制御部、第1のDMA制御部、外部バスと内部バスとを変換する第1の外部バス変換部とを持つ第1のシステムと、第2の制御部、第2のDMA制御部、外部バスと内部バスとを変換する第2の外部バス変換部とを持つ第2のシステムと、を有し、前記第1のシステムと前記第2のシステムが、前記内部バス上のアドレス空間へアクセス可能な外部バスで相互に接続され、前記第1のシステムは、前記第2のシステムより前記外部バスを経由して通知される第2のDMA制御部が転送するデータの最終アドレスと、前記第1の外部バス制御部の出力する内部バスアドレスとを比較し、その結果に応じて前記第1の制御部へ割り込みを通知する第1のアドレス判定部を有する。   In order to achieve the above object, a data processing apparatus of the present invention includes a first control unit, a first DMA control unit, and a first external bus conversion unit that converts an external bus and an internal bus. And a second system having a second control unit, a second DMA control unit, and a second external bus conversion unit for converting an external bus and an internal bus, and the first system The system and the second system are connected to each other by an external bus accessible to the address space on the internal bus, and the first system is notified from the second system via the external bus. Compares the final address of the data transferred by the second DMA control unit with the internal bus address output by the first external bus control unit, and notifies the first control unit of an interrupt according to the result. A first address determination unit.

本発明によれば、PCIやPCIeに代表される、デバイスのアドレス空間へアクセスできるようなバスで複数の集積回路が接続されている構成において、DMA転送の割り込みを相互に、かつ低レイテンシーで通知する事が可能となる。   According to the present invention, in a configuration in which a plurality of integrated circuits are connected by a bus that can access a device address space represented by PCI or PCIe, DMA transfer interrupts are notified to each other with low latency. It becomes possible to do.

第1の実施形態におけるデータ処理装置を示すブロック図である。It is a block diagram which shows the data processor in 1st Embodiment. DMA転送処理を示すフローチャートである。It is a flowchart which shows a DMA transfer process. DMA転送設定の内容を示す図である。It is a figure which shows the content of DMA transfer setting. 最終アドレス検出処理を示すフローチャートである。It is a flowchart which shows a last address detection process. DMA転送設定の内容を示す図である。It is a figure which shows the content of DMA transfer setting. DMA転送処理を示すフローチャートである。It is a flowchart which shows a DMA transfer process. 第3の実施形態におけるデータ処理装置を示すブロック図である。It is a block diagram which shows the data processor in 3rd Embodiment. DMA転送処理を示すフローチャートである。It is a flowchart which shows a DMA transfer process.

以下図面を参照しながら、本発明の実施の形態を詳細に説明する。
[実施例1]
図1は、本発明の第1の実施形態におけるデータ処理装置を示すブロック図である。図1において、1000はデータ処理装置、1100、1200はそれぞれ集積回路を示す。図1において、制御部1101、1201は、CPU,MPUなどのプログラマブルプロセッサと、プログラマブルプロセッサが実行する制御プログラムを格納する不揮発メモリを含み、それぞれの集積回路1100、1200の全体の処理を制御する。DMA制御部1102、1202は、所謂ダイレクトメモリアクセスをコントロールする。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[Example 1]
FIG. 1 is a block diagram showing a data processing apparatus according to the first embodiment of the present invention. In FIG. 1, reference numeral 1000 denotes a data processing device, and 1100 and 1200 denote integrated circuits. In FIG. 1, the control units 1101 and 1201 include programmable processors such as a CPU and an MPU, and a nonvolatile memory that stores a control program executed by the programmable processor, and controls the overall processing of the integrated circuits 1100 and 1200. The DMA control units 1102 and 1202 control so-called direct memory access.

本発明の第1の実施形態においては、集積回路1100,1200間でデータを転送するためにDMA制御部1102、1202が利用される。DMA制御部1102、1202は、それぞれの集積回路1100、1200内に存在する制御部1101、1202によりDMA転送の設定や、開始指示等が行われる。メモリ制御部1103、1203はメモリ1104,1204に対してコマンドの発行やリフレッシュ等の制御をおこない、それぞれの集積回路1100、1200内に存在する各動作部のメモリ1104、1204へのアクセスを制御する。   In the first embodiment of the present invention, DMA controllers 1102 and 1202 are used to transfer data between the integrated circuits 1100 and 1200. The DMA control units 1102 and 1202 are set by the control units 1101 and 1202 existing in the integrated circuits 1100 and 1200, and a start instruction is given. The memory control units 1103 and 1203 control the memory 1104 and 1204 to issue commands and refresh, and control access to the memories 1104 and 1204 of the operation units existing in the integrated circuits 1100 and 1200, respectively. .

PCIe制御部1110、1210には、それぞれシリアルパラレル変換部1111、1211、コマンド解析設定部1112、1212、アドレス変換部1113、1213と設定通知レジスタ部1114、1214が含まれる。   The PCIe control units 1110 and 1210 include serial / parallel conversion units 1111 and 1211, command analysis setting units 1112 and 1212, address conversion units 1113 and 1213, and setting notification register units 1114 and 1214, respectively.

シリアルパラレル変換部1111、1211は、PCIeバス1300上に伝送されるシリアルデータからクロック信号を取り出し、パラレルデータへと変換し、更に8b10b変換とデスクランブリング処理を行い、その結果をコマンド解析設定部1112、1212へ供給する。また、コマンド解析設定部1112、1212から供給されるパラレルデータをシリアルデータへと変換し、PCIeバス1301上へ伝送する事も行う。   The serial / parallel converters 1111 and 1211 extract a clock signal from serial data transmitted on the PCIe bus 1300, convert the clock signal into parallel data, further perform 8b10b conversion and descrambling processing, and the result is a command analysis setting unit 1112. , 1212. In addition, the parallel data supplied from the command analysis setting units 1112 and 1212 is converted into serial data and transmitted onto the PCIe bus 1301.

コマンド解析設定部1112、1212は、シリアルパラレル変換部1111、1211より供給されるパケットを解析し、コマンドに応じてパケットデータを各部へ転送する。PCIeにおいては、メッセージトランザクション、コンフィギュレーショントランザクション、メモリトランザクション、I/Oトランザクションの4種類のコマンドが定義されている。そのうちメモリトランザクションとI/Oトランザクションは、コマンド解析設定部1112、1212により内部バス1107、1207に対してのコマンドに変換され、アドレス変換部1113、1213へ供給される。   The command analysis setting units 1112 and 1212 analyze the packets supplied from the serial / parallel conversion units 1111 and 1211 and transfer the packet data to each unit according to the command. PCIe defines four types of commands: message transactions, configuration transactions, memory transactions, and I / O transactions. Among them, the memory transaction and the I / O transaction are converted into commands for the internal buses 1107 and 1207 by the command analysis setting units 1112 and 1212 and supplied to the address conversion units 1113 and 1213.

メッセージトランザクションとコンフィギュレーショントランザクションは、設定通知レジスタ部1114、1214へと転送される。アドレス変換部1113,1213は、コマンド解析部から送信された内部バスコマンドのアドレスを、PCIeの規格に基づくBAR(Base Address Register)の設定や、それぞれのBAR空間のオフセットアドレス設定に基づき、外部バスアドレスから内部バスアドレスへと変換する。   The message transaction and the configuration transaction are transferred to the setting notification register units 1114 and 1214. The address conversion units 1113 and 1213 use the external bus based on the address of the internal bus command transmitted from the command analysis unit based on the BAR (Base Address Register) setting based on the PCIe standard and the offset address setting of each BAR space. Convert from address to internal bus address.

また、制御部1101、1201等からPCIe制御部1110、1210へ供給される内部バスコマンドのアドレスを、BARの設定に基づき外部バスアドレスへと変換する。設定通知レジスタ部1114、1214は、PCIe制御部1110、1210の各動作部に関する種々の設定を保持する。また、PCIe制御部1110、1210の各動作部からの通知を保持し、その内容は制御部1101、1201等から参照される。   Also, the address of the internal bus command supplied from the control units 1101 and 1201 to the PCIe control units 1110 and 1210 is converted into an external bus address based on the BAR setting. The setting notification register units 1114 and 1214 hold various settings related to the operation units of the PCIe control units 1110 and 1210. Further, notifications from the respective operation units of the PCIe control units 1110 and 1210 are held, and the contents thereof are referred to by the control units 1101 and 1201 and the like.

なお、PCIeは、リンクアップ動作を行う際にそれぞれRoot Complex(以下RCと称す)かEndPoint(以下EPと称す)のどちらかを選択する必要がある。しかし、本発明の第1の実施形態において、PCIe制御部1110、1210はRC・EPの限定は無い。PCIe制御部1110をRC、PCIe制御部1210をEPとしてリンクアップしても良いし、その逆でもよい。   The PCIe needs to select either Root Complex (hereinafter referred to as RC) or EndPoint (hereinafter referred to as EP) when performing a link-up operation. However, in the first embodiment of the present invention, the PCIe control units 1110 and 1210 are not limited to RC / EP. The PCIe control unit 1110 may be linked up as RC, and the PCIe control unit 1210 may be linked up as EP, or vice versa.

内部バス1107、1207は、例えばAXIやOCP等のインターコネクトである。各動作部はアドレスが設定され、例えば制御部1101、1201からの指定された、任意のアドレスに対してのアクセスを、それぞれの動作部へ振り分けることを行う。また、所謂アービトレーション等、バスの一般的な制御に関しての動作も行う。   The internal buses 1107 and 1207 are interconnects such as AXI and OCP. Each operation unit is set with an address. For example, access to an arbitrary address designated by the control units 1101 and 1201 is distributed to each operation unit. It also performs operations related to general bus control such as so-called arbitration.

アクセス解析部1105、1205は、PCIe制御部1110、1210により内部バス1107、1207へ送信された、ないしは内部バス1107、1207から受信したコマンドを解析し、予め設定された監視対象アドレスへ対するアクセスが発生したか否かを解析する。解析した結果アクセスが発生していた場合、割り込み生成部1106,1206へ制御部1101,1201に対する割り込みを発生させるよう通知する。   The access analysis units 1105 and 1205 analyze a command transmitted to the internal buses 1107 and 1207 by the PCIe control units 1110 and 1210 or received from the internal buses 1107 and 1207, and access to a preset monitoring target address is performed. Analyzes whether it occurred. If access has occurred as a result of the analysis, the interrupt generation units 1106 and 1206 are notified to generate interrupts for the control units 1101 and 1201.

図2は、本発明の第1の実施形態におけるDMA転送処理を示すフローチャートである。図2は、集積回路1100が集積回路1200に対して、DMA転送を用いてデータを書き込む際のフローを表している。まず、ステップS201において、制御部1101は、DMA制御部1102に対してDMAの転送に関する設定を行う。   FIG. 2 is a flowchart showing a DMA transfer process in the first embodiment of the present invention. FIG. 2 shows a flow when the integrated circuit 1100 writes data to the integrated circuit 1200 by using DMA transfer. First, in step S <b> 201, the control unit 1101 performs settings related to DMA transfer to the DMA control unit 1102.

図3は本発明の第1の実施形態におけるDMA転送設定の内容を示す表である。本発明の第1の実施形態において、図3に示すように、制御部1101はPCIeバスアドレス、内部バスアドレス、転送データサイズ、転送方向の4つのパラメータを設定する。   FIG. 3 is a table showing the contents of the DMA transfer settings in the first embodiment of the present invention. In the first embodiment of the present invention, as shown in FIG. 3, the control unit 1101 sets four parameters: a PCIe bus address, an internal bus address, a transfer data size, and a transfer direction.

次に、図2において、制御部1101は、DMA制御部1102に対してDMAの転送を開始する指示を送付する(S202)。一般的には、ステップS202は、DMA制御部1102が持つDMA開始レジスタに対して制御部1101が開始指示を書き込むことにより実現される。その後、制御部1101は、DMA制御部1102からの転送完了通知を受け取るまで待機する(S203)。   Next, in FIG. 2, the control unit 1101 sends an instruction to start DMA transfer to the DMA control unit 1102 (S202). In general, step S202 is realized by the control unit 1101 writing a start instruction in the DMA start register of the DMA control unit 1102. Thereafter, the control unit 1101 waits until receiving a transfer completion notification from the DMA control unit 1102 (S203).

なお、S203において、制御部1101は転送完了通知を割り込みとして受け取るような構成を持つことで、制御部1101上で図2に示すDMA転送処理以外の処理を行わせることも可能である。制御部1101は、DMA制御部1102からの転送完了通知を受け取り次第、DMA転送処理を終了する。   In S203, the control unit 1101 is configured to receive a transfer completion notification as an interrupt, so that the control unit 1101 can perform processing other than the DMA transfer processing illustrated in FIG. Upon receiving the transfer completion notification from the DMA control unit 1102, the control unit 1101 ends the DMA transfer process.

DMA制御部1102は制御部1101からの開始指示を受け取ると、まず最終アドレス計算処理を行う(S211)。S211において、最終外部バスアドレスはステップS101で設定されたDMA転送設定を用いて、次の式から計算される。   When receiving a start instruction from the control unit 1101, the DMA control unit 1102 first performs final address calculation processing (S211). In S211, the final external bus address is calculated from the following equation using the DMA transfer settings set in Step S101.

最終外部バスアドレス=外部バスアドレス+転送データサイズ−1
次にDMA制御部1102は、PCIeバス1300を経由して、アクセス解析部1205に対して最終外部バスアドレスを通知する(S212)。その後、DMA制御部1102は、メモリ制御部1103を経由してメモリ1104にアクセスし、内部バスアドレスから転送データサイズ分の転送データを取得し(S213)、PCIe制御部1110、PCIeバス1300を経由して、集積回路1200へデータを送信する(S214)。
Final external bus address = external bus address + transfer data size-1
Next, the DMA control unit 1102 notifies the access analysis unit 1205 of the final external bus address via the PCIe bus 1300 (S212). Thereafter, the DMA control unit 1102 accesses the memory 1104 via the memory control unit 1103, acquires transfer data corresponding to the transfer data size from the internal bus address (S213), and passes through the PCIe control unit 1110 and the PCIe bus 1300. Then, data is transmitted to the integrated circuit 1200 (S214).

アクセス解析部1205は、ステップS212で転送された最終外部バスアドレスを受け取ると、最終外部バスアドレスに対してアドレス変換処理を行い、最終内部バスアドレスを算出する(S221)。この処理はアドレス変換部1213で行われるアドレス変換処理と同一の処理である。この変換処理により、PCIeバス1300を経由して通知された最終外部バスアドレスが最終内部バスアドレスへと変換される。次に、アクセス解析部1205は、ステップS221で変換したアドレスを監視対象アドレスとして設定する(S222)。   Upon receiving the final external bus address transferred in step S212, the access analysis unit 1205 performs address conversion processing on the final external bus address, and calculates the final internal bus address (S221). This process is the same as the address conversion process performed by the address conversion unit 1213. By this conversion processing, the final external bus address notified via the PCIe bus 1300 is converted into the final internal bus address. Next, the access analysis unit 1205 sets the address converted in step S221 as a monitoring target address (S222).

次に、アクセス解析部1205は、ステップS222で設定した監視対象アドレスに対して、PCIe制御部1210からのアクセスが発生することを監視する(S223)。S223の具体的な処理内容は後述する。最後にS234において、アクセス解析部1205は、割り込み生成部1206に対して割り込みを生成させるよう制御を行い、制御部1202に対しての割り込みを生成する。S224で生成された割り込み信号は制御部1201へと通知され、制御部1201はDMA転送終了処理を行い(S231)、本フローは終了する。   Next, the access analysis unit 1205 monitors the access from the PCIe control unit 1210 to the monitoring target address set in step S222 (S223). The specific processing content of S223 will be described later. Finally, in S234, the access analysis unit 1205 controls the interrupt generation unit 1206 to generate an interrupt, and generates an interrupt for the control unit 1202. The interrupt signal generated in S224 is notified to the control unit 1201, and the control unit 1201 performs DMA transfer end processing (S231), and this flow ends.

図4は、本発明の第1の実施形態における最終アドレス検出処理について示すフローチャートである。まず、アクセス解析部1205は、PCIe制御部1210からのアクセスを受信するまで待機する(S401)。PCIe制御部1210からのアクセスを検出した後に、アクセス解析部1205はS401で受信したアクセスのアドレス範囲を算出する(S402)。S402におけるアドレス範囲の下限値と上限値は、具体的に次の式から算出される。   FIG. 4 is a flowchart showing the final address detection process in the first embodiment of the present invention. First, the access analysis unit 1205 waits until an access from the PCIe control unit 1210 is received (S401). After detecting an access from the PCIe control unit 1210, the access analysis unit 1205 calculates the address range of the access received in S401 (S402). Specifically, the lower limit value and upper limit value of the address range in S402 are calculated from the following equations.

アドレス下限値(書き込み時)=AWADDR
アドレス上限値(書き込み時)=AWADDR+AWLEN−1
アドレス下限値(読み出し時)=ARADDR
アドレス上限値(読み出し時)=ARADDR+ARLEN−1
Lower address limit (when writing) = AWADDR
Address upper limit value (when writing) = AWADDR + AWLEN-1
Address lower limit (when reading) = ARADDR
Address upper limit value (when reading) = ARADDR + ARLEN-1

次にアクセス解析部1205は、ステップS222で設定した監視対象アドレスが、ステップS402で算出したアドレス範囲内に含まれているか否かを判定する(S403)。監視対象アドレスがアドレス範囲内に含まれていない場合、ステップS401へ戻り次のアクセスが発生するまで待機する。監視対象がアドレス範囲内に含まれている場合、アクセス解析部1205は最終データが受信されるまで待機し(S404)、受信が確認された後本フローを終了する。最終データ受信の判定は、次の式で行う。   Next, the access analysis unit 1205 determines whether or not the monitoring target address set in step S222 is included in the address range calculated in step S402 (S403). If the monitoring target address is not included in the address range, the process returns to step S401 and waits until the next access occurs. When the monitoring target is included in the address range, the access analysis unit 1205 waits until the final data is received (S404), and ends the flow after the reception is confirmed. The final data reception is determined by the following equation.

最終データ受信判定(書き込み時)=WVALID&&WREADY&&WLAST
最終データ受信判定(読み出し時)=RVALID&&RREADY&&RLAST
Final data reception determination (during writing) = WVALID && WREADY && WLAST
Final data reception determination (when reading) = RVALID && RREADY && RLAST

以上説明したように、本発明の第1の実施形態のデータ処理装置によれば、DMA転送完了時に制御部の介在なく、対向に接続されている集積回路に対して割り込みを発生させることが可能となる。それにより、複数の集積回路がPCIeバスに接続されている構成において、対向デバイスへデータの転送が完了したことを高速に通知することが可能となり、より高速なデータ処理が可能となる。   As described above, according to the data processing apparatus of the first embodiment of the present invention, it is possible to generate an interrupt to the integrated circuits connected in the opposite direction without the intervention of the control unit when the DMA transfer is completed. It becomes. As a result, in a configuration in which a plurality of integrated circuits are connected to the PCIe bus, it is possible to notify the opposite device that data transfer has been completed at high speed, thereby enabling higher-speed data processing.

なお、第1の実施形態では、集積回路1100から集積回路1200へのデータ転送を行う例について説明したが、集積回路1200から集積回路1100へのデータ転送時についても同様の手順を用いて、DMAの転送完了を通知する事が出来る。ゆえに、第1の実施形態においては、PCIe制御部のRCやEPの設定に依存しない。   In the first embodiment, an example of performing data transfer from the integrated circuit 1100 to the integrated circuit 1200 has been described. However, a similar procedure is used for data transfer from the integrated circuit 1200 to the integrated circuit 1100 to perform DMA transfer. The transfer completion can be notified. Therefore, the first embodiment does not depend on the setting of RC or EP of the PCIe control unit.

また、第1の実施形態では、ステップS221においてアクセス解析部1205がアドレス変換処理を行う構成について説明した。しかし、PCIeバスのメモリマップとローカルバスのメモリマップが同一になるようにアドレス変換部1213に対して設定を行う事により、アドレス変換処理S221を省略し、外部バスアドレスをそのまま監視対象アドレスとして設定する事も、本発明の第1の実施形態の派生として含まれる。   In the first embodiment, the configuration in which the access analysis unit 1205 performs the address conversion process in step S221 has been described. However, by setting the address conversion unit 1213 so that the memory map of the PCIe bus and the memory map of the local bus are the same, the address conversion processing S221 is omitted, and the external bus address is set as the monitoring target address as it is. This is also included as a derivation of the first embodiment of the present invention.

また、第1の実施形態では、最終アドレス計算処理と最終アドレス通知処理をDMA制御部1102で行う例について説明したが、最終アドレス計算処理と最終アドレス通知処理は制御部1101で行う事も、本発明の第1の実施形態の派生として含まれる。その場合は、ステップS221で行う最終アドレス変換処理も制御部1101で行ってもよい。   In the first embodiment, the example in which the final address calculation process and the final address notification process are performed by the DMA control unit 1102 has been described. However, the final address calculation process and the final address notification process may be performed by the control unit 1101. Included as a derivation of the first embodiment of the invention. In that case, the final address conversion process performed in step S221 may also be performed by the control unit 1101.

[実施例2]
本発明の第1の実施形態においては、DMA制御部1102が単一のDMA転送によって制御される例を示したが、第2の実施形態では、DMA制御部1102が複数のDMA転送を連続して行う、所謂チェーン転送動作により制御される例について説明する。なお、第1の実施形態と同一のしょりを行う部分は同一の記号で示し、説明を省略する。
[Example 2]
In the first embodiment of the present invention, an example is shown in which the DMA control unit 1102 is controlled by a single DMA transfer. However, in the second embodiment, the DMA control unit 1102 continuously performs a plurality of DMA transfers. An example controlled by a so-called chain transfer operation will be described. In addition, the part which performs the same process as 1st Embodiment is shown with the same symbol, and description is abbreviate | omitted.

図5は、本発明の第2の実施形態におけるDMA転送設定の内容を示す表である。図3で示したDMA制御部に対してのDMA設定内容(PCIeバスアドレス、内部バスアドレス、転送データサイズ、転送方向)に加えて、DMA制御部に対する次のDMA設定へのポインタと、次の設定内容が存在するか否かを設定する。DMA制御部は、本DMA設定内容を解析し、次のDMA設定が存在する場合は、メモリ制御部を通して次のDMA設定を取得する。   FIG. 5 is a table showing the contents of the DMA transfer settings in the second embodiment of the present invention. In addition to the DMA setting contents (PCIe bus address, internal bus address, transfer data size, transfer direction) for the DMA control unit shown in FIG. 3, a pointer to the next DMA setting for the DMA control unit, Sets whether the setting contents exist. The DMA control unit analyzes the contents of this DMA setting, and if the next DMA setting exists, acquires the next DMA setting through the memory control unit.

図6は、本発明の第2の実施形態におけるDMA転送処理を示すフローチャートである。まず、制御部1101は、メモリ1104に対して図5で示したDMA転送設定を書き込む(S601)。また、制御部1101は、DMA制御部1102に対して、ステップS601で書きこんだDMA転送設定のうち、最初のDMA転送設定が格納されているメモリ1104上のアドレスを設定する(S602)。その後、DMA制御部に対してDMA転送開始指示を行う(S202)。   FIG. 6 is a flowchart showing a DMA transfer process in the second embodiment of the present invention. First, the control unit 1101 writes the DMA transfer setting shown in FIG. 5 in the memory 1104 (S601). Further, the control unit 1101 sets an address on the memory 1104 in which the first DMA transfer setting is stored among the DMA transfer settings written in step S601 to the DMA control unit 1102 (S602). Thereafter, a DMA transfer start instruction is issued to the DMA controller (S202).

DMA制御部1102は、制御部1101からのDMA転送開始指示を受け取ると、メモリ1104からDMA転送設定を、ステップS602で設定されたアドレスから取得する(S611)。次に、取得したDMA転送設定を解析し、取得したDMA転送設定が最終のDMA転送設定か否かを確認する(S612)。取得したDMA転送設定が、最終のDMA転送設定でない場合は、本DMA転送設定から算出される最終アドレスがDMAの完了時に発生するものと異なるため、最終アドレス計算処理(S211)と最終アドレス通知処理を行わずに、ステップS213へ進む。   When receiving the DMA transfer start instruction from the control unit 1101, the DMA control unit 1102 acquires the DMA transfer setting from the memory 1104 from the address set in step S602 (S611). Next, the acquired DMA transfer setting is analyzed, and it is confirmed whether or not the acquired DMA transfer setting is the final DMA transfer setting (S612). If the acquired DMA transfer setting is not the final DMA transfer setting, the final address calculated from this DMA transfer setting is different from that generated at the completion of DMA, so the final address calculation process (S211) and the final address notification process Without proceeding to step S213.

ステップS612で取得したDMA転送設定が、最終のDMA転送設定である場合は、DMAデータを送受信する前に最終アドレスを設定しなければならないため、アクセス解析部1205に対して最終アドレスを算出して通知する(S211、S212)。DMA制御部1102は、DMAデータの転送を行ったあと(S213、S214)、再度現在のDMA転送設定が最終のDMA転送設定であるか否かを確認する(S613)。最終のDMA転送設定でない場合はS611へと戻り、次のDMA転送設定を取得する。最終のDMA転送設定である場合は、DMA制御部1102は動作を終了する。   If the DMA transfer setting acquired in step S612 is the final DMA transfer setting, the final address must be set before sending / receiving the DMA data, so the access analysis unit 1205 calculates the final address. Notification is made (S211, S212). After transferring the DMA data (S213, S214), the DMA control unit 1102 confirms again whether or not the current DMA transfer setting is the final DMA transfer setting (S613). If it is not the final DMA transfer setting, the process returns to S611 to acquire the next DMA transfer setting. If it is the final DMA transfer setting, the DMA control unit 1102 ends the operation.

以上説明したように、本発明の第2の実施形態のデータ処理装置によれば、チェーン転送として動作するDMA転送を利用したとしても、対向に接続されている制御部に対して適切な割り込みを発生させることが可能となる。それにより、複数の集積回路がPCIeバスに接続されている構成において、対向デバイスへデータの転送が完了したことを高速に通知することが可能となり、より高速なデータ処理が可能となる。   As described above, according to the data processing device of the second exemplary embodiment of the present invention, even when the DMA transfer that operates as the chain transfer is used, an appropriate interrupt is given to the control unit connected to the opposite side. Can be generated. As a result, in a configuration in which a plurality of integrated circuits are connected to the PCIe bus, it is possible to notify the opposite device that data transfer has been completed at high speed, thereby enabling higher-speed data processing.

なお、第2の実施形態では、集積回路1100から集積回路1200へのデータ転送を行う例について説明したが、集積回路1200から集積回路1100へのデータ転送時についても同様の手順を取ることで、DMAの転送完了を通知する事が出来る。ゆえに、第2の実施形態においては、PCIe制御部のRCやEPの設定に依存しない。   In the second embodiment, an example of performing data transfer from the integrated circuit 1100 to the integrated circuit 1200 has been described. However, by taking the same procedure at the time of data transfer from the integrated circuit 1200 to the integrated circuit 1100, The completion of DMA transfer can be notified. Therefore, the second embodiment does not depend on the setting of RC or EP of the PCIe control unit.

また、第2の実施形態では、ステップS221においてアクセス解析部1205がアドレス変換処理を行う構成について説明した。しかし、PCIeバスのメモリマップとローカルバスのメモリマップが同一になるようにアドレス変換部1213に対して設定を行う事により、アドレス変換処理S221を省略し、外部バスアドレスをそのまま監視対象アドレスとして設定する事も、本発明の第2の実施形態の派生として含まれる。   In the second embodiment, the configuration in which the access analysis unit 1205 performs the address conversion process in step S221 has been described. However, by setting the address conversion unit 1213 so that the memory map of the PCIe bus and the memory map of the local bus are the same, the address conversion processing S221 is omitted, and the external bus address is set as the monitoring target address as it is. This is also included as a derivation of the second embodiment of the present invention.

また、第2の実施形態では、最終アドレス計算処理と最終アドレス通知処理をDMA制御部1102で行う例について説明したが、最終アドレス計算処理と最終アドレス通知処理は制御部1101で行う事も、本発明の第2の実施形態の派生として含まれる。その場合は、ステップS221で行う最終アドレス変換処理も制御部1101で行ってもよい。   In the second embodiment, the example in which the final address calculation process and the final address notification process are performed by the DMA control unit 1102 has been described. However, the final address calculation process and the final address notification process may be performed by the control unit 1101. Included as a derivation of the second embodiment of the invention. In that case, the final address conversion process performed in step S221 may also be performed by the control unit 1101.

[実施例3]
次に、本発明の第3の実施形態として、外部バスにPCIバスを利用する構成においての例を説明する。なお、第1の実施形態、第2の実施形態と同一の処理を行う部分は同一の記号で示し、説明を省略する。
[Example 3]
Next, as a third embodiment of the present invention, an example in a configuration using a PCI bus for an external bus will be described. In addition, the part which performs the same process as 1st Embodiment and 2nd Embodiment is shown with the same symbol, and description is abbreviate | omitted.

図7は、本発明の第3の実施形態におけるデータ処理装置を示すブロック図である。第3の実施形態では集積回路1100と集積回路1200はPCIバス7300により接続される。   FIG. 7 is a block diagram showing a data processing apparatus according to the third embodiment of the present invention. In the third embodiment, the integrated circuit 1100 and the integrated circuit 1200 are connected by a PCI bus 7300.

PCI制御部7110、7220には、コマンド解析設定部7112、7212、アドレス変換部7113、7213、設定通知レジスタ部7114、7214が含まれる。コマンド解析部7112、7212は、PCIバス7300を経由して伝送されたバス信号を解析し、コマンドに応じてバスのデータを各部へ転送する。PCIにおいては、大きく分けるとコンフィギュレーショントランザクション、メモリトランザクション、I/Oトランザクションの3種類のコマンドが定義されている。   The PCI control units 7110 and 7220 include command analysis setting units 7112 and 7212, address conversion units 7113 and 7213, and setting notification register units 7114 and 7214. The command analysis units 7112 and 7212 analyze the bus signal transmitted via the PCI bus 7300 and transfer the bus data to each unit according to the command. In PCI, three types of commands are defined: a configuration transaction, a memory transaction, and an I / O transaction.

そのうちメモリトランザクションとI/Oトランザクションは、コマンド解析設定部7112、7212により内部バス7107、7207に対してのコマンドに変換され、アドレス変換部7113、7213へ供給される。コンフィギュレーショントランザクションは、設定通知レジスタ部7114、7214へと転送される。   Among them, the memory transaction and the I / O transaction are converted into commands for the internal buses 7107 and 7207 by the command analysis setting units 7112 and 7212 and supplied to the address conversion units 7113 and 7213. The configuration transaction is transferred to setting notification register units 7114 and 7214.

アドレス変換部7113,7213は、コマンド解析部から送信された内部バスコマンドのアドレスを、PCIの規格に基づくBAR(Base Address Register)の設定や、それぞれのBAR空間のオフセットアドレス設定に基づき、外部バスアドレスから内部バスアドレスへと変換する。また、制御部1101、1201等からPCI制御部7110、7210へ供給される内部バスコマンドのアドレスを、BARの設定に基づき外侮バスアドレスへと変換する。   The address conversion units 7113 and 7213 use the BUS (Base Address Register) setting based on the PCI standard and the offset address setting of each BAR space to set the address of the internal bus command transmitted from the command analysis unit. Convert from address to internal bus address. Also, the address of the internal bus command supplied from the control units 1101 and 1201 to the PCI control units 7110 and 7210 is converted into an external bus address based on the BAR setting.

設定通知レジスタ部7114、7214は、PCI制御部7110、7210の各動作部に関する種々の設定を保持する。また、PCI制御部7110、7210の各動作部からの通知を保持し、その内容は制御部1101、1201等から参照される。   The setting notification register units 7114 and 7214 hold various settings related to the operation units of the PCI control units 7110 and 7210. Further, notifications from the respective operation units of the PCI control units 7110 and 7210 are held, and the contents are referred to by the control units 1101 and 1201 and the like.

図8は、本発明の第3の実施形態におけるDMA転送処理を示すフローチャートである。   FIG. 8 is a flowchart showing a DMA transfer process in the third embodiment of the present invention.

DMA制御部1102は制御部1101からの開始指示を受け取ると、まず最終アドレス計算処理を行う(S211)。次にDMA制御部1102は、PCIバス7300を経由して、アクセス解析部1205に対して最終外部バスアドレスを通知する(S812)。その後DMA制御部1102は、メモリ制御部1103を経由してメモリ1104にアクセスし、内部バスアドレスから転送データサイズ分の転送データを取得し(S213)、PCI制御部7110、PCIバス7300を経由して集積回路1200へデータを送信する(S814)。   When receiving a start instruction from the control unit 1101, the DMA control unit 1102 first performs final address calculation processing (S211). Next, the DMA control unit 1102 notifies the access analysis unit 1205 of the final external bus address via the PCI bus 7300 (S812). Thereafter, the DMA control unit 1102 accesses the memory 1104 via the memory control unit 1103, acquires transfer data corresponding to the transfer data size from the internal bus address (S213), and passes through the PCI control unit 7110 and the PCI bus 7300. Then, data is transmitted to the integrated circuit 1200 (S814).

PCI制御部は、PCIe制御部と、内部バスとの接続に関しての変更はない。そのため、ほとんどの手順において図2に示すPCIe制御部を利用する際のフローと同一のフローで、PCI制御部を利用してDMA転送の割り込みを通知する事が可能となる。   The PCI control unit is not changed in connection with the PCIe control unit and the internal bus. Therefore, it is possible to notify the DMA transfer interrupt using the PCI control unit in the same flow as that when using the PCIe control unit shown in FIG. 2 in most procedures.

以上説明したように、本発明の第3の実施形態のデータ処理装置によれば、DMA転送完了時に制御部の介在なく、対向に接続されている集積回路に対して割り込みを発生させることが可能となる。それにより、複数の集積回路がPCIバスに接続されている構成において、接続されているデバイスへデータの転送が完了したことを高速に通知することが可能となり、より高速なデータ処理が可能となる。   As described above, according to the data processing apparatus of the third embodiment of the present invention, it is possible to generate an interrupt to the integrated circuits connected in the opposite direction without the intervention of the control unit when the DMA transfer is completed. It becomes. As a result, in a configuration in which a plurality of integrated circuits are connected to the PCI bus, it is possible to notify the connected device that data transfer has been completed at high speed, thereby enabling faster data processing. .

なお、第3の実施形態では、集積回路1100から集積回路1200へのデータ転送を行う例について説明したが、集積回路1200から集積回路1100へのデータ転送時についても同様の手順を取ることで、DMAの転送完了を通知する事が出来る。ゆえに、第3の実施形態においては、PCIのデバイスやホストの設定には依存しない。   In the third embodiment, the example of performing data transfer from the integrated circuit 1100 to the integrated circuit 1200 has been described. However, by taking the same procedure for data transfer from the integrated circuit 1200 to the integrated circuit 1100, The completion of DMA transfer can be notified. Therefore, the third embodiment does not depend on the setting of the PCI device or host.

また、第3の実施形態では、ステップS221においてアクセス解析部1205がアドレス変換処理を行う構成について説明した。しかし、PCIバスのメモリマップとローカルバスのメモリマップが同一になるようにアドレス変換部1213に対して設定を行う事により、アドレス変換処理S221を省略し、外部バスアドレスをそのまま監視対象アドレスとして設定する事も、本発明の第3の実施形態の派生として含まれる。   In the third embodiment, the configuration in which the access analysis unit 1205 performs the address conversion process in step S221 has been described. However, by setting the address conversion unit 1213 so that the memory map of the PCI bus and the memory map of the local bus are the same, the address conversion processing S221 is omitted, and the external bus address is set as the monitoring target address as it is. This is also included as a derivation of the third embodiment of the present invention.

また、第3の実施形態では、最終アドレス計算処理と最終アドレス通知処理をDMA制御部1102で行う例について説明したが、最終アドレス計算処理と最終アドレス通知処理は制御部1101で行う事も、本発明の第3の実施形態の派生として含まれる。その場合は、ステップS221で行う最終アドレス変換処理も制御部1101で行ってもよい。   In the third embodiment, an example in which the final address calculation process and the final address notification process are performed by the DMA control unit 1102 has been described. However, the final address calculation process and the final address notification process may be performed by the control unit 1101. Included as a derivation of the third embodiment of the invention. In that case, the final address conversion process performed in step S221 may also be performed by the control unit 1101.

1000 データ処理装置
1100、1200 集積回路
1101、1201 制御部
1102、1202 DMA制御部
1000 Data processing device 1100, 1200 Integrated circuit 1101, 1201 Control unit 1102, 1202 DMA control unit

Claims (8)

第1の制御部、第1のDMA制御部、外部バスと内部バスとを変換する第1の外部バス変換部とを持つ第1のシステムと、
第2の制御部、第2のDMA制御部、外部バスと内部バスとを変換する第2の外部バス変換部とを持つ第2のシステムと、を有し、
前記第1のシステムと前記第2のシステムが、前記内部バス上のアドレス空間へアクセス可能な外部バスで相互に接続され、
前記第1のシステムは、前記第2のシステムより前記外部バスを経由して通知される第2のDMA制御部が転送するデータの最終アドレスと、前記第1の外部バス制御部の出力する内部バスアドレスとを比較し、その結果に応じて前記第1の制御部へ割り込みを通知する第1のアドレス判定部を有することを特徴とするデータ処理装置。
A first system having a first control unit, a first DMA control unit, and a first external bus conversion unit for converting an external bus and an internal bus;
A second system having a second control unit, a second DMA control unit, and a second external bus conversion unit for converting the external bus and the internal bus,
The first system and the second system are interconnected by an external bus accessible to an address space on the internal bus;
The first system includes a final address of data transferred by the second DMA controller notified from the second system via the external bus, and an internal output from the first external bus controller. A data processing apparatus comprising: a first address determination unit that compares a bus address and notifies an interrupt to the first control unit according to the result.
前記第1のアドレス判定部は、前記第1の外部バス制御部の出力する内部バスへの書き込みアドレスを監視し、前記最終アドレスへのアクセスが発生する時に割り込みを通知することを特徴とする請求項1に記載のデータ処理装置。   The first address determination unit monitors a write address to the internal bus output from the first external bus control unit, and notifies an interrupt when an access to the final address occurs. Item 4. The data processing device according to Item 1. 前記内部バスはバースト転送に対応し、
前記第1のアドレス判定部は、前記第1の外部バス制御部の出力する内部バスへの書き込みアドレスとバースト長を監視し、前記最終アドレスへのアクセスがバースト転送内に存在することを判定することを特徴とする請求項1に記載のデータ処理装置。
The internal bus supports burst transfer,
The first address determination unit monitors the write address and burst length to the internal bus output from the first external bus control unit, and determines that access to the final address exists in burst transfer. The data processing apparatus according to claim 1.
前記最終アドレスは、前記第2のDMA制御部によるデータの転送開始前に、前記第2のDMA制御部により前記第1のアドレス判定部へ通知されることを特徴とする請求項1に記載のデータ処理装置。   2. The last address is notified to the first address determination unit by the second DMA control unit before starting the data transfer by the second DMA control unit. Data processing device. 前記最終アドレスは、前記第2のDMA制御部によるデータの転送開始前に、前記第2の制御部により前記第1のアドレス判定部へ通知されることを特徴とする請求項1に記載のデータ処理装置。   2. The data according to claim 1, wherein the final address is notified to the first address determination unit by the second control unit before starting data transfer by the second DMA control unit. 3. Processing equipment. 前記第2のDMA制御部はディスクリプタによるチェーン転送を行い、
前記第2のDMA制御部は、前記最終アドレスを、最後のディスクリプタ情報より生成することを特徴とする請求項1に記載のデータ処理装置。
The second DMA control unit performs chain transfer using a descriptor,
The data processing apparatus according to claim 1, wherein the second DMA control unit generates the final address from last descriptor information.
前記外部バスは、PCI Express規格に準拠したバスであることを特徴とする請求項1乃至6のいずれか1項に記載のデータ処理装置。   The data processing apparatus according to claim 1, wherein the external bus is a bus that conforms to a PCI Express standard. 前記外部バスは、PCI規格に準拠したバスであることを特徴とする請求項1乃至6のいずれか1項に記載のデータ処理装置。   The data processing apparatus according to claim 1, wherein the external bus is a bus conforming to a PCI standard.
JP2016228442A 2016-11-25 2016-11-25 Data processing device Pending JP2018085003A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016228442A JP2018085003A (en) 2016-11-25 2016-11-25 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016228442A JP2018085003A (en) 2016-11-25 2016-11-25 Data processing device

Publications (1)

Publication Number Publication Date
JP2018085003A true JP2018085003A (en) 2018-05-31

Family

ID=62238462

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016228442A Pending JP2018085003A (en) 2016-11-25 2016-11-25 Data processing device

Country Status (1)

Country Link
JP (1) JP2018085003A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023015551A1 (en) * 2021-08-13 2023-02-16 深圳市大疆创新科技有限公司 Communication method and apparatus, and electronic device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023015551A1 (en) * 2021-08-13 2023-02-16 深圳市大疆创新科技有限公司 Communication method and apparatus, and electronic device

Similar Documents

Publication Publication Date Title
CN110196824B (en) Method and device for realizing data transmission and electronic equipment
JP2008090375A (en) Interrupt control system and storage control system using the same
CN108733600B (en) Electronic system with direct memory access controller and method of operating the same
JP4198376B2 (en) Bus system and information processing system including bus system
JP2018085003A (en) Data processing device
WO2012081085A1 (en) Interrupt source management device and interrupt processing system
CN114185835A (en) System on chip and method for adjusting voltage and frequency
US9785556B2 (en) Cross-die interface snoop or global observation message ordering
JP6146508B1 (en) Synchronous processing unit, device, system and method
US8645602B2 (en) Microcomputer
KR102333544B1 (en) An interrupt-driven i/o arbiter for a microcomputer system
JP2006092077A (en) Bus system
US11216398B2 (en) USB device and data transfer method thereof
US20100153610A1 (en) Bus arbiter and bus system
CA2282166C (en) Method and apparatus for bridging a digital signal processor to a pci bus
JP4249741B2 (en) Bus system and information processing system including bus system
JP2005182299A (en) Device for monitoring pci bus
JP6542513B2 (en) USB transfer device, USB transfer system and USB transfer method
CN115328827A (en) PCIE (peripheral component interface express) -based storage system and method and electronic equipment
CN113821470A (en) Bus device, embedded system and system on chip
JP2007072685A (en) Data transfer device and information processor
JP2018032320A (en) Bus system and bus system control method
JP2009169501A (en) Data transfer device
JP2006139474A (en) Bus transfer device
JP2005228188A (en) Information processing system