JP2018032062A - Test item generation method and arithmetic unit - Google Patents
Test item generation method and arithmetic unit Download PDFInfo
- Publication number
- JP2018032062A JP2018032062A JP2016161716A JP2016161716A JP2018032062A JP 2018032062 A JP2018032062 A JP 2018032062A JP 2016161716 A JP2016161716 A JP 2016161716A JP 2016161716 A JP2016161716 A JP 2016161716A JP 2018032062 A JP2018032062 A JP 2018032062A
- Authority
- JP
- Japan
- Prior art keywords
- test item
- execution
- tasks
- task
- item generation
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 158
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000012795 verification Methods 0.000 claims description 15
- 230000008859 change Effects 0.000 description 21
- 238000004458 analytical method Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 10
- 230000008569 process Effects 0.000 description 10
- 238000012986 modification Methods 0.000 description 9
- 230000004048 modification Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 7
- 238000013500 data storage Methods 0.000 description 6
- 238000013461 design Methods 0.000 description 6
- 238000011161 development Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R31/00—Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
- G01R31/28—Testing of electronic circuits, e.g. by signal tracer
- G01R31/317—Testing of digital circuits
- G01R31/3181—Functional testing
- G01R31/3183—Generation of test inputs, e.g. test vectors, patterns or sequences
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/26—Functional testing
- G06F11/263—Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- Debugging And Monitoring (AREA)
- Tests Of Electronic Circuits (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
Description
本発明は、テスト項目生成方法、および演算装置に関する。 The present invention relates to a test item generation method and an arithmetic device.
近年、電子機器は多機能化により演算量が年々増加しており、電子機器に求められるCPUの性能が増加している。そのため、電子機器に搭載するCPUの数を増やすことや、CPUに内蔵するCPUコアの数を増やすことによって対応している。すなわちいずれの場合も電子機器に複数のCPUコアを搭載すること(マルチコア)により処理能力を向上させている。電子機器が複数のCPUコアを備える場合は、単一のCPUコアしか備えない場合に比べて動作が複雑化し、この動作を検証するためのテスト項目の作成が容易ではない。
特許文献1には、設計を検証する方法が開示されており、ある設計に対して離散的なテスト・ケースまたは1組の関連するテスト・ケースを実行するのに必要とされるリソースを抽出するステップを含む。この方法はさらに、抽出されたリソースに基づいてシミュレーション・モデルを構築するステップと、設計全体ではなく、抽出されたリソースだけを用いてこのシミュレーション・モデルを実行し、それによって、離散的なテスト・ケースまたは1組の関連するテスト・ケースによって表される特定の機能または一群の相互に関係する機能をテストして設計を検証するステップとを含む。
In recent years, the calculation amount of electronic devices has been increasing year by year due to multifunctionalization, and CPU performance required for electronic devices has increased. Therefore, this is dealt with by increasing the number of CPUs installed in the electronic device or increasing the number of CPU cores built in the CPU. That is, in any case, the processing capability is improved by mounting a plurality of CPU cores in an electronic device (multi-core). When the electronic device includes a plurality of CPU cores, the operation is more complicated than when only a single CPU core is provided, and it is not easy to create a test item for verifying this operation.
Patent Document 1 discloses a method for verifying a design, and extracts resources required to execute a discrete test case or a set of related test cases for a design. Includes steps. The method further includes building a simulation model based on the extracted resources, and executing the simulation model using only the extracted resources rather than the entire design, thereby providing a discrete test model. Testing a particular function or group of interrelated functions represented by a case or a set of related test cases to verify the design.
特許文献1に記載されている発明では、マルチコアに対応した適切なテスト項目を作成することできない。 In the invention described in Patent Document 1, an appropriate test item corresponding to the multi-core cannot be created.
本発明の第1の態様によるテスト項目生成方法は、複数のタスクを実行する複数のCPUコア、および前記複数のCPUコアがアクセスする共有資源を備える演算装置におけるテスト項目を生成するテスト項目生成方法は、コンピュータが、前記複数のタスクのうち、前記共有資源にアクセスするタスクを特定することと、コンピュータが、前記複数のタスクを、実行されるCPUコアごとに分類することと、コンピュータが、前記分類された複数のタスクのCPUコア内における実行順番を特定することと、コンピュータが、前記特定されたCPUコア内における前記複数のタスクの実行順番に適合し、かつ異なるCPUコアでそれぞれ実行される前記共有資源にアクセスする2以上のタスクの実行順番が互いに入れ替えられたタスク実行順列を複数生成することにより、前記テスト項目を生成することとを備える。
本発明の第2の態様による演算装置は、第1の態様のテスト項目生成方法により生成されたテスト項目と、前記テスト項目を確認するチェックロジックとが格納される記憶部を備える。
A test item generation method according to a first aspect of the present invention is a test item generation method for generating a test item in an arithmetic device including a plurality of CPU cores for executing a plurality of tasks and a shared resource accessed by the plurality of CPU cores. The computer specifies a task for accessing the shared resource among the plurality of tasks, the computer classifies the plurality of tasks for each CPU core to be executed, and the computer Specifying the execution order of the plurality of classified tasks in the CPU core, and the computer is adapted to the execution order of the plurality of tasks in the specified CPU core and executed on different CPU cores. Task execution in which the execution order of two or more tasks accessing the shared resource is interchanged By creating multiple columns, and generating a said test items.
An arithmetic device according to a second aspect of the present invention includes a storage unit in which test items generated by the test item generation method according to the first aspect and check logic for confirming the test items are stored.
本発明によれば、マルチコアに対応した適切なテスト項目を作成することできる。 According to the present invention, it is possible to create an appropriate test item corresponding to the multi-core.
(第1の実施の形態)
以下、図1〜図7を参照して、本発明に係るテスト項目生成方法を使用するテスト項目生成装置100の第1の実施の形態を説明する。テスト項目生成装置100は、後述するECU200において実行されるテストにおいて使用されるテスト項目を生成する。本実施の形態では、コンピュータプログラムの構成要素を「タスク」と呼ぶ。タスクは1または複数のCPU命令から構成される。タスクはいずれかのCPUコアで実行され、タスクによっては後述する共有資源203へのアクセスが必要である。また、複数のタスクを実行する順序を示したものを「タスク実行順列」と呼ぶ。本実施の形態では、テスト項目は2以上のタスク実行順列から構成されることとする。すなわちECU200において実行されるテストは、生成されたテスト項目にしたがって、所定のタスクを所定の順番で実行することである。
(First embodiment)
A first embodiment of a test
(テスト項目生成装置のハードウエア構成)
図1は、テスト項目生成装置100のハードウエア構成を示す図である。テスト項目生成装置100は、CPU101と、ROM102と、RAM103と、インタフェース104とを備える。CPU101は、テスト項目生成装置100の動作を制御する。CPU101は、ROM102に格納された不図示のプログラムをRAM103に展開して実行することにより、後述する機能を実現する。RAM103は、前述したプログラムが実行される際のワーキングエリア、および生成されたテスト項目の保存に利用される。インタフェース104は、電子データの入出力ポートであり、テスト項目生成装置100と他の装置との情報の授受を行う。テスト項目生成装置100は、インタフェース104を介してテスト項目の生成に必要な入力情報6を取得する。入力情報6は、プログラムのソースコード、設計ドキュメント、プログラムを実行するCPUのリバースエンジニアリング情報、テスト用ドキュメントなどであり、ECU200のCPUコアで実行される複数のタスクを含む。
(Hardware configuration of test item generator)
FIG. 1 is a diagram illustrating a hardware configuration of the test
(テスト項目生成装置の機能的構成)
図2は、テスト項目生成装置100の機能的な構成を示す図である。図2に示す各機能は、ROM102に格納されたプログラムをCPU101が実行することにより実現される。テスト項目生成装置100は、その機能として、対応情報部111と、特定情報部112と、順序情報部113と、テスト項目生成部114と、を備える。またRAM103に対応情報格納領域121と、特定情報格納領域122と、順序情報格納領域123と、テスト項目格納領域124とが設けられる。ここでは各機能の概要を説明し、各機能の詳細は後述する。
(Functional configuration of test item generator)
FIG. 2 is a diagram illustrating a functional configuration of the test
対応情報格納領域121、特定情報格納領域122、順序情報格納領域123、およびテスト項目格納領域124は、RAM103に設けられた記憶領域である。
対応情報部111は、インタフェース104から読み込まれる入力情報6を解析し、入力情報6に含まれる複数のタスクのそれぞれがECU200のいずれのCPUコアで実行されるかを特定して、実行されるCPUコアごとにタスクを分類する。そして、タスクの分類結果を示す対応情報を生成する。対応情報部111が生成した対応情報は、対応情報格納領域121に格納される。特定情報部112は、入力情報6を解析し、入力情報6に含まれるタスクのうち、どのタスクが後述する共有資源203にアクセスするタスクであるかを特定する。そして、特定したタスクを示す特定情報を生成する。特定情報部112が生成した特定情報は、特定情報格納領域122に格納される。
The correspondence
The
順序情報部113は、入力情報6を解析し、同一のCPUコアで実行されるタスクの実行順番を特定する。そして、特定した情報である、同一のCPUコアで実行されるタスクの実行順番を示す順序情報を生成する。順序情報部113が生成した順序情報は、順序情報格納領域123に格納される。順序情報には、CPUコアごとにタスクの実行順番が示されていてもよいし、複数のCPUコアで実行されるタスクが混在して示されていてもよい。
テスト項目生成部114は、対応情報部111、特定情報部112、および順序情報部113が生成した情報に基づきテスト項目を生成し、生成したテスト項目をテスト項目格納領域124に格納する。テスト項目生成部114が生成したテスト項目は、インタフェース104を介してECU200に出力される。
The
The test
対応情報部111、特定情報部112、および順序情報部113はいずれも、ソースコードを入力情報6とする場合は処理が容易である。対応情報部111、特定情報部112、および順序情報部113は設計ドキュメントやテスト用ドキュメントを入力情報6とする場合は、字句解析等を活用することで、ソースコードと同等の検索を行う。また、ドキュメントの解析ではドキュメントフォーマットの規定により、字句解析を不要とすることも可能である。
特定情報部112は、ソースコードを解析して共有資源203へアクセスするタスクを特定する際に、共有資源203へ直接アクセスするタスクだけではなく、タスクの呼び出しを再帰的に検索することで、共有資源203に間接的にアクセスするタスクも特定する。また、間接的なアクセスはタスクの呼び出し回数を指定することで、検索の範囲を限定してもよい。
The
When identifying the task that accesses the shared
(ECUのハードウエア構成)
図3は、ECU200のハードウエア構成を示す図である。ECU200は、第1コア201と、第2コア202と、共有資源203と、ROM204と、RAM205と、テスト項目入力部206と、を備える。第1コア201および第2コア202は、ECU200が備えるCPUのコアである。ECU200は単一のコアを有するCPUを複数備えてもよいし、複数のコアを有するCPUを備えてもよい。共有資源203は、第1コア201および第2コア202からアクセスされる資源であり、たとえばRAM205の一部の領域、ECU200が備えるCPUのレジスタ、不図示のアクチュエータ、センサ、および通信バスのいずれかである。テスト項目入力部206は、電子データの入出力ポートであり、テスト項目生成装置100が生成したテスト項目が入力される。
(ECU hardware configuration)
FIG. 3 is a diagram illustrating a hardware configuration of the
(ECUの機能的構成)
図4は、ECU200の機能的な構成を示す図である。図4に示す各機能は、ROM204に格納されたプログラムを第1コア201または第2コア202が実行することにより実現される。ECU200はその機能として、通常モード部211と、動作検証モード部212と、モード切替部213と、テスト実行データ格納領域215とを備える。ECU200は、テスト項目生成装置100のインタフェース104から入力されたテスト項目をテスト項目入力部206において受信する。ECU200は、受信したテスト項目をテスト実行データ格納領域215に格納する。ECU200は、テスト項目の実行結果をチェックするチェックロジックもテスト実行データ格納領域215に格納する。このチェックロジックは、オペレータが作成してもよいし、テスト項目生成装置100が作成してもよい。
(Functional configuration of ECU)
FIG. 4 is a diagram illustrating a functional configuration of the
ECU200は、通常モードと動作検証モードの2つの動作モードを有する。ECU200は、ユーザ3により操作されるモード切替部213の動作指令により、通常モードと動作検証モードのいずれかが有効になる。通常モードが有効な場合は通常モード部211がECU200の動作を制御し、動作検証モードが有効な場合は動作検証モード部212がECU200の動作を制御する。
通常モード部211は、ECU200が備える不図示のセンサ、または不図示の通信インタフェースからの入力に基づき各種演算処理を行う。動作検証モード部212は、テスト実行データ格納領域215に格納されたテスト項目を構成する複数のタスク実行順列のそれぞれを順次実行し、その実行結果をチェックロジックと照合する。動作検証モード部212は、照合結果を不図示の記憶部に格納し外部から照合結果にアクセス可能に構成してもよい。また動作検証モード部212は、ECU200またはECU200が接続される機器が備える報知部、たとえばスピーカやライトを用いて照合結果を報知してもよい。
The
(テスト項目生成の概要)
図5は、テスト項目生成装置100によるテスト項目の生成の概要を示す図である。
ソースコード4001は、ECU200において実行されるプログラムのソースコードである。ソースコード4001には、符号4002〜4007に示すように、そのプログラムを構成するタスクf1〜f6の詳細な情報、たとえば各タスクが共有資源203にアクセスするか否かが含まれる。またソースコード4001には、各タスクが実行されるCPUコアの情報、および各CPUコアにおいて各タスクが実行される順番の情報が含まれる。なお、異なるCPUコアで実行されるタスク同士の実行順番は実行のたびに変更となる可能性があり、ソースコード4001の記載からは同一のCPUコアで実行されるタスクの実行順番しか明らかにされない。
(Overview of test item generation)
FIG. 5 is a diagram showing an outline of test item generation by the test
テスト項目生成装置100にソースコード4001が入力情報6として入力されると、対応情報部111は、ソースコード4001を解析して符号4009で示すように各タスクが実行されるCPUコアを特定する。すなわちテスト項目に含まれるタスクf1〜f6のうち、f1、f3、f5のタスクは第1コア201で実行され、f2、f4、f6のタスクは第2コア202で実行されると特定する。
特定情報部112は、ソースコード4001を解析して、符号4008で示すように、テスト項目に含まれるタスクf1〜f6のうち、ECU200の共有資源203にアクセスするタスクはf3とf4であることを特定する。
When the
The
順序情報部113は、ソースコード4001を解析して、符号4010で示すように、同一のCPUコアで実行されるタスクの実行順番を示す順序情報を特定する。ただし図5ではCPUコアごとにタスクの実行順序を示しているが、複数のCPUコアで実行されるタスクが混在された状態で実行順番が示されてもよい。たとえば、「f1、f2、f3、f4、f5、f6」というタスクの実行順番が順序情報として特定されてもよい。
テスト項目生成部114は、対応情報部111、特定情報部112、および順序情報部113が生成した情報、すなわち符号4008,4009,4010の情報に基づきタスク実行順列を生成する。テスト項目生成部114は、特定されたCPUコア内における複数のタスクの実行順番に適合し、かつ異なるCPUコアでそれぞれ実行される共有資源203にアクセスするタスクf3、f4の実行順番が互いに入れ替えられたタスク実行順列を複数、ここでは2つ生成し、テスト項目として、テスト項目格納領域124に符号4012で示すように格納する。これにより、テスト項目生成装置100において、タスクf1〜f6を含むテスト項目が作成される。
The
The test
(テスト項目生成部の動作例)
図5に示した例では共有資源203にアクセスするタスクが2つだけだったので、もう少し複雑な例を用いてテスト項目生成部114の動作を説明する。ここでは、第1コア201でタスクf2、f3、f5、f7が実行され、第2コア202でタスクf4、f6が実行され、f2〜f6が共有資源203にアクセスする場合に、テスト項目生成部114により生成されるテスト項目を説明する。ここでは同一CPUコア内では数字が小さいタスクから実行されることとする。また以下では、タスクと後述する実行系列が実行される順番を右矢印の「→」を用いて表現する。たとえばタスクf2の次にタスクf3が実行されることは、「f2→f3」とあらわされる。
(Operation example of test item generator)
In the example shown in FIG. 5, since there are only two tasks accessing the shared
まずテスト項目生成部114は、CPUコアごとに共有資源203にアクセスするタスクが実行される順序を特定し、実行系列を生成する。実行系列とは、同一のCPUコアにおいて実行されるタスクであって、共有資源203にアクセスする複数のタスクを、順序情報格納領域123に格納された順序情報が示すタスクの実行順番で並べたものである。ここでは生成した実行系列をα、βと呼ぶ。実行系列は、CPUコアと同数だけ生成される。実行系列αがf2、f3、f5から構成されることを、以下ではα0(f2、f3、f5)と表記する。同様に、実行系列βはβ0(f4、f6)である。
First, the test
これ以降では、図6を参照しながらテスト項目生成部114がタスク実行順列を生成する手順の説明を続ける。
次にテスト項目生成部114は、生成した実行系列をすべて用いた順列、すなわち生成した実行系列をすべて用いて並び替えができる全ての順序を作成する。この例では、図6の未展開の欄に示すように、α→βとβ→αの2つが作成される。以下では、この作成した順列のそれぞれを「順列要素」と呼ぶ。
Hereinafter, the procedure for the test
Next, the test
そしてテスト項目生成部114は、生成した順列要素のそれぞれについて、αおよびβを展開して実行順序のバリエーションである順列要素を増加させる。たとえばαの展開とは、αを構成するタスクのうち先頭のタスクを分離させ、αの名称に分離したタスクの数を付加することである。すなわち、α0(f2、f3、f5)が、f2→α1(f3、f5)に展開される。この展開により順列要素を構成する要素が増えたので、さらなる並び替えが可能となる。なお、ここでは順列要素を展開したものも「順列要素」と呼んでいるが、「展開列」と呼んでもよい。また、ここでは実行系列を構成する先頭のタスクを分離させた例を示したが、実行系列を構成する末尾のタスクを分離させてもよい。
Then, the test
したがって、順列要素の1つであるα→βは、αを1回展開することにより図6の「α展開1回目」の欄に示すように、f2→α1(f3、f5)→βと、f2→β→α1(f3、f5)とに展開される。さらにαを展開すると、順列要素α→βは、図6の「α展開2回目」の欄に示すように合計で3つに展開される。このとき、α0(f2、f3、f5)が2回展開されたα2(f5)はf5そのものであり、これ以上展開できない。そのため次はβを展開する。 Therefore, α → β, which is one of the permutation elements, is expressed as f2 → α1 (f3, f5) → β as shown in the column of “α expansion first time” in FIG. 6 by expanding α once. Expanded in the order of f2 → β → α1 (f3, f5). When α is further expanded, permutation elements α → β are expanded into a total of three as shown in the column “α expansion second time” in FIG. At this time, α2 (f5) in which α0 (f2, f3, f5) is expanded twice is f5 itself and cannot be expanded any more. Therefore, β is expanded next.
順列要素α→βはさらに、βを展開することにより図6の「β展開1回目」の欄に示すように合計で5つに展開される。このとき、β0(f4、f6)が1回展開されたβ1(f6)はf6そのものであり、これ以上展開できない。そのため、以上でα→βの順列要素の展開処理は終了である。
テスト項目生成部114は、上述した順列要素α→βの展開と同様に順列要素β→αを展開する。この処理は順列要素α→βの展開と同様なので、説明および図6における例示を省略する。
Further, permutation elements α → β are expanded into a total of five by expanding β as shown in the column “β expansion first time” in FIG. At this time, β1 (f6) in which β0 (f4, f6) is expanded once is f6 itself and cannot be expanded any more. Therefore, the expansion process of the permutation element of α → β is completed.
The test
このように生成された順列要素に、共有資源203にアクセスしないタスクf7の実行順番を追記して、タスク実行順列とする。共有資源203にアクセスしないタスクの実行順番は、同一のCPUコアにおける実行順序に従っているいずれか1か所とする。たとえばf7を除く実行順序がf2→f3→f5→f4→f6である場合に、f7の実行順番は同一CPUコアで実行されるf5よりも後なので、f5、f4、f6それぞれの直後に挿入することができる。すなわちこの場合に、f7の挿入場所により3とおりの実行順序を生成可能ではあるが、3つのうちのいずれか1つのみを採用してタスク実行順列、すなわちテスト項目の1つとする。共有資源203にアクセスしないタスクの実行順番が変化してもテストへの影響がないためである。
The execution order of the task f7 that does not access the shared
(テスト項目生成部のフローチャート)
図7は、テスト項目生成部114の動作を表すフローチャートである。以下に説明するフローチャートの各ステップの実行主体は、テスト項目生成装置100のCPU101である。
ステップS301では、対応情報部111と特定情報部112の出力を参照し、CPUコアごとに共有資源203にアクセスするタスクを特定する。続くステップS302では、順序情報部113の出力を参照し、CPUコアごとに共有資源203にアクセスするタスクの実行順序を特定する。
(Flowchart of test item generator)
FIG. 7 is a flowchart showing the operation of the test
In step S301, the task that accesses the shared
続くステップS303では、実行系列を生成する。実行系列とは前述のとおり、同一のCPUコアにおいて実行されるタスクであって、共有資源203にアクセスする複数のタスクを、順序情報格納領域123に格納された順序情報が示すタスクの実行順番に並べたものである。すなわちステップS303ではCPUコアと同数の実行系列が生成される。続くステップS304では、実行系列の順列、すなわち複数の順列要素を作成する。ここで作成される順列要素の数は、ステップS303において生成された実行系列の数の階乗である。異なるCPUコアで実行されるタスクの実行の順番に制限はないからである。図6の例では、α→βとβ→αの作成に相当する。
In subsequent step S303, an execution sequence is generated. As described above, the execution sequence is a task executed in the same CPU core, and a plurality of tasks that access the shared
続くステップS305では、第1の実行系列、たとえばαを展開対象に設定する。続くステップS306では、展開対象の実行系列から先頭のタスクを展開する。図6の例では、α0(f2、f3、f5)をf2→α1(f3、f5)に展開することに相当する。続くステップS307では、ステップS306の展開に伴う順序入れ替えを含む順列要素を生成する。続くステップS308では展開対象の実行系列がさらに展開可能か否かを判断する。さらに展開可能と判断する場合はステップS306に戻り、さらなる展開は不可能と判断する場合はステップS309に進む。図6の例では、α展開2回目やβ展開1回目の終了後にはステップS309に進むこととなる。 In the subsequent step S305, the first execution series, for example, α is set as a development target. In the subsequent step S306, the first task is expanded from the execution sequence to be expanded. In the example of FIG. 6, it is equivalent to developing α0 (f2, f3, f5) from f2 → α1 (f3, f5). In the subsequent step S307, a permutation element including the order change accompanying the expansion in step S306 is generated. In a succeeding step S308, it is determined whether or not the execution sequence to be expanded can be further expanded. If it is determined that further expansion is possible, the process returns to step S306. If it is determined that further expansion is impossible, the process proceeds to step S309. In the example of FIG. 6, the process proceeds to step S309 after the second α expansion and the first β expansion.
ステップS309では、未展開の実行系列が存在するか否かを判断する。未展開の実行系列が存在すると判断する場合はステップS310に進み、未展開の実行系列が存在しないと判断する場合はステップS311に進む。ステップS310では未展開の実行系列のいずれかを展開対象に設定し、ステップS306に戻る。ステップS311では、共有資源203にアクセスしていないタスクを順列要素に追加し、タスク実行順列とする。これにより、異なるCPUコアでそれぞれ実行され、かつ共有資源203にアクセスするタスクf2、f4、f6とタスクf3、f5の実行順番の全ての組み合わせについて、タスク実行順列を生成することができる。続くステップS312では、生成したタスク実行順列をテスト項目格納領域124に格納して図7のフローチャートを終了する。
In step S309, it is determined whether there is an undeployed execution sequence. If it is determined that there is an unexpanded execution sequence, the process proceeds to step S310. If it is determined that there is no undeployed execution sequence, the process proceeds to step S311. In step S310, one of unexecuted execution sequences is set as a deployment target, and the process returns to step S306. In step S311, a task that has not accessed the shared
上述した第1の実施の形態によれば、次の作用効果が得られる。
(1)複数のタスクを実行する複数のCPUコア、および複数のCPUコアがアクセスする共有資源203を備える演算装置、すなわちECU200におけるテスト項目を生成するテスト項目生成方法は、以下のようにテスト項目生成装置100に実行される。このテスト項目生成方法は、以下の4つを含む。第1は、特定情報部112により実行される、複数のタスクのうち共有資源203にアクセスするタスクを特定することである。第2は、対応情報部111により実行される、複数のタスクを、実行されるCPUコアごとに分類することとである。第3は、順序情報部113により実行される、分類された複数のタスクのCPUコア内における実行の順番を特定することとである。第4は、テスト項目生成部114により実行される、特定されたCPUコア内における複数のタスクの実行順番に適合し、かつ異なるCPUコアでそれぞれ実行される共有資源203にアクセスする2以上のタスクの実行順番が互いに入れ替えられたタスク実行順列を複数生成することにより、テスト項目を生成することとである。
そのため、共有資源203にアクセスするタスクの実行順番を入れ替えたテスト項目を作成するので、マルチコアに対応した適切なテスト項目を作成することができる。
According to the first embodiment described above, the following operational effects are obtained.
(1) A test item generation method for generating a test item in an arithmetic device including a plurality of CPU cores that execute a plurality of tasks and a shared
Therefore, test items are created by changing the execution order of tasks that access the shared
(2)テスト項目生成装置100のテスト項目の生成では、異なるCPUコアでそれぞれ実行され、かつ共有資源203にアクセスするタスクの実行順番の全ての組み合わせについて、タスク実行順列を生成する。
そのため、タスクの数が多く組み合わせが膨大であっても漏れのないテスト項目を作成することができる。
(2) In the test item generation of the test
Therefore, even if the number of tasks is large and the number of combinations is enormous, it is possible to create test items without omissions.
(3)テスト項目生成部114によるテスト項目生成は以下の5つを含む。第1は、同一のCPUコアにおいて実行されるタスクを、特定されたCPUコア内における実行順番に並べた実行系列を生成すること(図7のステップS303)である。第2は、複数の実行系列の順列を生成すること(図7のステップS304)とである。第3は、順列のそれぞれについて、実行系列を構成する先頭または末尾のタスクを実行系列から分離させることにより実行系列を展開し、展開された実行系列および分離されたタスクの実行順番を保ったまま他の実行系列および他のタスクとの順番をすべて入れ替えて生成される、1または複数の展開列を生成すること(図7のステップS306、S307)である。第4は、展開列のそれぞれについて、実行系列が展開できなくなるまで展開列の生成を繰り返すことと(図7のステップS308が否定判断されるまで繰り返し)である。第5は、繰り返しにより生成された複数の、実行系列の展開ができない展開列のそれぞれをタスク実行順列とすること(図7のステップS312)である。
そのため、タスクの数が多く組み合わせが膨大であっても、実行系列の順列の生成と展開列の生成の繰り返しにより、漏れのないテスト項目を作成することができる。
(3) Test item generation by the test
Therefore, even if the number of tasks is large and the number of combinations is enormous, it is possible to create test items without omission by repeating generation of execution sequence permutations and generation of expanded sequences.
(4)演算装置、すなわちECU200は、上述したテスト項目生成方法により生成されたテスト項目と、テスト項目を確認するチェックロジックとが格納される記憶部、すなわちテスト実行データ格納領域215を備える。
そのためECU200は、実機であるECU200においてテスト項目を実行し、さらにチェックロジックを用いてそのテスト結果を確認することができる。このテスト項目はテスト項目生成装置100により生成されたものであり、それぞれのタスクの共有資源203へのアクセス順序を同じ順番で確認しないテスト項目である。
(4) The arithmetic unit, that is, the
Therefore, the
(5)演算装置、すなわちECU200は、テスト項目を構成する複数のタスク実行順列のそれぞれを順次実行する動作検証モード部212と、動作検証モード部212を動作させるモード切替部213とを備える。そのためECU200は、動作モードを切り替えてテストを実行することができる。
(5) The arithmetic unit, that is, the
(変形例1)
対応情報部111、特定情報部112、および順序情報部113は、従前に入力された入力情報6を保存しておき、新たに入力された入力情報6が従前の入力情報6に一致する場合は、それぞれの格納領域に格納した解析結果をテスト項目生成部114に出力してもよい。この変形例1によれば、入力情報6に変更がない場合に解析を省略することができる。本変形例における効果は、対応情報部111、特定情報部112、および順序情報部113に入力される情報がそれぞれ異なっており、それらのうちの一部のみが変更される場合、たとえばタスクの実行順番のみが変更される場合に顕著である。
(Modification 1)
The
(変形例2)
図8は、変形例2におけるテスト項目生成装置100の機能的な構成を示す図である。テスト項目生成装置100は、対応情報変更点分析部131と、特定情報変更点分析部132と、順序情報変更点分析部133と、変更点テスト項目生成部134とをさらに備えてもよい。
対応情報変更点分析部131は、入力情報6の変更点を分析し、対応情報格納領域121に格納されている対応情報を参照し、入力情報6の変更部分に係る対応情報を変更点テスト項目生成部134に出力する。特定情報変更点分析部132は、入力情報6の変更点を分析し、特定情報格納領域122に格納されている特定情報を参照し、入力情報6の変更部分に係る特定情報を変更点テスト項目生成部134に出力する。順序情報変更点分析部133は、入力情報6の変更点を分析し、順序情報格納領域123に格納されている順序情報を参照し、入力情報6の変更部分に係る順序情報を変更点テスト項目生成部134に出力する。
(Modification 2)
FIG. 8 is a diagram illustrating a functional configuration of the test
The correspondence information change
変更点テスト項目生成部134は、対応情報変更点分析部131、特定情報変更点分析部132、および順序情報変更点分析部133の出力、ならびにテスト項目格納領域124に格納されているテスト項目を用いて、修正が必要となるテスト項目のみを生成する。そして変更点テスト項目生成部134は、テスト項目格納領域124に格納されるテスト項目を更新する。
この変形例2によれば、入力情報6に変更がわずかな場合にテスト項目生成装置100の処理を減少させることができる。
The change point test
According to the second modification, the processing of the test
テスト項目生成装置100が実行するプログラムは不図示のROMに格納されるとしたが、プログラムはRAM103や不図示のフラッシュメモリに格納されていてもよい。また、テスト項目生成装置100がインタフェース104を用いて、必要なときにインタフェース104が利用可能な媒体を介して、他の装置からプログラムが読み込まれてもよい。ここで媒体とは、例えば入出力インタフェースに着脱可能な記憶媒体、または通信媒体、すなわち有線、無線、光などのネットワーク、または当該ネットワークを伝搬する搬送波やディジタル信号、を指す。また、プログラムにより実現される機能の一部または全部がハードウエア回路やFPGAにより実現されてもよい。
上述した各実施の形態および変形例は、それぞれ組み合わせてもよい。
上記では、種々の実施の形態および変形例を説明したが、本発明はこれらの内容に限定されるものではない。本発明の技術的思想の範囲内で考えられるその他の態様も本発明の範囲内に含まれる。
Although the program executed by the test
The above-described embodiments and modifications may be combined.
Although various embodiments and modifications have been described above, the present invention is not limited to these contents. Other embodiments conceivable within the scope of the technical idea of the present invention are also included in the scope of the present invention.
100 … テスト項目生成装置
111 … 対応情報部
112 … 特定情報部
113 … 順序情報部
114 … テスト項目生成部
124 … テスト項目格納領域
201 … 第1コア
202 … 第2コア
203 … 共有資源
212 … 動作検証モード部
213 … モード切替部
215 … テスト実行データ格納領域
DESCRIPTION OF
Claims (5)
コンピュータが、前記複数のタスクのうち、前記共有資源にアクセスするタスクを特定することと、
コンピュータが、前記複数のタスクを、実行されるCPUコアごとに分類することと、
コンピュータが、前記分類された複数のタスクのCPUコア内における実行順番を特定することと、
コンピュータが、前記特定されたCPUコア内における前記複数のタスクの実行順番に適合し、かつ異なるCPUコアでそれぞれ実行される前記共有資源にアクセスする2以上のタスクの実行順番が互いに入れ替えられたタスク実行順列を複数生成することにより、前記テスト項目を生成することとを備えるテスト項目生成方法。 A test item generation method for generating a test item in an arithmetic device including a plurality of CPU cores for executing a plurality of tasks and a shared resource accessed by the plurality of CPU cores,
Identifying a task for accessing the shared resource among the plurality of tasks;
A computer classifying the plurality of tasks for each CPU core to be executed;
A computer specifying an execution order in the CPU core of the plurality of classified tasks;
Tasks in which the computer is adapted to the execution order of the plurality of tasks in the specified CPU core and the execution order of two or more tasks accessing the shared resources respectively executed by different CPU cores is interchanged A test item generation method comprising: generating the test item by generating a plurality of execution permutations.
前記テスト項目の生成では、異なるCPUコアでそれぞれ実行され、かつ前記共有資源にアクセスするタスクの実行順番の全ての組み合わせについて、前記タスク実行順列を生成する、テスト項目生成方法。 The test item generation method according to claim 1,
In the test item generation, the test item generation method generates the task execution permutation for all combinations of execution orders of tasks that are respectively executed by different CPU cores and access the shared resource.
前記テスト項目の生成は、
同一のCPUコアにおいて実行されるタスクを前記実行順番に並べた実行系列を、前記複数のタスクの全てに基づき複数生成することと
前記複数の実行系列の順列を生成することと、
前記順列のそれぞれについて、前記実行系列を構成する先頭または末尾のタスクを前記実行系列から分離させることにより前記実行系列を展開し、前記展開された実行系列および前記分離されたタスクの前記実行順番を保ったまま他の実行系列および他のタスクとの順番をすべて入れ替えて生成される、1または複数の展開列を生成することと、
前記展開列のそれぞれについて、前記実行系列が展開できなくなるまで前記展開列の生成を繰り返すことと、
前記繰り返しにより生成された複数の、前記実行系列の展開ができない前記展開列のそれぞれを前記タスク実行順列とすることと、を備えるテスト項目生成方法。 The test item generation method according to claim 1,
The test item is generated by
Generating a plurality of execution sequences in which the tasks executed in the same CPU core are arranged in the execution order based on all of the plurality of tasks; generating a permutation of the plurality of execution sequences;
For each of the permutations, the execution sequence is expanded by separating the first or last task constituting the execution sequence from the execution sequence, and the execution order of the expanded execution sequence and the separated task is Generating one or a plurality of expansion sequences that are generated by rearranging all the orders with other execution sequences and other tasks while keeping them;
For each of the expansion columns, repeating the generation of the expansion column until the execution sequence cannot be expanded;
A test item generation method comprising: each of the plurality of expansion sequences generated by the repetition and incapable of expanding the execution series is set as the task execution sequence.
前記テスト項目を構成する複数のタスク実行順列のそれぞれを順次実行する動作検証モード部と、
前記動作検証モード部を動作させるモード切替部とをさらに備える演算装置。
The arithmetic unit according to claim 4,
An operation verification mode section for sequentially executing each of a plurality of task execution permutations constituting the test item;
An arithmetic device further comprising a mode switching unit that operates the operation verification mode unit.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016161716A JP6637394B2 (en) | 2016-08-22 | 2016-08-22 | Test item generation method, arithmetic unit |
PCT/JP2017/026374 WO2018037787A1 (en) | 2016-08-22 | 2017-07-20 | Test item generation method and computation device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016161716A JP6637394B2 (en) | 2016-08-22 | 2016-08-22 | Test item generation method, arithmetic unit |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018032062A true JP2018032062A (en) | 2018-03-01 |
JP6637394B2 JP6637394B2 (en) | 2020-01-29 |
Family
ID=61246661
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016161716A Active JP6637394B2 (en) | 2016-08-22 | 2016-08-22 | Test item generation method, arithmetic unit |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP6637394B2 (en) |
WO (1) | WO2018037787A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE112020004765T5 (en) | 2019-11-29 | 2022-07-28 | Hitachi Astemo, Ltd. | ELECTRONIC CONTROL DEVICE |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7493405B2 (en) * | 2020-07-21 | 2024-05-31 | 日立Astemo株式会社 | Test method and computing device |
WO2023238311A1 (en) * | 2022-06-09 | 2023-12-14 | 日立Astemo株式会社 | Verification system and verification method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11242614A (en) * | 1998-02-25 | 1999-09-07 | Mitsubishi Electric Corp | Device and method for real-time verification for parallel programs |
JP2011515000A (en) * | 2008-03-11 | 2011-05-12 | ユニバーシティ・オブ・ワシントン | Efficient deterministic multiprocessing (DETERMINISTICMULTIPROCESSING) |
-
2016
- 2016-08-22 JP JP2016161716A patent/JP6637394B2/en active Active
-
2017
- 2017-07-20 WO PCT/JP2017/026374 patent/WO2018037787A1/en active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11242614A (en) * | 1998-02-25 | 1999-09-07 | Mitsubishi Electric Corp | Device and method for real-time verification for parallel programs |
JP2011515000A (en) * | 2008-03-11 | 2011-05-12 | ユニバーシティ・オブ・ワシントン | Efficient deterministic multiprocessing (DETERMINISTICMULTIPROCESSING) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE112020004765T5 (en) | 2019-11-29 | 2022-07-28 | Hitachi Astemo, Ltd. | ELECTRONIC CONTROL DEVICE |
Also Published As
Publication number | Publication date |
---|---|
WO2018037787A1 (en) | 2018-03-01 |
JP6637394B2 (en) | 2020-01-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4414373B2 (en) | Program verification program, program verification apparatus, and program verification method | |
WO2018037787A1 (en) | Test item generation method and computation device | |
US10592703B1 (en) | Method and system for processing verification tests for testing a design under test | |
US9652360B2 (en) | Crawling for extracting a model of a GUI-based application | |
CN111178512A (en) | Device operation neural network test method and device | |
US10387124B2 (en) | System and method for creating domain specific language | |
JP2015219906A (en) | Software verification method and processor | |
KR102338365B1 (en) | Layout decomposition method and layout decomposition system | |
JP2006139427A (en) | Same subgraph detection device of data flow graph, high order synthesizer, method of detecting same subgraph of data flow graph, same subgraph detection control program of data flow graph and readable recording medium | |
CN112597718B (en) | Verification method, verification device and storage medium for integrated circuit design | |
US8321825B2 (en) | Method and system for synthesizing relative timing constraints on an integrated circuit design to facilitate timing verification | |
CN104866297A (en) | Method and device for optimizing kernel function | |
CN109522723A (en) | POC scenario generation method, device, electronic equipment and storage medium | |
US11048844B1 (en) | System and method for use in design verification | |
Lin et al. | Automatic compositional verification of timed systems | |
JP2009205523A (en) | Automatic property generator | |
CN105027089B (en) | Core functions detector | |
JP6903249B2 (en) | Test case generator, test case generator, and test case generator | |
JP2009223661A (en) | Verification support program, recording medium with the program recorded therein, verification support apparatus, and verification support method | |
JP2007249826A (en) | Test item generation device | |
CN117931156A (en) | Method, apparatus and storage medium for executing script command | |
Jiang et al. | Incremental development of fault prediction models | |
JP5328447B2 (en) | High-level synthesis apparatus and high-level synthesis method, semiconductor integrated circuit manufacturing method, control program, and readable storage medium | |
CN116992798B (en) | Quantum chip design scheduling method, system, electronic equipment and storage medium | |
Fekete et al. | Creating a GPGPU-accelerated framework for pattern matching using a case study |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20170126 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20170927 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20181002 |
|
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: 20191210 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20191220 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6637394 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |