JP2009151422A - Source code conversion program and device based on processor device - Google Patents

Source code conversion program and device based on processor device Download PDF

Info

Publication number
JP2009151422A
JP2009151422A JP2007326964A JP2007326964A JP2009151422A JP 2009151422 A JP2009151422 A JP 2009151422A JP 2007326964 A JP2007326964 A JP 2007326964A JP 2007326964 A JP2007326964 A JP 2007326964A JP 2009151422 A JP2009151422 A JP 2009151422A
Authority
JP
Japan
Prior art keywords
function
program
source code
output
input
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
JP2007326964A
Other languages
Japanese (ja)
Other versions
JP5143542B2 (en
Inventor
Yuji Ikeda
裕司 池田
Kosuke Yamazaki
浩輔 山崎
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.)
KDDI Corp
Original Assignee
KDDI 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 KDDI Corp filed Critical KDDI Corp
Priority to JP2007326964A priority Critical patent/JP5143542B2/en
Publication of JP2009151422A publication Critical patent/JP2009151422A/en
Application granted granted Critical
Publication of JP5143542B2 publication Critical patent/JP5143542B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Advance Control (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a source code conversion program and the like for converting an original source code into a source code that can be computed at high speed, depending on the characteristic of a high-speed computing unit of a processor device. <P>SOLUTION: The processor device includes a general-purpose computing unit and a high-speed computing unit. An original source code is converted into a function definition program to be executed by the high-speed computing unit and a function call program to be executed by the general-purpose computing unit. In particular, depending on the number of input registers and/or the number of output registers of the high-speed computing unit, the number of input variables and/or the number of output variables of each function of the function definition program are varied and associated with the number of input variables and/or the number of output variables of the call function of the function call program. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、ソースコード変換プログラム及び装置に関する。   The present invention relates to a source code conversion program and apparatus.

携帯電話、PHS、無線LAN等のような様々な無線通信方式は、出力レベル、周波数帯、変調方式等が異なっている。そのため、通信装置は、複数の通信方式に対応するために、通信方式毎に専用の信号処理回路(ハードウェア)を予め搭載する必要があった。しかしながら、ユーザの利用態様又は通信環境によっては、通信装置の通信方式も異なる場合が多い。ユーザが利用するであろう複数の通信方式を想定して、それらに対応するハードウェアを携帯電話機に予め搭載することは、携帯電話機の処理能力、容積及びコストの点から難しい。   Various wireless communication systems such as mobile phones, PHS, and wireless LANs differ in output level, frequency band, modulation system, and the like. Therefore, in order to cope with a plurality of communication methods, the communication device has to be preinstalled with a dedicated signal processing circuit (hardware) for each communication method. However, the communication method of the communication device often differs depending on the usage mode or communication environment of the user. Assuming a plurality of communication methods that a user will use, it is difficult to pre-install hardware corresponding to them in the cellular phone from the viewpoint of processing capability, volume, and cost of the cellular phone.

これに対し、通信装置の無線インタフェース部のソフトウェアを書き換えることによって、異なる様々な無線通信方式に対応するソフトウェア無線(SDR:Software Defined Radio)技術がある。この技術によれば、ソフトウェアモジュールを更新することによって通信装置の通信方式も更新することができるために、ハードウェアを予め搭載しておく必要がなく、容積及びコストの点からも有効といえる。   On the other hand, there is a software defined radio (SDR) technology corresponding to various different wireless communication systems by rewriting software of a wireless interface unit of a communication device. According to this technique, since the communication method of the communication device can be updated by updating the software module, it is not necessary to install hardware in advance, and it can be said that it is effective in terms of volume and cost.

ソフトウェア無線技術によれば、通信装置は、汎用的なハードウェアを用いることができる一方で、通信方式に依存する処理の大部分をソフトウェアによって実現する。ソフトウェアモジュールは更新可能であって、新しい通信方式には、新しいソフトウェアモジュールをダウンロードして実行することによって対応でき、ハードウェアを交換する必要がない。   According to the software defined radio technology, the communication device can use general-purpose hardware, while realizing most of the processing depending on the communication method by software. Software modules are updatable and new communication schemes can be accommodated by downloading and executing new software modules without having to replace hardware.

ここで、プログラムをハードウェア的に高速に実行するために、汎用演算部に加えて更に高速演算部を備えたDSP(Digital Signal Processor)プロセッサデバイスも市販されている(例えば非特許文献1参照)。   Here, in order to execute a program at high speed in hardware, a DSP (Digital Signal Processor) processor device provided with a high-speed arithmetic unit in addition to a general-purpose arithmetic unit is also commercially available (see, for example, Non-Patent Document 1). .

また、プログラムをソフトウェア的に高速に実行するために、原ソースコードを、最適なソースコードに変換する技術もある(例えば特許文献1参照)。この技術によれば、データ間の依存関係を解析し、その解析結果に基づいて最適化処理対象となる命令数を最適化因子として集計する。その最適化因子の集計結果に応じて、複数の最適化方法及びその実行順序を選択するように、原ソースコードを変換する。   There is also a technique for converting an original source code into an optimal source code in order to execute a program at high speed in terms of software (see, for example, Patent Document 1). According to this technique, dependency relationships between data are analyzed, and the number of instructions to be optimized is tabulated as an optimization factor based on the analysis result. The original source code is converted so as to select a plurality of optimization methods and their execution order according to the result of aggregation of the optimization factors.

ストレッチ株式会社、「S5530」、[online]、[平成19年12月10日検索]、インターネット<URL:http://www.stretchinc.co.jp/_files/s5530chip_J.pdf>Stretch Co., Ltd., “S5530”, [online], [December 10, 2007 search], Internet <URL: http://www.stretchinc.co.jp/_files/s5530chip_E.pdf> 特開平9−319586号公報Japanese Patent Laid-Open No. 9-319586

しかしながら、ソフトウェア無線のソフトウェアモジュールを実行するプロセッサデバイスが汎用的であっても、全ての通信装置についてその特性まで統一することは難しい。現実的に、様々な種類の高速演算部を搭載したプロセッサデバイスが市販されている。一方で、プロセッサデバイスの高速演算部の特性が異なるにもかかわらず、ソフトウェア無線のソースコード自体は、全て同じである。特定の高速演算部に最適なソースコードを作成するには、人手によってソースコードを再コーディングする必要がある。また、そのような最適なソースコードを作成したとしても、他の高速演算部では利用できず、結局、汎用性を失うこととなる。   However, even if a processor device that executes a software radio software module is general-purpose, it is difficult to unify the characteristics of all communication devices. In reality, processor devices equipped with various types of high-speed arithmetic units are commercially available. On the other hand, all the source codes of software defined radio are the same, although the characteristics of the high-speed calculation unit of the processor device are different. In order to create an optimum source code for a specific high-speed operation unit, it is necessary to recode the source code manually. Moreover, even if such an optimal source code is created, it cannot be used in other high-speed arithmetic units, and eventually versatility is lost.

特許文献1に記載された技術によれば、原ソースコードの中だけで、プログラムを最適化するものであって、ハードウェアの特性を考慮して最適化するものではない。即ち、異なる高速演算部を用いたとしても、変換されるソースコードは同じものである。一方で、携帯電話機のような通信端末についてソフトウェア無線技術を普及させるためには、ベースとなる原ソースコードを、プロセッサデバイス毎の特性を活かしたプログラムに変換することが好ましい。   According to the technique described in Patent Document 1, the program is optimized only in the original source code, and is not optimized in consideration of hardware characteristics. That is, even if different high-speed arithmetic units are used, the source code to be converted is the same. On the other hand, in order to spread software radio technology for communication terminals such as mobile phones, it is preferable to convert the original source code serving as a base into a program that takes advantage of the characteristics of each processor device.

そこで、本発明は、プロセッサデバイスの高速演算部の特性に応じて、原ソースコードを高速に演算することができるソースコードに変換するソースコード変換プログラム及び装置を提供することを目的とする。   Therefore, an object of the present invention is to provide a source code conversion program and apparatus for converting an original source code into a source code that can be operated at high speed in accordance with the characteristics of a high-speed operation unit of a processor device.

本発明によれば、原ソースコードをプロセッサデバイスに適応したソースコードに変換する変換手段として、コンピュータを機能させるプログラムにおいて、
プロセッサデバイスは、汎用演算手段と高速演算手段とを含んでおり、
変換手段は、原ソースコードから、高速演算手段で実行すべき関数定義プログラムと、汎用演算手段で実行すべき関数呼び出しプログラムとを生成するようにコンピュータを機能させることを特徴とする。
According to the present invention, in a program for causing a computer to function as conversion means for converting original source code into source code adapted to a processor device,
The processor device includes general-purpose computing means and high-speed computing means,
The converting means causes the computer to function so as to generate a function definition program to be executed by the high-speed arithmetic means and a function calling program to be executed by the general-purpose arithmetic means from the original source code.

本発明のソースコード変換プログラムにおける他の実施形態によれば、変換手段は、高速演算部の入力レジスタ数及び/又は出力レジスタ数に応じて、関数定義プログラムの各関数の入力変数の数及び/又は出力変数の数を変更すると共に、関数呼び出しプログラムの呼び出し関数の入力変数の数及び又は出力変数の数を対応させるようにコンピュータを機能させることも好ましい。   According to another embodiment of the source code conversion program of the present invention, the conversion means determines the number of input variables and / or the number of input variables of each function of the function definition program according to the number of input registers and / or the number of output registers of the high-speed operation unit. Alternatively, it is also preferable to change the number of output variables and allow the computer to function so as to correspond the number of input variables and / or the number of output variables of the calling function of the function calling program.

本発明のソースコード変換プログラムにおける他の実施形態によれば、変換手段は、高速演算部に対する入力データサイズ及び/又は出力データサイズに応じて、関数定義プログラムの各関数の入力データサイズ及び/又は出力データサイズを変更すると共に、関数呼び出しプログラムの呼び出し関数の入力データサイズ及び/又は出力データサイズを対応させるようにコンピュータを機能させることも好ましい。   According to another embodiment of the source code conversion program of the present invention, the conversion means can input data size and / or each function of the function definition program according to the input data size and / or output data size for the high-speed operation unit. It is also preferable to change the output data size and cause the computer to function so as to correspond to the input data size and / or the output data size of the calling function of the function calling program.

本発明のソースコード変換プログラムにおける他の実施形態によれば、変換手段は、関数定義プログラムの繰り返し関数について、高速演算部に対する入力データサイズに応じて、一度に入力可能な入力変数の配列要素の個数を算出し、算出された個数の単位で繰り返し処理をするべく変換すると共に、関数呼び出しプログラムの呼び出し関数からの入力変数の配列要素の個数を対応させるようにコンピュータを機能させることも好ましい。   According to another embodiment of the source code conversion program of the present invention, the conversion means is configured to input array elements of input variables that can be input at a time according to the input data size for the high-speed calculation unit for the repetition function of the function definition program. It is also preferable to calculate the number, convert it to repeat processing in the calculated number of units, and allow the computer to function so as to correspond to the number of array elements of the input variable from the calling function of the function calling program.

本発明のソースコード変換プログラムにおける他の実施形態によれば、変換手段は、関数定義プログラムの繰り返し関数について、高速演算部に対する出力データサイズに応じて、一度に出力可能な出力変数の配列要素の個数を算出し、算出された個数の単位で出力するべく変換すると共に、関数呼び出しプログラムの呼び出し関数からの出力変数の配列要素の個数を対応させるようにコンピュータを機能させることも好ましい。   According to another embodiment of the source code conversion program of the present invention, the conversion means includes, for the repetition function of the function definition program, the array elements of output variables that can be output at a time according to the output data size for the high-speed operation unit. It is also preferable to calculate the number and convert it to be output in the unit of the calculated number, and to make the computer function so that the number of array elements of the output variable from the calling function of the function calling program corresponds.

本発明のソースコード変換プログラムにおける他の実施形態によれば、関数定義プログラム及び関数呼び出しプログラムは、プロセッサデバイスによって実行されることにより、ソフトウェア無線の無線インタフェース部として機能することも好ましい。   According to another embodiment of the source code conversion program of the present invention, the function definition program and the function call program are preferably executed by the processor device to function as a software radio interface unit.

本発明によれば、原ソースコードをプロセッサデバイスに適応したソースコードに変換するプログラム変換装置であって、
プロセッサデバイスは、汎用演算手段と高速演算手段とを含んでおり、
変換手段は、原ソースコードから、高速演算手段で実行すべき関数定義プログラムと、汎用演算手段で実行すべき関数呼び出しプログラムとを生成することを特徴とする。
According to the present invention, there is provided a program conversion apparatus for converting original source code into source code adapted to a processor device,
The processor device includes general-purpose computing means and high-speed computing means,
The conversion unit generates a function definition program to be executed by the high-speed calculation unit and a function call program to be executed by the general-purpose calculation unit from the original source code.

本発明のソースコード変換プログラム及び装置によれば、原ソースコードを、その高速演算部の処理単位に応じて関数定義プログラムを記述したソースコードに変換するので、変換されたソースコードは、そのプロセッサデバイスで高速に演算することができる。   According to the source code conversion program and apparatus of the present invention, the original source code is converted into the source code in which the function definition program is described according to the processing unit of the high-speed operation unit. It can be operated at high speed on the device.

以下では、図面を用いて、本発明を実施するための最良の形態について詳細に説明する。   Hereinafter, the best mode for carrying out the present invention will be described in detail with reference to the drawings.

図1は、ソフトウェア無線技術に基づくシステム構成図である。   FIG. 1 is a system configuration diagram based on software defined radio technology.

図1によれば、通信端末1は、無線リンクで接続する基地局3を介して、ネットワーク4に接続される。また、ネットワーク4には、モジュール配信サーバ2が更に接続されている。   According to FIG. 1, a communication terminal 1 is connected to a network 4 via a base station 3 connected by a wireless link. Further, the module distribution server 2 is further connected to the network 4.

通信端末1の無線インタフェース部は、ソフトウェア無線として機能する。通信端末1は、そのソフトウェア無線のソフトウェアモジュールを、ネットワーク4を介してモジュール配信サーバ2から受信する。図1によれば、通信端末1は、通信状態情報をモジュール配信サーバ2へ送信する。これに対し、モジュール配信サーバ2は、その通信状態情報に最適となるソフトウェア無線のソフトウェアモジュールを、通信端末1へ送信する。これによって、通信端末1は、ハードウェアを変更することなく、異なる通信方式に対応することができる。   The radio interface unit of the communication terminal 1 functions as software radio. The communication terminal 1 receives the software radio software module from the module distribution server 2 via the network 4. According to FIG. 1, the communication terminal 1 transmits communication state information to the module distribution server 2. On the other hand, the module distribution server 2 transmits to the communication terminal 1 a software radio software module that is optimal for the communication state information. As a result, the communication terminal 1 can support different communication methods without changing the hardware.

図1によれば、通信端末1は、ハードウェアに基づくDSPチップであるプロセッサデバイス10と、無線インタフェース部(ソフトウェア無線)部11と、モジュール記憶部12と、モジュール再構成部13とを有する。   According to FIG. 1, the communication terminal 1 includes a processor device 10 that is a DSP chip based on hardware, a radio interface unit (software radio) unit 11, a module storage unit 12, and a module reconfiguration unit 13.

プロセッサデバイス10は、汎用演算部100と、高速演算部101とを有する。高速演算部101は、高速に演算するために、入力レジスタ数及び出力レジスタ数や、入力データサイズ及び出力データサイズが制約されている。汎用演算部100は、高速演算部101に対して、その制約条件の範囲内で処理を実行させる。   The processor device 10 includes a general-purpose arithmetic unit 100 and a high-speed arithmetic unit 101. The high-speed calculation unit 101 is restricted in the number of input registers and output registers, the input data size, and the output data size in order to perform high-speed calculations. The general-purpose arithmetic unit 100 causes the high-speed arithmetic unit 101 to execute processing within the range of the constraint condition.

無線インタフェース部11は、プロセッサデバイス10によってソフトウェアモジュールが実行されることによって機能する。モジュール記憶部12は、モジュール配信サーバ2から受信したソフトウェアモジュールを記憶する。モジュール再構成部13は、通信状態情報をモジュール配信サーバ2へ送信し、モジュール配信サーバ2から最適なソフトウェアモジュールを受信する。   The wireless interface unit 11 functions when a software module is executed by the processor device 10. The module storage unit 12 stores the software module received from the module distribution server 2. The module reconfiguration unit 13 transmits communication state information to the module distribution server 2 and receives an optimal software module from the module distribution server 2.

図2は、本発明におけるソースコード変換の説明図である。   FIG. 2 is an explanatory diagram of source code conversion in the present invention.

図2によれば、本発明に基づくソースコード変換プログラムをコンピュータで実行することによって、原ソースコードは、「関数定義プログラム」と、「関数呼び出しプログラム」とに変換される。関数定義プログラムに記述される各関数は、高速演算部で実行できる単位で生成される。また、関数呼び出しプログラムは、関数定義プログラムに記述される各関数を呼び出すことによって処理を実行する。   According to FIG. 2, by executing the source code conversion program based on the present invention on a computer, the original source code is converted into a “function definition program” and a “function call program”. Each function described in the function definition program is generated in units that can be executed by the high-speed arithmetic unit. The function call program executes processing by calling each function described in the function definition program.

図3は、様々な高速演算部の説明図である。   FIG. 3 is an explanatory diagram of various high-speed arithmetic units.

プロセッサデバイスに内蔵される高速演算部は、高速に演算するが故に、様々な制約がある。図3によれば、2入力1出力や3入力2出力のタイプがある。また、入出力データサイズが128ビットのものから64ビットのものまである。更に、高速演算部の内部メモリのサイズにも、256Kバイトのものから64Kバイトのものまである。本発明によれば、このような高速演算部のタイプに応じて、関数定義プログラムに記述される各関数が定義される。   The high-speed calculation unit built in the processor device has various restrictions because it calculates at high speed. According to FIG. 3, there are two-input one-output and three-input two-output types. The input / output data size ranges from 128 bits to 64 bits. Furthermore, the size of the internal memory of the high-speed arithmetic unit also ranges from 256 Kbytes to 64 Kbytes. According to the present invention, each function described in the function definition program is defined according to the type of the high-speed arithmetic unit.

以下では、具体的に、原ソースコードから変換された「関数定義プログラム」及び「関数呼び出しプログラム」を明示しながら説明する。尚、高速演算部では、以下に示すような高速演算部固有の記述方式が存在する。
WR :高速演算部で利用する変数の型
WRGETINIT() :高速演算部に渡す配列の先頭アドレスを設定する関数
WRGETI() :WRGETINIT()によって設定した先頭アドレスから何ビット分を、
高速演算部に渡すかを設定する関数
WRS16I() :高速演算部から配列を取り出す関数
In the following description, the “function definition program” and the “function call program” converted from the original source code will be specifically described. In the high-speed calculation unit, there are the following description methods unique to the high-speed calculation unit.
WR: Variable type used in the high-speed calculation unit
WRGETINIT (): A function that sets the start address of the array to be passed to the high-speed computation unit
WRGETI (): How many bits from the start address set by WRGETINIT ()
A function to set whether to pass to the high-speed calculation unit
WRS16I (): A function to extract an array from the high-speed calculation unit

最初に、2入力1出力の高速演算部に対する原ソースコードの例を表す。
[原ソースコード (2入力1出力)]
start Filtering Baseband [S11]
alloc int TempI [S12]
alloc int iDataI
alloc int iTap

for (i=0; i < (Num * CHIP_SAMP + TAP_NUM); i++) {
init TempI = 0 [S13]
loop_init j = 0 [S14]
loop_condition j < 48
loop_renew j += 1
calc_input iDataI = FIDMADataI[DMAOffset + i - (2*TAP_NUM-1)+j]
calc_input iTap = RxFilterFCHBBFTap[j] [S15]
calc_calc TempI += iDataI * iTap
loop_end
output DataI[i] = TempI >> 14
}
end
First, an example of original source code for a high-speed arithmetic unit with two inputs and one output will be shown.
[Original source code (2 inputs, 1 output)]
start Filtering Baseband [S11]
alloc int TempI [S12]
alloc int iDataI
alloc int iTap

for (i = 0; i <(Num * CHIP_SAMP + TAP_NUM); i ++) {
init TempI = 0 [S13]
loop_init j = 0 [S14]
loop_condition j <48
loop_renew j + = 1
calc_input iDataI = FIDMADataI [DMAOffset + i-(2 * TAP_NUM-1) + j]
calc_input iTap = RxFilterFCHBBFTap [j] [S15]
calc_calc TempI + = iDataI * iTap
loop_end
output DataI [i] = TempI >> 14
}
end

前述した原ソースコードは、標準のC言語で記述した上で、以下の表記を用いて拡張したものである。原ソースコードのこれら表記を逐次判定しながら変換する。
start :プログラム生成処理の開始
alloc :演算に利用する変数
init :変数の初期化
loop_init :ループの初期値
loop_condition :ループの終了条件
loop_renew :繰り返し時に実行される処理
loop_end :ループの終了
calc_input :演算に利用する入力
calc_calc :演算処理
output :演算の出力
end :プログラム生成処理の終了
また、前述した原ソースコードによれば、「calc_input」表記が2個で、「output」表記が1個なので、2入力1出力であることが理解できる。
The original source code described above is written in the standard C language and expanded using the following notation. The original source code is converted while sequentially judging these notations.
start: Start the program generation process
alloc: Variable used for operation
init: Variable initialization
loop_init: Initial value of the loop
loop_condition: Loop termination condition
loop_renew: Processing executed during iteration
loop_end: End of the loop
calc_input: Input used for calculation
calc_calc: Calculation processing
output: Output of operation
end: End of program generation process Further, according to the above-described original source code, it can be understood that there are two “calc_input” notations and one “output” notation, so that there are two inputs and one output.

前述した2入力1出力の原ソースコードを変換した場合の関数定義プログラムである。
[関数定義プログラム (2入力1出力)]
static se_sint<32> TempI; [S12]
static se_sint<32> iDataI;
static se_sint<32> iTap;

SE_FUNC void Filtering_Baseband_init() { [S13]
TempI = 0;
}

SE_FUNC void Filtering_Baseband_calc (WR A, WR B) { [S16]
int i;
for (i=0; i<4; i++) {
iDataI = A(32*i+32, 32*i); [S17]
iTap = B(32*i+32, 32*i);
Temp I += iData * iTap;
}
}

SE_FUNC void Filtering_Baseband_output (WR *A){ [S18]
*A = TempI >> 14;
}
This is a function definition program when the above-described two-input one-output original source code is converted.
[Function definition program (2 inputs, 1 output)]
static se_sint <32>TempI; [S12]
static se_sint <32>iDataI;
static se_sint <32>iTap;

SE_FUNC void Filtering_Baseband_init () {[S13]
TempI = 0;
}

SE_FUNC void Filtering_Baseband_calc (WR A, WR B) {[S16]
int i;
for (i = 0; i <4; i ++) {
iDataI = A (32 * i + 32, 32 * i); [S17]
iTap = B (32 * i + 32, 32 * i);
Temp I + = iData * iTap;
}
}

SE_FUNC void Filtering_Baseband_output (WR * A) {[S18]
* A = TempI >>14;
}

前述した2入力1出力の原ソースコードを変換した場合の関数呼び出しプログラムである。
[関数呼び出しプログラム (2入力1出力)]
WR A, B; [S11]

for (i=0; i< (Num * CHIP_SAMP + TAP_NUM); i++) {
Filtering_Baseband_init(); [S13]
for (j=0; j<48; j+=4) { [S14]
WRGETOINIT(WRGET_INIT_INCREMENT,
&FIDMADataI[DMAOffset + i - (2*TAP_NUM-1) + j]);
WRGETOI(&A, 32); [S15]
WRGETO1INIT(WRGET_INIT_INCREMENT, &RxFilterFCHBBFTap[j]);
WRGETO1I(&B, 32);
Filtering_Baseband_calc(A, B); [S16]
}
Filtering_Baseband_output(&A); [S18]
WRS16I(A, &DataI[i],0);
}
This is a function call program when the above-described 2-input 1-output original source code is converted.
[Function call program (2 inputs, 1 output)]
WR A, B; [S11]

for (i = 0; i <(Num * CHIP_SAMP + TAP_NUM); i ++) {
Filtering_Baseband_init (); [S13]
for (j = 0; j <48; j + = 4) {[S14]
WRGETOINIT (WRGET_INIT_INCREMENT,
& FIDMADataI [DMAOffset + i-(2 * TAP_NUM-1) + j]);
WRGETOI (& A, 32); [S15]
WRGETO1INIT (WRGET_INIT_INCREMENT, & RxFilterFCHBBFTap [j]);
WRGETO1I (& B, 32);
Filtering_Baseband_calc (A, B); [S16]
}
Filtering_Baseband_output (&A); [S18]
WRS16I (A, & DataI [i], 0);
}

以下では、前述した関数定義プログラム及び関数呼び出し定義プログラムが、どのように導出されたかについて説明する。   Hereinafter, how the above-described function definition program and function call definition program are derived will be described.

最初に、高速演算部の特性について規定する。非特許文献1に記載されたプロセッサデバイス(DSP(Digital Signal Processor)チップ)によれば、汎用演算部と高速演算部とを有する。高速演算部は、以下のような制約がある。本発明によれば、これら制約の中で、原ソースコードを、最適に高速演算部を利用することができるソースコードに変換する。
(1)最大入力数(入力レジスタの数)=3個
最大出力数(出力レジスタの数)=2個
(2)入力レジスタのデータサイズ=最大128ビット
出力レジスタのデータサイズ=最大128ビット
First, the characteristics of the high-speed calculation unit will be defined. The processor device (DSP (Digital Signal Processor) chip) described in Non-Patent Document 1 has a general-purpose arithmetic unit and a high-speed arithmetic unit. The high-speed arithmetic unit has the following restrictions. According to the present invention, within these restrictions, the original source code is converted into source code that can optimally use the high-speed arithmetic unit.
(1) Maximum number of inputs (number of input registers) = 3 Maximum number of outputs (number of output registers) = 2 (2) Input register data size = 128 bits maximum Output register data size = 128 bits maximum

[S11]原ソースコードに「start」表記があった場合、「end」表記までの間で、「calc_input」表記を検索する。そして、「calc_input」表記に記述されている変数のデータサイズを抽出する。前述の原ソースコードによれば、「iDataI」「iTap」「TempI」の変数が検出されており、各変数のデータサイズは、「alloc」表記の記述から、以下のように抽出できる。
「iDataI」:int 32bit
「iTap」 :int 32bit
「TempI」 :int 32bit
[S11] When “start” is written in the original source code, “calc_input” is searched until “end” is written. Then, the data size of the variable described in the “calc_input” notation is extracted. According to the above-mentioned original source code, the variables “iDataI”, “iTap”, and “TempI” are detected, and the data size of each variable can be extracted from the description of “alloc” notation as follows.
“IDataI”: int 32bit
"ITap": int 32bit
“TempI”: int 32bit

次に、高速演算部の入力レジスタのデータサイズと、「calc_input」表記の中の全ての変数の中で最大のデータサイズ(32ビット)とから、一度に入力可能な入力変数の配列要素の個数(以下「パッキング数」という)を算出する。前述の例によれば、入出力レジスタのデータサイズは、128ビットであり、パッキング数は、以下のように算出される。
128ビット(データサイズ)/32ビット(int)=4個
Next, the number of input variable array elements that can be input at one time based on the data size of the input register of the high-speed arithmetic unit and the maximum data size (32 bits) of all variables in the “calc_input” notation (Hereinafter referred to as “packing number”). According to the above-described example, the data size of the input / output register is 128 bits, and the packing number is calculated as follows.
128 bits (data size) / 32 bits (int) = 4

[S12]次に、関数定義プログラムに、「alloc」表記の数だけの静的変数を確保する。これら変数は、関数定義プログラム内で用いられるものであり、高速演算部の内部メモリが用いられる。 [S12] Next, as many static variables as the number of “alloc” are reserved in the function definition program. These variables are used in the function definition program, and the internal memory of the high-speed calculation unit is used.

[S13]原ソースコードに「init」表記があった場合、関数定義プログラムに「初期化関数」(Filtering_Baseband_init())を定義する。また、関数呼び出しプログラムからその関数を呼び出すように記述する。 [S13] If "init" is written in the original source code, an "initialization function" (Filtering_Baseband_init ()) is defined in the function definition program. Moreover, it describes so that the function may be called from a function calling program.

[S14]原ソースコードに「loop_init」「loop_condition」「loop_renew」表記があった場合、関数呼び出しプログラムにfor文を記述する。前述したように、高速演算部に対して32ビットの変数を、一度に4個入力することができる。その場合、48回繰り返す演算は、48回/4個=12回の演算に削減されることとなる。従って、「loop_renew」表記に基づく増分値を、パッキング数(4)に置き換える。 [S14] If “loop_init”, “loop_condition”, and “loop_renew” are written in the original source code, a for statement is written in the function calling program. As described above, four 32-bit variables can be input to the high-speed arithmetic unit at a time. In this case, the calculation repeated 48 times is reduced to 48 times / 4 pieces = 12 times. Therefore, the increment value based on the “loop_renew” notation is replaced with the packing number (4).

[S15]次に、関数呼び出しプログラムにおけるそのfor文の中で、高速演算部に渡す配列の先頭アドレスの設定(WRGETINIT())を記述し、先頭アドレスから何バイト渡すかの定義(WRGETI())を記述する。 [S15] Next, in the for statement in the function call program, the setting of the start address (WRGETINIT ()) of the array to be passed to the high-speed calculation unit is described, and the definition of how many bytes are passed from the start address (WRGETI () )

[S16]原ソースコードに「calc_input」表記があった場合、「calc_input」表記の個数を検索する。「calc_input」の個数が、高速演算部の入力数(入力レジスタの数)の最大値よりも多い場合、ソースコード変換の対象外とする。例えば、高速演算部の入力数の最大値が3であって、「calc_input」表記の個数が4である場合、ソースコード変換の対象外とする。 [S16] When “calc_input” is written in the original source code, the number of “calc_input” is searched. If the number of “calc_input” is larger than the maximum number of inputs (number of input registers) of the high-speed computation unit, it is excluded from the source code conversion target. For example, when the maximum value of the number of inputs of the high-speed calculation unit is 3 and the number of “calc_input” is 4, it is excluded from the source code conversion target.

一方、例えば、高速演算部の入力数の最大値が3であって、「calc_input」表記の個数が2であるとする。この場合、関数定義プログラムに、「calc_input」の数に相当する変数を持ったcalc関数を定義する(Filtering_Baseband_calc(WR A, WR B))。calc関数では、一度に高速演算部に渡す配列の要素の数だけループするようにfor文を記述する。また、関数呼び出しプログラムに、「calc_input」表記の数だけの入力変数を持ったcalc関数の呼び出しを記述する。   On the other hand, for example, it is assumed that the maximum value of the number of inputs of the high-speed calculation unit is 3 and the number of “calc_input” is 2. In this case, a calc function having a variable corresponding to the number of “calc_input” is defined in the function definition program (Filtering_Baseband_calc (WR A, WR B)). In the calc function, a for statement is described so as to loop as many as the number of elements of the array to be passed to the high-speed calculation unit at a time. In the function call program, a call to the calc function having as many input variables as “calc_input” is described.

[S17]原ソースコードの「calc_calc」表記の演算内容を、関数定義プログラムのcalc関数のfor文の中にコピーする。 [S17] Copy the calculation contents of “calc_calc” written in the original source code into the for statement of the calc function of the function definition program.

[S18]原ソースコードに「output」表記があった場合、「output」表記の個数を検索する。「output」表記の個数が、高速演算部の出力数(出力レジスタの数)の最大値よりも多い場合、ソースコード変換の対象外とする。例えば、高速演算部の出力数の最大値が2であって、「output」表記の個数が3である場合、ソースコード変換の対象外とする。 [S18] When “output” is written in the original source code, the number of “output” is searched. If the number of “output” is larger than the maximum value of the number of outputs (number of output registers) of the high-speed operation unit, it is excluded from the source code conversion target. For example, when the maximum value of the number of outputs of the high-speed calculation unit is 2 and the number of “output” is 3, it is excluded from the source code conversion target.

一方、例えば、高速演算部の出力数の最大値が2であって、「output」表記の個数が1であるとする。この場合、関数定義プログラムに、関数定義プログラムに「output」表記の数だけの変数を持ったoutput関数(Filtering_Baseband_output(WR *A))を定義する。そして、原ソースコードの「output」表記の処理内容を、関数定義プログラムのその関数内にコピーする。関数呼び出しプログラムには、「output」表記の数だけの変数を持ったoutput関数の呼び出しを記述し、最終的な出力を受け渡すように記述する(WRS16I())。   On the other hand, for example, it is assumed that the maximum value of the number of outputs of the high-speed calculation unit is 2 and the number of “output” is 1. In this case, an output function (Filtering_Baseband_output (WR * A)) having as many variables as “output” in the function definition program is defined in the function definition program. Then, the processing content of “output” notation of the original source code is copied into the function of the function definition program. In the function call program, describe a call to the output function having as many variables as “output” and write the final output (WRS16I ()).

次に、3入力2出力の高速演算部に対する原ソースコードの例を表す。前述した2入力1出力のソースコードと比較することによって、入出力数に応じたプログラムの差異を明示する。
[原ソースコード (3入力2出力)]
start Filtering Baseband [S21]
alloc int TempI [S22]
alloc int TempQ
alloc short iDataI
alloc short iDataQ
alloc short iTap

for (i=0; i < (Num * CHIP_SAMP + TAP_NUM); i++) {
init TempI = 0 [S23]
init TempQ = 0
loop_init j = 0 [S24]
loop_condition j < 48
loop_renew j += 1
calc_input iDataI = FIDMADataI[DMAOffset + i - (2*TAP_NUM-1)+j]
calc_input iTap = RxFilterFCHBBFTap[j] [S25]
calc_input iDataQ = FIDMADataQ[DMAOffset + i - (2*TAP_NUM-1)+j]
calc_calc TempI += iDataI * iTap
calc_calc TempQ += iDataQ * iTap
loop_end
output DataI[i] = TempI >> 14
output DataQ[i] = TempQ >> 14
}
end
Next, an example of the original source code for the high-speed arithmetic unit with three inputs and two outputs is shown. By comparing with the above-mentioned 2-input 1-output source code, the difference in the program according to the number of inputs and outputs is clearly shown.
[Original source code (3 inputs, 2 outputs)]
start Filtering Baseband [S21]
alloc int TempI [S22]
alloc int TempQ
alloc short iDataI
alloc short iDataQ
alloc short iTap

for (i = 0; i <(Num * CHIP_SAMP + TAP_NUM); i ++) {
init TempI = 0 [S23]
init TempQ = 0
loop_init j = 0 [S24]
loop_condition j <48
loop_renew j + = 1
calc_input iDataI = FIDMADataI [DMAOffset + i-(2 * TAP_NUM-1) + j]
calc_input iTap = RxFilterFCHBBFTap [j] [S25]
calc_input iDataQ = FIDMADataQ [DMAOffset + i-(2 * TAP_NUM-1) + j]
calc_calc TempI + = iDataI * iTap
calc_calc TempQ + = iDataQ * iTap
loop_end
output DataI [i] = TempI >> 14
output DataQ [i] = TempQ >> 14
}
end

前述した原ソースコードによれば、「calc_input」表記が3個で、「output」表記が2個なので、3入力2出力であることが理解できる。   According to the original source code described above, since there are three “calc_input” notations and two “output” notations, it can be understood that there are three inputs and two outputs.

前述した3入力2出力の原ソースコードを変換した場合の関数定義プログラムである。
[関数定義プログラム (3入力2出力)]
static se_sint<32> TempI; [S22]
static se_sint<32> TempQ;
static se_sint<16> iDataI;
static se_sint<16> iDataQ;
static se_sint<16> iTap;

SE_FUNC void Filtering_Baseband_init() { [S23]
TempI = 0;
TempQ = 0;
}

SE_FUNC void Filtering_Baseband_calc (WR A, WR B, WR C) { [S26]
int i;
for (i=0; i < 8; i++) {
iDataI = A(16*i+15, 16*i);
iTap = B(16*i+15, 16*i);
iDataQ = C(16*i+15, 16*i);
TempI += iDataI * iTap; [S27]
TempQ += iDataQ * iTap;
}
}

SE_FUNC void Filtering_Baseband_output (WR *A, WR *B){ [S28]
*A = TempI >> 14;
*B = TempQ >> 14;
}
This is a function definition program when the above-described 3-input 2-output original source code is converted.
[Function definition program (3 inputs, 2 outputs)]
static se_sint <32>TempI; [S22]
static se_sint <32>TempQ;
static se_sint <16>iDataI;
static se_sint <16>iDataQ;
static se_sint <16>iTap;

SE_FUNC void Filtering_Baseband_init () {[S23]
TempI = 0;
TempQ = 0;
}

SE_FUNC void Filtering_Baseband_calc (WR A, WR B, WR C) {[S26]
int i;
for (i = 0; i <8; i ++) {
iDataI = A (16 * i + 15, 16 * i);
iTap = B (16 * i + 15, 16 * i);
iDataQ = C (16 * i + 15, 16 * i);
TempI + = iDataI * iTap; [S27]
TempQ + = iDataQ * iTap;
}
}

SE_FUNC void Filtering_Baseband_output (WR * A, WR * B) {[S28]
* A = TempI >>14;
* B = TempQ >>14;
}

前述した3入力2出力の原ソースコードを変換した場合の関数呼び出しプログラムである。
[関数呼び出しプログラム (3入力2出力)]
WR A, B, C; [S21]

for (i=0; i< (Num * CHIP_SAMP + TAP_NUM); i++) {
Filtering_Baseband_init(); [S23]
for (j=0; j<48; j+=8) { [S24]
WRGETOINIT(WRGET_INIT_INCREMENT, [S25]
&FIDMADataI[DMAOffset + i - (2*TAP_NUM-1) + j]);
WRGETOI(&A, 16);
WRGET2INIT(WRGET_INIT_INCREMENT, &RxFilterFCHBBFTap[j]);
WRGET2I(&B, 16);
WRGETO1INIT(WRGET_INIT_INCREMENT,
&FIDMADataQ[DMAOffset + i - (2*TAP_NUM-1) + j]);
WRGETO1I(&C, 16);
Filtering_Baseband_calc(A, B, C); [S27]
}
Filtering_Baseband_output(&A, &B); [S28]
WRS16I(A, &DataI[i],0);
WRS16I(B, &DataQ[i],0);
}
This is a function call program when the above-described original source code with three inputs and two outputs is converted.
[Function call program (3-input 2-output)]
WR A, B, C; [S21]

for (i = 0; i <(Num * CHIP_SAMP + TAP_NUM); i ++) {
Filtering_Baseband_init (); [S23]
for (j = 0; j <48; j + = 8) {[S24]
WRGETOINIT (WRGET_INIT_INCREMENT, [S25]
& FIDMADataI [DMAOffset + i-(2 * TAP_NUM-1) + j]);
WRGETOI (& A, 16);
WRGET2INIT (WRGET_INIT_INCREMENT, & RxFilterFCHBBFTap [j]);
WRGET2I (& B, 16);
WRGETO1INIT (WRGET_INIT_INCREMENT,
& FIDMADataQ [DMAOffset + i-(2 * TAP_NUM-1) + j]);
WRGETO1I (& C, 16);
Filtering_Baseband_calc (A, B, C); [S27]
}
Filtering_Baseband_output (& A, &B); [S28]
WRS16I (A, & DataI [i], 0);
WRS16I (B, & DataQ [i], 0);
}

[S21]原ソースコードに「start」表記があった場合、「calc_input」表記に記述されている変数のデータサイズを抽出する。前述の原ソースコードによれば、「iDataI」「iDataQ」「iTap」の変数が検出されており、各変数のデータサイズは、「alloc」表記の記述から、以下のように抽出できる。
「iDataI」「iDataQ」:short 16bit
「iTap」 :short 16bit
[S21] If there is a “start” notation in the original source code, the data size of the variable described in the “calc_input” notation is extracted. According to the above-mentioned original source code, the variables “iDataI”, “iDataQ”, and “iTap” are detected, and the data size of each variable can be extracted from the description of “alloc” notation as follows.
"IDataI""iDataQ": short 16bit
"ITap": short 16bit

次に、高速演算部の入力レジスタのデータサイズと、「calc_input」表記の中の全ての変数の中で最大のデータサイズ(16ビット)とから、一度に入力可能な入力変数の配列要素のパッキング数を算出する。前述の例によれば、入出力レジスタのデータサイズは、128ビットであり、パッキング数は、以下のように算出される。
128ビット(データサイズ)/16ビット(int)=8個
Next, packing the array elements of input variables that can be input at once from the data size of the input register of the high-speed arithmetic unit and the maximum data size (16 bits) of all the variables in the “calc_input” notation Calculate the number. According to the above-described example, the data size of the input / output register is 128 bits, and the packing number is calculated as follows.
128 bits (data size) / 16 bits (int) = 8

[S22]次に、関数定義プログラムに、「alloc」表記の数だけの静的変数を確保する。これら変数は、関数定義プログラム内で用いられるものであり、高速演算部の内部メモリが用いられる。 [S22] Next, as many static variables as the number of “alloc” are reserved in the function definition program. These variables are used in the function definition program, and the internal memory of the high-speed calculation unit is used.

[S23]原ソースコードに「init」表記があった場合、関数定義プログラムに「初期化関数」(Filtering_Baseband_init())を定義する。また、関数呼び出しプログラムからその関数を呼び出すように記述する。 [S23] If "init" is written in the original source code, an "initialization function" (Filtering_Baseband_init ()) is defined in the function definition program. Moreover, it describes so that the function may be called from a function calling program.

[S24]原ソースコードに「loop_init」「loop_condition」「loop_renew」表記があった場合、関数呼び出しプログラムにfor文を記述する。前述したように、高速演算部に対して16ビットの変数を、一度に8個入力することができる。その場合、48回繰り返す演算は、48回/8個=6回の演算に削減されることとなる。従って、「loop_renew」表記に基づく増分値を、パッキング数(8)に置き換える。 [S24] If the original source code includes “loop_init”, “loop_condition”, and “loop_renew”, a for statement is described in the function call program. As described above, eight 16-bit variables can be input to the high-speed arithmetic unit at a time. In this case, the calculation repeated 48 times is reduced to 48 times / 8 pieces = 6 times. Therefore, the increment value based on the “loop_renew” notation is replaced with the packing number (8).

[S25]次に、関数呼び出しプログラムにおけるそのfor文の中で、高速演算部に渡す配列の先頭アドレスの設定(WRGETINIT())を記述し、先頭アドレスから何バイト渡すかの定義(WRGETI())を記述する。 [S25] Next, in the for statement in the function call program, the setting of the start address (WRGETINIT ()) of the array to be passed to the high-speed calculation unit is described, and the definition of how many bytes to pass from the start address (WRGETI () )

[S26]原ソースコードに「calc_input」表記があった場合、「calc_input」表記の個数を検索する。「calc_input」の個数が、高速演算部の入力数(入力レジスタの数)の最大値(3)が、「calc_input」表記の個数(3)と等しいので、この場合、関数定義プログラムに、「calc_input」の数に相当する変数を持ったcalc関数を定義する(Filtering_Baseband_calc(WR A, WR B, WR C))。calc関数では、一度に高速演算部に渡す配列の要素の数だけループするようにfor文を記述する。また、関数呼び出しプログラムに、「calc_input」表記の数だけの入力変数を持ったcalc関数の呼び出しを記述する。 [S26] When "calc_input" is written in the original source code, the number of "calc_input" is searched. Since the number of “calc_input” is the same as the number (3) of “calc_input”, the maximum value (3) of the number of inputs (number of input registers) of the high-speed calculation unit is equal to “calc_input”. Define a calc function with a variable equivalent to the number of "(Filtering_Baseband_calc (WR A, WR B, WR C)). In the calc function, a for statement is described so as to loop as many as the number of elements of the array to be passed to the high-speed calculation unit at a time. In the function call program, a call to the calc function having as many input variables as “calc_input” is described.

[S17]原ソースコードの「calc_calc」表記の演算内容を、関数定義プログラムのcalc関数のfor文の中にコピーする。 [S17] Copy the calculation contents of “calc_calc” written in the original source code into the for statement of the calc function of the function definition program.

[S28]原ソースコードに「output」表記があった場合、「output」表記の個数を検索する。「output」表記の個数(2)が、高速演算部の出力数(出力レジスタの数)の最大値(2)と等しい。この場合、関数定義プログラムに、関数定義プログラムに「output」表記の数だけの変数を持ったoutput関数(Filtering_Baseband_output(WR *A, WR *B))を定義する。そして、原ソースコードの「output」表記の処理内容を、関数定義プログラムのその関数内にコピーする。関数呼び出しプログラムには、「output」表記の数だけの変数を持ったoutput関数の呼び出しを記述し、最終的な出力を受け渡すように記述する(WRS16I())。 [S28] If there is "output" written in the original source code, the number of "output" written is searched. The number (2) indicated by “output” is equal to the maximum value (2) of the number of outputs (number of output registers) of the high-speed arithmetic unit. In this case, an output function (Filtering_Baseband_output (WR * A, WR * B)) having as many variables as “output” is defined in the function definition program. Then, the processing content of “output” notation of the original source code is copied into the function of the function definition program. In the function call program, describe a call to the output function having as many variables as “output” and write the final output (WRS16I ()).

以上、詳細に説明したように、本発明のソースコード変換プログラム及び装置によれば、原ソースコードを、その高速演算部の処理単位に応じて関数定義プログラムを記述したソースコードに変換するので、変換されたソースコードは、そのプロセッサデバイスで高速に演算することができる。   As described above in detail, according to the source code conversion program and apparatus of the present invention, the original source code is converted into the source code describing the function definition program according to the processing unit of the high-speed operation unit. The converted source code can be calculated at high speed by the processor device.

特に、本発明によれば、高速演算部の入出力数及び/又は入出力データサイズに応じて、一度に配列要素を複数個まとめて入力し、まとめた形式のまま処理を実行させることができる。これにより、ある配列の要素を1個ずつ演算する場合と比較して大幅な処理速度の改善が見込まれる。但し、高速演算部は、高速に演算するが故、入出力数及び/又は入出力データサイズに制約がある。本発明によれば、この制約を考慮した上で、最適なソースコードに変換することにより、プロセッサデバイスとしての演算速度を高めることができる。   In particular, according to the present invention, it is possible to input a plurality of array elements at once according to the number of inputs / outputs and / or the input / output data size of the high-speed arithmetic unit, and to execute the processing in the combined form. . As a result, a significant improvement in processing speed can be expected as compared with the case where one element of an array is calculated one by one. However, since the high-speed calculation unit performs high-speed calculations, there are restrictions on the number of input / output and / or the input / output data size. According to the present invention, the calculation speed as a processor device can be increased by converting into an optimal source code in consideration of this restriction.

前述した本発明の種々の実施形態において、本発明の技術思想及び見地の範囲の種々の変更、修正及び省略は、当業者によれば容易に行うことができる。前述の説明はあくまで例であって、何ら制約しようとするものではない。本発明は、特許請求の範囲及びその均等物として限定するものにのみ制約される。   In the various embodiments of the present invention described above, various changes, modifications, and omissions in the scope of the technical idea and the viewpoint of the present invention can be easily made by those skilled in the art. The above description is merely an example, and is not intended to be restrictive. The invention is limited only as defined in the following claims and the equivalents thereto.

ソフトウェア無線技術に基づくシステム構成図である。It is a system configuration diagram based on software radio technology. 本発明におけるソースコード変換の説明図である。It is explanatory drawing of the source code conversion in this invention. 様々な高速演算部の説明図である。It is explanatory drawing of various high-speed calculating parts.

符号の説明Explanation of symbols

1 通信端末
10 プロセッサデバイス
100 汎用演算部
101 高速演算部
11 無線インタフェース部(ソフトウェア無線)
12 モジュール記憶部
13 モジュール再構成部
2 モジュール配信サーバ
3 基地局
4 ネットワーク
DESCRIPTION OF SYMBOLS 1 Communication terminal 10 Processor device 100 General-purpose calculating part 101 High-speed calculating part 11 Wireless interface part (software radio)
12 Module storage unit 13 Module reconfiguration unit 2 Module distribution server 3 Base station 4 Network

Claims (7)

原ソースコードをプロセッサデバイスに適応したソースコードに変換する変換手段として、コンピュータを機能させるプログラムにおいて、
前記プロセッサデバイスは、汎用演算手段と高速演算手段とを含んでおり、
前記変換手段は、前記原ソースコードから、前記高速演算手段で実行すべき関数定義プログラムと、前記汎用演算手段で実行すべき関数呼び出しプログラムとを生成するようにコンピュータを機能させることを特徴とするソースコード変換プログラム。
In a program that causes a computer to function as conversion means for converting original source code into source code adapted to a processor device,
The processor device includes general-purpose computing means and high-speed computing means,
The converting means causes the computer to function from the original source code so as to generate a function definition program to be executed by the high-speed arithmetic means and a function calling program to be executed by the general-purpose arithmetic means. Source code conversion program.
前記変換手段は、前記高速演算部の入力レジスタ数及び/又は出力レジスタ数に応じて、前記関数定義プログラムの各関数の入力変数の数及び/又は出力変数の数を変更すると共に、前記関数呼び出しプログラムの呼び出し関数の入力変数の数及び又は出力変数の数を対応させるようにコンピュータを機能させることを特徴とする請求項1に記載のソースコード変換プログラム。   The conversion means changes the number of input variables and / or the number of output variables of each function of the function definition program according to the number of input registers and / or the number of output registers of the high-speed arithmetic unit, and calls the function. 2. The source code conversion program according to claim 1, wherein the computer is caused to function so as to correspond to the number of input variables and / or the number of output variables of the calling function of the program. 前記変換手段は、前記高速演算部に対する入力データサイズ及び/又は出力データサイズに応じて、前記関数定義プログラムの各関数の入力データサイズ及び/又は出力データサイズを変更すると共に、前記関数呼び出しプログラムの呼び出し関数の入力データサイズ及び/又は出力データサイズを対応させるようにコンピュータを機能させることを特徴とする請求項1又は2に記載のソースコード変換プログラム。   The conversion means changes the input data size and / or output data size of each function of the function definition program according to the input data size and / or output data size for the high-speed operation unit, and 3. The source code conversion program according to claim 1, wherein the computer is caused to function so as to correspond to the input data size and / or the output data size of the calling function. 前記変換手段は、前記関数定義プログラムの繰り返し関数について、前記高速演算部に対する入力データサイズに応じて、一度に入力可能な入力変数の配列要素の個数を算出し、算出された個数の単位で繰り返し処理をするべく変換すると共に、前記関数呼び出しプログラムの呼び出し関数からの入力変数の配列要素の個数を対応させるようにコンピュータを機能させることを特徴とする請求項3に記載のソースコード変換プログラム。   The conversion means calculates the number of array elements of input variables that can be input at a time according to the input data size for the high-speed calculation unit for the repetition function of the function definition program, and repeats the calculated number of units. 4. The source code conversion program according to claim 3, wherein the source code conversion program causes the computer to function so as to correspond to the number of array elements of the input variables from the calling function of the function calling program while performing conversion to perform processing. 前記変換手段は、前記関数定義プログラムの繰り返し関数について、前記高速演算部に対する出力データサイズに応じて、一度に出力可能な出力変数の配列要素の個数を算出し、算出された個数の単位で出力するべく変換すると共に、前記関数呼び出しプログラムの呼び出し関数からの出力変数の配列要素の個数を対応させるようにコンピュータを機能させることを特徴とする請求項3又は4に記載のソースコード変換プログラム。   The conversion means calculates the number of array elements of output variables that can be output at a time according to the output data size for the high-speed calculation unit for the iteration function of the function definition program, and outputs the calculated number of units. 5. The source code conversion program according to claim 3 or 4, wherein the computer is caused to function as much as possible and the computer is caused to function so as to correspond to the number of array elements of output variables from the call function of the function call program. 前記関数定義プログラム及び前記関数呼び出しプログラムは、前記プロセッサデバイスによって実行されることにより、ソフトウェア無線の無線インタフェース部として機能することを特徴とする請求項1から5のいずれか1項に記載のソースコード変換プログラム。   6. The source code according to claim 1, wherein the function definition program and the function call program function as a wireless interface unit of software radio by being executed by the processor device. 7. Conversion program. 原ソースコードをプロセッサデバイスに適応したソースコードに変換するプログラム変換装置であって、
前記プロセッサデバイスは、汎用演算手段と高速演算手段とを含んでおり、
前記変換手段は、前記原ソースコードから、前記高速演算手段で実行すべき関数定義プログラムと、前記汎用演算手段で実行すべき関数呼び出しプログラムとを生成することを特徴とするプログラム変換装置。
A program conversion device for converting original source code into source code adapted to a processor device,
The processor device includes general-purpose computing means and high-speed computing means,
The program conversion apparatus characterized in that the conversion means generates a function definition program to be executed by the high-speed calculation means and a function call program to be executed by the general-purpose calculation means from the original source code.
JP2007326964A 2007-12-19 2007-12-19 Source code conversion program and apparatus based on processor device Expired - Fee Related JP5143542B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007326964A JP5143542B2 (en) 2007-12-19 2007-12-19 Source code conversion program and apparatus based on processor device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007326964A JP5143542B2 (en) 2007-12-19 2007-12-19 Source code conversion program and apparatus based on processor device

Publications (2)

Publication Number Publication Date
JP2009151422A true JP2009151422A (en) 2009-07-09
JP5143542B2 JP5143542B2 (en) 2013-02-13

Family

ID=40920537

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007326964A Expired - Fee Related JP5143542B2 (en) 2007-12-19 2007-12-19 Source code conversion program and apparatus based on processor device

Country Status (1)

Country Link
JP (1) JP5143542B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019181333A1 (en) * 2018-03-19 2019-09-26 株式会社日立国際電気 Software radio machine

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59180669A (en) * 1983-03-31 1984-10-13 Fujitsu Ltd Assigning method of area constant vector
JPH04188224A (en) * 1990-11-22 1992-07-06 Nec Software Ltd Information processing system
JPH1011276A (en) * 1996-06-27 1998-01-16 Nec Ic Microcomput Syst Ltd Program transferring method
JPH11331911A (en) * 1998-05-13 1999-11-30 Kokusai Electric Co Ltd Controller for program downloading to radio terminal equipment
JP2001356979A (en) * 2000-06-13 2001-12-26 Hitachi Ltd Communication system
JP2005534114A (en) * 2002-07-25 2005-11-10 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Inter-source split compilation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59180669A (en) * 1983-03-31 1984-10-13 Fujitsu Ltd Assigning method of area constant vector
JPH04188224A (en) * 1990-11-22 1992-07-06 Nec Software Ltd Information processing system
JPH1011276A (en) * 1996-06-27 1998-01-16 Nec Ic Microcomput Syst Ltd Program transferring method
JPH11331911A (en) * 1998-05-13 1999-11-30 Kokusai Electric Co Ltd Controller for program downloading to radio terminal equipment
JP2001356979A (en) * 2000-06-13 2001-12-26 Hitachi Ltd Communication system
JP2005534114A (en) * 2002-07-25 2005-11-10 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Inter-source split compilation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CSNJ200810003497; 山崎浩輔、渡辺伸吾、武内良男: '信号処理ソフトウェア可搬化技術に関する一検討' 電子情報通信学会2007年通信ソサイエティ大会講演論文集1 , 20070829, p.497, 社団法人電子情報通信学会 *
JPN6012037417; 山崎浩輔、渡辺伸吾、武内良男: '信号処理ソフトウェア可搬化技術に関する一検討' 電子情報通信学会2007年通信ソサイエティ大会講演論文集1 , 20070829, p.497, 社団法人電子情報通信学会 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019181333A1 (en) * 2018-03-19 2019-09-26 株式会社日立国際電気 Software radio machine
JPWO2019181333A1 (en) * 2018-03-19 2021-02-04 株式会社日立国際電気 Software defined radio

Also Published As

Publication number Publication date
JP5143542B2 (en) 2013-02-13

Similar Documents

Publication Publication Date Title
Akeela et al. Software-defined Radios: Architecture, state-of-the-art, and challenges
Hara et al. Chstone: A benchmark program suite for practical c-based high-level synthesis
Glossner et al. A software-defined communications baseband design
US7979263B2 (en) Method, system and program for developing and scheduling adaptive integrated circuitry and corresponding control or configuration information
JP2010186467A (en) Method to be executed by computer, computer-readable storage medium and system (high-speed vector masking algorithm for conditional data selection in simd architecture)
Voss et al. Rapid development of Gzip with MaxJ
Arnold et al. Instruction set architecture extensions for a dynamic task scheduling unit
CN118069110A (en) Software code compiling method, instruction soft implementation method and device, electronic equipment and storage medium
US8532974B2 (en) Developing system and method for optimizing the energy consumption of an application program for a digital signal processor
JP5143542B2 (en) Source code conversion program and apparatus based on processor device
CN111338640B (en) Dynamically adjustable asymmetric command chain connection method and device
Stroop Enhancing GNU radio for run-time assembly of FPGA-based accelerators
KR20030004327A (en) Improved apparatus and method for multi-threaded signal processing
JP5228546B2 (en) Behavioral synthesis apparatus and program
Glossner et al. A multithreaded processor architecture for SDR
Garcia et al. Mapping of the AES cryptographic algorithm on a Coarse-Grain reconfigurable array processor
Akeela et al. Efficient co-design partitioning of WLANs on SoC-based SDRs
CN110209397B (en) Data processing method, device and system
Hong et al. Rapid prototyping of DSP algorithms on VLIW TMS320C6701 DSP
Oedzes ASIP design and algorithm implementation for beamforming in an antenna array
Mehdipour et al. An integrated temporal partitioning and physical design framework for static compilation of reconfigurable computing systems
Novo et al. Energy-performance exploration of a CGA-based SDR processor
Jungwirth et al. Alabama A&M Symmetric Overloaded Minimal Instruction Set Architecture (SOMA)
JP2006155448A (en) Data processor and method for designing data processor
Ordaz et al. On the hls design of bit-level operations and custom data types

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100712

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120615

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120720

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120823

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121121

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20151130

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees