JP2010191682A - Apparatus, method and program for processing information controlling computing system - Google Patents

Apparatus, method and program for processing information controlling computing system Download PDF

Info

Publication number
JP2010191682A
JP2010191682A JP2009035347A JP2009035347A JP2010191682A JP 2010191682 A JP2010191682 A JP 2010191682A JP 2009035347 A JP2009035347 A JP 2009035347A JP 2009035347 A JP2009035347 A JP 2009035347A JP 2010191682 A JP2010191682 A JP 2010191682A
Authority
JP
Japan
Prior art keywords
time
calculation
processing
executed
desynchronization
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.)
Granted
Application number
JP2009035347A
Other languages
Japanese (ja)
Other versions
JP5300523B2 (en
Inventor
Keisuke Mera
恵介 米良
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2009035347A priority Critical patent/JP5300523B2/en
Publication of JP2010191682A publication Critical patent/JP2010191682A/en
Application granted granted Critical
Publication of JP5300523B2 publication Critical patent/JP5300523B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To avoid a processing load increase, when executing hardware computation processings. <P>SOLUTION: An apparatus includes an HW calculating portion 120 for executing operations by a synchronous system or asynchronous system; a delay time calculating portion 105 for calculating a delay time to the completion of a requested operation requested for execution in the HW calculating portion 120; a computing system decision part 102 for comparing the sum of processing and delay times in the execution of a queued operation requested for the next execution in the HW calculating portion 120, with a asynchronization time indicating the processing time of processing, executed in conjunction with the asynchronous system. If the sum is larger than the asynchronization time, decision to execute the queued calculation by the asynchronous system, and a calculation control part 103 for requesting the HW calculating portion 120 for executing the queued calculation by the decided execution system. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、プロセッサユニットに対する負荷を低減可能な非同期方式と同期方式とによりハードウェア演算処理を制御して情報を処理する装置、方法、およびプログラムに関する。   The present invention relates to an apparatus, a method, and a program for processing information by controlling hardware arithmetic processing using an asynchronous method and a synchronous method capable of reducing a load on a processor unit.

近年、政府機関や企業、教育機関、家庭などで広帯域ネットワークが普及し、情報漏洩やデータ改竄防止のためのネットワークセキュリティへの関心が高まっている。通信路を介して転送される通信データは、暗号化技術やメッセージ認証(ダイジェスト認証、ハッシュ認証、HMAC(Keyed・Hashing for Message Authentication code)認証)技術を用いることで、盗聴や改ざんを防ぎ、セキュリティの向上を図ることができる。   In recent years, broadband networks have become widespread in government agencies, companies, educational institutions, homes, etc., and interest in network security for preventing information leakage and data tampering has increased. Communication data transferred via the communication path uses encryption technology and message authentication (digest authentication, hash authentication, HMAC (Keyed / Hashing for Message Authentication code) authentication) technology to prevent eavesdropping and tampering, and security Can be improved.

通信データのセキュリティ向上を図るための通信プロトコルの代表的なものとして、IETF(Internet Engineering Task Force)によって規定されているIPsecやTLS(Transport Layer Security)、IEEE(The Institute of Electrical and Electronics Engineers, Inc.)によって規定されているWEP(Wired Equivalent Privacy)などが挙げられる。また、著作物の不正な複製の防止や、個人情報や営業機密情報、国家の防衛に関する機密情報の不正流出を防ぐためにも暗号化技術が用いられている。   As representative communication protocols for improving the security of communication data, IPsec, TLS (Transport Layer Security), and IEEE (The Institute of Electrical Engineering) specified by IETF (Internet Engineering Task Force). .)) And WEP (Wired Equivalent Privacy) defined by. Encryption technology is also used to prevent unauthorized duplication of copyrighted works and to prevent unauthorized disclosure of personal information, confidential business information, and confidential information related to national defense.

また、近年、高精細・高音質を特徴とするデジタル放送やデジタル音楽配信などが普及している。デジタル音声データや画像データ、映像データなど各種デジタルデータは、データ圧縮技術を用いることで、記憶すべきデータ量の削減や、通信路の単位時間当たりのデータ転送容量が削減できる。特に、画像データや映像データの高精細化によってデータ量が増大しているため、圧縮技術は必須の技術となっている。   In recent years, digital broadcasting and digital music distribution characterized by high definition and high sound quality have become widespread. Various digital data such as digital audio data, image data, and video data can be reduced in data amount to be stored and data transfer capacity per unit time of a communication path by using a data compression technique. In particular, since the amount of data is increasing due to high definition of image data and video data, the compression technique is an indispensable technique.

デジタル画像データやデジタル映像データの代表的な圧縮技術としては、JPEG(Joint Photographic Experts Group)やMPEG(Moving Picture Experts Group)(登録商標)が挙げられる。デジタル音声データの代表的な圧縮技術としては、AAC(Advanced Audio Coding)(登録商標)や、MP3(MPEG・1 for Audio Layer・3)、ATRAC(Adaptive TRansform Acoustic Coding)(登録商標)が挙げられる。   Typical compression techniques for digital image data and digital video data include JPEG (Joint Photographic Experts Group) and MPEG (Moving Picture Experts Group) (registered trademark). Typical compression techniques for digital audio data include AAC (Advanced Audio Coding) (registered trademark), MP3 (MPEG-1 for Audio Layer-3), and ATRAC (Adaptive Transform Acoustic Coding) (registered trademark). .

以上のような暗号化やデータ圧縮処理などの演算処理は、汎用のコンピュータ装置に備えられた汎用のPU(Processing Unit)上で、演算するための命令列(プログラム)を実行することで実現することが多い。ところが、この方法では、データ量や通信データ速度の増大に伴い、単位時間あたりに処理すべきデータ量が増大し、汎用のPU上で行う演算処理の負荷が増大することになる。   Arithmetic processing such as encryption and data compression processing as described above is realized by executing an instruction sequence (program) for calculation on a general-purpose PU (Processing Unit) provided in a general-purpose computer device. There are many cases. However, with this method, the amount of data to be processed per unit time increases as the amount of data and the communication data rate increase, and the processing load on the general-purpose PU increases.

このような問題に対しては、汎用 のPUとは別に特定の演算処理を行うための装置(以降、HW演算装置という)を、汎用のコンピュータ装置内に搭載することで、PUによる演算処理負荷を削減することが可能となっている。このように演算処理をHW演算装置で実行することを、ハードウエアオフローディング処理またはハードウェア演算処理と呼ぶことが多い。   To solve this problem, a device for performing specific arithmetic processing (hereinafter referred to as an HW arithmetic device) separately from the general-purpose PU is installed in the general-purpose computer device, so that the arithmetic processing load by the PU is reduced. Can be reduced. The execution of arithmetic processing by the HW arithmetic device in this way is often referred to as hardware offloading processing or hardware arithmetic processing.

ハードウェア演算処理に関して、特許文献1および特許文献2では、暗号化処理やデータ圧縮処理などの演算処理について、HW演算装置またはPUのいずれか処理の速い方で実行するために、ソフトウエア演算処理とハードウェア演算処理とを切り替える技術が提案されている。   With regard to hardware arithmetic processing, in Patent Document 1 and Patent Document 2, software arithmetic processing is performed in order to execute arithmetic processing such as encryption processing or data compression processing in the faster one of the HW arithmetic device or the PU. And a technique for switching between hardware arithmetic processing.

一方、汎用PU上で動作するプログラムからHW演算装置を制御する方式は、同期方式と非同期方式二つに分類することができる。同期方式とは、汎用PU上で動作するプログラムからHW演算装置に演算処理を依頼した際に、HW演算装置による処理の終了を待つ処理(以下、HW演算終了待ち処理という)を行う方式をいう。同期方式は、HW演算装置で演算処理を行うプログラムで多く採用されている。   On the other hand, the method of controlling the HW arithmetic device from a program operating on a general-purpose PU can be classified into two types: a synchronous method and an asynchronous method. The synchronous method is a method of performing processing for waiting for the end of processing by the HW arithmetic device (hereinafter referred to as HW arithmetic end waiting processing) when a calculation process is requested from the program operating on the general-purpose PU to the HW arithmetic device. . The synchronization method is often used in programs that perform arithmetic processing with an HW arithmetic device.

また、非同期方式とは、HW演算装置による処理の終了を待たずに、ハードウェア演算処理までの処理(以下、前処理という)と、ハードウェア演算処理より後の処理(以下、後処理という)が分割して実行される方式をいう。非同期方式では、ハードウエア演算処理前後で処理が分割して実行されるため、前処理が保持しているデータ(例:ハードウェア演算処理に関するパラメータ、ハードウェア演算処理を行う対象のデータ)を後処理に伝えるための処理(以下、非同期化処理という)が必要となる。非同期化処理の例としては、前処理が保持しているデータのうちすべてまたは一部を後処理に渡す、または前処理が保持しているデータのうちすべてまたは一部のデータのメモリアドレスを後処理に渡すという作業が挙げられる。   In addition, the asynchronous method means that processing up to hardware arithmetic processing (hereinafter referred to as pre-processing) and processing after hardware arithmetic processing (hereinafter referred to as post-processing) without waiting for completion of processing by the HW arithmetic device. Is a method that is executed in a divided manner. In the asynchronous method, processing is divided and executed before and after hardware operation processing, so the data held by the preprocessing (eg, parameters related to hardware operation processing, data subject to hardware operation processing) Processing (hereinafter referred to as desynchronization processing) is required to communicate to the processing. As an example of desynchronization processing, all or part of the data held by the preprocessing is passed to the postprocessing, or the memory address of all or part of the data held by the preprocessing is updated The work of passing to processing is mentioned.

非同期方式の具体的な実施例として、非特許文献1では、暗号化・復号を行うHW演算装置を非同期方式で制御するためのプログラムについて述べられている。しかし、現状では、非同期方式を採用した例は同期方式と比較して少ない。   As a specific example of the asynchronous system, Non-Patent Document 1 describes a program for controlling an HW arithmetic unit that performs encryption / decryption in an asynchronous system. However, at present, there are few examples that adopt the asynchronous method compared to the synchronous method.

また、非同期方式と類似の方式として、特許文献3では、メモリアクセス競合などで待ち時間イベントが発生したら、スレッドの優先度を変更して、別のスレッドへ切り替えるという方式について述べられている。しかし、切り替えを実行することによる処理時間(非同期方式では、非同期化処理にかかる時間を表す「非同期化時間」に相当)の増加が考慮されていない。   Further, as a method similar to the asynchronous method, Patent Document 3 describes a method in which when a waiting time event occurs due to memory access contention or the like, the priority of a thread is changed to switch to another thread. However, an increase in processing time (corresponding to “asynchronization time” representing the time required for desynchronization processing in the asynchronous method) due to execution of switching is not considered.

特開2006−7638号公報JP 2006-7638 A 特開2004−180253号公報JP 2004-180253 A 特許第3714598号公報Japanese Patent No. 3714598

A.D.Keromytis et al., “The Design of the OpenBSD Cryptographic Framework”,2003 USENIX Annual Technical Conference,USENIX Association,2003A. D. Keromytis et al. , “The Design of the OpenBSD Cryptographic Framework”, 2003 USENIX Annual Technical Conference, USENIX Association, 2003

しかしながら、演算処理の種類によっては、非同期方式によるHW演算装置の制御が適さない場合がある。例えば、同期方式におけるHW演算終了待ち処理がPUで実行される時間よりも、非同期方式における非同期化処理がPUで実行される時間のほうが長い場合は、同期方式でHW演算装置を制御したほうがPUに対する負荷が減ることになる。   However, depending on the type of arithmetic processing, control of the HW arithmetic device by an asynchronous method may not be suitable. For example, if the time during which the asynchronous processing in the asynchronous method is executed in the PU is longer than the time in which the processing for waiting for the completion of the HW calculation in the synchronous method is executed in the PU, it is better to control the HW arithmetic device in the synchronous method. The load on will be reduced.

さらに別の例として、HW演算が実行開始されるまでに遅延時間が生じ、非同期化処理が実行される時間よりもその遅延時間のほうが長い場合も、同期方式でHW演算装置を制御したほうがPUに対する負荷が減ることになる。   As yet another example, when a delay time occurs until the execution of the HW calculation is started and the delay time is longer than the time when the desynchronization process is executed, it is more likely that the HW calculation device is controlled in a synchronous manner. The load on will be reduced.

すなわち、PUに対する負荷を減らすために非同期方式でHW演算装置を制御するよう設計された装置であっても、かえってPUに対する負荷を増大させる場合があるという問題があった。   That is, there is a problem that even if the device is designed to control the HW arithmetic device in an asynchronous manner in order to reduce the load on the PU, the load on the PU may be increased.

本発明は、上記に鑑みてなされたものであって、ハードウェア演算処理を実行する場合の処理負荷の増加を回避することができる装置、方法およびプログラムを提供することを目的とする。   The present invention has been made in view of the above, and an object of the present invention is to provide an apparatus, a method, and a program that can avoid an increase in processing load when executing hardware arithmetic processing.

上述した課題を解決し、目的を達成するために、本発明は、予め定められた演算を要求した処理が前記演算の終了と同期して実行される同期方式、および、前記処理が前記演算の終了と非同期に実行される非同期方式、のいずれかの実行方式で前記演算を実行する演算回路と、前記演算回路で実行することを要求された前記演算を表す要求済み演算が終了するまでの時間を表す遅延時間を算出する遅延時間算出部と、前記要求済み演算の次に実行が要求される前記演算を表す要求待ち演算を前記演算回路で実行するときの処理時間と前記遅延時間との和、および、前記非同期方式で前記要求待ち演算を実行するときに前記要求待ち演算に付随して実行される処理の処理時間を表す非同期化時間を比較し、前記和が前記非同期化時間より大きい場合に、前記非同期方式で前記要求待ち演算を実行することを決定する決定部と、決定された前記実行方式により前記要求待ち演算を実行することを前記演算回路に要求する制御部と、を備えたことを特徴とする。   In order to solve the above-described problems and achieve the object, the present invention provides a synchronization method in which a process that requests a predetermined operation is executed in synchronization with the end of the operation, and the process An operation circuit that executes the operation in any one of the execution methods of asynchronous and asynchronous execution, and a time until the requested operation that represents the operation that is requested to be executed by the operation circuit is completed A delay time calculation unit that calculates a delay time that represents the sum of a processing time and a delay time when the arithmetic circuit executes a request waiting operation that represents the operation that is requested to be executed next to the requested operation And, when executing the request wait operation in the asynchronous method, the desynchronization time representing the processing time of the process executed accompanying the request wait operation is compared, and the sum is greater than the desynchronization time A determination unit that determines to execute the request waiting operation in the asynchronous method, and a control unit that requests the arithmetic circuit to execute the request waiting operation in accordance with the determined execution method. It is characterized by that.

また、本発明は、上記装置で実行することができる方法およびプログラムである。   The present invention also relates to a method and a program that can be executed by the above apparatus.

本発明によれば、ハードウェア演算処理を実行する場合の処理負荷の増加を回避することができるという効果を奏する。   According to the present invention, it is possible to avoid an increase in processing load when executing hardware arithmetic processing.

図1は、第1の実施の形態にかかる通信装置を含む通信システムのネットワーク構成図である。FIG. 1 is a network configuration diagram of a communication system including a communication apparatus according to the first embodiment. 図2は、第1の実施の形態にかかる通信装置の構成を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration of the communication apparatus according to the first embodiment. 図3は、ハードウエアオフローディング処理を同期方式および非同期方式で実行した場合のタイムライン図である。FIG. 3 is a timeline diagram when the hardware offloading process is executed in a synchronous manner and an asynchronous manner. 図4は、第1の実施の形態における、処理時間を計測するためのテストシート例を示す図である。FIG. 4 is a diagram illustrating an example of a test sheet for measuring a processing time in the first embodiment. 図5は、第1の実施の形態における非同期化時間算出処理の全体の流れを示すフローチャートである。FIG. 5 is a flowchart illustrating an overall flow of the desynchronization time calculation process according to the first embodiment. 図6は、図5に示す非同期化時間算出処理で記録された時刻の関係を示す図である。FIG. 6 is a diagram showing the relationship of times recorded in the desynchronization time calculation process shown in FIG. 図7は、第1の実施の形態における、処理時間を計測するためのテストシート例を示す図である。FIG. 7 is a diagram illustrating an example of a test sheet for measuring a processing time in the first embodiment. 図8は、図7のテストシートを用いて計測された結果から得られたTsyncとTasyncをデータサイズごとにプロットしたグラフの一例を示す図である。FIG. 8 is a diagram illustrating an example of a graph in which Tsync and Tasync obtained from the results measured using the test sheet of FIG. 7 are plotted for each data size. 図9は、第1の実施の形態における通信処理の全体の流れを示すフローチャートである。FIG. 9 is a flowchart showing an overall flow of communication processing in the first embodiment. 図10は、第1の実施の形態における演算方式決定処理の全体の流れを示すフローチャートである。FIG. 10 is a flowchart showing the overall flow of the calculation method determination process in the first embodiment. 図11は、第1の実施の形態における演算方式決定部の判断結果を示す図である。FIG. 11 is a diagram illustrating a determination result of the calculation method determination unit in the first embodiment. 図12は、第2の実施の形態にかかる通信装置の構成を示すブロック図である。FIG. 12 is a block diagram illustrating a configuration of a communication apparatus according to the second embodiment. 図13は、第2の実施の形態における通信処理の全体の流れを示すフローチャートである。FIG. 13 is a flowchart illustrating an overall flow of communication processing according to the second embodiment. 図14は、フラグ領域の値を書き換える時刻と演算の処理時間等との関係を示す図である。FIG. 14 is a diagram showing the relationship between the time for rewriting the value of the flag area and the processing time of the calculation. 図15は、第2の実施の形態における演算方式決定処理の全体の流れを示すフローチャートである。FIG. 15 is a flowchart illustrating an overall flow of the calculation method determination process according to the second embodiment.

以下に添付図面を参照して、この発明にかかる情報を処理する装置、方法およびプログラムの最良な実施の形態を詳細に説明する。   Exemplary embodiments of an apparatus, a method, and a program for processing information according to the present invention will be explained below in detail with reference to the accompanying drawings.

(第1の実施の形態)
第1の実施の形態にかかる情報処理装置は、ハードウェアにより暗号化処理を実行するときに、暗号化するデータの属性(データサイズ)、および、実行中または実行待ちの演算処理が完了するまでの遅延時間に応じて、同期方式および非同期方式のいずれかの方式を採用する。
(First embodiment)
When the information processing apparatus according to the first embodiment executes encryption processing by hardware, the attribute of the data to be encrypted (data size) and the calculation processing being executed or waiting for execution are completed. Either the synchronous method or the asynchronous method is adopted according to the delay time.

なお、第1の実施の形態では、情報処理装置の一例として、IPsecプロトコルに従い通信処理を行う通信装置を用いた例について説明する。ただし、適用可能な装置はこのような通信処理を実行する通信装置に限られるものではなく、暗号化処理、データ圧縮処理など特定の演算をハードウェアにより実行する機能を備えた装置であれば、あらゆる装置に適用できる。   In the first embodiment, an example using a communication device that performs communication processing according to the IPsec protocol will be described as an example of the information processing device. However, applicable devices are not limited to communication devices that execute such communication processing, and devices that have a function of executing specific operations such as encryption processing and data compression processing by hardware, Applicable to any device.

図1は、第1の実施の形態にかかる通信装置100を含む通信システムのネットワーク構成図である。図1に示すように、第1の実施の形態の通信システムは、通信装置100と、通信相手である通信装置200とが、IPネットワーク300で接続された構成となっている。また、通信装置100および通信装置200は、それぞれ端末装置400および端末装置500に接続されている。   FIG. 1 is a network configuration diagram of a communication system including a communication device 100 according to the first embodiment. As shown in FIG. 1, the communication system according to the first embodiment has a configuration in which a communication device 100 and a communication device 200 that is a communication partner are connected via an IP network 300. Communication device 100 and communication device 200 are connected to terminal device 400 and terminal device 500, respectively.

通信装置100は、IPsecプロトコルに関するパケット処理やデータ処理を行う装置であり、暗号化処理等をハードウェアにより実行する機能を備えている。同図に示すように、通信装置100は、IPネットワーク300および端末装置400に対して、それぞれネットワークインタフェース130およびネットワークインタフェース131を介して接続する。   The communication device 100 is a device that performs packet processing and data processing related to the IPsec protocol, and has a function of executing encryption processing and the like by hardware. As shown in the figure, the communication device 100 is connected to the IP network 300 and the terminal device 400 via a network interface 130 and a network interface 131, respectively.

通信装置200は、通信装置100とIPsecプロトコルによって通信する装置である。端末装置400および端末装置500は、それぞれ、通信装置100および通信装置200を介してデータを送受信する装置である。   The communication device 200 is a device that communicates with the communication device 100 using the IPsec protocol. The terminal device 400 and the terminal device 500 are devices that transmit and receive data via the communication device 100 and the communication device 200, respectively.

次に、図2を参照して通信装置100の詳細な構成について説明する。図2は、第1の実施の形態にかかる通信装置100の構成を示すブロック図である。同図に示すように、通信装置100は、主なハードウェア構成として、PU110と、HW演算部120と、メモリ140と、ネットワークインタフェース130と、ネットワークインタフェース131と、を備えている。   Next, a detailed configuration of the communication apparatus 100 will be described with reference to FIG. FIG. 2 is a block diagram illustrating a configuration of the communication apparatus 100 according to the first embodiment. As shown in the figure, the communication apparatus 100 includes a PU 110, an HW calculation unit 120, a memory 140, a network interface 130, and a network interface 131 as main hardware configurations.

これらはすべて共有バス111に接続されており、共有バス111を介して相互にデータが受け渡される。なお、ネットワークインタフェース130、131は第1の実施の形態の例を示すために記載されたものであり、通信が必要ない場合には搭載されていなくてもよい。また、ネットワークインタフェースの個数は2つに限られるものではなく、処理内容等に応じて1つまたは3つ以上のネットワークインタフェースを搭載するように構成してもよい。   All of these are connected to the shared bus 111, and data is transferred to each other via the shared bus 111. Note that the network interfaces 130 and 131 are described to show an example of the first embodiment, and may not be installed when communication is not necessary. Further, the number of network interfaces is not limited to two, and one or three or more network interfaces may be mounted according to the processing contents.

HW演算部120は、暗号化・復号、データ圧縮・伸張などの特定の演算をハードウェアにより処理する演算回路である。例えば、HW演算部120は、特定の演算処理を行うために専用に作られたDSP(Digital Signal Processor)やASIC(Application Specific Integrated Circuit)などのデバイスや、特定の演算処理の命令列を記憶装置からロードして回路を構成するプログラマブルなデバイスなどによって構成することができる。   The HW operation unit 120 is an operation circuit that processes specific operations such as encryption / decryption and data compression / expansion by hardware. For example, the HW calculation unit 120 stores a device such as a DSP (Digital Signal Processor) or ASIC (Application Specific Integrated Circuit) dedicated to perform a specific calculation process, or a command sequence of a specific calculation process. It can be configured by a programmable device or the like that configures a circuit by loading from the above.

メモリ140は、PU110がデータ処理を行う際に、データ処理に関する命令列や、処理対象データを保存するRAM(Random Access Memory)などの記憶装置である。なお、メモリ140はRAMに限られるものではなく、メモリカード、光ディスク、HDD(Hard Disk Drive)などの一般的に利用されているあらゆる記憶媒体により構成することができる。   The memory 140 is a storage device such as a RAM (Random Access Memory) that stores instruction sequences related to data processing and data to be processed when the PU 110 performs data processing. Note that the memory 140 is not limited to the RAM, and can be configured by any commonly used storage medium such as a memory card, an optical disk, and an HDD (Hard Disk Drive).

ネットワークインタフェース130、131は、通信装置100が外部の装置とデータを送受信するためのデバイスである。ネットワークインタフェース130、131は、イーサネット(登録商標)、ISDN(Integrated Services Digital Network)(登録商標)、およびFAX Modemなどの有線通信用インタフェース、またはWiFi(Wireless Fidelity)(登録商標)(無線LAN)および携帯電話などの無線通信用インタフェースなど、一般的に利用されているあらゆるインタフェースにより構成できる。   The network interfaces 130 and 131 are devices for the communication apparatus 100 to transmit / receive data to / from an external apparatus. The network interfaces 130 and 131 are interfaces for wired communication such as Ethernet (registered trademark), ISDN (Integrated Services Digital Network) (registered trademark), and FAX Modem, or WiFi (Wireless Fidelity) (registered trademark) (wireless LAN) and It can be configured by any commonly used interface such as a wireless communication interface such as a cellular phone.

共有バス111は、PU110やメモリ140などのデバイス相互でデータの送受信を電磁的または光学的に行うための通信路である。   The shared bus 111 is a communication path for electromagnetically or optically transmitting / receiving data between devices such as the PU 110 and the memory 140.

PU110は、主なソフトウエア構成である処理時間算出部101、演算方式決定部102、演算制御部103、ネットワーク処理部104、および遅延時間算出部105に関する各タスクを実行するための装置である。   The PU 110 is a device for executing each task related to the processing time calculation unit 101, the calculation method determination unit 102, the calculation control unit 103, the network processing unit 104, and the delay time calculation unit 105, which are main software configurations.

処理時間算出部101は、演算方式決定部102がHW演算部120の処理で同期方式、非同期方式のいずれを選択するか判断する際の判断基準となる情報である非同期化時間を、実際のデータ処理の前に事前に算出する。非同期化時間とは、非同期方式により演算処理を実行するときに、当該演算処理に付随して実行される処理の処理時間をいう。言い換えると、非同期化時間は、上述のような非同期化処理を実行するために必要となるオーバーヘッドに相当する。   The processing time calculation unit 101 calculates the desynchronization time, which is information used as a criterion for determining whether the calculation method determination unit 102 selects the synchronous method or the asynchronous method in the processing of the HW calculation unit 120, as actual data Calculate in advance before processing. The desynchronization time refers to a processing time of a process that is executed in association with the arithmetic process when the arithmetic process is executed by the asynchronous method. In other words, the desynchronization time corresponds to the overhead required for executing the desynchronization process as described above.

非同期化時間を算出する非同期化時間算出処理は、同期方式選択時における処理時間の計測、非同期方式選択時における処理時間の計測、同期方式と非同期方式の計測結果を用いた非同期化時間算出のステップで構成される。非同期化時間算出処理の処理フローの詳細は後述する。   The desynchronization time calculation process that calculates the desynchronization time includes the processing time measurement when the synchronous method is selected, the processing time measurement when the asynchronous method is selected, and the desynchronization time calculation step using the measurement results of the synchronous method and the asynchronous method. Consists of. Details of the processing flow of the desynchronization time calculation process will be described later.

演算方式決定部102は、処理時間算出部101によって算出された判断基準(非同期化時間)等に基づいて、HW演算部120による演算の実行方式(以下、演算方式という)を、同期方式および非同期方式のいずれかに決定する。決定する方法の詳細は後述する。   The calculation method determination unit 102 determines a calculation execution method (hereinafter referred to as a calculation method) by the HW calculation unit 120 based on a determination criterion (asynchronization time) calculated by the processing time calculation unit 101, a synchronous method and an asynchronous method. Decide on one of the methods. Details of the determination method will be described later.

演算制御部103は、HW演算部120による暗号化・復号、データ圧縮・伸張などの特定の演算処理の実行を制御する。具体的には、演算制御部103は、ネットワーク処理部104から演算に関するパラメータを受け取り、受け取ったパラメータに従ってHW演算部120に処理を指示する。演算制御部103は、例えば、処理アルゴリズム、処理対象データのメモリ格納領域、および処理対象データサイズなどをパラメータとして受け取る。   The arithmetic control unit 103 controls execution of specific arithmetic processing such as encryption / decryption and data compression / decompression by the HW arithmetic unit 120. Specifically, the calculation control unit 103 receives parameters related to calculation from the network processing unit 104, and instructs the HW calculation unit 120 to perform processing according to the received parameters. The arithmetic control unit 103 receives, for example, a processing algorithm, a memory storage area of processing target data, a processing target data size, and the like as parameters.

ネットワーク処理部104は、アプリケーションやシステムの処理を実行する主たる部分であり、演算制御部103を用いて、処理の一部、またはすべてをHW演算部120に実行させる。第1の実施の形態は通信処理の例であるため、ネットワーク処理部104は、通信装置100と外部装置との間でデータを送受信するための各種処理を行う。例えば、ネットワーク処理部104は、ネットワークインタフェース130から受信したデータ(パケット)のヘッダ部分の解析や通信プロトコル処理、ネットワークインタフェース130、131から送信するためのデータ(パケット)のヘッダ部分の作成や通信プロトコル処理を行う。   The network processing unit 104 is a main part that executes application and system processing, and causes the HW calculation unit 120 to execute part or all of the processing using the calculation control unit 103. Since the first embodiment is an example of communication processing, the network processing unit 104 performs various processes for transmitting and receiving data between the communication device 100 and an external device. For example, the network processing unit 104 analyzes the header portion of data (packet) received from the network interface 130, performs communication protocol processing, creates the header portion of data (packet) to be transmitted from the network interfaces 130 and 131, and creates a communication protocol. Process.

遅延時間算出部105は、演算方式決定部102の依頼に応じて、現在時刻から、要求済み演算が終了する時刻までの時間を表す遅延時間を算出する。   The delay time calculation unit 105 calculates a delay time representing the time from the current time to the time when the requested calculation ends in response to a request from the calculation method determination unit 102.

なお、通信装置100は、PU110、メモリ140、およびHW演算部120のいずれか2つ以上をSystem on chip(SoC)などの半導体デバイスに搭載するように構成してもよい。   Note that the communication apparatus 100 may be configured to mount any two or more of the PU 110, the memory 140, and the HW calculation unit 120 on a semiconductor device such as a System on chip (SoC).

次に、図3を参照して、非同期化時間と、非同期化方式で演算を実行することによる効果を表す非同期化効果という概念について説明する。図3は、ハードウエアオフローディング処理を同期方式および非同期方式で実行した場合のタイムライン図である。   Next, with reference to FIG. 3, the concept of the desynchronization time and the desynchronization effect representing the effect of executing the operation in the desynchronization method will be described. FIG. 3 is a timeline diagram when the hardware offloading process is executed in a synchronous manner and an asynchronous manner.

前処理301は、PU110で実行されるソフトウエア処理からHW演算部120で実行される演算処理を呼び出すための処理である。例えば、ソフトウエア処理がIPsecトンネルモードにおけるパケット処理である場合は、IPsecパケットを受信してパケットを解析することを含む処理に相当する。   The pre-processing 301 is a process for calling a calculation process executed by the HW calculation unit 120 from a software process executed by the PU 110. For example, when the software process is a packet process in the IPsec tunnel mode, this corresponds to a process including receiving an IPsec packet and analyzing the packet.

後処理305は、HW演算部120で実行された演算処理の結果を受け取るための処理である。例えば、ソフトウエア処理がIPsecトンネルモードにおけるパケット処理である場合は、演算処理を施されたデータをIPsecパケットにカプセル化して所定のネットワークインタフェースからパケットを出力することを含む処理に相当する。   The post-processing 305 is a process for receiving the result of the arithmetic processing executed by the HW arithmetic unit 120. For example, when the software process is a packet process in the IPsec tunnel mode, this corresponds to a process including encapsulating the data subjected to the calculation process into an IPsec packet and outputting the packet from a predetermined network interface.

Tdelay302は、前処理301が、HW演算部120に対して、次に実行を要求する演算処理(要求待ち演算)の開始を要求した時点から、要求待ち演算がHW演算部120上で実行開始される時点までの時間(遅延時間)を指している。Tdelay302が0でない値を取る場合の例としては、HW演算部120上で既に要求された演算処理(要求済み演算)を実行している時間と前処理301が要求待ち演算の開始を要求する時点が重なった場合が考えられる。   In the Tdelay 302, the request wait calculation is started to be executed on the HW calculation unit 120 from the time when the pre-processing 301 requests the HW calculation unit 120 to start the next calculation process (request waiting calculation). This is the time (delay time) to the point in time. As an example of the case where Tdelay 302 takes a value other than 0, the time when the requested computation process (requested computation) is already executed on the HW computation unit 120 and the time when the pre-processing 301 requests the start of a request waiting computation It can be considered that they overlap.

Thw303は、前処理301が開始を要求する要求待ち演算をHW演算部120が実行するのに掛る時間を指している。   Thw 303 indicates the time required for the HW calculation unit 120 to execute the request wait calculation that the pre-processing 301 requests to start.

ポーリング処理304は、前処理301がHW演算部120に要求待ち演算の開始を要求した時点から、要求済み演算が終了するまで待機するための処理である。ポーリング処理304では、実行中の演算処理が終了したか否かを判別する処理を繰り返し実行することになる。この処理は同期方式のみに必要な処理であり、非同期方式ではこの処理は実行されない。   The polling process 304 is a process for waiting until the requested calculation is completed after the preprocessing 301 requests the HW calculation unit 120 to start the request waiting calculation. In the polling process 304, a process for determining whether or not the operation process being executed has been completed is repeatedly executed. This process is necessary only for the synchronous method, and this process is not executed in the asynchronous method.

非同期化処理311は、非同期方式でハードウエアオフローディング処理を実行する場合に、同期方式のようにポーリング処理304を実行せずに済むようにするために必要な処理を指している。具体例としては、前処理301が保持している一時的に必要な変数を後処理305でも利用可能にするためにメモリ140上の所定のアドレスに当該変数を記録する処理が例として挙げられる。   The desynchronization process 311 refers to a process necessary to eliminate the need to execute the polling process 304 as in the synchronous system when executing the hardware offloading process in an asynchronous system. As a specific example, a process of recording the variable at a predetermined address on the memory 140 so that the temporarily necessary variable held in the pre-processing 301 can be used in the post-processing 305 is given as an example.

非同期化効果312は、同期方式の場合にPU110上で実行される処理の処理時間と、非同期方式の場合にPU110上で実行される処理の処理時間との差を示している。非同期化効果312をGとすると、Gは以下の(1)式で表される。(1)式では、非同期化時間をTohと表している。
G=Tdelay+Thw−Toh ・・・(1)
The desynchronization effect 312 shows the difference between the processing time of processing executed on the PU 110 in the case of the synchronous method and the processing time of processing executed on the PU 110 in the case of the asynchronous method. If the desynchronization effect 312 is G, G is expressed by the following equation (1). In the formula (1), the desynchronization time is expressed as Toh.
G = Tdelay + Thw-Toh (1)

本実施の形態では、演算方式決定部102が、この非同期化効果312が正の値となるか負の値となるかによって、同期方式で実行するか非同期方式で実行するかを判断する。このため、遅延時間Tdelay、HW演算部120による処理時間であるハードウェア処理時間Thw、および非同期化時間Tohを知る必要がある。   In the present embodiment, the calculation method determination unit 102 determines whether to execute in the synchronous method or the asynchronous method depending on whether the desynchronization effect 312 is a positive value or a negative value. Therefore, it is necessary to know the delay time Tdelay, the hardware processing time Thw that is the processing time by the HW calculation unit 120, and the desynchronization time Toh.

なお、遅延時間は、実行中の演算処理のハードウェア処理時間、開始時刻、および現在時刻から求めることができる(詳細は後述)。そこで、以下では、ハードウェア処理時間および非同期化時間を求める方法について説明する。   Note that the delay time can be obtained from the hardware processing time, the start time, and the current time of the arithmetic processing being executed (details will be described later). In the following, a method for obtaining the hardware processing time and the desynchronization time will be described.

最初に、図4〜8を参照して、処理時間算出部101が非同期化時間(Toh)を算出する処理フローについて説明する。   First, a processing flow in which the processing time calculation unit 101 calculates the desynchronization time (Toh) will be described with reference to FIGS.

処理時間算出部101は、図4に示すような、テストデータや条件を予め定めたテストシートを利用して非同期化時間を計測する。図4は、第1の実施の形態における、処理時間を計測するためのテストシート例を示す図である。   The processing time calculation unit 101 measures the desynchronization time using a test sheet in which test data and conditions are predetermined as shown in FIG. FIG. 4 is a diagram illustrating an example of a test sheet for measuring a processing time in the first embodiment.

図4に示すように、テストシートは、識別情報(No.)と、演算処理の内容を表す処理内容と、計測に用いるテストデータのデータサイズと、演算方式(同期または非同期)と、データの読み出しアドレスと、データの書き込みアドレスとを含んでいる。なお、処理内容の「AES−CBC(暗号化)」とは、AES(Advanced Encryption Standard)方式のCBC(Cipher Block Chaining)モードで暗号化処理を行うことを意味する。   As shown in FIG. 4, the test sheet includes identification information (No.), processing contents indicating the contents of arithmetic processing, data size of test data used for measurement, arithmetic method (synchronous or asynchronous), data A read address and a data write address are included. The processing content “AES-CBC (encryption)” means that encryption processing is performed in an AES (Advanced Encryption Standard) CBC (Cipher Block Chaining) mode.

なお、図4の例では、AES−CBC(暗号化)のみを挙げているが、その他のアルゴリズムや復号化の処理を含んでもよい。また、HW演算部120が、暗号化・復号以外のデータ圧縮や伸張アルゴリズムなどの演算を行う場合には、処理内容にそれらの演算の内容を設定するように構成してもよい。   In the example of FIG. 4, only AES-CBC (encryption) is mentioned, but other algorithms and decryption processing may be included. Further, when the HW calculation unit 120 performs calculations such as data compression or decompression algorithm other than encryption / decryption, the contents of those calculations may be set as the processing contents.

次に、図5を参照して、非同期化時間算出処理のフローについて説明する。図5は、第1の実施の形態における非同期化時間算出処理の全体の流れを示すフローチャートである。   Next, the flow of the desynchronization time calculation process will be described with reference to FIG. FIG. 5 is a flowchart illustrating an overall flow of the desynchronization time calculation process according to the first embodiment.

まず、処理時間算出部101は、現在の時刻をメモリ140などに記録する(ステップS701)。なお、説明の便宜上、本ステップで記録された時刻を、同期方式の場合は時刻Tsync1、非同期方式の場合は時刻Tasync1という。   First, the processing time calculation unit 101 records the current time in the memory 140 or the like (step S701). For convenience of explanation, the time recorded in this step is referred to as time Tsync1 in the case of the synchronous method and time Tasync1 in the case of the asynchronous method.

処理時間算出部101は、演算制御部103に対してテストを指示する(ステップS702)。このとき、処理時間算出部101は、図4のようなテストシートのうちいずれかによるテストの実行を指示する。   The processing time calculation unit 101 instructs the arithmetic control unit 103 to perform a test (step S702). At this time, the processing time calculation unit 101 instructs execution of a test using any one of the test sheets as shown in FIG.

指示を受けた演算制御部103は、テストシートの演算方式が同期か非同期かを判断する(ステップS703)。例えば、図4のテストシートのNo.=C101の実行が指示された場合は、演算制御部103は、演算方式が「同期」であると判断する。また、例えば、図4のテストシートのNo.=C102の実行が指示された場合は、演算制御部103は、演算方式が「非同期」であると判断する。   Receiving the instruction, the calculation control unit 103 determines whether the calculation method of the test sheet is synchronous or asynchronous (step S703). For example, the test sheet No. of FIG. = If execution of C101 is instructed, the operation control unit 103 determines that the operation method is “synchronous”. Further, for example, the test sheet No. of FIG. When execution of C102 is instructed, the operation control unit 103 determines that the operation method is “asynchronous”.

演算方式が同期の場合は(ステップS703:YES)、演算制御部103は、テストシートの処理内容による演算を開始するようにHW演算部120を操作する(ステップS708)。そして、演算制御部103は、HW演算部120による処理が終了するまで待つ(ステップS709)。   When the calculation method is synchronous (step S703: YES), the calculation control unit 103 operates the HW calculation unit 120 so as to start calculation based on the processing content of the test sheet (step S708). Then, the calculation control unit 103 waits until the processing by the HW calculation unit 120 is completed (step S709).

HW演算部120から演算処理の終了通知を受けると、演算制御部103は、処理時間算出部101に対して同期方式による処理の終了を通知し(ステップS710)、処理を終了する。   Upon receiving a calculation processing end notification from the HW calculation unit 120, the calculation control unit 103 notifies the processing time calculation unit 101 of the end of the processing by the synchronization method (step S710) and ends the processing.

ステップS703で、演算方式が非同期であると判断した場合は(ステップS703:NO)、演算制御部103は、処理状態を保存する処理などの非同期化の前処理を実行する(ステップS711)。次に、演算制御部103は、テストシートの処理内容による演算を開始するようにHW演算部120を操作する(ステップS712)。非同期方式であるため、演算制御部103は非同期方式によるHW演算処理を開始したことを処理時間算出部101に通知して処理を終了する(ステップS713)。   If it is determined in step S703 that the calculation method is asynchronous (step S703: NO), the calculation control unit 103 executes preprocessing for desynchronization such as processing for saving the processing state (step S711). Next, the calculation control unit 103 operates the HW calculation unit 120 so as to start calculation based on the processing content of the test sheet (step S712). Since the method is asynchronous, the arithmetic control unit 103 notifies the processing time calculation unit 101 that the asynchronous method HW arithmetic processing has started, and ends the processing (step S713).

この後、HW演算部120から演算処理の終了通知を受けると、演算制御部103は、処理時間算出部101に対して非同期方式によるHW演算処理の終了を通知する(ステップS714)。次に、演算制御部103は、保存した処理状態を呼び出す処理などの非同期化の後処理を実行する(ステップS715)。後処理が完了すると、演算制御部103は、処理時間算出部101に対して非同期方式による処理の終了を通知し(ステップS716)、処理を終了する。   Thereafter, upon receiving a calculation processing end notification from the HW calculation unit 120, the calculation control unit 103 notifies the processing time calculation unit 101 of the end of the asynchronous HW calculation processing (step S714). Next, the arithmetic control unit 103 executes a post-synchronization process such as a process for calling the stored processing state (step S715). When the post-processing is completed, the arithmetic control unit 103 notifies the processing time calculation unit 101 of the end of the asynchronous processing (step S716), and ends the processing.

ステップS708またはステップS712で、演算制御部103から演算開始の操作を受けたHW演算部120は、指示された処理内容の演算処理を実行する(ステップS717)。例えば、図4のテストシートのNo.=C101またはC102の実行が指示された場合、HW演算部120は、アルゴリズムがAESのCBCモードの暗号化を、メモリ140上のアドレスA01から64byte分のデータに対して行い、処理結果のデータをメモリ140上のアドレスA02から64byte分の領域に書き込む。   In Step S708 or Step S712, the HW calculation unit 120 that has received a calculation start operation from the calculation control unit 103 executes calculation processing of the instructed processing content (Step S717). For example, the test sheet No. of FIG. = When execution of C101 or C102 is instructed, the HW calculation unit 120 performs CBC mode encryption with an algorithm of AES on the data for 64 bytes from the address A01 on the memory 140, and the processing result data Write to an area of 64 bytes from address A02 on the memory 140.

演算処理が終了した場合は、HW演算部120は、演算制御部103に演算処理の終了を通知し(ステップS718)、処理を終了する。   When the calculation process is completed, the HW calculation unit 120 notifies the calculation control unit 103 of the end of the calculation process (step S718) and ends the process.

ステップS702でテストを指示した後、処理時間算出部101は、指示したテストの演算方式が同期か非同期かを判断する(ステップS704)。非同期の場合は(ステップS704:NO)、処理時間算出部101は、演算制御部103からHW演算処理の開始通知を受けた時点の時刻Tasync2を記録する(ステップS705)。さらに、処理時間算出部101は、演算制御部103からHW演算処理の終了通知を受けた時点の時刻Tasync3を記録する(ステップS707)。   After instructing the test in step S702, the processing time calculation unit 101 determines whether the arithmetic method of the instructed test is synchronous or asynchronous (step S704). In the case of asynchronous (step S704: NO), the processing time calculation unit 101 records the time Tasync2 when the start notification of the HW calculation process is received from the calculation control unit 103 (step S705). Further, the processing time calculation unit 101 records the time Tasync3 at the time when the completion notification of the HW calculation process is received from the calculation control unit 103 (step S707).

時刻Tasync3を記録後、処理時間算出部101は、演算制御部103から処理の終了通知を受けた時点の時刻を記録する(ステップS719)。なお、説明の便宜上、本ステップで記録された時刻を、同期方式の場合は時刻Tsync2、非同期方式の場合は時刻Tasync4という。   After recording the time Tasync3, the processing time calculation unit 101 records the time when the processing end notification is received from the arithmetic control unit 103 (step S719). For convenience of explanation, the time recorded in this step is referred to as time Tsync2 in the case of the synchronous method and time Tasync4 in the case of the asynchronous method.

図6は、このようにして記録された時刻の関係を示す図である。図6は、図3と同様のタイムライン図に、各時刻であるTsync1、Tsync2、Tasync1、Tasync2、Tasync3、および、Tasync4を記載している。   FIG. 6 is a diagram showing the relationship between the times recorded in this way. FIG. 6 shows Tsync1, Tsync2, Tasync1, Tasync2, Tasync3, and Tasync4, which are the respective times, in the same timeline diagram as FIG.

図5に戻り、処理時間算出部101は、テストシートのすべてのデータを処理したか否かを判断し(ステップS720)、すべてのデータを処理していない場合は(ステップS720:NO)、次にデータに対して処理を繰り返す(ステップS701)。   Returning to FIG. 5, the processing time calculation unit 101 determines whether all the data of the test sheet has been processed (step S720). If all the data has not been processed (step S720: NO), the next The processing is repeated for the data (step S701).

このようにして、処理時間算出部101は、データサイズの異なるデータごとに各演算方式による演算処理の処理時間を求めるための時刻を記録することができる。なお、各時刻は、テストシートの「No.」それぞれに対応づけられて記録される。   In this way, the processing time calculation unit 101 can record the time for calculating the processing time of the arithmetic processing by each arithmetic method for each data having a different data size. Each time is recorded in association with each “No.” of the test sheet.

すべてのデータを処理した場合は(ステップS720:YES)、処理時間算出部101は、記録した各時刻を元に非同期化時間を算出する(ステップS721)。   When all the data has been processed (step S720: YES), the processing time calculation unit 101 calculates the desynchronization time based on each recorded time (step S721).

ここで、ステップS721における、計測した時刻から非同期化時間を求める手順の詳細について説明する。まず、処理時間算出部101は、記録した時刻から、演算方式ごとの処理時間を算出する。処理時間算出部101は、同期方式の処理時間Tsync、および非同期方式の処理時間Tasyncを、それぞれ以下の(2)式および(3)式によって算出する。
Tsync=Tsync2−Tsync1 ・・・(2)
Tasync=(Tasync2−Tasync1)+(Tasync4−Tasync3) ・・・(3)
Here, the details of the procedure for obtaining the desynchronization time from the measured time in step S721 will be described. First, the processing time calculation unit 101 calculates a processing time for each calculation method from the recorded time. The processing time calculation unit 101 calculates the processing time Tsync of the synchronous method and the processing time Tasync of the asynchronous method by the following equations (2) and (3), respectively.
Tsync = Tsync2-Tsync1 (2)
Tasync = (Tasync2-Tasync1) + (Tasync4-Tasync3) (3)

そして、処理時間算出部101は、算出したTsyncおよびTasyncから、非同期化時間(Toh)を算出する。非同期化時間(Toh)の算出方法はいくつか考えられるが、最も簡易な方法の一つとして、TsyncとTasyncの差をTohとする方法を用いることができる。図4のテストシート例では、処理方式が同期の場合も非同期の場合もデータサイズが64byteで同じであるため、計測値から求めたTsyncとTasyncとの差がTohである。なお、TsyncやTasyncは1回の計測から求めた値を用いてもよいが、複数回の計測から求めた平均値を求めてもよい。   Then, the processing time calculation unit 101 calculates the desynchronization time (Toh) from the calculated Tsync and Tasync. Several methods for calculating the desynchronization time (Toh) are conceivable. As one of the simplest methods, a method in which the difference between Tsync and Tasync is Toh can be used. In the test sheet example of FIG. 4, since the data size is the same at 64 bytes regardless of whether the processing method is synchronous or asynchronous, the difference between Tsync and Tasync obtained from the measured value is Toh. In addition, although the value calculated | required from one measurement may be used for Tsync or Tasync, you may obtain | require the average value calculated | required from multiple measurements.

また別の算出方法例として、図4のかわりに、図7のようなテストシートを用いても非同期化時間を算出できる。図7のテストシートは、図4のテストシートにデータサイズのバリエーション(C103〜C112)を追加したものである。   As another calculation method example, the desynchronization time can be calculated using a test sheet as shown in FIG. 7 instead of FIG. The test sheet in FIG. 7 is obtained by adding data size variations (C103 to C112) to the test sheet in FIG.

図8に計測結果の例を示す。図8は、図7のテストシートを用いて図5の非同期化時間算出処理を実施し、計測結果から得られたTsyncとTasyncをデータサイズごとにプロットしたグラフの一例である。この例では、512byteから768byteの間で、TsyncとTasyncの値の大小関係が入れ替わっている。   FIG. 8 shows an example of the measurement result. FIG. 8 is an example of a graph in which the Tsync and Tasync obtained from the measurement results are plotted for each data size by performing the desynchronization time calculation process of FIG. 5 using the test sheet of FIG. In this example, the magnitude relationship between the values of Tsync and Tasync is switched between 512 bytes and 768 bytes.

これは、図6に示した演算処理に掛る時間であるThw303と、非同期化処理311の処理時間との大小関係が、512byte以上768byte以下の間で入れ替わっていることを示している。例えば512byteの場合はTasync(512byte)>Tsync(512byte)であるため、Toh>Thw(512byte)であり、768byteの場合はTasync(768byte)<Tsync(768byte)であるため、Toh<Thw(768byte)であることを意味している。   This indicates that the magnitude relationship between Thw 303, which is the time required for the arithmetic processing shown in FIG. 6, and the processing time of the desynchronization process 311 is switched between 512 bytes and 768 bytes. For example, since Tasync (512 bytes)> Tsync (512 bytes) in the case of 512 bytes, Toh> Thw (512 bytes), and in the case of 768 bytes, Tasync (768 bytes) <Tsync (768 bytes), soh (Ty68). It means that.

図7のテストシートを用いて非同期化時間を算出する場合、TasyncとTsyncそれぞれについて一次関数をフィッティングし、その一次関数とデータサイズ0の軸とが交わる際のTasync(Tasync(0byte))とTsync(Tsync(0byte))との差を非同期化時間としてもよい。つまり、Toh=Tasync(0byte)−Tsync(0byte)と求めてもよい。図8では、非同期化時間801が、このようにして求めた非同期化時間を表している。   When calculating the desynchronization time using the test sheet of FIG. 7, a linear function is fitted to each of Tasync and Tsync, and Tasync (Tasync (0 byte)) and Tsync when the linear function and the axis of data size 0 intersect. The difference from (Tsync (0byte)) may be the desynchronization time. That is, Toh = Tasync (0 byte) −Tsync (0 byte) may be obtained. In FIG. 8, the desynchronization time 801 represents the desynchronization time obtained in this way.

さらに、非同期化時間(Toh)と演算処理に掛る時間(Thw)の大小関係が入れ替わる(つまりこの二つの値が同じになる)閾値となるデータサイズ(Size)の処理時間を元に非同期化時間を求めてもよい。具体的には、当該閾値となるデータサイズでの処理時間と上記Tsync(0)との差分を非同期化時間としてもよい。図8では、非同期化時間802が、このようにして求めた非同期化時間を表している。   Further, the desynchronization time is based on the processing time of the data size (Size) that becomes a threshold at which the magnitude relationship between the desynchronization time (Toh) and the time (Thw) required for the arithmetic processing is switched (that is, the two values are the same). You may ask for. Specifically, the difference between the processing time at the data size serving as the threshold and the Tsync (0) may be used as the desynchronization time. In FIG. 8, the desynchronization time 802 represents the desynchronization time obtained in this way.

なお、図4にも図7にも共通するが、読み出しアドレスや書き込みアドレスは、全試行の中で同じものを用いてもよいし、別のものを用いてもよい。ここで示したテストシートの例のテーブル形式については任意に変更可能であり、設計事項である。   Although common to both FIG. 4 and FIG. 7, the same read address or write address may be used in all trials, or different addresses may be used. The table format of the example of the test sheet shown here can be arbitrarily changed and is a design matter.

また、図7では、データサイズの区切りを64〜256byteとしているが、さらに細かく区切ったデータを用いてもよいし、より粗く区切ったデータを用いてもよい。ただし、粗く区切った場合は、求められるデータサイズ閾値の精度が低くなる可能性が高いため、できるだけ細かく区切るほうが望ましい。   In FIG. 7, the data size is divided into 64 to 256 bytes. However, data divided more finely or data divided more coarsely may be used. However, when the data is roughly divided, there is a high possibility that the accuracy of the required data size threshold will be low.

処理時間算出部101は、以上述べた方法により、HW演算部120が処理可能な処理内容のうち全部または一部について非同期化時間算出処理を実行し、算出した値(Toh)を演算方式決定部102と共有できるようにメモリ140等に保存する。なお、処理時間算出部101が算出したデータサイズ閾値を演算方式決定部102に通知し、演算方式決定部102内に保存するように構成してもよい。   The processing time calculation unit 101 executes the desynchronization time calculation process for all or part of the processing contents that can be processed by the HW calculation unit 120 by the method described above, and calculates the calculated value (Toh) as the calculation method determination unit. It is stored in the memory 140 or the like so that it can be shared with 102. The data size threshold calculated by the processing time calculation unit 101 may be notified to the calculation method determination unit 102 and stored in the calculation method determination unit 102.

このように、本実施の形態では、演算方式を選択するための判断基準となる非同期化時間を、事前に算出して保存することができる。これにより、ハードウェア構成が異なる場合であっても、構成に応じた最適なデータサイズ閾値を求めることができる。   As described above, in this embodiment, the desynchronization time that is a criterion for selecting the calculation method can be calculated and stored in advance. As a result, even if the hardware configuration is different, an optimum data size threshold corresponding to the configuration can be obtained.

ここで、図5の処理フローの変形例として、演算制御部103が時刻を記録し、記録した情報を処理時間算出部101に渡して非同期化時間算出処理を実行するように構成してもよい。さらに図5の別の変形例として、演算制御部103が時刻を記録するよう構成したうえで、演算制御部103が非同期化時間のみを計測するようにしてもよい。   Here, as a modification of the processing flow of FIG. 5, the operation control unit 103 may record the time, and the recorded information may be passed to the processing time calculation unit 101 to execute the desynchronization time calculation process. . Furthermore, as another modification of FIG. 5, the calculation control unit 103 may be configured to record the time, and the calculation control unit 103 may measure only the desynchronization time.

次に、ハードウェア処理時間Thwを求める方法について説明する。上述のとおり、本実施の形態を実施するためにはHW演算部120が実行する特定の演算処理にかかる時間(ハードウェア処理時間Thw)が既知である必要がある。具体的には、本実施の形態では、演算制御部103がHW演算部120に演算処理(要求待ち演算)を要求する際に、要求待ち演算の処理対象であるデータの種類やサイズ、処理内容から、HW演算部120が要求待ち演算の実行に要する時間を算出できる必要がある。   Next, a method for obtaining the hardware processing time Thw will be described. As described above, in order to implement the present embodiment, the time (hardware processing time Thw) required for specific calculation processing executed by the HW calculation unit 120 needs to be known. Specifically, in this embodiment, when the calculation control unit 103 requests the HW calculation unit 120 to perform calculation processing (request waiting calculation), the type and size of data that is the target of the request waiting calculation processing, and the processing content Therefore, it is necessary that the time required for the HW calculation unit 120 to execute the request waiting calculation can be calculated.

例えば、演算処理としてAES方式のCBCモードで暗号化処理を実行させる場合は、HW演算部120で実行する暗号化処理に掛る時間(ハードウェア処理時間)は、処理対象であるデータのサイズに比例する。このため、データサイズとハードウェア処理時間との対応関係を複数のデータサイズについて予め計測しておけばよい。   For example, when the encryption process is executed in the AES CBC mode as the calculation process, the time (hardware processing time) required for the encryption process executed by the HW calculation unit 120 is proportional to the size of the data to be processed. To do. For this reason, the correspondence between the data size and the hardware processing time may be measured in advance for a plurality of data sizes.

具体的には、HW演算部120が実行可能な演算処理毎に、複数のデータサイズについて演算処理に掛る時間(ハードウェア処理時間)を計測する。そして、データサイズを変数とする一次関数でハードウェア処理時間を表現するために、ハードウェア処理時間を一次関数でフィッティングし、この一次関数の傾きの値を何れかの処理部や記憶装置に保持させればよい。   Specifically, for each arithmetic processing that can be executed by the HW arithmetic unit 120, the time required for the arithmetic processing (hardware processing time) for a plurality of data sizes is measured. In order to express the hardware processing time with a linear function with the data size as a variable, the hardware processing time is fitted with a linear function, and the slope value of this linear function is held in any processing unit or storage device. You can do it.

なお、演算処理に掛る時間を知るための方法はこれに限られず、従来から用いられているあらゆる方法を適用できる。また、演算処理はこの例で示した演算処理に限定する必要はなく、他の暗号アルゴリズムや、圧縮伸長などを含む他の演算処理の場合も同様に実施可能である。   The method for knowing the time required for the arithmetic processing is not limited to this, and any conventionally used method can be applied. The arithmetic processing need not be limited to the arithmetic processing shown in this example, and can be similarly performed in the case of other arithmetic processing including other encryption algorithms and compression / decompression.

次に、図9を参照して、第1の実施の形態にかかる通信装置100が通信処理を実施する際の処理フローについて説明する。通信処理とは、図1において通信装置200との間でIPネットワーク300を介してデータを送受信する処理を意味する。図9は、第1の実施の形態における通信処理の全体の流れを示すフローチャートである。   Next, a processing flow when the communication apparatus 100 according to the first embodiment performs communication processing will be described with reference to FIG. The communication process means a process of transmitting / receiving data to / from the communication apparatus 200 via the IP network 300 in FIG. FIG. 9 is a flowchart showing an overall flow of communication processing in the first embodiment.

ここでは通信処理の一例として、通信装置100が受信したパケットのペイロードに対して、IPsecプロトコル処理としてAES−CBC(暗号化)処理を施す場合の処理について説明する。   Here, as an example of the communication process, a process when an AES-CBC (encryption) process is performed as an IPsec protocol process on the payload of a packet received by the communication apparatus 100 will be described.

なお、通信装置100と通信装置200との間では、IPsecプロトコルに基づくSA(Security Association)およびSP(Security Policy)が既に設定されているものとする。   It is assumed that SA (Security Association) and SP (Security Policy) based on the IPsec protocol have already been set between the communication device 100 and the communication device 200.

まず、通信装置100のネットワークインタフェース131は、端末装置400から通信装置100に送信されたIPパケットを受信し、パケットを受信したことをネットワーク処理部104に伝える。ネットワーク処理部104は、受信したパケットのヘッダの解析やIPsecプロトコル処理などのネットワーク処理を行う(ステップS801)。   First, the network interface 131 of the communication device 100 receives an IP packet transmitted from the terminal device 400 to the communication device 100 and notifies the network processing unit 104 that the packet has been received. The network processing unit 104 performs network processing such as header analysis of the received packet and IPsec protocol processing (step S801).

次に、ネットワーク処理部104は、演算制御部103に対して、HW演算処理に関する指示を行う(ステップS802)。この例では、ネットワーク処理部104は、受信したパケットのペイロードのAES−CBCによる暗号化処理を、HW演算部120で実行することを指示する。この指示を受けた演算制御部103は、演算方式決定部102を呼び出す(ステップS803)。   Next, the network processing unit 104 gives an instruction regarding the HW calculation process to the calculation control unit 103 (step S802). In this example, the network processing unit 104 instructs the HW calculation unit 120 to execute encryption processing by AES-CBC of the payload of the received packet. Receiving this instruction, the calculation control unit 103 calls the calculation method determination unit 102 (step S803).

演算方式決定部102は、処理対象となるデータ(受信パケットのペイロード)のデータサイズと、HW演算部120で実行中の処理に関する情報と、上述した非同期化時間とから、同期方式を選択すべきか非同期方式を選択すべきかを決定する演算方式決定処理を実行する(ステップS804)。演算方式決定処理の具体的な処理フローについては後に図10を参照して説明する。   Should the calculation method determination unit 102 select the synchronization method from the data size of the data to be processed (payload of the received packet), information on the process being executed by the HW calculation unit 120, and the desynchronization time described above? A calculation method determining process for determining whether the asynchronous method should be selected is executed (step S804). A specific processing flow of the calculation method determination processing will be described later with reference to FIG.

演算方式決定部102は、決定した演算方式を演算制御部103に通知する(ステップS805)。通知を受けた演算制御部103は、決定された演算方式が同期方式であるか非同期方式であるかを判断する(ステップS806)。   The calculation method determination unit 102 notifies the calculation control unit 103 of the determined calculation method (step S805). Receiving the notification, the calculation control unit 103 determines whether the determined calculation method is a synchronous method or an asynchronous method (step S806).

同期方式の場合は(ステップS806:YES)、演算制御部103は、HW演算部120に対して処理内容を指示して暗号化処理を開始させる(ステップS807)。その後、演算制御部103は、HW演算部120による処理が終了するまで待つ(ステップS808)。   In the case of the synchronous method (step S806: YES), the operation control unit 103 instructs the HW operation unit 120 about the processing content and starts the encryption process (step S807). Thereafter, the calculation control unit 103 waits until the processing by the HW calculation unit 120 is completed (step S808).

HW演算部120から演算処理の終了通知を受けると、演算制御部103は、ネットワーク処理部104に対して同期方式による処理の終了を通知し(ステップS809)、処理を終了する。   Upon receiving a calculation processing end notification from the HW calculation unit 120, the calculation control unit 103 notifies the network processing unit 104 of the end of the processing by the synchronization method (step S809), and ends the processing.

一方、ステップS806で演算方式が非同期方式であると判断した場合は(ステップS806:NO)、演算制御部103は、処理状態を保存する処理などの非同期化の前処理を実行する(ステップS810)。次に、演算制御部103は、指示された処理内容による演算を開始するようにHW演算部120を操作する(ステップS811)。非同期方式であるため、演算制御部103は非同期方式によるHW演算処理を開始したことをネットワーク処理部104に通知して処理を終了する(ステップS812)。   On the other hand, when it is determined in step S806 that the calculation method is an asynchronous method (step S806: NO), the calculation control unit 103 executes preprocessing for desynchronization such as processing for saving the processing state (step S810). . Next, the calculation control unit 103 operates the HW calculation unit 120 so as to start calculation based on the instructed processing content (step S811). Because of the asynchronous method, the operation control unit 103 notifies the network processing unit 104 that the asynchronous method HW operation processing has started, and ends the processing (step S812).

この後、HW演算部120から演算処理の終了通知を受けると、演算制御部103は、保存した処理状態を呼び出す処理などの非同期化の後処理を実行する(ステップS813)。後処理が完了すると、演算制御部103は、ネットワーク処理部104に対して非同期方式による処理の終了を通知し(ステップS814)、処理を終了する。   Thereafter, upon receiving a calculation processing end notification from the HW calculation unit 120, the calculation control unit 103 executes asynchronous post-processing such as processing for calling the stored processing state (step S813). When the post-processing is completed, the arithmetic control unit 103 notifies the network processing unit 104 of the end of the asynchronous process (step S814), and ends the process.

ステップS807またはステップS811で、演算制御部103から演算開始の操作を受けたHW演算部120は、指示された処理内容の演算処理を実行する(ステップS815)。例えば、HW演算部120は、受け取ったデータアドレスのデータ(パケットのペイロード)に対して、アルゴリズムがAESのCBCモードの暗号化処理を実行する。   In Step S807 or Step S811, the HW calculation unit 120 that has received a calculation start operation from the calculation control unit 103 performs calculation processing of the instructed processing content (Step S815). For example, the HW calculation unit 120 executes CBC mode encryption processing with an algorithm of AES on the received data address data (packet payload).

演算処理が終了した場合は、HW演算部120は、演算制御部103に演算処理の終了を通知し(ステップS816)、処理を終了する。   When the calculation process is completed, the HW calculation unit 120 notifies the calculation control unit 103 of the end of the calculation process (step S816) and ends the process.

演算制御部103に対して演算を指示した後、ネットワーク処理部104は、非同期方式によるHW演算処理の開始通知を演算制御部103から受け取ったか否かを判断する(ステップS817)。   After instructing the arithmetic control unit 103 to perform arithmetic operation, the network processing unit 104 determines whether or not the start notification of the asynchronous HW arithmetic processing is received from the arithmetic control unit 103 (step S817).

非同期方式によるHW演算処理の開始通知を受け取った場合は(ステップS817:YES)、ネットワーク処理部104は処理を終了する。通知を受け取っていない場合は(ステップS817:NO)、同期方式により演算が行われていると判断できるため、ネットワーク処理部104は、同期処理による演算の終了通知を受けるために処理を続行する。   When the notification of the start of the HW calculation process by the asynchronous method is received (step S817: YES), the network processing unit 104 ends the process. When the notification has not been received (step S817: NO), it can be determined that the calculation is being performed by the synchronization method, and thus the network processing unit 104 continues the process in order to receive an end notification of the calculation by the synchronization process.

ステップS809またはステップS814で演算制御部103から送信された演算処理の終了通知を受けた後、ネットワーク処理部104は、暗号化処理後に必要なIPsecプロトコルまたはIPプロトコル処理などのネットワーク処理を実行する(ステップS818)。そして、ネットワーク処理部104は、ネットワークインタフェース131にパケットの送信を指示する(ステップS819)。   After receiving the computation processing end notification transmitted from the computation control unit 103 in step S809 or step S814, the network processing unit 104 executes network processing such as IPsec protocol or IP protocol processing necessary after the encryption processing ( Step S818). Then, the network processing unit 104 instructs the network interface 131 to transmit a packet (step S819).

このように、本実施の形態の方法によれば、処理対象データサイズとデータサイズ閾値とを比較することで、同期方式および非同期方式のうち、いずれか適切な演算方式を選択してデータ処理を行うことができる。   As described above, according to the method of the present embodiment, by comparing the data size to be processed and the data size threshold value, data processing is performed by selecting one of the appropriate arithmetic method from the synchronous method and the asynchronous method. It can be carried out.

