JP2007034650A - Software development system - Google Patents
Software development system Download PDFInfo
- Publication number
- JP2007034650A JP2007034650A JP2005216662A JP2005216662A JP2007034650A JP 2007034650 A JP2007034650 A JP 2007034650A JP 2005216662 A JP2005216662 A JP 2005216662A JP 2005216662 A JP2005216662 A JP 2005216662A JP 2007034650 A JP2007034650 A JP 2007034650A
- Authority
- JP
- Japan
- Prior art keywords
- program
- target program
- software development
- development system
- compiler
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
Description
本発明は、ソフトウェアを開発するための技術に関する。 The present invention relates to a technique for developing software.
ソフトウェアの開発において、コンパイラは重要な役割を果たす。コンパイラは、原始プログラム(ソースコード)をコンパイルし、目的プログラム(実行コード)を生成する。また、コンパイラは、目的プログラムのサイズや効率が向上するように、プログラム構成を最適化する。その最適化手法は、目的プログラムを実行するプロセッサの機能によって大きく異なってくる。言い換えれば、あるプロセッサに関して、どのような最適化方法を用いるかによって、目的プログラムの性能に大きな差が生じてしまう。このように、目的プログラムが適用されるシステムの性能を最大限に引き出す上で、コンパイラにおける最適化技術は、非常に重要な役割を果たす。 Compilers play an important role in software development. The compiler compiles a source program (source code) and generates a target program (executable code). The compiler also optimizes the program configuration so that the size and efficiency of the target program are improved. The optimization method varies greatly depending on the function of the processor that executes the target program. In other words, there is a large difference in the performance of the target program depending on what optimization method is used for a certain processor. Thus, the optimization technique in the compiler plays a very important role in maximizing the performance of the system to which the target program is applied.
コンパイルに関連する技術は、例えば特許文献1に開示されている。特許文献1に記載されたコンパイル装置は、分岐履歴情報採取コード生成手段と、分岐パターン解析手段と、ループ最適化手段とを含む。分岐履歴情報採取コード生成手段は、オブジェクトプログラムに含まれる各ループ処理の実行毎の繰り返し数と該ループ処理内の条件分岐命令の分岐履歴の情報とを採取するためのコードを生成する。分岐パターン解析手段は、分岐履歴情報ファイルに記録された情報に基づいて、対象となるループ処理内の分岐パターンの解析を行う。ループ最適化手段は、分岐パターン解析手段による解析結果に基づいて、対象となるループ処理を効率良く実行するのに最適なコードを生成する。
A technique related to compilation is disclosed in
あるプロセッサの機能として、「アドレス更新機能付きメモリアクセス機能」が知られている。図1は、その機能を説明するための概念図である。図1には、アドレス更新機能付きメモリアクセス機能を有するプロセッサ1と、そのプロセッサ1がアクセスするメインメモリ2が示されている。プロセッサ1は、レジスタdp0やレジスタr0を含んでいる。レジスタdp0には、メインメモリ2のアドレス(番地)を示す値“0x100”が格納されているとする。このようなプロセッサ1において、例えば、次のような命令が実行される場合を考える。
As a function of a certain processor, a “memory access function with an address update function” is known. FIG. 1 is a conceptual diagram for explaining the function. FIG. 1 shows a
r0 = *++dp0 r0 = * ++ dp0
この命令は、「レジスタdp0の値を1増加させ、レジスタdp0で示されるアドレスからデータを読み出し、そのデータをレジスタr0にセットする」という命令である。この場合、レジスタdp0の値がインクリメントされ、“0x101”になる。また、メインメモリ2の番地0x101から、値“0xff”が読み出される。その値“0xff”は、レジスタr0に格納される。
This instruction is an instruction that “increments the value of the register dp0 by 1, reads data from the address indicated by the register dp0, and sets the data in the register r0”. In this case, the value of the register dp0 is incremented to “0x101”. Also, the value “0xff” is read from the address 0x101 of the
上述の例において、レジスタdp0の値を1増加させる動作が「アドレス更新」であり、レジスタdp0で示されるアドレスからデータを読み出す動作が「メモリアクセス」である。上述の命令によれば、アドレス更新とメモリアクセスが1ステップで実行される。このような命令が、「アドレス更新機能付きメモリアクセス命令」と呼ばれる。図1におけるプロセッサ1は、このアドレス更新機能付きメモリアクセス命令をサポートしており、アドレス更新機能付きメモリアクセス機能を有している。
In the above example, the operation of incrementing the value of the register dp0 by 1 is “address update”, and the operation of reading data from the address indicated by the register dp0 is “memory access”. According to the above instruction, the address update and the memory access are executed in one step. Such an instruction is called a “memory access instruction with an address update function”. The
このような機能を有するプロセッサ1に対応するコンパイラの最適化手法として、図2に示された手法が知られている。図2には、あるプログラムの流れの一部が示されている。最適化が行われない場合、まずアドレス更新が行われる(ステップS1)。次に、ある条件が満たされているか否かの判定が行われる(ステップS2)。その条件が満たされている場合(ステップS2;Yes)、続けて第1処理(ステップS3)、メモリアクセス(ステップS4)、及び第2処理(ステップS5)が実行される。その条件が満たされない場合(ステップS2;No)、ステップS3〜S5は実行されない。
As a compiler optimization method corresponding to the
プロセッサ1がアドレス更新機能付きメモリアクセス機能を有する場合、コンパイラは、上記処理を次のように最適化することができる。すなわち、まず「アドレス更新機能付きメモリアクセス命令」が実行される(ステップS11)。次に、上記条件が満たされているか否かの判定が行われる(ステップS12)。その条件が満たされている場合(ステップS12;Yes)、続けて第1処理(ステップS13)及び第2処理(ステップS14)が実行される。その条件が満たされない場合(ステップS12;No)、ステップS13〜S14は実行されない。
When the
このように、条件分岐を挟んで実行される2つの「アドレス更新」と「メモリアクセス」を、条件分岐の前に実行される1つの「アドレス更新機能付きメモリアクセス」にまとめることが可能である。これにより、コードのサイズが削減される。また、条件分岐において条件が満たされる場合(ステップS2、S12;Yes)、続けて行われる処理ステップの数が1つだけ減少する。その結果、プログラムの実行速度が向上する。すなわち、図2に示される最適化を行うことにより、目的プログラムの効率や性能を向上させることが可能となる。メモリアクセスが条件分岐前に実行され、アドレス更新が条件分岐後に実行される場合であっても、同様の最適化が可能である。 In this way, it is possible to combine two “address update” and “memory access” executed across a conditional branch into one “memory access with address update function” executed before the conditional branch. . This reduces the code size. Further, when the condition is satisfied in the conditional branch (steps S2, S12; Yes), the number of subsequent processing steps is decreased by one. As a result, the execution speed of the program is improved. That is, by performing the optimization shown in FIG. 2, the efficiency and performance of the target program can be improved. Similar optimization is possible even when the memory access is executed before the conditional branch and the address update is executed after the conditional branch.
図3は、一般的なソフトウェア開発環境を説明するための図である。コンパイラ80は、原始プログラム11をコンパイルすることにより、目的プログラム12を生成する。開発される目的プログラム12(ソフトウェア)は、マイコンなどの製品3に搭載される。この製品3は、「アドレス更新機能付きメモリアクセス機能」を有する上記プロセッサ1を備えており、目的プログラム12はそのプロセッサ1により実行される。そのため、コンパイラ80は、図2に示された手法に基づいて、目的プログラム12の最適化を行う。
FIG. 3 is a diagram for explaining a general software development environment. The
尚、上述の最適化が行われる場合、条件分岐の前に、プログラム開発者の意図しないメモリアクセスが発生するという副作用も発生する。つまり、原始プログラム11が意図通りに作成されたとしても、コンパイラ80によるコンパイルの結果、目的プログラム12は、プログラム開発者の意図しないメモリアクセスを含んでしまう。但し、この副作用は、プログラムの正常な実行を妨げるわけでは無いので、通常は無視される。意図しないメモリアクセスを含む目的プログラム12がそのまま製品3に搭載されても、特に問題は生じない。
When the above-described optimization is performed, a side effect that a memory access unintended by the program developer occurs before the conditional branch occurs. That is, even if the
ソフトウェアの開発において、生成される目的プログラム12のデバッグや動作検証も必要である。例えば図3に示されるように、シミュレーションモジュール90が用いられる。このシミュレーションモジュール90は、プロセッサ1と目的プログラム12を搭載した製品3をシミュレートするように構成されたハードウェアあるいはソフトウェアである。シミュレーションモジュール90は、目的プログラム12を実行する実行部91を備えている。この実行部91は、目的プログラム12の実行中に未初期化・未定義のメモリ領域へのアクセスが行われた場合、開発者に対して警告を発する「警告機能」を備えている。この警告機能は、開発者が目的プログラム12中の不具合を発見する助けとなる。
In software development, it is necessary to debug and verify the operation of the generated
上述の通り、コンパイラ80により最適化された目的プログラム12は、プログラム開発者の意図しないメモリアクセスを含んでいる。そのようなメモリアクセスは、プログラムの正常動作を妨げるわけではないが、シミュレーションモジュール90は、そのようなメモリアクセスに対しても警告を発する可能性がある。しかしながら、開発者は、そのようなメモリアクセスによる警告と、本当の不具合による警告とを区別することはできない。従って、警告が発せられた場合、開発者は、問題点やプログラムの解析を無駄に行ってしまう可能性がある。これは、時間の無駄であり、開発効率の低下を招く。
As described above, the
以下に、[発明を実施するための最良の形態]で使用される番号・符号を用いて、[課題を解決するための手段]を説明する。これらの番号・符号は、[特許請求の範囲]の記載と[発明を実施するための最良の形態]との対応関係を明らかにするために括弧付きで付加されたものである。ただし、それらの番号・符号を、[特許請求の範囲]に記載されている発明の技術的範囲の解釈に用いてはならない。 [Means for Solving the Problems] will be described below using the numbers and symbols used in [Best Mode for Carrying Out the Invention]. These numbers and symbols are added in parentheses in order to clarify the correspondence between the description of [Claims] and [Best Mode for Carrying Out the Invention]. However, these numbers and symbols should not be used for the interpretation of the technical scope of the invention described in [Claims].
本発明に係るソフトウェア開発システム(100)は、原始プログラム(11)をコンパイルし目的プログラム(12)を生成するコンパイラと、その目的プログラム(12)を実行する実行モジュール(30)とを備える。その実行モジュール(30)は、例えば、目的プログラム(12)が搭載される製品(3)をシミュレートするためのシミュレーションモジュール(30)である。 A software development system (100) according to the present invention includes a compiler that compiles a source program (11) and generates a target program (12), and an execution module (30) that executes the target program (12). The execution module (30) is, for example, a simulation module (30) for simulating a product (3) on which the target program (12) is mounted.
コンパイラ(20)は、アドレス更新とメモリアクセスを1ステップで実行する「第1命令(アドレス更新機能付きメモリアクセス命令)」をサポートするプロセッサ(1)に対応するように、目的プログラム(12)の最適化を行う。その最適化において、コンパイラ(20)は、条件分岐を挟んで実行されるアドレス更新とメモリアクセスを、条件分岐の前に実行される1ステップの上記第1命令にまとめる。更に、コンパイラ(20)は、目的プログラム(12)中の最適化が行われた位置を示す最適化位置データ(13)を生成する。 The compiler (20) executes the update of the target program (12) so as to correspond to the processor (1) that supports the "first instruction (memory access instruction with an address update function)" that executes address update and memory access in one step. Perform optimization. In the optimization, the compiler (20) combines the address update and the memory access that are executed with the conditional branch between them into one step of the first instruction that is executed before the conditional branch. Further, the compiler (20) generates optimized position data (13) indicating the position where the optimization is performed in the target program (12).
実行モジュール(30)は、未初期化・未定義のメモリ領域へのアクセスが行われる場合に警告を発する機能を有する。この実行モジュール(30)は、上記最適化位置データ(13)に示された位置を参照しながら、目的プログラム(12)を実行する。具体的には、実行モジュール(30)は、目的プログラム(12)中の上記位置のコードを実行する際は、警告を発しない。つまり、実行モジュール(30)は、無視可能な未初期化・未定義のメモリ領域へのアクセスに対して警告を行わず、本当の不具合に起因する警告のみを発する。 The execution module (30) has a function of issuing a warning when an uninitialized / undefined memory area is accessed. The execution module (30) executes the object program (12) while referring to the position indicated in the optimized position data (13). Specifically, the execution module (30) does not issue a warning when executing the code at the position in the target program (12). That is, the execution module (30) does not issue a warning for access to an uninitialized / undefined memory area that can be ignored, and only issues a warning due to a real failure.
従って、開発者は無駄なプログラム解析を行う必要がなくなり、開発時間の浪費が抑制される。また、開発者は、本来の警告機能を有効に活用することが可能となる。その結果、ソフトウェアの開発効率が向上する。 Therefore, the developer does not need to perform useless program analysis, and waste of development time is suppressed. In addition, the developer can effectively use the original warning function. As a result, software development efficiency is improved.
本発明に係るソフトウェア開発システムによれば、開発効率が向上する。 The software development system according to the present invention improves the development efficiency.
添付図面を参照して、本発明によるソフトウェア開発システムを説明する。 A software development system according to the present invention will be described with reference to the accompanying drawings.
図4は、本発明の実施の形態に係るソフトウェア開発環境を説明するための図である。コンパイラ20は、原始プログラム11をコンパイルすることにより、目的プログラム12を生成する。その目的プログラム12(ソフトウェア)は、マイコンなどの製品に搭載される。その製品は、「アドレス更新機能付きメモリアクセス機能」を有するプロセッサ1を備えており、目的プログラム12はそのプロセッサ1により実行される。そのため、コンパイラ20は、図2に示された手法に基づいて、プロセッサ1に対応するように目的プログラム12の最適化を行う。すなわち、コンパイラ20は、条件分岐を挟んで実行される「アドレス更新」と「メモリアクセス」を、条件分岐の前に実行される1ステップの「アドレス更新機能付きメモリアクセス命令」にまとめる。
FIG. 4 is a diagram for explaining a software development environment according to the embodiment of the present invention. The
また、本実施の形態に係るコンパイラ20は、目的プログラム12中の最適化が行われた位置を示す最適化位置データ13を生成する。つまり、最適化位置データ13は、条件分岐前後の「アドレス更新」と「メモリアクセス」がまとめられた「アドレス更新機能付きメモリアクセス命令」の位置を示す。更に言い換えれば、最適化位置データ13は、図2に示されたステップS11の位置を示す。目的プログラム12中の位置とは、ステップS11の目的プログラム12内でのアドレス(オフセット位置)を意味する。例えば、最適化位置データ13には、“0x010”といったアドレスを示す値が格納される。
In addition, the
コンパイラ20によって生成された目的プログラム12は、実行モジュールにより実行される。図4において、その実行モジュールの例として、生成された目的プログラム12のデバッグや動作検証を行うためのシミュレーションモジュール30が示されている。このシミュレーションモジュール30は、プロセッサ1と目的プログラム12を搭載した製品をシミュレートするように構成される。後述されるように、このシミュレーションモジュール30は、ハードウェアで構成されてもよいし、ソフトウェアで構成されてもよい。
The
目的プログラム12のデバッグや動作検証を行うためには、プログラムの異常動作を検知し開発者に通知する機能が必要である。そのため、本実施の形態に係るシミュレーションモジュール30は、目的プログラム12の実行中に未初期化・未定義のメモリ領域へのアクセスが行われた場合、開発者に対して警告を発する機能を備えている。この機能は、以下「警告機能」と参照される。シミュレーションモジュール30の警告機能は、開発者が目的プログラム12中の不具合を発見する助けとなる。
In order to debug and verify the operation of the
図4に示されるように、シミュレーションモジュール30は、実行部31と判定部32を有している。実行部31は、目的プログラム12を実行する。実行中の目的プログラム12の不具合を検出するため、この実行部31は、上述の警告機能を有する。判定部32は、最適化位置データ13を読み込む。そして、判定部32は、現在実行中の目的プログラム12の位置が、最適化位置データ13に示されている位置と一致するかどうか判定する。一致する場合、判定部32は、実行部31にマスク信号を出力する。実行部31は、マスク信号を受け取った場合、未初期化・未定義のメモリ領域へのアクセスが行われたとしても、警告を発しない。
As illustrated in FIG. 4, the simulation module 30 includes an
図5は、シミュレーションモジュール30による処理を示すフローチャートである。シミュレーションモジュール30は、目的プログラム12の実行を開始する(ステップS100)。目的プログラム12中のある位置で、メインメモリに対するアクセスが行われる(ステップS110)。そのメモリアクセスが未初期化・未定義のメモリ領域へのアクセスではない場合(ステップS111;No)、処理が引き続き実行される(ステップS120)。 FIG. 5 is a flowchart showing processing by the simulation module 30. The simulation module 30 starts execution of the target program 12 (step S100). The main memory is accessed at a certain position in the target program 12 (step S110). If the memory access is not an access to an uninitialized / undefined memory area (step S111; No), the processing is continued (step S120).
未初期化・未定義のメモリ領域へのアクセスが行われた時は(ステップS111;Yes)、警告が発せられる場合と、警告が発せられない場合がある。ステップS111におけるメモリアクセスが、最適化位置データ13に示された位置のメモリアクセスである場合(ステップS112;Yes)、判定部32は、実行部31にマスク信号を出力している。従って、シミュレーションモジュール30は、警告を出さずに処理を続行する(ステップS120)。つまり、シミュレーションモジュール30は、未初期化・未定義のメモリ領域へのアクセスが行われていないように振る舞う。
When an uninitialized / undefined memory area is accessed (step S111; Yes), a warning may be issued or a warning may not be issued. When the memory access in step S111 is a memory access at the position indicated in the optimized position data 13 (step S112; Yes), the
一方、ステップS111におけるメモリアクセスが、最適化位置データ13に示された位置のメモリアクセスではない場合(ステップS112;No)、シミュレーションモジュール30は、開発者に警告を与える(ステップS200)。この場合の警告は無視できない本当の不具合に起因する可能性が高い。未初期化・未定義のメモリ領域へのアクセスの原因は、原始プログラム11に存在する可能性が高い。従って、開発者は、プログラムの解析を行い、問題点を検討する(ステップS210)。
On the other hand, when the memory access in step S111 is not the memory access at the position indicated in the optimized position data 13 (step S112; No), the simulation module 30 gives a warning to the developer (step S200). The warning in this case is likely due to a real fault that cannot be ignored. The cause of access to the uninitialized / undefined memory area is likely to exist in the
目的プログラム12が最後まで実行されると(ステップS130;Yes)、シミュレーションモジュール30の処理は終了する。
When the
このように、本実施の形態に係るシミュレーションモジュール30は、最適化位置データ13に示された位置情報を参照しながら目的プログラム12を実行し、不必要な場合は警告を発しない。具体的には、最適化位置データ13に示された位置の「アドレス更新機能付きメモリアクセス命令」を実行する際、シミュレーションモジュール30は、警告を発しない。すなわち、シミュレーションモジュール30は、無視可能な未初期化・未定義のメモリ領域へのアクセスに対して警告を行わず、本当の不具合に起因する警告のみを発する。従って、開発者は無駄なプログラム解析を行う必要がなくなり、開発時間の浪費が抑制される。また、開発者は、本来の警告機能を有効に活用することが可能となる。その結果、ソフトウェアの開発効率が向上する。
As described above, the simulation module 30 according to the present embodiment executes the
以上に説明されたソフトウェア開発を実現するための具体的なシステム構成が、以下に例示される。 A specific system configuration for realizing the software development described above is exemplified below.
図6は、ソフトウェア開発システム100の一例を示している。このソフトウェア開発システム100は、目的プログラム開発装置200と目的プログラム実行装置300を含んでいる。目的プログラム開発装置200は、目的プログラム12を開発するための装置であり、例えばパーソナルコンピュータにより実現される。目的プログラム実行装置300は、目的プログラム12を実行するための装置であり、上記シミュレーションモジュール(実行モジュール)30に対応している。
FIG. 6 shows an example of the
目的プログラム開発装置200は、演算処理装置210、メインメモリ220、記憶装置230、入力装置240、表示装置250、及びインタフェース260を備えており、それらはバスを介して互いに通信可能に接続されている。記憶装置230としては、ハードディスクドライブが例示される。この記憶装置230には、原始プログラム11、目的プログラム12、最適化位置データ13、コンパイラ20、及びデバッガ40が格納されている。入力装置240としては、マウスやキーボードが例示される。表示装置250としては、液晶ディスプレイが例示される。
The target program development device 200 includes an
目的プログラム実行装置300は、ハードウェアであり、製品と同じように目的プログラム12を実行できるように構成される。具体的には、目的プログラム実行装置300は、プロセッサ310、メインメモリ320、格納部330、及びインタフェース360を備えており、それらはバスを介して互いに通信可能に接続されている。格納部330は、最適化位置データ13を格納するための記憶領域であり、その格納部330として、不揮発性メモリが例示される。
The target
プロセッサ310は、上述の実行部31に対応している。目的プログラム12を実行するため、プロセッサ310は、「アドレス更新機能付きメモリアクセス機能」を有している。つまり、プロセッサ310は、アドレス更新機能付きメモリアクセス命令をサポートしている。また、プロセッサ310は、目的プログラム12の実行中に未初期化・未定義のメモリ領域へのアクセスが行われた場合に警告を発する「警告機能」も有している。更に、プロセッサ310は、最適化位置データ13を参照する上述の判定部32も有している。
The
目的プログラム開発装置200と目的プログラム実行装置300は、インタフェース260及び360を介して、互いに通信可能に接続される。これにより、目的プログラム開発装置200と目的プログラム実行装置300との間で、データのやりとりを行うことが可能である。
The target program development device 200 and the target
このようなソフトウェア開発システム100を用いて、ソフトウェアは次のように開発される。開発者は、表示装置250に表示される情報を参照し、入力装置240を用いることによって原始プログラム11を編集する。次に、開発者は、コンパイラ20を起動する。このコンパイラ20は、演算処理装置210によって、メインメモリ220にロードされ実行される。コンパイラ20の命令に従って、演算処理装置210は、次のような処理を行う。すなわち、演算処理装置210は、記憶装置230から原始プログラム11を読み込み、その原始プログラム11をコンパイルする。ここで、図2に示された最適化が行われる。このコンパイルの結果、最適化された目的プログラム12と、最適化された位置を示す最適化位置データ13が生成される。演算処理装置210は、これら目的プログラム12及び最適化位置データ13を、記憶装置230に格納する。
Using such a
次に、開発者は、デバッガ40を起動する。このデバッガ40は、演算処理装置210によって、メインメモリ220にロードされ実行される。デバッガ40の命令に従って、演算処理装置210は、目的プログラム12と最適化位置データ13を、記憶装置230から目的プログラム実行装置300に送信する。目的プログラム12は、メインメモリ320に格納され、プロセッサ310により実行される。最適化位置データ13は、格納部330に格納される。開発者による指示に応答して、デバッガ40は、目的プログラム実行装置300に目的プログラム12の実行を開始させる。
Next, the developer activates the
目的プログラム実行装置300において、プロセッサ310は、図5に示された処理を実行する。つまり、プロセッサ310は、最適化位置データ13を参照しながら、目的プログラム12を実行する。最適化位置データ13に示された位置のコードを実行する際、プロセッサ310は警告を出力しない。一方、未初期化・未定義のメモリ領域へのアクセスが行われ、そのコードの位置が最適化位置データ13に示された位置と一致しない場合、プロセッサ310は警告を出力する。その警告を示す信号は、目的プログラム開発装置200に送られ、表示装置250には警告メッセージが表示される。不具合を通知された開発者は、原始プログラム11や目的プログラム12の解析を行う。
In the target
また、シミュレーションモジュール30は、ソフトウェア的に構成されてもよい。図7は、シミュレーションモジュール30がソフトウェアで構成された場合のソフトウェア開発システム100’を示している。図7において、図6と同様の構成には同一の符号が付され、その説明は適宜省略される。
The simulation module 30 may be configured as software. FIG. 7 shows a
図7において、記憶装置230には、ソフトウェアとしてのシミュレータ300’が格納されている。このシミュレータ300’が、上記シミュレーションモジュール(実行モジュール)30に対応している。このシミュレータ300’は、演算処理装置210によって実行されるソフトウェアであり、図6に示された目的プログラム実行装置300の機能をソフトウェア的に実現している。つまり、上述のプロセッサ310やメインメモリ320は、仮想的にコンピュータ上に構築される。
In FIG. 7, the
目的プログラム12と最適化位置データ13が生成された後、開発者は、シミュレータ300’を起動する。このシミュレータ300’は、演算処理装置210によって、メインメモリ220にロードされ実行される。シミュレータ300’の命令に従って、演算処理装置210は、記憶装置230に格納された目的プログラム12と最適化位置データ13を読み込む。目的プログラム12は、このシミュレータ300’上において実行される、すなわち、仮想的なプロセッサ310により実行される。シミュレータ300’の処理内容は、目的プログラム実行装置300の処理内容と同一である。
After the
本発明に係るソフトウェア開発システム100、100’によれば、開発者は無駄なプログラム解析を行う必要がなくなる。よって、開発時間の浪費が抑制される。また、開発者は、シミュレーションモジュールの本来の警告機能を有効に活用することが可能となる。その結果、ソフトウェアの開発効率が向上する。
According to the
1 プロセッサ
11 原始プログラム
12 目的プログラム
13 最適化位置データ
20 コンパイラ
30 シミュレーションモジュール
31 実行部
32 判定部
40 デバッガ
100 ソフトウェア開発システム
200 目的プログラム開発装置
210 演算処理装置
220 メインメモリ
230 記憶装置
240 入力装置
250 表示装置
260 インタフェース
300 目的プログラム実行装置
300’ シミュレータ
310 プロセッサ
320 メインメモリ
330 格納部
360 インタフェース
DESCRIPTION OF
Claims (10)
前記目的プログラムを実行する実行モジュールと
を備え、
前記コンパイラは、アドレス更新とメモリアクセスを1ステップで実行する第1命令をサポートするプロセッサに対応するように前記目的プログラムの最適化を行い、また、前記目的プログラム中の前記最適化が行われた位置を示す最適化位置データを生成し、
前記実行モジュールは、前記最適化位置データに示された前記位置を参照しながら、前記目的プログラムを実行する
ソフトウェア開発システム。 A compiler that compiles the source program and generates the target program;
An execution module for executing the target program,
The compiler optimizes the target program so as to correspond to a processor that supports a first instruction that executes address update and memory access in one step, and the optimization is performed in the target program. Generate optimized location data to indicate location,
The execution module executes the object program while referring to the position indicated in the optimized position data.
前記実行モジュールは、未初期化・未定義のメモリ領域へのアクセスが行われる場合に警告を発する機能を有し、前記目的プログラム中の前記位置のコードを実行する際は、前記警告を発しない
ソフトウェア開発システム。 A software development system according to claim 1,
The execution module has a function of issuing a warning when an uninitialized / undefined memory area is accessed, and does not issue the warning when executing the code at the location in the target program. Software development system.
前記最適化において、前記コンパイラは、条件分岐を挟んで実行されるアドレス更新とメモリアクセスを、前記条件分岐の前に実行される1ステップの前記第1命令にまとめる
ソフトウェア開発システム。 The software development system according to claim 1 or 2,
In the optimization, the compiler integrates the address update and memory access executed across the conditional branch into one step of the first instruction executed before the conditional branch.
前記最適化位置データは、前記目的プログラム中の前記まとめられた前記第1命令の位置を示す
ソフトウェア開発システム。 A software development system according to claim 3,
The software development system, wherein the optimized position data indicates a position of the collected first instruction in the target program.
前記コンパイラを実行する演算処理装置と、
前記原始プログラムが格納される記憶装置と
を更に備え、
前記演算処理装置は、前記記憶装置から前記原始プログラムを読み込み、前記コンパイラの命令に従って前記原始プログラムをコンパイルし、生成される前記目的プログラム及び前記最適化位置データを前記記憶装置に格納する
ソフトウェア開発システム。 A software development system according to any one of claims 1 to 4,
An arithmetic processing unit for executing the compiler;
A storage device for storing the primitive program;
A software development system that reads the source program from the storage device, compiles the source program according to instructions of the compiler, and stores the generated target program and the optimized position data in the storage device .
前記実行モジュールは、前記演算処理装置により実行されるソフトウェアであり、
前記演算処理装置は、前記実行モジュールの命令に従い、前記記憶装置に格納された前記目的プログラム及び前記最適化位置データを読み込み、
前記ソフトウェア上において前記目的プログラムが実行される
ソフトウェア開発システム。 The software development system according to claim 5,
The execution module is software executed by the arithmetic processing device,
The arithmetic processing unit reads the target program and the optimized position data stored in the storage device according to the instruction of the execution module,
A software development system in which the target program is executed on the software.
前記実行モジュールは、前記記憶装置と通信可能なハードウェアであり、前記第1命令をサポートする第1プロセッサを備え、
前記第1プロセッサは、前記記憶装置から送信される前記目的プログラムを実行する
ソフトウェア開発システム。 The software development system according to claim 5,
The execution module is hardware capable of communicating with the storage device, and includes a first processor that supports the first instruction,
The first processor is a software development system for executing the object program transmitted from the storage device.
前記プログラム開発装置と通信可能に接続されたプログラム実行装置と
を具備し、
前記プログラム実行装置は、アドレス更新とメインメモリへのアクセスを1ステップで実行する第1命令をサポートするプロセッサを備え、
前記プロセッサは、未初期化・未定義のメモリ領域へのアクセスが行われる場合に警告を発する機能を有し、
前記プログラム開発装置は、原始プログラムをコンパイルすることによって前記目的プログラムを生成するコンパイラを備え、
前記コンパイラは、前記プロセッサに対応するように前記目的プログラムの最適化を行い、また、前記目的プログラム中の前記最適化が行われた位置を示す最適化位置データを生成し、
前記プログラム実行装置は、前記目的プログラムと前記最適化位置データを前記プログラム開発装置から受け取り、
前記プロセッサは、前記最適化位置データを参照しながら前記目的プログラムを実行し、前記目的プログラム中の前記位置のコードを実行する際は、前記警告を発しない
ソフトウェア開発システム。 A program development device for developing a target program;
A program execution device communicably connected to the program development device,
The program execution device includes a processor that supports a first instruction that executes address update and access to a main memory in one step,
The processor has a function of issuing a warning when an uninitialized / undefined memory area is accessed,
The program development apparatus includes a compiler that generates the target program by compiling a source program,
The compiler optimizes the target program so as to correspond to the processor, and generates optimized position data indicating a position where the optimization is performed in the target program,
The program execution device receives the target program and the optimized position data from the program development device,
The software development system, wherein the processor executes the target program while referring to the optimized position data, and does not issue the warning when executing the code at the position in the target program.
前記最適化において、前記コンパイラは、条件分岐を挟んで実行されるアドレス更新とメモリアクセスを、前記条件分岐の前に実行される1ステップの前記第1命令にまとめる
ソフトウェア開発システム。 The software development system according to claim 8,
In the optimization, the compiler integrates the address update and memory access executed across the conditional branch into one step of the first instruction executed before the conditional branch.
前記最適化位置データは、前記目的プログラム中の前記まとめられた前記第1命令の位置を示す
ソフトウェア開発システム。 The software development system according to claim 9,
The software development system, wherein the optimized position data indicates a position of the collected first instruction in the target program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005216662A JP2007034650A (en) | 2005-07-27 | 2005-07-27 | Software development system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005216662A JP2007034650A (en) | 2005-07-27 | 2005-07-27 | Software development system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007034650A true JP2007034650A (en) | 2007-02-08 |
Family
ID=37793838
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005216662A Withdrawn JP2007034650A (en) | 2005-07-27 | 2005-07-27 | Software development system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007034650A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101944037A (en) * | 2009-07-06 | 2011-01-12 | 北京中电华大电子设计有限责任公司 | Method for simulating randomicity of smart card chip RAM in development system |
US8930905B2 (en) | 2012-03-05 | 2015-01-06 | Samsung Electronics Co., Ltd. | System and method for providing a guideline for optimizing platform |
-
2005
- 2005-07-27 JP JP2005216662A patent/JP2007034650A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101944037A (en) * | 2009-07-06 | 2011-01-12 | 北京中电华大电子设计有限责任公司 | Method for simulating randomicity of smart card chip RAM in development system |
US8930905B2 (en) | 2012-03-05 | 2015-01-06 | Samsung Electronics Co., Ltd. | System and method for providing a guideline for optimizing platform |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8170859B1 (en) | Methods, apparatuses and computer program products for simulating arbitrary unmodified code | |
US6587995B1 (en) | Enhanced programmable core model with integrated graphical debugging functionality | |
US20090144705A1 (en) | Debugging device and debugging method | |
JPH11232138A (en) | Emulation method | |
US9292265B2 (en) | Method for convergence analysis based on thread variance analysis | |
US8359561B2 (en) | Equivalence verification between transaction level models and RTL at the example to processors | |
EP2223213B1 (en) | Multi language software code analysis | |
US20110307688A1 (en) | Synthesis system for pipelined digital circuits | |
JPH11194957A (en) | Debug supporting device, parallel execution information generation device and recording medium for recording program applied to the same | |
Bouchhima et al. | Automatic instrumentation of embedded software for high level hardware/software co-simulation | |
JP6342129B2 (en) | Source code error position detection apparatus and method for mixed mode program | |
US20100275185A1 (en) | System and Method for High Performance Coverage Analysis | |
US7240334B1 (en) | Methods, systems, and computer program products for deferred computer program tracing | |
US20130024675A1 (en) | Return address optimisation for a dynamic code translator | |
US10380313B1 (en) | Implementation and evaluation of designs for heterogeneous computing platforms with hardware acceleration | |
US20080127118A1 (en) | Method and system for dynamic patching of software | |
JPH0748182B2 (en) | Program error detection method | |
JP2007034650A (en) | Software development system | |
Chen et al. | CARE: Compiler-assisted recovery from soft failures | |
JPH06309193A (en) | Method and device for verifying operation of machine language program | |
US20030070117A1 (en) | Simulation apparatus and simulation method | |
Hexsel | cMIPS–a synthesizable VHDL model for the classical five stage pipeline | |
JP2011145880A (en) | Generation method for test task used in logic verification of semiconductor integrated circuit | |
JP4594704B2 (en) | Program development support system, program and recording medium | |
JP2004013190A (en) | Environment for software development, simulator, and recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20081007 |