Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5391962B2 - Software error detection tool - Google Patents
[go: Go Back, main page]

JP5391962B2 - Software error detection tool - Google Patents

Software error detection tool Download PDF

Info

Publication number
JP5391962B2
JP5391962B2 JP2009218554A JP2009218554A JP5391962B2 JP 5391962 B2 JP5391962 B2 JP 5391962B2 JP 2009218554 A JP2009218554 A JP 2009218554A JP 2009218554 A JP2009218554 A JP 2009218554A JP 5391962 B2 JP5391962 B2 JP 5391962B2
Authority
JP
Japan
Prior art keywords
data
software
gpio
pin
output
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.)
Expired - Fee Related
Application number
JP2009218554A
Other languages
Japanese (ja)
Other versions
JP2011070254A (en
Inventor
嘉晃 佐藤
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.)
Fujitsu Mobile Communications Ltd
Original Assignee
Fujitsu Mobile Communications Ltd
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 Fujitsu Mobile Communications Ltd filed Critical Fujitsu Mobile Communications Ltd
Priority to JP2009218554A priority Critical patent/JP5391962B2/en
Publication of JP2011070254A publication Critical patent/JP2011070254A/en
Application granted granted Critical
Publication of JP5391962B2 publication Critical patent/JP5391962B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Description

本発明は、電子機器等に内蔵されるソフトウェアの開発設計段階において、ソフトウェ
アのソースコードの作成ミスを検出するツールに関する。
The present invention relates to a tool for detecting software source code creation mistakes in the development and design stage of software built in an electronic device or the like.

電子機器等に内蔵されるGPIO(汎用入出力ポート)は、汎用入出力ピンの状態設定
がプログラマブルであり、入力ピン状態/出力ピン状態の設定、および汎用入出力ピンの
内部Pull Up/Pull Down/No Pullの状態設定が、電子機器に内蔵
されるソフトウェアにより設定可能となっている。どう設定するか予め決められた設計仕
様に対して、ソフトウェア設計者が、誤って、異なる状態にソフトウェアを作成しても、
電子機器の実機テストでは、ソフトウェアの作成ミスの発見が困難な場合が多々ある。
A GPIO (general-purpose input / output port) built in an electronic device or the like has programmable general-purpose input / output pin state settings, input pin state / output pin state settings, and internal pull-up / pull-down of general-purpose input / output pins. / No Pull status setting can be set by software built in the electronic device. Even if a software designer mistakenly creates software in a different state with respect to the design specifications determined in advance,
In actual device tests of electronic devices, it is often difficult to find software creation errors.

作成ミスを低減する手法として、電子機器に内蔵されるソフトウェア自体に、設計仕様
を記載したテーブルを設け、GPIOへの設定は、そのテーブルを呼び出して設定する方
法がある。しかし、ソフトウェア設計者が、そのテーブルを呼び出して設定する方法を確
実に実行すればよいが、忘れて、直接にGPIOへ設定してしまい、それが設計仕様とは
異なって設定してしまうこともあり、防ぎきれるものではない。特に、他のソフトウェア
設計者が設計したり、引継ぎ漏れ等により、確実に保証できるものではない。
As a technique for reducing creation mistakes, there is a method in which a table describing design specifications is provided in software built in an electronic device, and setting to GPIO is performed by calling the table. However, the software designer only needs to execute the method of calling and setting the table without fail, but forgetting to set it directly in GPIO, it may be set differently from the design specification. Yes, it cannot be prevented. In particular, it cannot be surely guaranteed by other software designers designing or taking over leakage.

特許文献として、ソフトウェア開発の初期段階においてレジスタ設定値間違いを発見す
るレジスタ設定値監視モジュール、システム、方法がある(例えば、特許文献1参照。)
。このシステム(実機)は、従来のCPU2と機能モジュール6−8(DMAコントロー
ラやタイマーなど)に加えて、レジスタ設定値監視モジュール4と、機能モジュール6−
8に設定する期待値が予め格納された期待値レジスタ228、229などを実機内に備え
る。
As patent literature, there is a register setting value monitoring module, system, and method for detecting a register setting value error in the initial stage of software development (see, for example, Patent Literature 1).
. This system (actual machine) includes a register setting value monitoring module 4 and a function module 6-6 in addition to the conventional CPU 2 and function module 6-8 (DMA controller, timer, etc.).
8 includes expected value registers 228 and 229 in which expected values to be set to 8 are stored in advance.

そして、実機内で、レジスタ設定値監視モジュール4は、CPU2が機能モジュール6
−8にソフトウェアでアクセスする設定値と、期待値レジスタ228、229とを比較し
て、ソフトウェアのミスを発見している。
Then, in the actual machine, the register set value monitoring module 4 has the function module 6 of the CPU 2.
The setting value accessed by software in -8 and the expected value registers 228 and 229 are compared, and a software error is found.

特開2006−293641号公報(頁5−12、図35)JP 2006-293641 A (Page 5-12, FIG. 35)

特許文献1のシステムは、実機内に、レジスタ設定値監視モジュール4や期待値レジス
タ228、229などを新たに設ける必要があり、実機の規模がテストのために大きくな
ってしまうという問題がある。また、テスト時の比較処理を行っている期間はレジスタア
クセスを遅延させる必要があり、CPU2のペリフェラルへのIOアクセス自体が低速化
してしまうので、ソフトウェア開発後期や製品化時には、レジスタ設定値監視モジュール
4をパスして通常のアクセスを保証する必要がある。
The system of Patent Document 1 needs to newly provide a register set value monitoring module 4 and expected value registers 228 and 229 in an actual machine, and there is a problem that the scale of the actual machine becomes large for testing. In addition, register access must be delayed during the comparison process at the time of the test, and the IO access to the peripheral of the CPU 2 itself is slowed down. 4 must be passed to guarantee normal access.

本発明は、電子機器内のソフトウェアのソースコードのミスを発見するために、電子機
器の内部構成を変えることなく、このソースコードが読み込まれて外部でミスを発見する
ソフトウェアミス検出ツールを提供することを目的とする。
The present invention provides a software error detection tool that detects a source code error in an electronic device and detects the error externally by reading the source code without changing the internal configuration of the electronic device. For the purpose.

上記目的を達成するために、本発明のソフトウェアミス検出ツールは、外部の電子機器の回路を制御する該電子機器のソフトウェアデータが読み込まれて該ソフトウェアデータのミスを検出するソフトウェアミス検出ツールであって、前記ソフトウェアデータが読み込まれて格納されるソフトウェアデータ格納部と、前記電子機器の回路のハードウェアデータが読み込まれて格納されるハードウェアデータ格納部と、前記ハードウェアデータに対応したソフトウェア仕様データを格納する仕様テーブルと、前記ハードウェアデータの言語に基づいて規定された検索条件データを格納する検索条件データ格納部と、前記検索条件データに対応する前記仕様テーブルのソフトウェア仕様データを抽出し、この抽出されたソフトウェア仕様データと前記ソフトウェアデータとを比較して、前記ソフトウェアデータのミスを検出するコード作成ミス検出手段とを具備することを特徴とする。

In order to achieve the above object, a software error detection tool of the present invention is a software error detection tool that reads software data of an electronic device that controls a circuit of an external electronic device and detects an error in the software data. A software data storage unit in which the software data is read and stored; a hardware data storage unit in which hardware data of the circuit of the electronic device is read and stored; and software specifications corresponding to the hardware data A specification table for storing data; a search condition data storage unit for storing search condition data defined based on a language of the hardware data; and software specification data in the specification table corresponding to the search condition data are extracted. , With this extracted software specification data It compares the serial software data, characterized by comprising a code generator error detecting means for detecting errors in the software data.

本発明によれば、電子機器の内部構成を変えることなく、外部のソフトウェアミス検出
ツールにより、電子機器内のソフトウェアのミスを発見することができる。
According to the present invention, a software error in an electronic device can be found by an external software error detection tool without changing the internal configuration of the electronic device.

本発明の各実施例に係る電子機器100の回路図(GPIO21関連)。The circuit diagram (related to GPIO21) of the electronic device 100 which concerns on each Example of this invention. 標準規格のI2Cバスのデータ信号とクロック信号のタイムチャート。A time chart of a data signal and a clock signal of a standard I2C bus. 本発明の各実施例に係る電子機器100のハードウェアデータ(GPIO21関連)。Hardware data (related to GPIO21) of the electronic device 100 according to each embodiment of the present invention. 本発明の各実施例に係る電子機器100のHW/SW仕様テーブル6(正誤表)を説明する図(GPIO21関連)。The figure (GPIO21 relation) explaining the HW / SW specification table 6 (correct / incorrect table) of the electronic device 100 which concerns on each Example of this invention. 本発明の各実施例に係る電子機器100のソフトウェアデータの一例を説明する図(GPIO21関連)。The figure explaining an example of the software data of the electronic device 100 which concerns on each Example of this invention (GPIO21 connection). 本発明の各実施例に係るソフトウェアミス検出ツール200のブロック図。The block diagram of the software mistake detection tool 200 which concerns on each Example of this invention. 本発明の実施例1に係るソフトウェアミス検出ツール200の判定処理モジュール8の動作フローチャート。The operation | movement flowchart of the determination process module 8 of the software error detection tool 200 which concerns on Example 1 of this invention. 本発明の実施例2に係るソフトウェアミス検出ツール200の判定処理モジュール8の動作フローチャート。The operation | movement flowchart of the determination process module 8 of the software error detection tool 200 which concerns on Example 2 of this invention.

図1は、本発明の各実施例に係る電子機器100のGPIO21(汎用IO)の関連部
分の回路図である。この構成そのものは本発明ではなく、電子機器100に内蔵のソフト
ウェア(ROM26に格納されたプログラム)の設計ミスが、電子機器100自体の実機
テストでは発見がむずかしい一例として説明する。このような場合に特に、後述の本発明
のソフトウェアミス検出ツール200(図6)により、電子機器100に内蔵のソフトウ
ェアの設計ミスの発見が有用である。もちろん、本発明のソフトウェアミス検出ツール2
00は、実機テストで発見がむずかしい場合に限る必要はなく、その他通常のソフトウェ
アに対しても適用できる。
FIG. 1 is a circuit diagram of a relevant portion of a GPIO 21 (general purpose IO) of an electronic device 100 according to each embodiment of the present invention. This configuration is not an example of the present invention, and a design error of software (program stored in the ROM 26) built in the electronic device 100 will be described as an example that is difficult to find in an actual machine test of the electronic device 100 itself. Particularly in such a case, it is useful to find a software design error in the electronic device 100 using the software error detection tool 200 (FIG. 6) of the present invention described later. Of course, the software error detection tool 2 of the present invention
00 need not be limited to cases where it is difficult to find in actual machine tests, and can also be applied to other ordinary software.

以下、電子機器100のGPIO21関連部分の構成と動作について説明する。電子機
器100のGPIO21関連部分は、GPIO21、電子部品22、電子部品23、抵抗
24(外部Pull Up)、制御部25、ROM26などから構成される。
Hereinafter, the configuration and operation of the GPIO 21 related part of the electronic device 100 will be described. The GPIO 21 related portion of the electronic device 100 includes a GPIO 21, an electronic component 22, an electronic component 23, a resistor 24 (external Pull Up), a control unit 25, a ROM 26, and the like.

図1の(括弧)書きの部分は、この回路図部分が搭載される印刷回路基板の回路図上の
表記であり、印刷回路基板のハードウェア設計時のハードウェアデータ(NETリストお
よびICピン表)として、全ての構成要素、ピン、信号線に表記されるが、図1では、制
御部25、ROM26、CPUバス等についてはHWデータ表記は省略する。
1 is a notation on the circuit diagram of the printed circuit board on which the circuit diagram portion is mounted, and hardware data (NET list and IC pin table at the time of hardware design of the printed circuit board). ), All the components, pins, and signal lines are represented, but in FIG. 1, the HW data notation is omitted for the control unit 25, the ROM 26, the CPU bus, and the like.

制御部25は、不図示のCPU、RAMなどを有し、ROM26に格納されたプログラ
ムを実行する。この例では、制御部25は、ROM26に格納されたプログラムに基づい
て、GPIO21の内部設定や入出力制御やI2C制御機能を実行する。ROM26には
、ソフトウェア設計者が設計したプログラムのソースコードがコンパイルおよびアセンブ
ルされた機械語が格納されている。
The control unit 25 includes a CPU, a RAM, and the like (not shown), and executes a program stored in the ROM 26. In this example, the control unit 25 executes internal settings, input / output control, and I2C control functions of the GPIO 21 based on a program stored in the ROM 26. The ROM 26 stores a machine language in which a source code of a program designed by a software designer is compiled and assembled.

GPIO21は、汎用IOであり、複数の入出力ピン、ここでは、ピン番号(1)とピ
ン番号(2)の2個の入出力ピンのそれぞれの実施例を示す。ピン番号(1)はピン名称
(GPIO_1)、ピン番号(2)はピン名称(GPIO_2)である。各入出力ピン毎
にモード設定が可能であり、入力ピンとして動作させるか出力ピンとして動作させるかの
入力ピン/出力ピン設定がプログラマブルである。また、内部PullUp/内部Pul
lDown/内部NoPullの設定がプログラマブルである。汎用IOゆえにプログラ
マブルであるが、逆に設定ミスの要因ともなる。
GPIO 21 is a general-purpose IO, and shows examples of a plurality of input / output pins, here, two input / output pins of pin number (1) and pin number (2). The pin number (1) is a pin name (GPIO_1), and the pin number (2) is a pin name (GPIO_2). Mode setting is possible for each input / output pin, and input pin / output pin setting for operating as an input pin or as an output pin is programmable. Also, Internal PullUp / Internal Pull
The setting of lDown / internal NoPull is programmable. Although it is programmable because of the general-purpose IO, it also causes a setting error.

このプログラマブルであるGPIO21の入出力ピンの内部構成は、周知であり、ドラ
イバ31(35)、レシーバ32(36)、内部PullUp抵抗33(37)、内部P
ullDown抵抗34(38)、スイッチ等から構成され、これにより、前記の入力ピ
ン/出力ピン設定、内部PullUp/内部PullDown/内部NoPullの設定
ができる。
The internal configuration of the programmable input / output pins of the GPIO 21 is well known, and includes a driver 31 (35), a receiver 32 (36), an internal PullUp resistor 33 (37), an internal P
This is composed of an all-down resistor 34 (38), a switch, and the like, whereby the above-described input pin / output pin setting, internal PullUp / internal PullDown / internal NoPull can be set.

このGPIO21に対する設定を行うROM26のプログラムのソースコードの設計ミ
スが、電子機器100の実機テストでは発見がむずかしい例として、以下の2とおりにつ
いて説明する。
The following two examples will be described as examples in which the design error of the source code of the ROM 26 program for setting the GPIO 21 is difficult to find in the actual device test of the electronic device 100.

「1.通常の出力ポート」
GPIO21のピン番号(1)を通常の出力ピンとして設定した例である。GPIO2
1のピン番号(1)は、信号線名(A_OUT)で電子部品22のピン番号(1)と繋が
る。電子部品22は、GPIO21のピン番号(1)の出力で制御される被制御対象であ
り、例えば、ランプ点灯、ブザー鳴動、その他の信号伝達など何でもよい。
“1. Normal output port”
In this example, the pin number (1) of the GPIO 21 is set as a normal output pin. GPIO2
The pin number (1) of 1 is connected to the pin number (1) of the electronic component 22 by the signal line name (A_OUT). The electronic component 22 is a controlled object controlled by the output of the pin number (1) of the GPIO 21, and may be anything such as lamp lighting, buzzer ringing, or other signal transmission.

GPIO21のピン番号(1)が出力ピンに設定された場合は、ドライバ31はアクテ
ィブ状態であり、内部PullUp抵抗33や内部PullDown抵抗34でHigh
/Lowレベルを制御する必要はない。したがって、内部NoPull設定にすればよい
When the pin number (1) of GPIO 21 is set as an output pin, the driver 31 is in an active state, and the internal pull-up resistor 33 and the internal pull-down resistor 34 are high.
There is no need to control the / Low level. Therefore, the internal NoPull setting may be set.

ところが、ソフトウェア設計者が間違って、内部PullUp状態や内部PullDo
wn状態に設定してしまった場合でも、ドライバ31の出力でピン番号(1)の論理出力
レベルが決まるので、論理動作上の支障はまったく発生しない。しかし、内部PullU
p抵抗33や内部PullDown抵抗34に電流が流れるので、消費電流が増えてしま
うという問題がある。この間違った状態は、電子機器100の実機テストでは発見は極め
て困難である。
However, if the software designer makes a mistake, the internal PullUp state or the internal PullDo
Even when the wn state is set, the logical output level of the pin number (1) is determined by the output of the driver 31, so that no trouble in logical operation occurs. However, the internal PullU
Since current flows through the p resistor 33 and the internal PullDown resistor 34, there is a problem in that current consumption increases. This wrong state is extremely difficult to find in an actual device test of the electronic device 100.

「2.I2Cバスのバスマスター」
GPIO21のピン番号(2)をI2Cバスのバスマスターとして使用する例であり、
特殊な使い方をする。I2Cバスは、周知のように、データ信号とクロック信号の2本の
信号線で構成され、GPIO21と電子部品23とがこのデータ信号とクロック信号の2
本の信号線で繋がるが、図1では、クロック信号関連のみ図示し、同様の構成のデータ信
号関連は図示を省略する。GPIO21のピン番号(2)側がバスマスター(以下、マス
ター)、電子部品23のピン番号(1)側がバススレーブ(以下、スレーブ)である。
"2. Bus master of I2C bus"
In this example, the pin number (2) of GPIO 21 is used as the bus master of the I2C bus.
Use a special way. As is well known, the I2C bus is composed of two signal lines of a data signal and a clock signal, and the GPIO 21 and the electronic component 23 are connected to the data signal and the clock signal.
Although they are connected by a signal line, only the clock signal is shown in FIG. 1, and the data signal having the same configuration is not shown. The pin number (2) side of the GPIO 21 is a bus master (hereinafter referred to as master), and the pin number (1) side of the electronic component 23 is a bus slave (hereinafter referred to as slave).

このI2Cバスは標準規格で決められており、次に説明する。
図2は、標準規格のI2Cバスのデータ信号とクロック信号のタイムチャートである。
データ信号とクロック信号は同期が取れており、スレーブは、クロック信号の立上がりで
、データ信号を取り込む。
This I2C bus is determined by the standard, and will be described next.
FIG. 2 is a time chart of standard I2C bus data signals and clock signals.
The data signal and the clock signal are synchronized, and the slave captures the data signal at the rising edge of the clock signal.

データ信号は、マスターとスレーブ間で双方向であり、データ信号の構成は、スタート
ビットS、スレーブアドレスA7−A1、R/W、ACK、データD7−D0のシリアル
構成である。この内、S、A7−A1、R/Wの各ビットは、バスマスターが出力する。
A7−A1で指定されたスレーブは、R/Wを確認後に、1ビット時間、LレベルのAC
Kを返信出力する。D7−D0は、R/WがReadならばスレーブが出力し、R/Wが
Wrightならばマスターが出力する。
The data signal is bidirectional between the master and the slave, and the data signal has a serial configuration of a start bit S, slave addresses A7-A1, R / W, ACK, and data D7-D0. Of these, the S, A7-A1, and R / W bits are output by the bus master.
After confirming the R / W, the slave specified by A7-A1 is the AC level of L level for 1 bit time.
K is returned and output. D7-D0 is output by the slave if R / W is Read, and is output by the master if R / W is Wright.

クロック信号は、常時マスターが出力する。しかし、ACK期間中において、以下に説
明するクロックストレッチが発生する状況では、マスターは点線で示すようにクロック信
号の出力を継続するが、スレーブもACKのタイミングで実線で示すクロック信号を同じ
クロック信号ラインに出力し、両信号がぶつかるが、クロック信号ラインは、実線で示す
クロック信号となるように構成される必要がある。
The clock signal is always output by the master. However, in the situation where the clock stretch described below occurs during the ACK period, the master continues to output the clock signal as shown by the dotted line, but the slave also uses the same clock signal as the clock signal shown by the solid line at the ACK timing. Although both signals collide with each other, the clock signal line needs to be configured to be a clock signal indicated by a solid line.

次に、このクロックストレッチについて説明する。前述のスレーブがデータ信号でAC
Kを返信出力するタイミングは厳しく規定されており、マスターがクロック信号を点線の
Hレベルにする前、すなわち、クロック信号がLレベルの内に、スレーブは、Lレベルの
ACKを返信出力する必要がある。
Next, this clock stretching will be described. The aforementioned slave is a data signal AC
The timing at which K is returned and output is strictly defined. Before the master sets the clock signal to the dotted H level, that is, the clock signal is at the L level, the slave needs to return and output the L level ACK. is there.

ところが、スレーブは、何らかの処理中で、このACKの返信出力が遅れることがある
。これに対応するために、スレーブは、クロックストレッチと呼ばれる処理を行う。すな
わち、スレーブは、ACKビットのためのマスター出力のクロック信号がLレベルのタイ
ミングで、スレーブがクロック信号をLレベルにして出力する。マスター出力のLレベル
とスレーブ出力のLレベルが共に低インピーダンス出力でバスファイトしても、同じLレ
ベルなので、クロック信号のラインは、Lレベルとなる。
However, the slave may be delayed in outputting this ACK during some processing. In order to cope with this, the slave performs a process called clock stretching. That is, the slave outputs the clock signal at the L level when the master output clock signal for the ACK bit is at the L level. Even if the L level of the master output and the L level of the slave output are both low impedance outputs and bus fight, the clock signal line is at the L level because the L level is the same.

マスター出力のクロック信号が点線のようにHレベルになったときも、スレーブはクロ
ック信号をLレベルにする(クロックストレッチ)。HレベルとLレベルがバスファイト
するが、この状態でクロック信号ラインが強制的にスレーブ出力のLレベルになるように
、ハードウェアを構成する必要があり、あと(図1)で説明する。
Even when the clock signal of the master output becomes H level as indicated by a dotted line, the slave sets the clock signal to L level (clock stretching). Although the H level and the L level are bus-fighted, it is necessary to configure the hardware so that the clock signal line is forced to the L level of the slave output in this state, which will be described later (FIG. 1).

マスターは、クロック信号を出力しながらクロック信号をモニターしており、点線のよ
うにHレベル出力してもLレベルをモニターしたときは、クロック信号がHレベルになる
のを待つ。マスターは、モニターしたクロック信号がHレベルになったら、データ信号を
チェックしてLレベル(ACK)であれば、指定のスレーブが存在することを知る。そし
て、マスターは、クロック信号をLレベルにして、ACK確認のフェーズを終了し、以降
のD7−D0のフェーズに入る。
The master monitors the clock signal while outputting the clock signal. If the L level is monitored even if the H level is output as indicated by the dotted line, the master waits for the clock signal to become the H level. When the monitored clock signal becomes H level, the master checks the data signal and if it is L level (ACK), the master knows that the designated slave exists. Then, the master sets the clock signal to L level, ends the ACK confirmation phase, and enters the subsequent phase D7-D0.

なお、図示しないが、D7−D0のフェーズにおいても、ACKと同様の方法でクロッ
クストレッチを行うことができる。
Although not shown, clock stretching can be performed in the same manner as ACK in the phase D7-D0.

再び、図1に戻り、前記クロックストレッチでバスファイト時のクロック信号が前記所
定のレベルとなるための構成について説明する。マスター側のGPIO21のピン番号(
2)がI2Cバスのクロック信号ラインである信号線名(I2C_SCL)でスレーブ側
の電子部品23のピン番号(1)と繋がる。クロック信号ラインは、抵抗24(部品番号
(R1))により、外部PullUpされる。
Returning to FIG. 1 again, a configuration for the clock signal at the time of bus fight to be the predetermined level by the clock stretch will be described. GPIO21 pin number on the master side (
2) is connected to the pin number (1) of the electronic component 23 on the slave side by the signal line name (I2C_SCL) which is the clock signal line of the I2C bus. The clock signal line is pulled up externally by a resistor 24 (part number (R1)).

マスター側のGPIO21のピン番号(2)に対する制御部25とROM26によるプ
ログラマブル設定は以下のように行う必要がある。
・Lレベル出力を行う時は、GPIOの一般的な使用方法であり、出力ピン設定および
内部NoPull設定し、その後、Lレベル出力を行う。すなわち、ドライバ35による
低インピーダンスのLレベル出力である。したがって、外部PullUpの抵抗24があ
っても、クロック信号ラインはLレベルとなる。この状態で、スレーブ側の電子部品23
のピン番号(1)が低インピーダンスのLレベル出力を行っても、同じLレベルなのでバ
スファイトは発生せず、クロック信号ラインはLレベルである。
Programmable setting by the control unit 25 and the ROM 26 for the pin number (2) of the GPIO 21 on the master side needs to be performed as follows.
When performing L level output, it is a general usage method of GPIO, and output pin setting and internal NoPull setting are performed, and then L level output is performed. That is, a low impedance L level output by the driver 35. Therefore, even if the external PullUp resistor 24 is present, the clock signal line is at the L level. In this state, the electronic component 23 on the slave side
Even if the pin number (1) of the low level outputs L level with low impedance, the bus level does not occur because the level is the same L level, and the clock signal line is at the L level.

・Hレベル出力を行う時は、GPIOとして特殊な使い方をする。すなわち、出力を行
うにも関わらず、入力ピン設定および内部NoPull設定とする。ドライバ35はHi
−Z(高インピーダンス)であり、したがって、クロック信号ラインは外部PullUp
の抵抗24によりHレベルとなる。この状態で、スレーブ側の電子部品23のピン番号(
1)が低インピーダンスのLレベル出力を行うと、抵抗24よりも低インピーダンスのこ
のLレベル出力によりクロック信号ラインはLレベルになる。マスターは、Hレベル出力
しているとは言え、入力ピン設定および内部NoPull設定なので、クロック信号ライ
ンの状態をレシーバ36でモニターすることができ、スレーブのLレベル出力を知ること
ができる。
• When performing H level output, use GPIO specially. That is, although the output is performed, the input pin setting and the internal NoPull setting are set. Driver 35 is Hi
-Z (high impedance), so the clock signal line is external PullUp
The resistor 24 becomes H level. In this state, the pin number of the electronic component 23 on the slave side (
When 1) performs L level output with low impedance, the clock signal line becomes L level due to this L level output having impedance lower than that of the resistor 24. Although the master is outputting the H level, since it is the input pin setting and the internal NoPull setting, the state of the clock signal line can be monitored by the receiver 36 and the slave L level output can be known.

以上の構成により、GPIO21のピン番号(2)をI2Cバスのクロック信号のマス
ターとして使用することができるものである。
With the above configuration, the pin number (2) of the GPIO 21 can be used as the master of the clock signal of the I2C bus.

ところで、I2Cバス用に、Hレベル出力を行う時は、出力を行うにも関わらず、入力
ピン設定および内部NoPull設定とすることは、GPIO21の一般的な使い方とし
てはまれであり、I2Cバス以外の通常では、Hレベル出力を行う時は出力ピン設定でH
レベル出力とするのが普通である。
By the way, when performing H-level output for the I2C bus, setting the input pin and setting the internal NoPull is rare as a general usage of the GPIO 21 in spite of the output, except for the I2C bus. Normally, when H level output is performed, the output pin is set to H
It is normal to use level output.

それだけに、ソフトウェア設計者は、GPIO21のHレベル出力を行うときに、出力
ピン設定でHレベル出力として設計してしまうおそれが多分にある。もし、間違ってこの
ように設計してしまった場合、クロックストレッチ時、マスターの出力ピン設定での低イ
ンピーダンスのHレベル出力と、スレーブの低インピーダンスのLレベル出力とがバスフ
ァイトしてしまい、クロック信号ラインのH/Lレベルは不定となり、誤動作を引き起こ
す。
For that reason, when the software designer performs the H level output of the GPIO 21, there is a possibility that the software designer will design as an H level output by setting the output pin. If this design is mistakenly performed, the clock impedance will cause the low impedance H level output at the master output pin setting and the slave low impedance L level output to bus fight, resulting in a clock fight. The H / L level of the signal line becomes indefinite and causes a malfunction.

しかし、電子機器100の実機動作テストでは、I2Cバスの定常動作は簡単に発生で
きてテストできるが、イレギュラーな非定常動作のスレーブのACK応答が遅れてクロッ
クストレッチを行うという事象は発生させることが難しく、その分のテストが行われずに
、ソフトウェアの設計ミスを見逃してしまうことがある。
However, in the actual device operation test of the electronic device 100, the steady operation of the I2C bus can be easily generated and tested, but an event that the clock ACK response is delayed due to the ACK response of the irregular non-steady operation slave is generated. It is difficult to do so, and there are cases where software testing mistakes are missed without being tested.

GPIO21を、通常の出力ポートとして使用する例も、I2Cバスのバスマスターと
して使用する例も、ソフトウェアの設計ミスが、電子機器100の実機動作テストでは発
見が難しい事例であり、そのような場合、特に、電子機器100の外部である本発明のソ
フトウェアミス検出ツール200が有効となる。
In both the case where the GPIO 21 is used as a normal output port and the case where the GPIO 21 is used as a bus master of the I2C bus, it is difficult to find a software design error in the actual device operation test of the electronic device 100. In particular, the software error detection tool 200 of the present invention that is external to the electronic device 100 is effective.

次に、ソフトウェアミス検出ツール200で使用する電子機器100の回路のハードウ
ェアデータとソフトウェアデータについて説明する。
Next, hardware data and software data of a circuit of the electronic device 100 used in the software error detection tool 200 will be described.

図3は、本発明の各実施例に係る電子機器100の回路のハードウェアデータを説明す
る図である。ハードウェア開発ツール(不図示)で回路設計時に得られるデータである。
図1の回路の(括弧)書きの部分のみについて説明する。図3(A)は、ハードウェアデ
ータの内、回路の接続を表すNETリストである。図3(B)は、ハードウェアデータの
内、ICのピン表であり、ピン番号とそのピン名称を表すデータである。
FIG. 3 is a diagram illustrating hardware data of a circuit of the electronic device 100 according to each embodiment of the present invention. Data obtained at the time of circuit design by a hardware development tool (not shown).
Only the part (in parentheses) written in the circuit of FIG. 1 will be described. FIG. 3A is a NET list representing circuit connections in hardware data. FIG. 3B is a pin table of the IC among the hardware data, and is data representing a pin number and its pin name.

図3(A)のNETリストは、信号線毎に、この信号線に繋がる全ての部品とその部品
のピン番号を表すリストであり、1つの信号線に関して繋がるピンの数分のリストとして
表される。1つの信号線に繋がるピンが2つあれば2つのリスト、1つの信号線に繋がる
ピンが3つあれば3つのリストとして表される。
・リスト “信号線名”:“部品名称”:“部品番号”:“ピン番号”
部品名称のない部品については、“部品名称”部分を削除する。
The NET list in FIG. 3A is a list showing all parts connected to this signal line and pin numbers of the parts for each signal line, and is expressed as a list corresponding to the number of pins connected to one signal line. The If there are two pins connected to one signal line, it is represented as two lists, and if there are three pins connected to one signal line, it is represented as three lists.
List “Signal line name”: “Part name”: “Part number”: “Pin number”
For parts without a part name, the “part name” part is deleted.

具体的には、GPIO21のピン番号(1)関連(通常の出力ポートの例)として、
・N1 “A_OUT”:“CHIPSET”:“IC001”:“1”
・N2 “A_OUT”:“MODULE_A”:“IC002”:“1”
すなわち、N1は、信号線名(A_OUT)が、部品名称(CHIPSET)、部品番
号(IC001)のピン番号(1)に繋がることを表す。N2は、同じ信号線名(A_O
UT)が、部品名称(MODULE_A)、部品番号(IC002)のピン番号(1)に
繋がることを表す。
Specifically, as the pin number (1) related to GPIO21 (example of normal output port),
N1 “A_OUT”: “CHIPSET”: “IC001”: “1”
N2 “A_OUT”: “MODULE_A”: “IC002”: “1”
That is, N1 represents that the signal line name (A_OUT) is connected to the component name (CHIPSET) and the pin number (1) of the component number (IC001). N2 is the same signal line name (A_O
UT) is connected to the part name (MODULE_A) and the pin number (1) of the part number (IC002).

GPIO21のピン番号(2)関連(I2Cのバスマスターの例)として、
・N3 “I2C_SCL”:“CHIPSET”:“IC001”:“2”
・N4 “I2C_SCL”:“MODULE_B”:“IC003”:“1”
・N5 “I2C_SCL:“R1”:“2”
・N6 “L26V”:“R1”:“1”
となる。
As for pin number (2) of GPIO21 (example of I2C bus master)
N3 “I2C_SCL”: “CHIPSET”: “IC001”: “2”
N4 “I2C_SCL”: “MODULE_B”: “IC003”: “1”
N5 “I2C_SCL:“ R1 ”:“ 2 ”
・ N6 “L26V”: “R1”: “1”
It becomes.

図3(B)のICのピン表は、ICの部品番号とその全てのピン番号とそのピン名称が
以下のように表される。
・部品名称 部品番号(1段目は、部品名と部品番号)
・ピン番号:ピン名称(2段目以降は、全てのピン番号とピン名称)
・ピン番号:ピン名称
・ピン番号:ピン名称
具体的には、
・CHIPSET IC001
・1:GPIO_1
・2:GPIO_2
・MODULE_A IC002
・1:A_1
・MODULE_B IC003
・1:I2C_CLK
となる。
In the IC pin table of FIG. 3B, the IC part number, all its pin numbers, and their pin names are expressed as follows.
・ Part name Part number (The first level is the part name and part number)
・ Pin number: Pin name (From the second stage onwards, all pin numbers and pin names)
・ Pin number: Pin name ・ Pin number: Pin name Specifically,
・ CHIPSET IC001
・ 1: GPIO_1
-2: GPIO_2
・ MODULE_A IC002
・ 1: A_1
・ MODULE_B IC003
・ 1: I2C_CLK
It becomes.

図4は、本発明の各実施例に係る電子機器100のGPIO21の入出力ピン関連のH
W/SW仕様テーブル6(正誤表)を説明する図であり、電子機器100の予め決められ
た設計仕様に相当する。入出力ピンを制御すべき正しいソフトウェアデータ(ソースコー
ド)と誤ったソフトウェアデータ(ソースコード)を示す図である。このテーブルは、後
(図6)で説明するソフトウェアミス検出ツール200に入力される。
FIG. 4 is a diagram illustrating an input / output pin-related H of the GPIO 21 of the electronic device 100 according to each embodiment of the invention.
It is a figure explaining the W / SW specification table 6 (correction table), and corresponds to a predetermined design specification of the electronic device 100. It is a figure which shows the correct software data (source code) which should control an input-output pin, and incorrect software data (source code). This table is input to the software error detection tool 200 described later (FIG. 6).

HW/SW仕様テーブル6は、GPIO21に繋がる信号線毎に、ICピン表のGPI
Oのピン名、ソフトウェアデータ(ソースコード)の正誤を示す。
The HW / SW specification table 6 includes a GPI in the IC pin table for each signal line connected to the GPIO 21.
O pin name, software data (source code) correct / incorrect.

T1は、入出力ピン(1)を通常の出力ピンとして使う場合であり、信号線名(A_O
UT)、ピン名(GPIO_1)である。
T11は、このピン名(GPIO_1)に対するモード設定の正しいソースコードであ
り、ピン名(GPIO_1)を出力ピン(out)として設定(set)し、また、内部
NoPull(nopull)に設定する。これにより、余分な電流を消費しない。
T12、T13は、ピン名(GPIO_1)に対するモード設定の誤ったソースコード
であり、ピン名(GPIO_1)を内部PullUp(pullup)、又は、内部Pu
llDown(pulldown)に設定しており、余分な電流を消費してしまう。
T1 is a case where the input / output pin (1) is used as a normal output pin, and the signal line name (A_O
UT) and pin name (GPIO_1).
T11 is a correct source code of the mode setting for this pin name (GPIO_1), sets the pin name (GPIO_1) as an output pin (out), and sets it to internal NoPull (nopull). Thereby, no extra current is consumed.
T12 and T13 are incorrect source codes for mode setting for the pin name (GPIO_1), and the pin name (GPIO_1) is changed to the internal PullUp (pulple) or the internal Pu.
It is set to llDown (pulldown), and an extra current is consumed.

T2は、入出力ピン(2)をI2Cバスのクロック信号のバスマスターとして使う場合
であり、信号線名(I2C_SCL)、ピン名(GPIO_2)である。
T21は、このピン名(GPIO_2)に対するHレベル出力の正しいソースコードで
あり、ピン名(GPIO_2)を入力ピン(in)として設定(set)し、また、内部
NoPull(nopull)に設定する。Hレベル出力するのに入力ピン設定とするだ
けで、外部のPullUp抵抗24(図1)によりHレベルとなり、かつモニターできる
I2Cでの特殊な使い方である。
T2 is a case where the input / output pin (2) is used as a bus master of the clock signal of the I2C bus, and has a signal line name (I2C_SCL) and a pin name (GPIO_2).
T21 is the correct source code of the H level output for this pin name (GPIO_2), and the pin name (GPIO_2) is set (set) as an input pin (in), and is set to internal NoPull (nopull). This is a special use in I2C that can be monitored by an external PullUp resistor 24 (FIG. 1) and can be monitored only by setting the input pin to output the H level.

T22のペアのソースコードは、ピン名(GPIO_2)に対するHレベル出力の誤っ
たソースコードであり、ピン名(GPIO_2)をまず、出力ピン(out)に設定(s
et)し、次に、Hレベル(H)を出力(out)している。これは、I2C以外では一
般的な使い方であるが、I2Cでは、バスファイトで誤動作の原因となる。
The source code of the pair of T22 is an incorrect source code of the H level output for the pin name (GPIO_2), and the pin name (GPIO_2) is first set to the output pin (out) (s
et), and then the H level (H) is output (out). This is a general usage except for I2C, but in I2C, a bus fight causes a malfunction.

T23のペアのソースコードは、ピン名(GPIO_2)に対するLレベル出力の正し
いソースコードであり、ピン名(GPIO_2)をまず、出力ピン(out)に設定(s
et)し、次に、Lレベル(L)を出力(out)している。これは、I2C以外の一般
的な使い方と同じである。
The source code of the pair of T23 is a correct source code of the L level output for the pin name (GPIO_2), and the pin name (GPIO_2) is first set to the output pin (out) (s
et), and then the L level (L) is output (out). This is the same as general usage other than I2C.

図5は、本発明の各実施例に係る電子機器100のGPIO21を制御するソフトウェ
アデータの一例を説明する図である。ソフトウェア開発ツール(不図示)でソフトウェア設
計時に得られる膨大なソースコードの一部を抜粋したものである。このソースコードがコ
ンパイルおよびアセンブルされて等価な機械語がROM26に格納される。
FIG. 5 is a diagram for explaining an example of software data for controlling the GPIO 21 of the electronic device 100 according to each embodiment of the present invention. This is an excerpt of a part of the enormous source code obtained when designing software with a software development tool (not shown). This source code is compiled and assembled, and an equivalent machine language is stored in the ROM 26.

ソフトウェア設計者は、本来は、図4に示した正しいソースコードがソフトウェア外部
仕様として与えられるので、その正しいソースコードどおりに設計すればソフトウェアミ
スは発生しない。しかし、開発段階で色々な修正を加えたり、他のソフトウェア設計者に
変わったりした場合など、正しいソースコードどおりに設計できるとは限らない。特に、
GPIOの入出力ピンの制御は一般的には簡単なだけに、ついミスをしてしまうことが起
こり得る。
Since the correct source code shown in FIG. 4 is originally given as the software external specification, the software designer does not cause a software error if the design is performed according to the correct source code. However, it is not always possible to design according to the correct source code when various modifications are made at the development stage or when the software designer changes. In particular,
Although control of GPIO input / output pins is generally simple, it is possible to make a mistake.

図5(A)は、GPIO21のピン名(GPIO_1)を通常の出力ピンとして使用す
る場合であり、図4で説明したように、C1のモード設定命令は正しい。C2はH出力命
令、C3はL出力命令である。C4のモード設定命令は間違いである。
FIG. 5A shows a case where the pin name (GPIO_1) of GPIO 21 is used as a normal output pin, and the mode setting command of C1 is correct as described with reference to FIG. C2 is an H output command, and C3 is an L output command. The C4 mode setting command is incorrect.

図5(B)は、GPIO21のピン名(GPIO_2)をI2Cバスのバスマスターと
して使用する場合であり、図4で説明したように、C5は正しい。C6とC7のペアは間
違いである。C8とC9のペアは正しい。
FIG. 5B shows a case where the pin name (GPIO_2) of GPIO 21 is used as the bus master of the I2C bus, and C5 is correct as described in FIG. The pair C6 and C7 is wrong. The pair of C8 and C9 is correct.

以上説明した図3のハードウェアデータ(NETリストとICピン表)と図5のソフト
ウェアデータ(ソースコード)は、電子機器100の設計情報として、ハードウェア設計
ツール(不図示)やソフトウェア設計ツール(不図示)に存在する。
The hardware data (NET list and IC pin table) of FIG. 3 and the software data (source code) of FIG. 5 described above are used as design information of the electronic device 100 as a hardware design tool (not shown) or a software design tool ( (Not shown).

そして、これらのデータは、後(図6)で説明するソフトウェアミス検出ツール200
に入力されて格納される。また、図4のHW/SW仕様テーブル6(正誤表)もソフトウ
ェアミス検出ツール200に入力されて格納される。
These data are stored in the software error detection tool 200 described later (FIG. 6).
Is input and stored. Also, the HW / SW specification table 6 (correct / error table) of FIG. 4 is also input to the software error detection tool 200 and stored.

次に、これらのデータによりソフトウェアのミスを発見するソフトウェアミス検出ツー
ル200について説明する。
図6は、本発明の各実施例に係るソフトウェアミス検出ツール200のブロック図であ
る。ソフトウェアミス検出ツール200は、PC(パーソナルコンピュータ)等であり、
HWデータフォルダ1、SWデータフォルダ2、キーボード3、ミス検出モジュール10
、表示部11などから構成される。
Next, a software error detection tool 200 that detects software errors from these data will be described.
FIG. 6 is a block diagram of the software error detection tool 200 according to each embodiment of the present invention. The software error detection tool 200 is a PC (personal computer) or the like,
HW data folder 1, SW data folder 2, keyboard 3, miss detection module 10
And the display unit 11 and the like.

ミス検出モジュール10は、ソフトウェアミス検出ツール200にインストールされた
モジュールであり、内部に、HWデータ入力モジュール4、SWデータ入力モジュール5
、HW/SW仕様テーブル6、検索条件入力モジュール7、判定処理モジュール8、判定
結果ストアモジュール9などを有する。
The error detection module 10 is a module installed in the software error detection tool 200, and includes an HW data input module 4 and an SW data input module 5 inside.
, HW / SW specification table 6, search condition input module 7, determination processing module 8, determination result store module 9, and the like.

ユーザは、まず、ハードウェア設計ツール(不図示)で設計されたハードウェアデータの
NETリスト(図3(A))とICピン表(図3(B))を、HWデータフォルダ1、例
えば¥C¥HWに保存する。
The user first stores the hardware data NET list (FIG. 3A) and the IC pin table (FIG. 3B) designed by the hardware design tool (not shown) into the HW data folder 1, for example, \ C Save to ¥ HW.

また、ユーザは、ソフトウェア設計ツール(不図示)で設計されたソフトウェアデータの
ソースコード(図5)を、SWデータフォルダ2、例えば¥C¥SWに保存する。このソ
フトウェアデータの保存は、ソフトウェアミス検出を行うために、ソフトウェアデータを
変更する毎に行うことが望ましい。
Further, the user saves the source code (FIG. 5) of the software data designed by the software design tool (not shown) in the SW data folder 2, for example, \ C \ SW. This software data is preferably stored every time the software data is changed in order to detect software errors.

また、ユーザは、キーボード3から、HW/SW仕様(図4)を入力し、HW/SW仕
様テーブル6に書き込まれる。このHW/SW仕様は、ソフトウェアミス検出の基準とな
るものであり、確実に入力されるものとする。そして、電子機器100のシステム変更が
ない限りは固定される。HW/SW仕様は、フォルダに保存してもよい。ソフトウェアミ
ス検出ツール200を汎用性のあるツールにするためには、HW/SW仕様テーブル6を
設け、その内容を電子機器100の内容に応じて、書き換えるようにしてもよい。
Further, the user inputs the HW / SW specification (FIG. 4) from the keyboard 3 and is written in the HW / SW specification table 6. This HW / SW specification is a standard for software error detection, and is input reliably. The electronic device 100 is fixed as long as there is no system change. The HW / SW specification may be saved in a folder. In order to make the software error detection tool 200 a versatile tool, the HW / SW specification table 6 may be provided, and the contents thereof may be rewritten according to the contents of the electronic device 100.

そして、ソフトウェアミス検出を行うユーザは、キーボード3から検索条件を入力し、
検索条件入力モジュール7に書き込まれる。検索条件については、後述(図7〜図8)す
る。
And the user who performs software mistake detection inputs the search condition from the keyboard 3,
It is written in the search condition input module 7. The search conditions will be described later (FIGS. 7 to 8).

これらのハードウェアデータ(図3相当)、ソフトウェアデータ(図5相当)、HW/
SW仕様データ(図4相当)、検索条件データは、ミス検出モジュール10により、HW
データ入力モジュール4、SWデータ入力モジュール5、検索条件入力モジュール7を介
して、または直接に、判定処理モジュール8に読み込まれる。
These hardware data (corresponding to FIG. 3), software data (corresponding to FIG. 5), HW /
SW specification data (corresponding to FIG. 4) and search condition data are sent to the HW by the miss detection module 10.
The data is read into the determination processing module 8 via the data input module 4, the SW data input module 5, the search condition input module 7 or directly.

これらの情報を基に、判定処理モジュール8は、後述(図7〜図8)するように、ソフ
トウェアのミスを判定し、判定結果を判定結果ストアモジュール9に記録し、表示部11
に表示させる。
Based on these pieces of information, the determination processing module 8 determines a software error and records the determination result in the determination result store module 9 as described later (FIGS. 7 to 8).
To display.

図7は、本発明の実施例1に係るソフトウェアミス検出ツール200の判定処理モジュ
ール8の動作フローチャートである。実施例1は、ユーザが検索条件として、ソフトウェ
アのソースコードに基づく検索条件データを入力する場合である。
FIG. 7 is an operation flowchart of the determination processing module 8 of the software error detection tool 200 according to the first embodiment of the present invention. In the first embodiment, the user inputs search condition data based on the software source code as a search condition.

ユーザは、GPIOの出力ピン設定時の内部PullUp/内部PullDown/内
部NoPullの設定ミス、すなわち、余分な消費電流を確認したいときには、ソースコ
ードに基づく「gpio_set(?,out,?)」をキーボード3から入力する。
When the user wants to confirm the setting error of Internal PullUp / Internal PullDown / Internal NoPull at the time of setting the output pin of GPIO, that is, to check the excess current consumption, the keyboard 3 uses “gpio_set (?, out,?)” Based on the source code. Enter from.

これは、図4のソースコードに示すように、「gpio_set(GPIOのピン名,
out,内部pull状態)」に対応したデータであり、最初の「?」は、GPIOのピ
ン名は何でもよいの意味、2番目の「?」は、内部pull状態は何でもよいの意味であ
る。
As shown in the source code of FIG. 4, “gpio_set (GPIO pin name,
out, internal pull state) ”, the first“? ”means any GPIO pin name, and the second“? ”means any internal pull state.

判定処理モジュール8は、まず、キーボード3から入力された検索条件を確認する(ス
テップS1)。ここで、「gpio_set(?,out,?)」が確認されれば、この
条件でソフトウェアデータ(図5全体)を検索し、以下が検出される(ステップS2)。
・C1・gpio_set(GPIO_1,out,nopull)
・C4・gpio_set(GPIO_1,out,pullup)
・C6・gpio_set(GPIO_2,out,nopull)
・C8・gpio_set(GPIO_2,out,nopull)
そして、判定処理モジュール8は、ステップS2で検出したソースコードに対して、H
W/SW仕様テーブル6(図4)の正誤表を基に判定し、C4はNG、C4以外はOKで
あると判定する。GPIOのI2Cバスについての検索条件ではないので、C6もOKと
判定され(ステップS3)、判定結果ストアモジュール9に記録する。
The determination processing module 8 first confirms the search conditions input from the keyboard 3 (step S1). Here, if “gpio_set (?, Out,?)” Is confirmed, software data (entire FIG. 5) is searched under this condition, and the following is detected (step S2).
・ C1 ・ gpio_set (GPIO_1, out, nopull)
・ C4 ・ gpio_set (GPIO_1, out, pullup)
・ C6 ・ gpio_set (GPIO_2, out, nopull)
・ C8 ・ gpio_set (GPIO_2, out, nopull)
Then, the determination processing module 8 applies H to the source code detected in step S2.
Judgment is made based on the errata in the W / SW specification table 6 (FIG. 4), and C4 is judged as NG, and other than C4 is judged as OK. Since it is not a search condition for the GPIO I2C bus, C6 is also determined to be OK (step S3) and recorded in the determination result store module 9.

そして、C4にミスがあることと、C4を内部NoPullに修正するように表示させ
る(ステップS4)。もし、C8が内部PullUpに設定してあれば、それもミスとし
て検出される。
Then, it is displayed that there is a mistake in C4 and that C4 is corrected to the internal NoPull (step S4). If C8 is set to internal PullUp, it is also detected as a miss.

ユーザは、ソフトウェア設計ツール(不図示)により、電子機器100のソフトウェア
(ソースコード)のC4の「pullup」を「nopull」に修正し、電子機器10
0のROM26を修正することにより、電子機器100の消費電流の無駄な増加を抑える
ことができる。
The user corrects C4 “pullup” of the software (source code) of the electronic device 100 to “nopull” by using a software design tool (not shown), and the electronic device 10
By correcting the ROM 26 of 0, it is possible to suppress a wasteful increase in current consumption of the electronic device 100.

実施例1によれば、ソースコードに基づく検索条件で検索するので、ソースコード全体
に対して、判定がなされ、上述したように、GPIOの全ての出力ピン設定のソースコー
ドの判定を行うことができる。
According to the first embodiment, since the search is performed based on the search condition based on the source code, the determination is made for the entire source code, and as described above, the determination of the source code for all the output pin settings of GPIO can be performed. it can.

図8は、本発明の実施例2に係るソフトウェアミス検出ツール200の判定処理モジュ
ール8の動作フローチャートである。実施例2は、ユーザが検索条件として、ハードウェ
アのNETリストの信号線名を検索条件データとして入力する場合である。
FIG. 8 is an operation flowchart of the determination processing module 8 of the software error detection tool 200 according to the second embodiment of the present invention. In the second embodiment, the user inputs a signal line name of a hardware NET list as search condition data as a search condition.

実施例1のようにソースコードで検索した場合は、ソースコード全体に対して判定がな
されるが、GPIOの出力ピン設定時の用途として、内部NoPullが全て正解かとい
うと、用途によっては、例えば、出力ピンのドライブ能力を高める場合に内部PullU
pする用途もありえる。
When the source code is searched as in the first embodiment, the entire source code is determined, but as an application when setting the output pin of GPIO, whether all internal NoPulls are correct, depending on the application, for example, Internal PullU to increase output pin drive capability
There is also an application for p.

実施例2は、そのような場合も含めて、GPIOの入出力ピンの用途毎、すなわち、N
ETリストの信号線名を検索条件とするものである。信号線は、回路図中に同じものは存
在しないので、1つ1つを指定することができる。
In the second embodiment, including such a case, the GPIO input / output pin is used for each application, that is, N
The signal line name in the ET list is used as a search condition. Since the same signal line does not exist in the circuit diagram, one signal line can be designated.

ユーザは、例えば、GPIOの入出力ピンをI2Cバスのマスターとして使用する用途
の場合、そのソフトウェアのミスを検出する目的で、NETリストの信号線名「I2C_
SCL」をキーボード3から入力する。
For example, in a case where the GPIO input / output pin is used as an I2C bus master, the user detects a software error of the signal line name “I2C_
“SCL” is input from the keyboard 3.

判定処理モジュール8は、まず、キーボード3から入力された検索条件を確認する(ス
テップS11)。ここで、「I2C_SCL」がが確認されれば、この条件でNETリス
ト(図3(A)全体) を検索し、以下が検出される(ステップS12)。
・N3・“I2C_SCL”:“CHIPSET”:“IC001”:“2”
・N4・“I2C_SCL”:“MODULE_B”:“IC003”:“1”
・N5・“I2C_SCL:“R1”:“2”
次に、判定処理モジュール8は、上記検出したNETリスト中から、その信号線名「I
2C_SCL」が繋がる部品とピン番号を確認し、以下が得られる(ステップS13)。
・“CHIPSET”:“IC001”:“2”
・“MODULE_B”:“IC003”:“1”
・“R1”:“2”
次に、判定処理モジュール8は、上記部品の内、ICピン表(図3(B))にあるピン
名を確認し、以下が得られる(ステップS14)。
・GPIO_2
・I2C_CLK
次に、判定処理モジュール8は、上記抽出したピン名の内、GPIOであるものを確認
し、「GPIO_2」が確認される(ステップS15)。
以上で、信号線「I2C_SCL」を制御するGPIOのピン名が「GPIO_2」で
あることがわかる。
The determination processing module 8 first confirms the search conditions input from the keyboard 3 (step S11). If “I2C_SCL” is confirmed, the NET list (entire FIG. 3A) is searched under this condition, and the following is detected (step S12).
N3 “I2C_SCL”: “CHIPSET”: “IC001”: “2”
N4 “I2C_SCL”: “MODULE_B”: “IC003”: “1”
・ N5 ・ “I2C_SCL:“ R1 ”:“ 2 ”
Next, the determination processing module 8 selects the signal line name “I” from the detected NET list.
The components and pin numbers connected to “2C_SCL” are confirmed, and the following is obtained (step S13).
“CHIPSET”: “IC001”: “2”
“MODULE_B”: “IC003”: “1”
・ "R1": "2"
Next, the determination processing module 8 confirms the pin names in the IC pin table (FIG. 3B) among the above components, and the following is obtained (step S14).
・ GPIO_2
・ I2C_CLK
Next, the determination processing module 8 confirms that the extracted pin name is GPIO, and “GPIO_2” is confirmed (step S15).
As described above, it can be seen that the pin name of GPIO that controls the signal line “I2C_SCL” is “GPIO_2”.

次に、判定処理モジュール8は、図5のソフトウェアデータ全てから、ピン名称「GP
IO_2」が含まれるソースコードを検出し、以下が得られる(ステップS16)。
・C5:gpio_set(GPIO_2,in,nopull)
・C6:gpio_set(GPIO_2,out,nopull)
・C7:gpio_out(GPIO_2,H)
・C8:gpio_set(GPIO_2,out,nopull)
・C9:gpio_out(GPIO_2,L)
そして、判定処理モジュール8は、ステップS16で検出したソースコードに対して、
HW/SW仕様テーブル6(図4)の「I2C_SCL」についての正誤表T2を基に判
定し(ステップS17)、HW/SW仕様テーブル6(図4)のT22の誤ペアのソース
コードと同じC6とC7のペアがミスと判定され、判定結果ストアモジュール9に記録す
る。
Next, the determination processing module 8 determines the pin name “GP” from all the software data in FIG.
The source code including “IO_2” is detected, and the following is obtained (step S16).
C5: gpio_set (GPIO_2, in, nopull)
C6: gpio_set (GPIO_2, out, nopull)
C7: gpio_out (GPIO_2, H)
C8: gpio_set (GPIO_2, out, nopull)
C9: gpio_out (GPIO_2, L)
Then, the determination processing module 8 performs the process on the source code detected in step S16.
Judgment is made based on the errata table T2 for “I2C_SCL” in the HW / SW specification table 6 (FIG. 4) (step S17), and the same C6 as the source code of the error pair T22 in the HW / SW specification table 6 (FIG. 4). And the pair of C7 are determined to be misses, and are recorded in the determination result store module 9.

そして、C6とC7のペアがミスであることと、C6とC7のペアを、HW/SW仕様
テーブル6(図4)のT21の正解のソースコードと同じ内容に修正するように表示させ
る(ステップS18)。
Then, it is displayed that the pair of C6 and C7 is a mistake and that the pair of C6 and C7 is corrected to the same content as the correct source code of T21 in the HW / SW specification table 6 (FIG. 4) (step) S18).

ユーザは、ソフトウェア設計ツール(不図示)により、電子機器100のソフトウェア
(ソースコード)のC6とC7のペアを、入力ピン設定(T21と同じ)に修正し、電子
機器100のROM26を修正することにより、電子機器100のI2C機能を正常にす
ることができる。
The user modifies the pair of C6 and C7 of the software (source code) of the electronic device 100 to the input pin setting (same as T21) and the ROM 26 of the electronic device 100 by using a software design tool (not shown). Thus, the I2C function of the electronic device 100 can be made normal.

なお、ユーザが検索条件として「A−OUT」を入力した場合、判定処理モジュール8
は、「A−OUT」、すなわち、GPIO_1についてのソフトウェアを対象にして、H
W/SW仕様テーブル6(図4)の「A−OUT」の正誤表T1を基に判定する。
When the user inputs “A-OUT” as a search condition, the determination processing module 8
Is "A-OUT", ie, the software for GPIO_1, H
The determination is made based on the errata table T1 of “A-OUT” in the W / SW specification table 6 (FIG. 4).

実施例2によれば、NETリストの信号線名を検索条件として検索するので、GPIO
の個々の入出力ピンの用途に合ったソフトウェアのミスを検出することができる。
According to the second embodiment, since the signal line name in the NET list is searched as a search condition, GPIO
Can detect software mistakes that match the purpose of each individual I / O pin.

なお、ユーザが実施例1と実施例2の検索条件を両方入力した場合は、判定処理モジュ
ール8は、両方の検索とミス検出を行う。
When the user inputs both search conditions of the first embodiment and the second embodiment, the determination processing module 8 performs both searches and error detection.

また、HW/SW仕様テーブル6を設けたが、ソフトウェアミス検出ツール200が特
定の電子機器100に限定したツールであるならば、HW/SW仕様テーブル6を設けず
に、図7、図8の動作フローチャートのステップ中に判定条件を直接組み込んでもよい。
Further, although the HW / SW specification table 6 is provided, if the software error detection tool 200 is a tool limited to a specific electronic device 100, the HW / SW specification table 6 is not provided, and the software error detection tool 200 shown in FIGS. The determination condition may be directly incorporated into the steps of the operation flowchart.

また、電子機器100の例として、GPIOの通常の出力ピン用途と、I2Cバス用途
について説明したが、GPIOの他の使い方であってもよい。また、GPIO以外のCP
U周辺ペリフェラル、例えば、DMACやカウンタなど、プログラムにより動作するもの
であれば何でもよい。また、上記は、電子機器100の実機テストではソフトウェアの設
計ミスを発見しにくい場合について説明したが、本発明のツールは、どのようなソフトウ
ェアに対しても有効である。
In addition, as an example of the electronic device 100, GPIO normal output pin use and I2C bus use have been described, but other uses of GPIO may be used. In addition, CP other than GPIO
Any peripheral device that can be operated by a program, such as a U peripheral, for example, a DMAC or a counter, may be used. In the above description, the case where it is difficult to find a software design error in the actual device test of the electronic device 100 has been described. However, the tool of the present invention is effective for any software.

以上説明したように、本発明によれば、特に、電子機器100の実機テストでは発見し
にくいソフトウェアのミスを、外部のソフトウェアミス検出ツール200で発見すること
ができる。
As described above, according to the present invention, it is possible to detect software errors that are difficult to find in the actual machine test of the electronic device 100 with the external software error detection tool 200.

1 HWデータフォルダ
2 SWデータフォルダ
3 キーボード
4 HWデータ入力モジュール
5 SWデータ入力モジュール
6 HW/SW仕様テーブル
7 検索条件入力モジュール
8 判定処理モジュール
9 判定結果ストアモジュール
10 ミス検出モジュール
11 表示部
21 GPIO
22、23 電子部品
24 抵抗(外部PullUp)
25 制御部
26 ROM
31 ドライバ
32 レシーバ
33 内部PullUp抵抗
34 内部PullDown抵抗
35 ドライバ
36 レシーバ
37 内部PullUp抵抗
38 内部PullDown抵抗
100 電子機器
200 ソフトウェアミス検出ツール
DESCRIPTION OF SYMBOLS 1 HW data folder 2 SW data folder 3 Keyboard 4 HW data input module 5 SW data input module 6 HW / SW specification table 7 Search condition input module 8 Judgment processing module 9 Judgment result store module 10 Miss detection module 11 Display unit 21 GPIO
22, 23 Electronic component 24 Resistance (external PullUp)
25 Control unit 26 ROM
31 Driver 32 Receiver 33 Internal PullUp Resistor 34 Internal PullDown Resistor 35 Driver 36 Receiver 37 Internal PullUp Resistor 38 Internal PullDown Resistor 100 Electronic Device 200 Software Miss Detection Tool

Claims (5)

外部の電子機器の回路を制御する該電子機器のソフトウェアデータが読み込まれて該ソフトウェアデータのミスを検出するソフトウェアミス検出ツールであって、
前記ソフトウェアデータが読み込まれて格納されるソフトウェアデータ格納部と、
前記電子機器の回路のハードウェアデータが読み込まれて格納されるハードウェアデータ格納部と、
前記ハードウェアデータに対応したソフトウェア仕様データを格納する仕様テーブルと、
前記ハードウェアデータの言語に基づいて規定された検索条件データを格納する検索条件データ格納部と、
前記検索条件データに対応する前記仕様テーブルのソフトウェア仕様データを抽出し、この抽出されたソフトウェア仕様データと前記ソフトウェアデータとを比較して、前記ソフトウェアデータのミスを検出するコード作成ミス検出手段と
を具備することを特徴とするソフトウェアミス検出ツール。
A software error detection tool for reading software data of the electronic device that controls a circuit of an external electronic device and detecting a mistake in the software data,
A software data storage unit in which the software data is read and stored;
A hardware data storage unit in which hardware data of a circuit of the electronic device is read and stored;
A specification table for storing software specification data corresponding to the hardware data;
A search condition data storage unit for storing search condition data defined based on the language of the hardware data;
Code creation error detection means for extracting software specification data of the specification table corresponding to the search condition data, comparing the extracted software specification data with the software data, and detecting a mistake in the software data; A software error detection tool comprising:
さらに、操作入力手段を有し、
前記検索条件データは、当該操作入力手段から入力されることを特徴とする請求項1又は記載のソフトウェアミス検出ツール。
Furthermore, it has an operation input means,
The search condition data, the software error detecting tool of claim 1 or 1, wherein the input from the operation input means.
前記ソフトウェアデータはソースコードであり、前記ハードウェアデータは回路のネットリストであることを特徴とする請求項記載のソフトウェアミス検出ツール。 The software data is the source code, the hardware data according to claim 1 software error detecting tool, wherein it is a net list of the circuit. 前記仕様テーブルのソフトウェア仕様データは、正しいデータまたは誤ったデータとして規定されていることを特徴とする請求項記載のソフトウェアミス検出ツール。 Software specification data of the specification table, correct data or incorrect claim 1, wherein the software error detecting tool, characterized in that it is defined as data. 前記ハードウェアデータおよびソフトウェアデータは、汎用入出力ポートの入出力切替ピンに関連のデータであることを特徴とする請求項記載のソフトウェアミス検出ツール。 The hardware data and software data, according to claim 1, wherein the software error detecting tool, characterized in that the data is related to the input and output switching pins for general input and output ports.
JP2009218554A 2009-09-24 2009-09-24 Software error detection tool Expired - Fee Related JP5391962B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009218554A JP5391962B2 (en) 2009-09-24 2009-09-24 Software error detection tool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009218554A JP5391962B2 (en) 2009-09-24 2009-09-24 Software error detection tool

Publications (2)

Publication Number Publication Date
JP2011070254A JP2011070254A (en) 2011-04-07
JP5391962B2 true JP5391962B2 (en) 2014-01-15

Family

ID=44015509

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009218554A Expired - Fee Related JP5391962B2 (en) 2009-09-24 2009-09-24 Software error detection tool

Country Status (1)

Country Link
JP (1) JP5391962B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4052684B2 (en) * 1995-05-30 2008-02-27 富士通株式会社 Computer system using programmable logic circuit
JP2005190330A (en) * 2003-12-26 2005-07-14 Matsushita Electric Ind Co Ltd Source program review support system
JP2005284785A (en) * 2004-03-30 2005-10-13 Jfe Steel Kk Program development device

Also Published As

Publication number Publication date
JP2011070254A (en) 2011-04-07

Similar Documents

Publication Publication Date Title
JP5609176B2 (en) Configuration method and configuration control circuit
CN107066746B (en) Method for realizing PCA9555 function through CPLD based on I2C interface
US20030204790A1 (en) Computer main board on/off testing device, method and system
US8516431B2 (en) Rule check system, design rule check method and design rule check program
US20100100779A1 (en) Data processing apparatus
CN110532164B (en) Semiconductor equipment and debugging methods
JP4886558B2 (en) Information processing device
JP5391962B2 (en) Software error detection tool
JP3605506B2 (en) Critical path search method
CN111949319A (en) Sequence controller self-monitoring method, system and electronic device
US20240143465A1 (en) Semiconductor device and startup control method for semiconductor device
US20050060617A1 (en) Device for debugging and method thereof
CN100367147C (en) Working clock setting method and device capable of detecting state of basic input and output system
JP5387521B2 (en) Logic verification scenario generation device and logic verification scenario generation program
JP4589207B2 (en) Circuit design electrical check system
CN101359292A (en) Computer system and control method
CN119201252B (en) Function configuration method, computer program product, device and storage medium
JPH1097357A (en) Data processor and data processing system
EP4202708A1 (en) Large touch display integrated circuit and operation method thereof
CN115834970B (en) Light sensing module control method, device, display device and storage medium
CN120353636B (en) Dynamic repairing method, system, equipment, medium and product for abnormal functions of controller
US9885754B2 (en) Integrated circuit with self-verification function, verification method and method for generating a BIST signature adjustment code
JP2010250581A (en) Semiconductor device
JP2006277133A (en) Semiconductor integrated circuit and memory data check method
CN110462603B (en) Microcomputer

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120605

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130610

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130709

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130829

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130930

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