なお、ここでは通信装置100がエンコード(暗号化)処理を行う場合の処理フローを示したが、デコード(復号)処理を行う場合も同一の構成で同様の処理フローによって実現可能である。また、ここでは通信装置100のネットワーク処理部104が暗号化を含むネットワーク処理を行う場合の例を示したが、ネットワーク処理部104がHW演算部120を使って暗号化以外の演算処理(例えばデータ圧縮・伸張処理)を行う場合も同様の構成および処理フローで実現可能である。   Here, the processing flow in the case where the communication apparatus 100 performs the encoding (encryption) processing is shown, but the decoding (decryption) processing can also be realized by the same processing flow with the same configuration. Although an example in which the network processing unit 104 of the communication apparatus 100 performs network processing including encryption is shown here, the network processing unit 104 uses the HW calculation unit 120 to perform calculation processing other than encryption (for example, data (Compression / decompression processing) can also be realized with the same configuration and processing flow.

次に、演算制御部103がHW演算部120を操作する処理(ステップS807およびステップS811)で、HW演算部120が実行中の処理が終了する時間を算出する処理の詳細について説明する。演算制御部103は、HW演算部120に処理を要求する際、要求した処理に関する情報のうち、処理が終了する時刻を予想するのに必要な情報(以下、参照情報という)を保存しておく。   Next, details of processing for calculating the time when the processing being executed by the HW calculation unit 120 is completed in the processing (step S807 and step S811) in which the calculation control unit 103 operates the HW calculation unit 120 will be described. When requesting a process to the HW calculation unit 120, the calculation control unit 103 stores information (hereinafter referred to as reference information) necessary for predicting the time at which the process ends among the information related to the requested process. .

参照情報としては、演算処理内容、演算処理を施す対象のデータのサイズ、および、演算処理を開始する時刻が代表例として挙げられる。具体例としては、演算処理内容として暗号アルゴリズム(AES CBCモード 128bit鍵長 暗号化処理)、サイズとして暗号化対象のデータのサイズ(IPsecトンネルモードの場合はネットワークインタフェース130から入力されたIPパケットサイズ)、時刻として演算制御部103がHW演算部120のレジスタ値を変更してHW演算部120の処理を開始させた時刻を保存すればよい。   As reference information, the contents of calculation processing, the size of data to be subjected to calculation processing, and the time at which calculation processing is started are given as representative examples. As a specific example, an encryption algorithm (AES CBC mode 128-bit key length encryption process) is used as the operation processing content, and a size of data to be encrypted (IP packet size input from the network interface 130 in the IPsec tunnel mode) is used as the size. As the time, the time when the arithmetic control unit 103 changes the register value of the HW arithmetic unit 120 and starts the processing of the HW arithmetic unit 120 may be stored.

また、HW演算部120が何らかの演算処理中に演算制御部103がHW演算部120に演算処理をさらに要求した場合などのように、HW演算部120がすぐに演算処理を開始できない場合がある。このような場合には、HW演算部120の演算処理の開始を待つ待ち行列を用意し、適宜HW演算部120で演算処理が実行されるよう構成するのが望ましい。なお、この場合は、実行中の演算、および、待ち行列に含まれる演算が、要求済み演算に相当する。   Further, there are cases where the HW calculation unit 120 cannot immediately start the calculation process, such as when the calculation control unit 103 further requests a calculation process from the HW calculation unit 120 while the HW calculation unit 120 performs some calculation process. In such a case, it is desirable to prepare a queue that waits for the start of the arithmetic processing of the HW arithmetic unit 120, and to appropriately execute the arithmetic processing in the HW arithmetic unit 120. In this case, the operation being executed and the operation included in the queue correspond to the requested operation.

この場合、HW演算部120が実行中の処理だけでなく、待ち行列に含まれる演算処理の情報についても考慮する必要がある。この場合は、待ち行列に含まれる各演算処理に掛かる時間を足し合わせればよい。また、各演算処理に掛かる時間は、HW演算部120が実行中の処理の残り時間を計算した方法と同様の方法で算出可能である。つまり、演算処理内容と、演算処理を施す対象のデータのサイズがわかれば、HW演算部120での演算処理に掛る時間は予測可能である。   In this case, it is necessary to consider not only the process being executed by the HW calculation unit 120 but also information about the calculation process included in the queue. In this case, what is necessary is just to add the time concerning each calculation process contained in a queue. The time required for each calculation process can be calculated by a method similar to the method for calculating the remaining time of the process being executed by the HW calculation unit 120. That is, if the contents of the calculation process and the size of the data to be subjected to the calculation process are known, the time required for the calculation process in the HW calculation unit 120 can be predicted.

次に、ステップS804の演算方式決定処理の詳細について図10を参照して説明する。図10は、第1の実施の形態における演算方式決定処理の全体の流れを示すフローチャートである。   Next, details of the calculation method determination processing in step S804 will be described with reference to FIG. FIG. 10 is a flowchart showing the overall flow of the calculation method determination process in the first embodiment.

なお、演算制御部103は、図9のステップS803で演算方式決定部102を起動する際に、要求済み演算の参照情報を演算方式決定部102に伝える。演算方式決定部102は、参照情報を取得し(ステップS1001)、遅延時間の算出を遅延時間算出部105に依頼する。遅延時間算出部105は、現在時刻と演算方式決定部102から通知される参照情報とから、HW演算部120上で実行中の演算および待ち行列に含まれる実行待ちの演算(要求済み演算)の処理時間から、演算処理が完了するまでの時間である遅延時間を算出する(ステップS1002)。遅延時間の算出には以下の(4)式を用いればよい。
Tdelay=Thw−(Tnow−Tstart) ・・・(4)
Note that the calculation control unit 103 notifies the calculation method determination unit 102 of the reference information of the requested calculation when the calculation method determination unit 102 is activated in step S803 in FIG. The calculation method determination unit 102 acquires reference information (step S1001), and requests the delay time calculation unit 105 to calculate the delay time. The delay time calculation unit 105 calculates a calculation being executed on the HW calculation unit 120 and a calculation waiting for execution (requested calculation) included in the queue from the current time and the reference information notified from the calculation method determination unit 102. From the processing time, a delay time that is a time until the arithmetic processing is completed is calculated (step S1002). The following equation (4) may be used to calculate the delay time.
Tdelay = Thw- (Tnow-Tstart) (4)

Tnowは現在時刻、Tstartは、参照情報に含まれるHW演算部120上で実行中の処理が開始された時刻である。なお、(4)式でTdelayが負となる場合は、Tdelayは0とする。ハードウェア処理時間Thwは、上述のように、要求待ち演算の処理対象であるデータの種類やデータサイズ、処理内容から算出することができる。なお、以下では、データサイズ、処理内容等のThwを算出するために必要な変数をxと表し、xに応じて算出されるハードウェア処理時間をThw(x)と表す場合がある。   Tnow is the current time, and Tstart is the time when the process being executed on the HW calculation unit 120 included in the reference information is started. If Tdelay is negative in equation (4), Tdelay is set to zero. As described above, the hardware processing time Thw can be calculated from the type, data size, and processing content of the data to be processed in the request waiting calculation. In the following description, a variable necessary for calculating Thw such as data size and processing content may be expressed as x, and a hardware processing time calculated according to x may be expressed as Thw (x).

次に、演算方式決定部102は、算出されたTdelayを以下の(5)式に代入することにより、非同期化効果G(x、Tdelay)を算出する(ステップS1003)。
G(x,Tdelay)=Thw(x)+Tdelay−Toh ・・・(5)
Next, the calculation method determination unit 102 calculates the desynchronization effect G (x, Tdelay) by substituting the calculated Tdelay into the following equation (5) (step S1003).
G (x, Tdelay) = Thw (x) + Tdelay−Toh (5)

そして、演算方式決定部102は、算出した非同期化効果Gが0以上であるか否かを判断する(ステップS1004)。0以上の場合(ステップS1004:YES)、演算方式決定部102は、要求待ち演算の演算方式を非同期方式に決定する(ステップS1005)。また、0より小さい場合(ステップS1004:NO)、演算方式決定部102は、要求待ち演算の演算方式を同期方式に決定する(ステップS1006)。なお、この非同期化効果Gが、図3に示した非同期化効果312に相当する。   Then, the calculation method determination unit 102 determines whether or not the calculated desynchronization effect G is 0 or more (step S1004). In the case of 0 or more (step S1004: YES), the calculation method determination unit 102 determines the calculation method of the request waiting calculation to be an asynchronous method (step S1005). If the value is smaller than 0 (step S1004: NO), the calculation method determination unit 102 determines the calculation method of the request waiting calculation as a synchronous method (step S1006). The desynchronization effect G corresponds to the desynchronization effect 312 shown in FIG.

なお、同図では、非同期化効果Gが0の場合に、演算方式を非同期方式に決定しているが、非同期化効果が0のときの演算方式の決定方法はこれに限られるものではない。例えば、演算方式決定部102が、非同期化効果が0となった場合に同期方式を演算方式として決定するように構成してもよい。また、演算方式決定部102が、このような場合に、同期方式と非同期方式とを交互に採用するなどの動的なルールに従って演算方式を決定するように構成してもよい。   In the figure, when the desynchronization effect G is 0, the calculation method is determined to be an asynchronous method, but the calculation method determination method when the desynchronization effect is 0 is not limited to this. For example, the calculation method determination unit 102 may be configured to determine the synchronization method as the calculation method when the desynchronization effect becomes zero. In such a case, the calculation method determination unit 102 may be configured to determine the calculation method according to a dynamic rule such as alternately adopting a synchronous method and an asynchronous method.

図11は、第1の実施の形態における演算方式決定部102の判断結果を示す図である。横軸はHW演算部120で演算処理を実行するのに掛る時間(Thw)であり、縦軸は演算処理が開始されるまでの遅延時間(Tdelay)である。同図に示すように、Thw+Tdelay−Toh>0となる領域では、非同期方式を選択する方がPU110上での実行時間が少なくなる。   FIG. 11 is a diagram illustrating a determination result of the calculation method determination unit 102 according to the first embodiment. The horizontal axis represents the time (Thw) required to execute the arithmetic processing in the HW arithmetic unit 120, and the vertical axis represents the delay time (Tdelay) until the arithmetic processing is started. As shown in the figure, in the region where Thw + Tdelay-Toh> 0, the execution time on the PU 110 is shorter when the asynchronous method is selected.

なお、単にハードウェア処理時間(Thw)と非同期化時間(Toh)とを比較する方法では、同図のThw=Tohとなる境界線の左側の領域すべてで同期方式を選択することになる。これに対し、本実施の形態によれば、遅延時間(Tdelay)を考慮するため、領域1101のみで同期方式が選択される。   In the method of simply comparing the hardware processing time (Thw) and the desynchronization time (Toh), the synchronization method is selected in all the areas on the left side of the boundary line where Thw = Toh in FIG. On the other hand, according to the present embodiment, in order to consider the delay time (Tdelay), the synchronization method is selected only in the area 1101.

なお、領域1102では、Thw+Tdelay>Tohとなるため、非同期方式の方が演算処理にかかる処理時間が小さい。すなわち、CPU負荷が小さくなる。ただし、Thw<Tohであるため、演算処理自体にかかる処理時間は、非同期方式の方が大きい。また、領域1103では、Tdelay>Tohとなるため、非同期方式の方が演算処理にかかる処理時間が小さい。すなわち、CPU負荷が小さくなる。   Note that in the area 1102, since Thw + Tdelay> Toh, the processing time required for the arithmetic processing is shorter in the asynchronous method. That is, the CPU load is reduced. However, since Thw <Toh, the processing time required for the arithmetic processing itself is larger in the asynchronous method. In the area 1103, since Tdelay> Toh, the processing time required for the arithmetic processing is shorter in the asynchronous method. That is, the CPU load is reduced.

(変形例1)
上述の非同期化時間算出処理では、処理フローの中で直接処理時間を計測していた。これに対し、プロファイリングという手法を使って処理時間を推定する方法でデータサイズ閾値を算出するように構成してもよい。
(Modification 1)
In the above desynchronization time calculation process, the processing time is directly measured in the processing flow. On the other hand, the data size threshold may be calculated by a method of estimating the processing time using a method called profiling.

プロファイリングとは、PU110上で実行されているプロセスを一定時間間隔で記録(以下、サンプリングという)することで、各プロセスの実行時間を推定する手法である。Linux(登録商標)に実装されているOProfileが代表的な実装例である。サンプリングによって得られたプロセス毎のサンプル数の比率が、PU110上で実行されているプロセスの実行時間の比率を表している。このため、プロセス毎のサンプル数の大小を比較することによりプロセス毎の実行時間の比率を比較することができる。   Profiling is a technique for estimating the execution time of each process by recording the processes being executed on the PU 110 at regular time intervals (hereinafter referred to as sampling). An OProfile implemented in Linux (registered trademark) is a typical implementation example. The ratio of the number of samples for each process obtained by sampling represents the ratio of the execution times of processes executed on the PU 110. For this reason, the ratio of the execution time for each process can be compared by comparing the number of samples for each process.

プロファイリング手法を用いて閾値を求める場合は、図5のような非同期化時間算出処理から時刻計測に関する処理を除いた処理についてプロファイリングを行い、同期方式と非同期方式でサンプル数を実時間に換算し、その実時間からTasyncおよびTsyncを求め、上述したようないずれかの方法で非同期化時間を算出できる。   When using the profiling method to determine the threshold, profiling is performed for the processing that excludes the processing related to time measurement from the desynchronization time calculation processing as shown in FIG. 5, and the number of samples is converted into real time in the synchronous method and the asynchronous method, Tasync and Tsync are obtained from the actual time, and the desynchronization time can be calculated by any of the methods described above.

このような構成により、処理時間算出部101および演算制御部103に時刻を計測する機能を備える必要がなく、実装が比較的容易になるという利点がある。   With such a configuration, there is an advantage that the processing time calculation unit 101 and the calculation control unit 103 do not need to have a function of measuring time, and mounting is relatively easy.

(変形例2)
上述の実施の形態では、処理時間算出部101が非同期化時間算出処理を実行してデータサイズ閾値を算出し、メモリ140等に保存していた。これに対し、非同期化時間算出処理を行わずに、事前に外部装置等で求められた非同期化時間をメモリ140等に保存するように構成してもよい。この場合は、処理時間算出部101が不要となる。なお、非同期化時間を任意の値に変更できるように構成してもよい。
(Modification 2)
In the above-described embodiment, the processing time calculation unit 101 executes the desynchronization time calculation process to calculate the data size threshold value and stores it in the memory 140 or the like. In contrast, the desynchronization time calculated in advance by an external device or the like may be stored in the memory 140 or the like without performing the desynchronization time calculation process. In this case, the processing time calculation unit 101 is not necessary. In addition, you may comprise so that desynchronization time can be changed into arbitrary values.

このように、第1の実施の形態にかかる情報処理装置では、ハードウェアにより暗号化処理を実行するときに、暗号化するデータのデータサイズ、および、実行中または実行待ちの演算処理が完了するまでの遅延時間に応じて、同期方式および非同期方式のいずれかの方式を採用することができる。これにより、PU上の処理負荷の増加を回避することができる。   As described above, in the information processing apparatus according to the first embodiment, when the encryption process is executed by hardware, the data size of the data to be encrypted and the calculation process being executed or waiting for execution are completed. Either a synchronous method or an asynchronous method can be adopted depending on the delay time until. Thereby, an increase in processing load on the PU can be avoided.

(第2の実施の形態)
第2の実施の形態にかかる情報処理装置は、既に要求済みの演算処理(要求済み演算)を非同期方式で実行できるか否かを表す可否情報(フラグ)を記憶し、このフラグの値が非同期方式で実行可能であることを示す場合は、次に要求する演算処理(要求待ち演算)の演算方式を非同期方式に決定する。なお、このフラグは、非同期方式で実行できる時間として事前に計算された時間が経過したときに、非同期方式で実行できないことを示す値に更新される。
(Second Embodiment)
The information processing apparatus according to the second embodiment stores availability information (flag) indicating whether or not an already requested computation process (requested computation) can be executed in an asynchronous manner, and the value of this flag is asynchronous. When it is shown that the method can be executed, the calculation method of the next requested calculation process (request waiting calculation) is determined to be an asynchronous method. This flag is updated to a value indicating that it cannot be executed in the asynchronous manner when the time calculated in advance as the time that can be executed in the asynchronous manner has elapsed.

図12は、第2の実施の形態にかかる通信装置1200の構成を示すブロック図である。同図に示すように、通信装置1200は、主なハードウエア構成として、PU210と、HW演算部120と、メモリ240と、ネットワークインタフェース130と、ネットワークインタフェース131と、計時部250と、を備えている。   FIG. 12 is a block diagram illustrating a configuration of a communication device 1200 according to the second embodiment. As shown in the figure, the communication device 1200 includes a PU 210, an HW calculation unit 120, a memory 240, a network interface 130, a network interface 131, and a time measuring unit 250 as main hardware configurations. Yes.

第2の実施の形態では、メモリ240内のフラグ領域241と、PU210内のフラグ更新部206と、計時部250と、を追加したこと、および、PU210内の演算方式決定部202と演算制御部203の機能が第1の実施の形態と異なっている。その他の構成および機能は、第1の実施の形態にかかる通信装置100の構成を表すブロック図である図2と同様であるので、同一符号を付し、ここでの説明は省略する。   In the second embodiment, the flag area 241 in the memory 240, the flag update unit 206 in the PU 210, and the time measuring unit 250 are added, and the calculation method determination unit 202 and the calculation control unit in the PU 210. The function 203 is different from that of the first embodiment. Other configurations and functions are the same as those in FIG. 2, which is a block diagram showing the configuration of the communication apparatus 100 according to the first embodiment, and thus are denoted by the same reference numerals and description thereof is omitted here.

フラグ領域241は、メモリ240の記憶領域の一部の領域を指す。フラグ領域241は、演算制御部203、演算方式決定部202、および後述するフラグ更新部206が、少なくとも2種類の値を読み書きできる領域であればよい。例えば、メモリ240の記憶領域上のあるアドレスに1byte分の容量の領域をフラグ領域241として確保する。そして、このフラグ領域241に、第1の値として“0x00”(16進数表記)、および、第2の値として“0x01”を読み書きするよう構成すればよい。以下では、一例として、第1の値が、要求待ち演算が非同期方式で実行できることを表し、第2の値が、要求待ち演算が非同期方式で実行できないことを表すものとする。なお、メモリ240上の物理的位置や読み書きする値は任意である。   The flag area 241 indicates a partial area of the storage area of the memory 240. The flag area 241 may be an area where the calculation control unit 203, the calculation method determination unit 202, and the flag update unit 206 described later can read and write at least two types of values. For example, an area having a capacity of 1 byte is secured as a flag area 241 at a certain address on the storage area of the memory 240. The flag area 241 may be configured to read and write “0x00” (hexadecimal notation) as the first value and “0x01” as the second value. In the following, as an example, the first value represents that the request waiting operation can be executed in an asynchronous manner, and the second value represents that the request waiting operation cannot be executed in an asynchronous manner. Note that the physical position on the memory 240 and the value to be read and written are arbitrary.

フラグ更新部206は、フラグ領域241の値の書き換えを実行する。具体的には、フラグ更新部206は、最後に要求された要求済み演算(最終演算)が要求されたときに、フラグ領域241の値を第1の値に更新する。また、フラグ更新部206は、最終演算が要求された後、最終演算が終了するまでの期間として演算制御部203によって算出された期間が経過したとき、フラグ領域241の値を第2の値に更新する。   The flag update unit 206 rewrites the value in the flag area 241. Specifically, the flag update unit 206 updates the value of the flag area 241 to the first value when the last requested request (final calculation) is requested. In addition, the flag update unit 206 sets the value of the flag area 241 to the second value when the period calculated by the calculation control unit 203 has passed as the period until the final calculation ends after the final calculation is requested. Update.

計時部250は、設定された時刻にPU110に対して予め定められた処理を実行させる。例えば、計時部250は、設定された時刻になったらPU110に対して割り込みをかける。PU110は、その割り込みに関連する処理を実行する。本実施の形態では、計時部250は、フラグ更新部206が算出した期間が経過したときに、フラグ更新部206がフラグ領域241を第2の値に更新する処理を実行するように割り込みをかける。   The timer unit 250 causes the PU 110 to execute a predetermined process at the set time. For example, the time measuring unit 250 interrupts the PU 110 when the set time is reached. The PU 110 executes processing related to the interrupt. In the present embodiment, the timing unit 250 interrupts the flag updating unit 206 to execute processing for updating the flag area 241 to the second value when the period calculated by the flag updating unit 206 has elapsed. .

演算方式決定部202は、フラグ領域241の値を参照し、この値が第1の値である場合には、非同期化効果Gを算出することなく、次に要求される要求待ち演算の演算方式を非同期方式に決定する。   The calculation method determination unit 202 refers to the value of the flag area 241. If this value is the first value, the calculation method of the request wait calculation to be requested next without calculating the desynchronization effect G Is determined to be asynchronous.

演算制御部203は、第1の実施の形態の演算制御部103の機能に加え、以下の機能を備える。すなわち、演算制御部203は、HW演算部120に演算処理の実行を要求する前に、フラグ領域241を第1の値に更新するようにフラグ更新部206に要求する。また、ハードウェア演算処理を非同期方式で実行する場合は、演算制御部203は、フラグ更新部206がフラグ領域241を第2の値に書き換える時刻を算出し(詳細は後述)、その時刻に計時部250が割り込みをかけるように計時部250に指示する。   The arithmetic control unit 203 includes the following functions in addition to the functions of the arithmetic control unit 103 of the first embodiment. That is, the calculation control unit 203 requests the flag update unit 206 to update the flag area 241 to the first value before requesting the HW calculation unit 120 to execute the calculation process. In addition, when the hardware arithmetic processing is executed in an asynchronous manner, the arithmetic control unit 203 calculates a time when the flag update unit 206 rewrites the flag area 241 to the second value (details will be described later), and measures the time at that time. The unit 250 instructs the timing unit 250 to interrupt.

次に、図13を参照して、第2の実施の形態にかかる通信装置1200が通信処理を実施する際の処理フローについて説明する。ここでも第1の実施の形態と同様に、通信処理の一例として、通信装置1200が受信したパケットのペイロードに対して、IPsecプロトコル処理としてAES−CBC(暗号化)処理を施す場合の処理について説明する。図13は、第2の実施の形態における通信処理の全体の流れを示すフローチャートである。   Next, a processing flow when the communication apparatus 1200 according to the second embodiment performs communication processing will be described with reference to FIG. Here, as in the first embodiment, as an example of the communication process, a process when an AES-CBC (encryption) process is performed as an IPsec protocol process on the payload of a packet received by the communication apparatus 1200 will be described. To do. FIG. 13 is a flowchart illustrating an overall flow of communication processing according to the second embodiment.

第2の実施の形態では、演算制御部203が、HW演算部120に演算処理を要求する前に、フラグ更新部206にフラグ領域241の更新を要求するステップ(ステップS806−1、ステップS810−2)、および、フラグ領域241を第2の値に書き換える時刻を計時部250に設定するステップ(ステップS810−1)が、図9に示した第1の実施の形態の通信処理に追加される。その他のステップは、図9と同様の処理なので、その説明を省略する。   In the second embodiment, the calculation control unit 203 requests the flag update unit 206 to update the flag area 241 before requesting the HW calculation unit 120 to perform calculation processing (step S806-1, step S810-). 2) and the step (step S810-1) of setting the time for rewriting the flag area 241 to the second value in the timer unit 250 (step S810-1) are added to the communication processing of the first embodiment shown in FIG. . The other steps are the same as those in FIG.

ステップS806で、演算方式決定部202による判断結果が非同期方式であると判断した場合(ステップS806:NO)、演算制御部203は、フラグ更新部206がフラグ領域241の値を書き換える時刻を算出し、算出した時刻にフラグ更新のための割り込みをかけることを計時部250に設定する(ステップS810−1)。演算制御部203は、以下の(6)式でフラグ領域241の値を書き換える時刻Tを算出する。
T=Tnow+(Tdelay+Thw)−Toh ・・・(6)
If it is determined in step S806 that the determination result by the calculation method determination unit 202 is an asynchronous method (step S806: NO), the calculation control unit 203 calculates the time at which the flag update unit 206 rewrites the value of the flag area 241. The timer unit 250 is set to interrupt the flag update at the calculated time (step S810-1). The arithmetic control unit 203 calculates a time T at which the value of the flag area 241 is rewritten by the following equation (6).
T = Tnow + (Tdelay + Thw) −Toh (6)

なお、Tdelayは、既に要求している要求済み演算に対して上述の(4)式で算出された遅延時間を表す。また、Thwは、要求済み演算に対して算出されたハードウェア処理時間を表す。   Tdelay represents the delay time calculated by the above-described equation (4) with respect to the requested computation that has already been requested. Thw represents the hardware processing time calculated for the requested computation.

時刻Tの設定が終了した後、演算制御部203は、フラグ領域241の値を第1の値に書き換えることをフラグ更新部206に要求する(ステップS810−2)。また、ステップS806で、演算方式決定部202による判断結果が同期方式であると判断した場合も(ステップS806:YES)、演算制御部203は、フラグ領域241の値を第1の値に書き換えることをフラグ更新部206に要求する(ステップS806−1)。なお、フラグ領域241に既に第1の値が保存されている場合は改めて書き換える必要はない。   After the setting of the time T is completed, the arithmetic control unit 203 requests the flag update unit 206 to rewrite the value of the flag area 241 to the first value (step S810-2). Also, when it is determined in step S806 that the determination result by the calculation method determination unit 202 is the synchronous method (step S806: YES), the calculation control unit 203 rewrites the value of the flag area 241 to the first value. Is requested to the flag update unit 206 (step S806-1). If the first value is already stored in the flag area 241, there is no need to rewrite it.

また、本実施の形態ではフラグ領域241の値を書き換える処理をPU110で実行される機能(フラグ更新部206)で実行する例を示したが、これに限定する必要はない。例えば、HW演算部120や計時部250がフラグ領域241の値を書き換える機能を備えるよう構成してもよい。   Moreover, although the example which performs the process which rewrites the value of the flag area | region 241 with the function (flag update part 206) performed by PU110 was shown in this Embodiment, it is not necessary to limit to this. For example, you may comprise so that the HW calculating part 120 and the time measuring part 250 may be provided with the function to rewrite the value of the flag area | region 241. FIG.

また、本実施の形態ではフラグ領域241としてメモリ240の記憶領域の一部を利用する例を示したが、これに限定される必要はなく、例えばPU110やHW演算部120に記憶手段(図示せず)を備えてその記憶手段の一部をフラグ領域241としてもよい。   In the present embodiment, an example in which a part of the storage area of the memory 240 is used as the flag area 241 is shown. However, the present invention is not limited to this. For example, the PU 110 or the HW arithmetic unit 120 stores storage means (not shown). A part of the storage means may be used as the flag area 241.

ここで、図14を参照して、上記(6)式で算出した時刻について説明する。図14は、フラグ領域241の値を書き換える時刻と演算の処理時間等との関係を示す図である。図14では、T1411が、フラグ領域241の値を書き換える時刻Tに相当する。   Here, with reference to FIG. 14, the time calculated by the above equation (6) will be described. FIG. 14 is a diagram showing the relationship between the time for rewriting the value of the flag area 241 and the processing time of the calculation. In FIG. 14, T1411 corresponds to time T when the value of the flag area 241 is rewritten.

なお、同図の第1の演算処理は、要求済み演算に相当する。また、第2の演算処理は、要求済み演算の次に要求される演算処理(要求待ち演算)に相当する。同図は、第2の演算処理が、第1の演算処理の前処理301や非同期化処理311が実行された後に実行された場合の例を示している。なお、前処理321、非同期化処理331、Tdelay322、およびThw323は、第2の演算処理に含まれる各処理または処理の処理時間を表す。   Note that the first calculation process in the figure corresponds to the requested calculation. The second calculation process corresponds to a calculation process (request waiting calculation) requested next to the requested calculation. This figure shows an example in which the second arithmetic processing is executed after the preprocessing 301 of the first arithmetic processing and the desynchronization processing 311 are executed. Note that pre-processing 321, desynchronization processing 331, Tdelay 322, and Thw 323 represent each processing included in the second arithmetic processing or processing time of the processing.

同図で示すように、第2の演算処理で演算方式決定部202を実行する時点(図中の前処理321)から見ると、T1411は、Tdelay322が終了する時刻から非同期化時間(Toh)332を減算した時刻に相当する。もし演算方式決定部202が実行される時点がT1411より前であれば、Thw>0であることを考えると、以下の(7)式が成り立つ。
Thw+Tdelay−Toh>0 ・・・(7)
As shown in the figure, when viewed from the time point when the calculation method determination unit 202 is executed in the second calculation process (pre-process 321 in the figure), T1411 is the desynchronization time (Toh) 332 from the time when the Tdelay 322 ends. Corresponds to the time obtained by subtracting. If the time point at which the calculation method determination unit 202 is executed is before T1411, considering that Thw> 0, the following equation (7) holds.
Thw + Tdelay-Toh> 0 (7)

なお、(7)式では、Tdelayは、要求待ち演算に対して上述の(4)式で算出された遅延時間を表す。また、Thwは、要求待ち演算に対して算出されたハードウェア処理時間を表す。   In equation (7), Tdelay represents the delay time calculated by equation (4) above for the request wait calculation. Thw represents the hardware processing time calculated for the request wait calculation.

このため、次に要求する要求待ち演算について非同期化効果G(x)を計算するまでもなく、要求待ち演算の演算方式を非同期方式に決定すればよいことになる。そこで、本実施の形態の演算方式決定部202は、図15の処理フローで演算方式を決定する。図15は、第2の実施の形態における演算方式決定処理の全体の流れを示すフローチャートである。   For this reason, it is not necessary to calculate the desynchronization effect G (x) for the request waiting operation to be requested next, and the operation method of the request waiting operation may be determined as the asynchronous method. Therefore, the calculation method determination unit 202 of this embodiment determines the calculation method in the processing flow of FIG. FIG. 15 is a flowchart illustrating an overall flow of the calculation method determination process according to the second embodiment.

演算方式決定部202は、フラグ領域241が第1の値であるか否かを判断する(ステップS1501)。フラグ領域241が第1の値である場合(ステップS1501:YES)、演算方式決定部202は、演算方式を非同期方式に決定する(ステップS1506)。   The calculation method determination unit 202 determines whether or not the flag area 241 has the first value (step S1501). When the flag area 241 is the first value (step S1501: YES), the calculation method determination unit 202 determines the calculation method to be an asynchronous method (step S1506).

フラグ領域241が第1の値でない場合、すなわち、第2の値である場合は(ステップS1501:NO)、演算方式決定部202は、第1の実施の形態と同様の方法により、演算方式を決定する(ステップS1502〜ステップS1507)。ステップS1502からS1507までは第1の実施の形態における図10のステップS1001〜S1006までと同様であるため、説明を省略する。   If the flag area 241 is not the first value, that is, if it is the second value (step S1501: NO), the calculation method determination unit 202 uses the same method as in the first embodiment to change the calculation method. Determine (steps S1502 to S1507). Steps S1502 to S1507 are the same as steps S1001 to S1006 in FIG. 10 in the first embodiment, and thus the description thereof is omitted.

第2の実施の形態における演算方式決定部202の判断結果は、第1の実施の形態における演算方式決定部102の判断結果である図11と同様となる。   The determination result of the calculation method determination unit 202 in the second embodiment is the same as FIG. 11 which is the determination result of the calculation method determination unit 102 in the first embodiment.

このように、第2の実施の形態にかかる情報処理装置では、要求済み演算を非同期方式で実行できることを表すフラグを記憶し、このフラグの値が非同期方式で実行可能であることを示す場合は、要求待ち演算の演算方式を非同期方式に決定することができる。このため、第1の実施の形態よりも演算方式決定処理の処理時間を削減し、PU上の処理負荷をさらに減少させることが可能となる。   As described above, the information processing apparatus according to the second embodiment stores a flag indicating that the requested calculation can be executed in an asynchronous manner, and indicates that the value of the flag indicates that the calculation can be executed in an asynchronous manner. Thus, the calculation method of the request waiting calculation can be determined as an asynchronous method. For this reason, it is possible to reduce the processing time of the calculation method determination processing and further reduce the processing load on the PU as compared with the first embodiment.

第1または第2の実施の形態にかかる情報処理装置で実行される情報処理プログラムは、インストール可能な形式又は実行可能な形式のファイルでCD−ROM(Compact Disk Read Only Memory)、フレキシブルディスク(FD)、CD−R(Compact Disk Recordable)、DVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記録媒体に記録されて提供される。   An information processing program executed by the information processing apparatus according to the first or second embodiment is a file in an installable format or an executable format, and is a CD-ROM (Compact Disk Read Only Memory) or a flexible disk (FD). ), A CD-R (Compact Disk Recordable), a DVD (Digital Versatile Disk), and the like.

また、第1または第2の実施の形態にかかる情報処理装置で実行される情報処理プログラムを、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成してもよい。また、第1または第2の実施の形態にかかる情報処理装置で実行される情報処理プログラムをインターネット等のネットワーク経由で提供または配布するように構成してもよい。   Further, the information processing program executed by the information processing apparatus according to the first or second embodiment is stored on a computer connected to a network such as the Internet and provided by being downloaded via the network. It may be configured. The information processing program executed by the information processing apparatus according to the first or second embodiment may be provided or distributed via a network such as the Internet.

また、第1または第2の実施の形態の情報処理プログラムを、ROM等に予め組み込んで提供するように構成してもよい。   The information processing program according to the first or second embodiment may be provided by being incorporated in advance in a ROM or the like.

第1または第2の実施の形態にかかる情報処理装置で実行される情報処理プログラムは、上述した各部(処理時間算出部、演算方式決定部、演算制御部、ネットワーク処理部、遅延時間算出部)を含むモジュール構成となっており、実際のハードウェアとしてはPU110(プロセッサ)が上記記憶媒体から情報処理プログラムを読み出して実行することにより上記各部が主記憶装置上にロードされ、上述した各部が主記憶装置上に生成されるようになっている。   The information processing program executed by the information processing apparatus according to the first or second embodiment includes the above-described units (processing time calculation unit, calculation method determination unit, calculation control unit, network processing unit, delay time calculation unit). As the actual hardware, the PU 110 (processor) reads the information processing program from the storage medium and executes it to load the respective units onto the main storage device. It is generated on a storage device.

なお、本発明は、上記実施の形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化することができる。また、上記実施の形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成することができる。例えば、実施の形態に示される全構成要素からいくつかの構成要素を削除してもよい。さらに、異なる実施の形態にわたる構成要素を適宜組み合わせても良い。   It should be noted that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the above embodiments. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.

100、200、1200 通信装置
101 処理時間算出部
102、202 演算方式決定部
103、203 演算制御部
104 ネットワーク処理部
105 遅延時間算出部
111 共有バス
120 HW演算部
130、131 ネットワークインタフェース
140、240 メモリ
206 フラグ更新部
241 フラグ領域
250 計時部
300 IPネットワーク
400、500 端末装置
100, 200, 1200 Communication device 101 Processing time calculation unit 102, 202 Calculation method determination unit 103, 203 Calculation control unit 104 Network processing unit 105 Delay time calculation unit 111 Shared bus 120 HW calculation unit 130, 131 Network interface 140, 240 Memory 206 Flag Update Unit 241 Flag Area 250 Timekeeping Unit 300 IP Network 400, 500 Terminal Device

Claims (10)

予め定められた演算を要求した処理が前記演算の終了と同期して実行される同期方式、および、前記処理が前記演算の終了と非同期に実行される非同期方式、のいずれかの実行方式で前記演算を実行する演算回路と、
前記演算回路で実行することを要求された前記演算を表す要求済み演算が終了するまでの時間を表す遅延時間を算出する遅延時間算出部と、
前記要求済み演算の次に実行が要求される前記演算を表す要求待ち演算を前記演算回路で実行するときの処理時間と前記遅延時間との和、および、前記非同期方式で前記要求待ち演算を実行するときに前記要求待ち演算に付随して実行される処理の処理時間を表す非同期化時間を比較し、前記和が前記非同期化時間より大きい場合に、前記非同期方式で前記要求待ち演算を実行することを決定する決定部と、
決定された前記実行方式により前記要求待ち演算を実行することを前記演算回路に要求する制御部と、
を備えたことを特徴とする情報処理装置。
The execution method is one of a synchronous method in which a process that requests a predetermined operation is executed in synchronization with the end of the operation, and an asynchronous method in which the process is executed asynchronously with the end of the operation. An arithmetic circuit for performing an operation;
A delay time calculation unit that calculates a delay time that represents a time until the requested calculation that represents the calculation requested to be executed by the calculation circuit is completed;
Execution of the request wait operation in the asynchronous manner, and the sum of the processing time and the delay time when the operation circuit executes the request wait operation representing the operation requested to be executed next to the requested operation When the sum is greater than the desynchronization time, the request wait operation is executed in the asynchronous manner when the desynchronization time representing the processing time of the process executed in association with the request wait operation is compared. A decision unit that decides,
A control unit that requests the arithmetic circuit to execute the request waiting operation according to the determined execution method;
An information processing apparatus comprising:
前記決定部は、前記和が前記非同期化時間より小さい場合に、前記同期方式で前記要求待ち演算を実行することを決定すること、
を特徴とする請求項1に記載の情報処理装置。
The determining unit determines to execute the request waiting operation in the synchronization method when the sum is smaller than the desynchronization time;
The information processing apparatus according to claim 1.
前記演算を前記非同期方式で実行できるか否かを表す可否情報を記憶する記憶部と、
前記要求済み演算のうち最後に要求された前記要求済み演算を表す最終演算が要求されたときに、前記可否情報を前記非同期方式で実行できることを表す値に更新し、前記最終演算が要求されてから、前記最終演算を前記演算回路で実行するときの処理時間と前記遅延時間との和に相当する時間が経過したときに、前記可否情報を前記非同期方式で実行できないことを表す値に更新する更新部と、をさらに備え、
前記決定部は、さらに、前記可否情報が前記非同期方式で実行できることを表す値である場合に、前記非同期方式で前記要求待ち演算を実行することを決定すること、
を特徴とする請求項1に記載の情報処理装置。
A storage unit that stores availability information indicating whether the operation can be performed in the asynchronous manner;
When a final operation representing the requested operation that is requested last among the requested operations is requested, the availability information is updated to a value indicating that the asynchronous operation can be performed, and the final operation is requested. When the time corresponding to the sum of the processing time when the final operation is executed by the arithmetic circuit and the delay time has elapsed, the availability information is updated to a value indicating that the asynchronous method cannot be executed. An update unit,
The determination unit further determines to execute the request waiting operation in the asynchronous method when the availability information is a value indicating that the information can be executed in the asynchronous method;
The information processing apparatus according to claim 1.
前記決定部は、前記可否情報が前記非同期方式で実行できることを表す値ではない値である場合に、前記和および前記非同期化時間を比較し、前記和が前記非同期化時間より大きい場合に、前記非同期方式で前記要求待ち演算を実行することを決定すること、
を特徴とする請求項3に記載の情報処理装置。
The determining unit compares the sum and the desynchronization time when the availability information is a value that is not a value indicating that the information can be executed in the asynchronous manner, and when the sum is larger than the desynchronization time, Determining to perform the request wait operation in an asynchronous manner;
The information processing apparatus according to claim 3.
予め定められた前記非同期化時間を記憶する記憶部をさらに備え、
前記決定部は、前記和と前記記憶部に記憶された前記非同期化時間とを比較し、前記和が前記非同期化時間より大きい場合に、前記非同期方式で前記要求待ち演算を実行することを決定すること、
を特徴とする請求項1に記載の情報処理装置。
A storage unit for storing the predetermined desynchronization time;
The determination unit compares the sum and the desynchronization time stored in the storage unit, and when the sum is greater than the desynchronization time, determines to execute the request waiting operation in the asynchronous method. To do,
The information processing apparatus according to claim 1.
前記非同期化時間を記憶可能な記憶部をさらに備え、
予め定められたテストデータに対して前記非同期方式により前記演算を実行したときの処理時間と、前記テストデータに対して前記同期方式により前記演算を実行したときの処理時間とを比較し、比較結果に基づいて前記非同期化時間を算出し、算出した前記非同期化時間を前記記憶部に保存する処理時間算出部をさらに備えたこと、
を特徴とする請求項1に記載の情報処理装置。
A storage unit capable of storing the desynchronization time;
The processing time when the calculation is executed by the asynchronous method with respect to predetermined test data is compared with the processing time when the calculation is executed by the synchronous method with respect to the test data, and the comparison result Further comprising a processing time calculation unit that calculates the desynchronization time based on the data and stores the calculated desynchronization time in the storage unit;
The information processing apparatus according to claim 1.
前記処理時間算出部は、前記テストデータに対して前記非同期方式により前記演算を実行したときの処理時間と前記テストデータに対して前記同期方式により前記演算を実行したときの処理時間との差分を前記非同期化時間として算出し、算出した前記非同期化時間を前記記憶部に保存すること、
を特徴とする請求項6に記載の情報処理装置。
The processing time calculation unit calculates a difference between a processing time when the calculation is performed on the test data by the asynchronous method and a processing time when the calculation is performed on the test data by the synchronous method. Calculating as the desynchronization time, and storing the calculated desynchronization time in the storage unit;
The information processing apparatus according to claim 6.
前記決定部は、前記演算の処理対象となるデータのデータサイズに基づいて、前記要求待ち演算を前記演算回路で実行するときの処理時間を算出し、算出した処理時間と前記遅延時間との和、および、前記非同期化時間を比較し、前記和が前記非同期化時間より大きい場合に、前記非同期方式で前記要求待ち演算を実行することを決定すること、
を特徴とする請求項1に記載の情報処理装置。
The determination unit calculates a processing time when the request wait calculation is executed in the arithmetic circuit based on a data size of data to be processed by the calculation, and sums the calculated processing time and the delay time. Comparing the desynchronization times and determining to execute the request wait operation in the asynchronous manner if the sum is greater than the desynchronization time;
The information processing apparatus according to claim 1.
予め定められた演算を要求した処理が前記演算の終了と同期して実行される同期方式、および、前記処理が前記演算の終了と非同期に実行される非同期方式、のいずれかの実行方式で前記演算を実行する演算回路を備えた情報処理装置で実行される情報処理方法であって、
遅延時間算出部が、前記演算回路で実行することを要求された前記演算を表す要求済み演算が終了するまでの時間を表す遅延時間を算出する遅延時間算出ステップと、
決定部が、前記要求済み演算の次に実行が要求される前記演算を表す要求待ち演算を前記演算回路で実行するときの処理時間と前記遅延時間との和、および、前記非同期方式で前記要求待ち演算を実行するときに前記要求待ち演算に付随して実行される処理の処理時間を表す非同期化時間を比較し、前記和が前記非同期化時間より大きい場合に、前記非同期方式で前記要求待ち演算を実行することを決定する決定ステップと、
制御部が、決定された前記実行方式により前記要求待ち演算を実行することを前記演算回路に要求する制御ステップと、
を備えることを特徴とする情報処理方法。
The execution method is one of a synchronous method in which a process that requests a predetermined operation is executed in synchronization with the end of the operation, and an asynchronous method in which the process is executed asynchronously with the end of the operation. An information processing method executed by an information processing apparatus including an arithmetic circuit for performing an arithmetic operation,
A delay time calculating step in which a delay time calculating unit calculates a delay time representing a time until a requested operation representing the operation requested to be executed by the arithmetic circuit is completed;
The determination unit includes a sum of a processing time and the delay time when the calculation circuit executes a request waiting calculation representing the calculation requested to be executed next to the requested calculation, and the request in the asynchronous manner. When performing the wait operation, the desynchronization time representing the processing time of the process executed in association with the request wait operation is compared, and when the sum is larger than the desynchronization time, the request wait is performed in the asynchronous method. A decision step for deciding to perform the operation;
A control step for requesting the arithmetic circuit to execute the request waiting operation according to the determined execution method;
An information processing method comprising:
予め定められた演算を要求した処理が前記演算の終了と同期して実行される同期方式、および、前記処理が前記演算の終了と非同期に実行される非同期方式、のいずれかの実行方式で前記演算を実行する演算回路を備えたコンピュータを、
前記演算回路で実行することを要求された前記演算を表す要求済み演算が終了するまでの時間を表す遅延時間を算出する遅延時間算出部と、
前記要求済み演算の次に実行が要求される前記演算を表す要求待ち演算を前記演算回路で実行するときの処理時間と前記遅延時間との和、および、前記非同期方式で前記要求待ち演算を実行するときに前記要求待ち演算に付随して実行される処理の処理時間を表す非同期化時間を比較し、前記和が前記非同期化時間より大きい場合に、前記非同期方式で前記要求待ち演算を実行することを決定する決定部と、
決定された前記実行方式により前記要求待ち演算を実行することを前記演算回路に要求する制御部として機能させるための情報処理プログラム。
The execution method is one of a synchronous method in which a process that requests a predetermined operation is executed in synchronization with the end of the operation, and an asynchronous method in which the process is executed asynchronously with the end of the operation. A computer equipped with an arithmetic circuit for performing an operation
A delay time calculation unit that calculates a delay time that represents a time until the requested calculation that represents the calculation requested to be executed by the calculation circuit is completed;
Execution of the request wait operation in the asynchronous manner, and the sum of the processing time and the delay time when the operation circuit executes the request wait operation representing the operation requested to be executed next to the requested operation When the sum is greater than the desynchronization time, the request waiting operation is executed in the asynchronous manner when the desynchronization time representing the processing time of the processing executed in association with the request waiting operation is compared. A decision unit that decides,
An information processing program for causing a function to function as a control unit that requests the arithmetic circuit to execute the request waiting operation according to the determined execution method.
JP2009035347A 2009-02-18 2009-02-18 Apparatus, method, and program for processing information by controlling calculation method Expired - Fee Related JP5300523B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009035347A JP5300523B2 (en) 2009-02-18 2009-02-18 Apparatus, method, and program for processing information by controlling calculation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009035347A JP5300523B2 (en) 2009-02-18 2009-02-18 Apparatus, method, and program for processing information by controlling calculation method

Publications (2)

Publication Number Publication Date
JP2010191682A true JP2010191682A (en) 2010-09-02
JP5300523B2 JP5300523B2 (en) 2013-09-25

Family

ID=42817664

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009035347A Expired - Fee Related JP5300523B2 (en) 2009-02-18 2009-02-18 Apparatus, method, and program for processing information by controlling calculation method

Country Status (1)

Country Link
JP (1) JP5300523B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009009477A (en) * 2007-06-29 2009-01-15 Toshiba Corp Device, method, and program for controlling operation system to process information
US11586032B2 (en) 2017-01-27 2023-02-21 Gigaphoton Inc. Laser apparatus and extreme ultraviolet light generation system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008112274A (en) * 2006-10-30 2008-05-15 Fuji Xerox Co Ltd Controller and program
JP2008210110A (en) * 2007-02-26 2008-09-11 Nec Corp Business system and its execution request management method
JP2009009477A (en) * 2007-06-29 2009-01-15 Toshiba Corp Device, method, and program for controlling operation system to process information

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008112274A (en) * 2006-10-30 2008-05-15 Fuji Xerox Co Ltd Controller and program
JP2008210110A (en) * 2007-02-26 2008-09-11 Nec Corp Business system and its execution request management method
JP2009009477A (en) * 2007-06-29 2009-01-15 Toshiba Corp Device, method, and program for controlling operation system to process information

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009009477A (en) * 2007-06-29 2009-01-15 Toshiba Corp Device, method, and program for controlling operation system to process information
US11586032B2 (en) 2017-01-27 2023-02-21 Gigaphoton Inc. Laser apparatus and extreme ultraviolet light generation system

Also Published As

Publication number Publication date
JP5300523B2 (en) 2013-09-25

Similar Documents

Publication Publication Date Title
JP5032219B2 (en) Apparatus, method, and program for processing information by controlling calculation method
KR101464416B1 (en) Systems, methods, and apparatuses for ciphering error detection and recovery
JP6229800B2 (en) Analysis system, analysis method, and analysis program
EP2879337B1 (en) Communication system, method, and program
WO2017221979A1 (en) Process control device, process control method, and recording medium having process control program recorded therein
US10827044B2 (en) Method, apparatus and computer program product for processing data
JP5300523B2 (en) Apparatus, method, and program for processing information by controlling calculation method
JP6112874B2 (en) COMMUNICATION DEVICE, COMMUNICATION DEVICE CONTROL METHOD, AND PROGRAM
JP2009218743A (en) Ip protocol processor and its processing method
JP5335354B2 (en) Information transmitting apparatus, information transmitting apparatus control method, and computer program
JP2007028552A (en) Apparatus and method for information processing, and computer program
JP6369554B2 (en) Analysis system, analysis method, and analysis program
JP6036442B2 (en) Encryption communication apparatus, encryption communication method, and encryption communication program
US8897441B2 (en) Packet transmitting and receiving apparatus and packet transmitting and receiving method
CN115766902A (en) Method, device, equipment and medium for transmitting non-sensitive data through QUIC
JP6369553B2 (en) Analysis system, analysis method, and analysis program
JP2019033402A (en) Communication device
JP2010119030A (en) Communication device, communication method, and communication program
JP2017102559A (en) Malware determination device, malware determination method, and malware determination program
JP2009044677A (en) Secret information processor, processing apparatus, and processing method
JP6742740B2 (en) Communication device, control method, and program
WO2023180892A1 (en) System, method, and computer program for online data transfer
JP2016015697A (en) Communication device, communication device control method, and program
JP2016031552A (en) Image supply device, image display device, image display system and image supply program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110916

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130301

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130312

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130510

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130528

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130618

LAPS Cancellation because of no payment of annual fees