WO2000002106A1 - Procede et appareil pour faciliter le developpement d'un programme d'automobile - Google Patents

Procede et appareil pour faciliter le developpement d'un programme d'automobile Download PDF

Info

Publication number
WO2000002106A1
WO2000002106A1 PCT/JP1999/003146 JP9903146W WO0002106A1 WO 2000002106 A1 WO2000002106 A1 WO 2000002106A1 JP 9903146 W JP9903146 W JP 9903146W WO 0002106 A1 WO0002106 A1 WO 0002106A1
Authority
WO
WIPO (PCT)
Prior art keywords
vehicle
program
development support
integer
code
Prior art date
Application number
PCT/JP1999/003146
Other languages
English (en)
French (fr)
Inventor
Noriyasu Adachi
Original Assignee
Toyota Jidosha Kabushiki Kaisha
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 Toyota Jidosha Kabushiki Kaisha filed Critical Toyota Jidosha Kabushiki Kaisha
Priority to EP99925309A priority Critical patent/EP1111483A4/en
Publication of WO2000002106A1 publication Critical patent/WO2000002106A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/23Pc programming
    • G05B2219/23389Modular program, each process has corresponding program module
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/23Pc programming
    • G05B2219/23452Simulate sequence on display to control program, test functions
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/26Pc applications
    • G05B2219/2637Vehicle, car, auto, wheelchair

Definitions

  • the present invention relates to a method and apparatus for supporting development of a vehicle-use program, and more particularly, to improvement of development efficiency and reliability of a program to be developed.
  • a user who develops a system inputs a control specification (spececification) to a computer using a simulation function.
  • Specifications on the display of the Combi show the user's ideas in the form of data flowcharts and state flowcharts. Simulation calculations are performed according to the created chart, and logic debugging is performed with reference to the simulation results.
  • This type of simulation software has a function to automatically generate program code, for example, C code, from the created chart.
  • C code program code
  • the automatically generated C code is verbose and large in capacity, making it unsuitable for use in vehicle control, which has severe memory and execution speed constraints.
  • the variable names determined by the computer are assigned to each part of the chart, so that the generated C code is low in readability.
  • the user manually creates a vehicle C code suitable for the vehicle ECU (electric control unit) with reference to the data flowchart and the state flowchart.
  • vehicle C code suitable for the vehicle ECU (electric control unit)
  • dedicated code composed of integer logic
  • a high-speed process is realized with a memory capacity that is independent of the number of bits per night.
  • the manually created C code for the vehicle is actually downloaded to the in-vehicle ECU and debugged.
  • the present invention has been made in view of the above problems, and an object of the present invention is to provide a vehicular program development support method and apparatus that enable a highly reliable control program to be developed in a shorter time. . Disclosure of the invention
  • a vehicle is generated by using a program generation device having a function of generating a vehicle code from input control specifications.
  • a control program is generated.
  • the generated vehicle control program is downloaded to the vehicle ECU.
  • the vehicle ECU is caused to execute the vehicle control program, and the vehicle control program is debugged.
  • the vehicle code directly generated from the control specification is used as the vehicle ECU. Downloaded to Since the original control specifications and the vehicle need have a common feature, the occurrence of bugs is reduced, and debugging can be performed efficiently with a small amount of work. Further, the manual work of the developer in the coding work is significantly reduced.
  • the debugging work in the debugging step is performed on the program generation device that monitors a result of the vehicle ECU executing the vehicle control program. . Using a program generator with control specifications makes debugging easier.
  • the vehicle program development support device provides a vehicle control specification.
  • the vehicle E cu a car that is composed of integer logic that is managed.
  • a program code generation function for generating a vehicle code of the control program.
  • the code for the vehicle can be generated from the own flow by generating the integer logic code from the overnight flow chart and the state flowchart.
  • the data flow chart is simulated by applying floating numbers corresponding to physical values, integers converted from a number of points and floating point numbers, respectively,
  • a simulation function is provided to output simulation results of floating-point numbers and integers.
  • floating point numbers were handled in the simulation stage and integers were handled in the coding stage.
  • floating point numbers and integers are processed in the simulation stage, and both processing results are output, so that the validity of the integer trick can be easily determined in the specification creation stage.
  • the result of inversely calculating the floating-point number from the integer simulation result is displayed so that the difference between the simulation result when the floating-point number and the integer are applied can be determined.
  • a result of inversely calculating an integer from a floating-point number using the floating-point number, an integer, an integer conversion condition from a floating-point number to an integer, and the integer conversion condition Give information about, preferably; a result of inversely calculating an integer from a floating-point number using the floating-point number, an integer, an integer conversion condition from a floating-point number to an integer, and the integer conversion condition give information about,.
  • a vehicle code is automatically generated using the integer information of the block symbol.
  • a priority function is provided for defining the order in which the plurality of data charts in the same hierarchy are executed on the state flowchart.
  • a labeling function for selecting a desired symbol connection line in the data flow chart and attaching a desired label is provided. Then, the vehicle code using the label as a variable name of the corresponding location is generated. Easy-to-understand user: 'Labeling generates highly readable vehicle code.
  • a grouping function for grouping a plurality of processes corresponding to a plurality of Buccoue symbols in the data flow chart at the time of generating a vehicle code is provided. Preferably, grouping is performed according to a predetermined grouping restriction condition that defines the number of block symbols to be grouped. Also, preferably, the labeling of the symbol connection lines is used as a delimiter of the grouping. Grouping such as c2 can improve the readability of the vehicle code:
  • the vehicle code according to the present invention is a vehicle condolence C code obtained by modifying a general C code so as to be compatible with the vehicle ECU if it is clear, but is not limited to the C code.
  • the vehicle ECU of the present invention is any ECU mounted on the vehicle. If it is clear, it is an engine ECU, a transmission ECU, a suspension control ECU, and a brake control ECU. Needless to say, the control specifications and vehicle specifications required for program development differ depending on the ECU and the on-board equipment to be controlled.
  • FIG. 1 is a diagram showing an overall configuration of an embodiment of the present invention.
  • FIG. 2 is a block diagram showing the configuration of the program generation device.
  • FIG. 3 is a diagram showing a data flow chart representing a control specification and a state flowchart.
  • FIG. 4 is a diagram illustrating the concept of integer logic in the vehicle ECU.
  • FIG. 5 is a diagram illustrating an example of a part of the integer logic.
  • FIG. 6 is a diagram showing the configuration of the integer Bukok.
  • FIG. 7 is a diagram showing an example in which the integer Bukok is applied to multiplication.
  • FIG. 8 is a diagram showing the processing of the multiplication block in FIG.
  • Fig. 9 shows the ';! It is a figure which shows the modification of a process.
  • FIG. 10 is a diagram showing an integer Kozic support tool.
  • FIG. 11 is a diagram illustrating an integer Kozic support tool.
  • FIG. 12 is a diagram showing an integer Kozic sabot tool.
  • FIG. 13 is a diagram showing an integer kozic sabottoru.
  • Figure 14 shows the integer Kozic support tool:
  • Figure 15 shows the integer Kozic support tool:
  • Figure 16 shows the support tool for integer logic:
  • FIG. 17 is a diagram showing a method of defining the operation order.
  • FIG. 18 is a diagram showing a prioritizing function of the present embodiment, which is a method of defining a calculation order.
  • FIG. 19 is a diagram showing the C code generated as a result of FIG. 1 and FIG.
  • FIG. 20 is a diagram showing an example of a C coat mainly composed of a data flowchart.
  • C FIG. 21 is a C code generated from a data flowchart similar to that of FIG.
  • FIG. 9 is a diagram showing a C code in which the following is performed.
  • FIG. 22 is a diagram showing a grouping process in C code generation.
  • FIG. 23 is a diagram showing a variable name data base and an expression data base created in the C code generation process.
  • FIG. 24 is a diagram showing a grouping process using the database of FIG. 23.
  • FIG. 25 is a diagram showing a specific example of the grouping process.
  • FIG. 26 is a diagram illustrating an example of a display screen when the program generation device monitors engine control.
  • the program generation device 1 has a function of creating a control specification, a simulation function of the control specification, and a function of generating a C code for a vehicle from the control specification.
  • the program generation device 1 is composed of a computer, as shown in Fig. 2, and includes a CPU 10, a ROM 11, a RAM 12, a keyboard 13, a pointing device 14, a display 15, a hard disk 16, and a communication circuit. 17, CD-R0 M Drive 18 Programs for realizing the various functions of the program generator 1 are stored in the ROM 11, the hard disk 16 or the CD-ROM 19. Performed by U10.
  • the input / output device is not limited to the keyboard 13, the ⁇ inting device 14, and the display 15. Further, any type of recording medium other than the CD-ROM 19, for example, a DVD may be used. Further, any type of storage device other than the hard disk 16 may be applied.
  • the user operates the keyboard 13 and the pointing device 14 (mouse or the like), and writes a specification containing his / her own idea on the display 15.
  • the deno spray 15 has the form of the data flow chart (block diagram) and the state flow chart (state flow chart) shown in Figs. 3 (a) and (b).
  • the control specification is drawn with.
  • the data flow chart shows the partial data flow
  • the state flow chart shows the overall control flow.
  • the user operates the keyboard 13 and the pointing device 14 to input vehicle specifications (specifications), whereby a virtual vehicle model is formed in the program or device 1.
  • vehicle model is composed of a set of equations describing various motions, actions, and the like of the vehicle.
  • the created specifications (data flow chart and state-of-the-art chart) are simulated.
  • the control logic controls the vehicle model all over the convenience store.
  • the simulation result is displayed on the display 15, and the necessary debugging work is performed at this stage. While debugging, the specifications are revised and improved, and the specifications are completed.
  • C codes for vehicles are generated from the specifications according to the user's instructions. That is, a file in which the C code corresponding to the data flowchart and the state code chart is written is formed.
  • the vehicle C code uses integer logic, and is configured to be able to achieve high-speed processing with a smaller memory size than general C code (described later).
  • the generated vehicle C-need is downloaded to the actual vehicle ECU2, for example, the engine ECU.
  • the vehicle model is downloaded from the program generation device 1 to the vehicle model device 3.
  • the vehicle model device 3 including DSP uses a high-speed interrupt
  • the two ECUs 2 seem to behave similarly to the actual vehicle. In order to shorten the development period and develop efficiently, it is effective to conduct such a simulation before testing using actual vehicles.
  • the vehicle model device 3 is connected to the vehicle ECU2, and the vehicle C code downloaded to the vehicle ECU2 is executed. As a result, a simulation in a realistic environment is performed.
  • the operations of the vehicle ECU 2 and the vehicle model device 3 are monitored by the program generation device 1 using the communication circuit 17, and debugging is performed on the program main device 1. For example, if improper control action is found, the cause can be examined using data charts and state flow charts. The defect is corrected on the computer, and the logic after the correction is verified.
  • the vehicle ECU2 is mounted on the vehicle 4, and an actual vehicle test (actua 1 test) is performed. Here, the points that need to be corrected due to the non-linear factors of the actual vehicle are detected, and the final program correction work is performed.
  • integer logic can be considered from the control specification creation stage, and a vehicle C need of integer logic can be automatically generated from the control specification. .
  • X— int int (x_float one OFFSET) / SLOPE (1)
  • x—float is a floating point number
  • x_int is an integer
  • OFFSET or bias
  • SLOPE or LSB
  • Figure 4 illustrates the concept of integer logic in the vehicle ECU.
  • the sensor 21 sends a voltage signal V corresponding to the detected physical quantity p to the A / D converter # 22.
  • the A / D converter 22 converts the voltage signal V into an integer P and sends it to the vehicle ECU 2.
  • the vehicle ECU2 obtains the integer data Q of the control parameters from the integer data P of the detection signal using integer logic.
  • the integer data is, for example, an unsigned integer of 16 bits.
  • the integer data Q is converted into a control signal and output to the factory 23 to be controlled. Then, the actuary 23 operates to generate a physical quantity q.
  • the integer logic must produce a result equivalent to the original control logic for physical values.
  • SL0PE and OFFSET of the input / output unit of the vehicle ECU 2 are lp, lq, op, and oq, respectively.
  • Integer logic is actually provided with multiple stages of arithmetic processing, and several intermediate processes S LOPE, 0 F F SET are provided. These SL0PE, OFFSET should be set to optimize integer logic in terms of memory size and execution time.
  • a transfer function as shown in Fig. 5 is included in a part of the control specification (logic) created by the user.
  • logic the control specification
  • the same S LOPE is used for all seven terms of the transfer function. Since the coefficients of the first term and the seventh term are significantly different, if the SLOPE suitable for the first term is adopted, the numerical value of the seventh term can always be zero.
  • control logic can contain redundant components due to improper S LOPE settings. In order to avoid this, it is necessary to be able to easily set appropriate integer conversion conditions.
  • an integer block (Integer Block) shown in FIG. 6 is introduced as a feature in order to configure an appropriate integer logic on the data flow chart and easily set an appropriate integer conversion condition. I do.
  • An integer block is one prosod symbol in a data flow chart. The user can write integer blocks of symbols into the data flow chart.
  • the integer block consists of (l) integer (integer), (2) SL0 PE (LSB), (3) 0 FF SET (bias), and (4) flo at (floating point Number), (5) Data type, (6) "integerx SL0PE + OFFSET". (6) is the result of inversely calculating f10at from integer (inverse 1 oat).
  • SLOPE and OFFSET are input to the multiplication block together with input data 1 and 2, respectively.
  • the multiplication block calculates and outputs the above six pieces of information from these data.
  • FIG. 8 shows the processing of the multiplication block by an equation.
  • the input values x and y are converted to integers using 0 ffset 1 and 2 and s 1 ope 1 and 2, respectively, and the product of these two integers is output (integer output).
  • the float output is xy.
  • the output SLOPE and OFF SET can be found (Fig. 8, second and third equations).
  • f 1 oat and integer can have substantially the same meaning in the entire control process. In other words, it is possible to avoid a situation in which the difference between float and integer increases as the block goes to the subsequent stage. In addition, it is possible to prevent a situation where an input of a certain sensor is ignored due to an inappropriate S LOPE setting.
  • the OFFSET on the output side includes the input values x and y, as shown in the third equation. If this effect cannot be ignored, the user can select the transformation shown in FIG. In FIG. 9, as shown in the first equation, by adding "offset / slope" to the integer before multiplication, the term of ffsset on the output side becomes zero.
  • Figures 10 to 16 show various integer blocks that support integer logic. As shown in Fig. 10, this tool adds information y (5) to y (8) to the integer block, but basic information y (1) to y (4) are the same as above. It is. In FIGS. 10 to 16, L S B corresponds to s 10 pe.
  • control specification in the chart format expresses integer logic by introducing an integer block. Since the appropriate integer conversion conditions can be set while comparing the theoretical control logic (real number operation) and the integer logic (integer operation), it is possible to easily create a proper integer logic with few bugs.
  • the created control specification can itself be simulated on a computer.
  • control If the c code is generated by extracting the integer rosinok part of the specification, the vehicle C code can be generated automatically. Since the control specification and the vehicle c-code have commonality, the occurrence of bugs at the code generation stage is reduced, and program verification such as debugging is also facilitated.
  • the prioritizing function shown in FIG. 18 is further provided.
  • the user assigns a priority number to the data flow chart.
  • Each module or arithmetic expression is a prioritized subsystem (1—Prior—Subsystenu 2—Prior—Subsystem).
  • the operations are performed in the order of the subsystem names.
  • this prioritizing function there is an advantage that the calculation order of the data flowchart in the same hierarchy can be easily specified. Also, as shown in FIG. 19, there is an advantage that the generated C code is simpler than before, which is preferable in terms of readability and memory capacity.
  • C code generation is performed in response to user instructions.
  • each block of the data flowchart has integer information. Therefore, a series of blocks can be obtained by integer arithmetic.
  • a C code for the vehicle composed of integer mouthpieces is generated: Specifically, referring to the example in Fig. 7, information input to and output from the multiplication block at the chart stage An integer operation (two integer inputs and one integer output) is extracted from the group.
  • Fig. 20 shows an example of C code mainly composed of data flow charts. In the ordinary C code generation method, as shown in Fig. 20, variable names determined by the viewer are shown in each part. Assigned. Therefore, the generated C code is very hard to read for humans.
  • a labeling function shown in FIG. 21 is provided to improve readability.
  • the selected connection line is labeled as desired.
  • the labels "t_x”, “t_y”, “t_z” and “t—xyz” are given as examples. It is suitable.
  • the corresponding label is used as the variable name of the label.
  • easy-to-read C code is generated as shown in Fig. 21.
  • connection lines are labeled. However, the user may label the appropriate desired line to make the C code easier to read.
  • the variable names assigned by the computer are used as is.
  • a grouping function is provided to improve readability.
  • FIG. 22 in the overnight flowchart, there are two blocks between input and output: In the left C code without grouping, the number of blocks Two expressions have been generated according to. On the other hand, in the right grouped C code, the operations of the two blocks are grouped together and represented by one expression. Variable names that are unnecessary for humans to read C code have been reduced, and thus C code has been generated that is easy to read.
  • an ID is attached to each block in the data flowchart, and the ID is used as a variable name.
  • a variable name (signal name) that associates the ID with the label given by the user is created.
  • a data base (Fig. 23 (a)) is created. If unlabeled, the ID is used as is.
  • an expression of the block of interest is created (S15). It is determined whether the grouping condition is satisfied for the created expression (S16). If the condition is not satisfied, the expression created in S15 is registered in the expression table for processing in the next block (S17). If the grouping condition is satisfied, the formula created in S15 is written to a file (S18). In Figure 22, an expression that combines the two blocks is output.
  • the input signal is s1 and s2.
  • a search of the equation database for the input signal s 1 yields the equation (x + 1).
  • the number of groupings in this equation is still 1 (condition not satisfied). Therefore, the equation (x + 1) is adopted as the input signal.
  • C Next, a search for the input signal s 2 reveals that the number of groupings of the input signal s 2 is 2.
  • a database of variables is searched and the label X2 is adopted as the input signal. Therefore, the operation in the block of interest is (x + 1) XX 2 (multiplication).
  • the readability of the automatically generated C code can be further improved by performing appropriate grouping at the time of C code generation. You can also save memory by reducing variable names.
  • the program generation device 1 downloads the automatically generated vehicle condolence C code to the vehicle ECU 2 in response to a user's instruction.
  • the vehicle ECU 2 executes the vehicle C control and controls the vehicle model device 3 (DSP).
  • the program generation device 1 monitors the state of execution of the control and displays it on a display in an appropriate form.
  • FIG. 26 shows an example of a monitor screen when the engine ECU is applied to the vehicle ECU 2. The user operates the program generation device 1 to -Performs operation verification and debugging of the software.
  • an appropriate vehicle C code with few bugs is generated.
  • the vehicle control code and the original control logic are common.
  • the readability of the C-compatible C code is high. Therefore, debugging can be performed efficiently and easily.
  • the vehicle code corresponding to the control specification input by the user is automatically generated, so that the man-hour for the coding operation is greatly reduced.
  • the input control specifications can be simulated on a computer by themselves, and can be converted into vehicle codes and used by the vehicle ECU. Reduction is possible. As a result, the man-hours required for reliability assurance are reduced, and the development period and development cost can be reduced.
  • the advantage of the present invention that supports from specification creation to logic debugging is remarkably obtained.
  • a highly readable vehicle code is automatically generated by appropriate C code generation processing for performing labeling and grouping. As a result, the number of steps for debugging and the like can be further reduced.
  • the vehicle program development support method and device according to the present invention are used for controlling a vehicle: the vehicle ECU can be used for the development work of a program executed by the vehicle ECU.

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)
  • Software Systems (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Description

明細書 車両用プログラム開発支援方法および装置
技術分野
本発明は、 車両用プログラム(vehicle-use program)開発支援方法および装置に 関し、 特に、 開発効率の向上および開発されるプログラムの信頼性の向上に関す る。 背景技術
ビジュアルプ πグラミング技術を利用した制御システム設計支援統合環境を実 現するための技術が進展している。 このような背景の下、 車両の制御システムの 開発にも、 シミュレーション機能およびプログラミング機能を備えたソフトウェ ァをインストールしたコンピュータが利用されるようになってきた。
システム開発を行うユーザは、 シミュレーション機能を利用して制御仕様書(s pecification)をコンピュータに入力する。 コンビュ一夕のディスプレイ上には、 ユーザのアイデアを盛り込んだ仕様書が、 データフローチャートおよびステート フローチャートといったかたちで書き表される。 作成されたチャートに従ったシ ミュレ一ション計算が行われ、 シミュレーション結果を参考にしてロジヅクのデ バッグ作業が行われる。
この種のシミ二レ一ションソフトウェアは、 作成されたチヤ一トからプログラ ムコード、 例えば Cコードを自動的に生成する機能をもつ。 しかし、 自動生成さ れる Cコードは、 冗長で、 容量が大きく、 そのため、 メモリの制約や実行速度に 関する制約の厳しい車両制御にそのまま使うのには適していない。 また、 従来の コード生成方法では、 コンピュータが決めた変数名がチャートの各部に割り付け られる結果、 生成された Cコ一ドは可読性の低いものとなってしまう。
そこで、 ユーザは、 データフローチャートおよびステートフローチャートを参 考にして、 車両 E C U (electric contol unit)に適した車両用 Cコードを手作業 で作成する。 特に、 一般の Cコードと異なり、 整数ロジックで構成される専用コ ードが作成され、 二れにより、 デ一夕ビッ ト数の観点から ないメモリ容量で 高速処理が実現される。 手作業で作られた車両用 Cコ一ドは実際に車載 E C Uに ダウンロードされ、 そしてデバッグ作業が行われる。
従来は、 上記のように、 仕様シミュレーションとプログラムコーディングが全 く別の作業であり、 それぞれの段階で独立してデバ 'ソグ作業を行わなければなら なかった。 特に、 聿両用コードのデバッグ作業において不具合が見つかった場合、 不具合原因がコーディングのミスにあるのか、 不適当なォ ジナル仕様書にある のかを判定するのが困難であった。 手作業のコ一ディングおよびデバッグ作業の 困難さは、 制御プコグラムの信頼性保証にかかる工数を増 、させ、 さらには、 開 発期間を引き延ばし、 開発コス 卜の増大を招く可能性があっ 。
本発明は上記課題に鑑みてなされたものであり、 その目的は、 信頼性の高い制 御プログラムをより短期間で開発できるようにする車両用プコグラム開発支援方 法および装置を提供することにある。 発明の開示
( 1 ) 上記目的を達成するため、 本発明の車両用プログラム開発支援方法によ れば、 入力された制御仕様から車両用コ一ドを生成する機能をもつプログラム生 成装置を用いて、 車両制御プログラムが生成される。 生成された前記車両制御プ ログラムは車両 E C Uにダウンロードされる。 そして、 前記車両 E C Uに前記車 両制御プログラムを実行させて、 前記車両制御プログラムのデバッグが行われる このように、 本発明によれば、 制御仕様から直接的に生成された車両用コードが 車両 E C Uにダウンロードされる。 元の制御仕様と車両用ニードが共通性をもつ ので、 バグ発生が低減し、 少ない作業量で効率よくデバッグ作業を行うことが可 能となる。 また、 コーディング作業における開発者の手作業が大幅に削減される 好ましくは、 前記デバッグステップのデバッグ作業は、 前記車両 E C Uが前記 車両制御プログラムを実行した結果を監視する前記プログラム生成装置上で行わ れる。 制御仕様をもっているプログラム生成装置を利用する二とで、 デバッグ作 業が容易になる。
( 2 ) 本発明の一態様の車両用プログラム開発支援装置は、 車両の制御仕様を 表すデータフロー ャ一トおよびステートフローチヤ一トを': 成するチヤ一ト作 成機能と、 作成されたチャートに基づいて、 車両 E c uで: 理される整数ロジッ クで構成された車 ¾制御プログラムの車両用コードを生成するプログラムコ一ド 生成機能と、 を有する。 車両 E C Uでは、 メモリサイズや実行速度の制約がある ので整数ロジックを用いることが好適である。 本態様では、 一夕フローチヤ一 トおよびステートフローチャートから整数ロジックのコ一ドを生成することで、 車両用コードの自 ft生成ができる。
好ましくは、 ^¾明の一態様では、 物理値に対応する浮動'」、数点数および浮動 小数点数から変換された整数をそれぞれ適用して前記データフローチヤ一卜のシ ミュレ一シヨンを行い、 浮動小数点数および整数のシミュレーション結果を出力 するシミュレ一ション機能が設けられる。 従来技術では、 シミュレ一ション段階 においては浮動小数点数が扱われ、 コーディング段階では整数が扱われた。 しか し、 本発明によれば、 シミュレーション段階で浮動小数点数と整数が処理され、 両方の処理結果が出力されるので、 仕様作成段階で整数口ジックの妥当性を容易 に判定することができる。 好ましくは、 浮動小数点数およ 整数を適用したとき のシミユレ一シヨン結果の相違を判定可能なように、 整数のシミユレ一シヨン結 果から浮動小数点数を逆算した結果を表示する。
また、 好ましく; 、 前記デ一夕フローチャートのブロックシンボルに、 浮動小 数点数、 整数、 浮動小数点数から整数への整数変換条件、 および該整数変換条件 を用いて浮動小数点数から整数を逆算した結果、 についての情報をもたせる。 ブ 口ックシンボルの つ整数情報を利用して車両用コードが自動生成される。
( 3 ) 本発明の一態様では、 前記ステートフローチャート上で同一階層の複数 の前記データフ π—チャートを実行する順番を定義する優先付け機能が設けられ る。 これにより、 駄が無く適正な制御プログラムを確実に 成できる。
また、 本発明 G—態様では、 前記デ一夕フローチャート内の所望のシンボル接 続ラインを選択して所望のラベルを付けるラベリング機能が設けられる。 そして、 該当個所の変数名として前記ラベルを用いた前記車両用コードが生成される。 ュ 一ザに分かりやす:、'ラベルを付けることで、 可読性の高い車両用コードが生成さ れる。 また、 本発明 一態様では、 車両用コード生成の際に、 前記データフローチヤ ―ト内の複数のブコックシンボルに対応する複数の処理をグルーピングするグル —ビング機能が設けられる。 好ましくは、 グルーピングされるブロックシンボル の数を規定する所定のグルーピング制限条件に従ってグルーピングが行われる。 また好ましくは、 シンボル接続ラインにラベルを付けた箇所が、 グルーピングの 区切りとされる c 二のようなグルーピングにより、 車両用コードの可読性を向上 することができる:
本発明の車両用コードは、 冽えば、 一般の Cコードを車両 E C Uに適合するよ うに変形した車両弔 Cコードであるが、 ただし Cコードには限定されない。 本発 明の車両 E C Uは、 車両に搭載される任意の E C Uであり、 冽えば、 エンジン E C U、 トランスミ ノシヨン E C U、 サスペンション制御 E C U、 ブレーキ制御 E C Uである。 E C Uおよび制御対象の車載機器に応じて、 プログラム開発に必要 な制御仕様および車両仕様が異なることはもちろんである 図面の簡単な説明
図 1は、 本発明' O実施形態の全体構成を示す図である。
図 2は、 プログラム生成装置の構成を示すプロック図である。
図 3は、 制御仕様を表すデータフローチャートおよびステートフ口一チヤ一ト を示す図である:
図 4は、 車両 E C Uにおける整数ロジックの概念を示す図である。
図 5は、 整数ロジックの一部の例を示す図である。
図 6は、 整数ブコックの構成を示す図である。
図 7は、 整数ブコックをかけ算に適用した例を示す図である。
図 8は、 図 7のかけ算ブロックの処理を示す図である。
図 9は、 図 8の';!理の変形例を示す図である。
図 1 0は、 整数コジックのサポー卜ツールを示す図である。
図 1 1は、 整数コジックのサポートツールを示す図である。
図 1 2は、 整数コジックのサボ一トツールを示す図である。
図 1 3は、 整数コジックのサボ一トツ一ルを示す図である。 図 1 4は、 整数コジックのサポートツールを示す図である:
図 1 5は、 整数コジックのサポートツールを示す図である:
図 1 6は、 整数ロジックのサポートツールを示す図である:
図 1 7は、 演算頓序の規定方法を示す図である。
図 1 8は、 演算頃序の規定方法であって本実施形態の優先付け機能を示す図で ある。
図 1 9は、 図 1 了および図 1 8の結果として生成される Cコードを示す図であ る。
図 2 0は、 データフローチャートから主成される Cコートの例を示す図である c 図 2 1は、 図 2 0と同様のデータフローチャートから生成される Cコードであ つて、 本実施形態のラベリングが行われた Cコードを示す図である。
図 2 2は、 Cコード生成におけるグルーピング処理を示す図である。
図 2 3は、 Cコ一ド生成過程で作成される変数名デ一夕ベースおよび式のデ一 夕ベースを示す図である。
図 2 4は、 図 2 3のデータベースを利用したグルーピング処理を示す図である c 図 2 5は、 グルーピング処理の具体例を示す図である。
図 2 6は、 プログラム生成装置がエンジン制御をモニタするときの表示画面例 を示す図である。 発明を実施するための最良の形態
以下、 本発明の好適な実施の形態について、 図面を参照し説明する。
図 1を参照すると、 プログラム生成装置 1は、 制御仕様の作成機能と、 制御仕 様のシミュレ一ション機能と、 制御仕様から車両用 Cコ一ドを生成する機能を有 する。
プログラム生成装置 1はコンピュータで構成され、 図 2に示すように、 C P U 1 0、 R O M 1 1、 R A M 1 2、 キーボード 1 3、 ボインテノングデバイス 1 4、 ディスプレイ 1 5、 ハードディスク 1 6、 通信回路 1 7、 C D— R 0 Mドライブ 1 8を有する。 プコグラム生成装置 1の各種機能を実現するプログラムは、 R O M l 1、 ハードデノ スク 1 6あるいは C D— R O M 1 9に格納されており、 C P U 1 0により実行される。 入出力装置は、 キーボード 1 3、 ^インティングデバ イス 1 4、 ディスプレイ 1 5には限定されない。 また、 C D— R O M 1 9以外の 任意のタイプの記録媒体、 例えば D V Dが用いられてもよ : さらに、 ハードデ イスク 1 6以外の任意のタイプの記憶装置が適用されてもよい。
ユーザは、 キーボード 1 3およびポインティングデバイス 1 4 (マウス等) を 操作し、 自らのアイデアを盛り込んだ仕様書(specification )をディスプレイ 1 5 に書き表す。 デノ スプレイ 1 5には、 図 3 ( a ) ( b ) に すデ一夕フローチヤ ート(data flowchart, ブロック線図)およびステートフローチャート (state fl owchart, state transition chart, 状態遷移図)のかたちで制御仕様書が描かれ る。 データフローチャートが部分的なデータの流れを表し、 ステートフロ一チヤ 一卜が全体的な制御の流れを表す。
また、 ユーザは、 キーボード 1 3およびポインティングデバイス 1 4を操作し て車両仕様 (諸元) を入力し、 これにより、 プログラム生或装置 1内に仮想的な 車両モデルが形成される。 具体的には、 車両モデルは、 車両の種々の運動、 動作 等を記述した式の集合で構成される。
ユーザの指示に応え、 作成された仕様書 (データフローチャートおよびステー トフ口一チャート) のシミュレーションが行われる。 図 1に示すように、 コンビ ュ一夕上で制御仕 ¾のロジックが車両モデルを制御する。 シミュレーション結果 がディスプレイ 1 5に表示され、 この段階で必要なデバッグ 業が行われる。 デ バッグ作業を行いながら、 仕様書の修正および改良が行われ、 仕様書が完成され る。
仕様書が完成すると、 ユーザの指示に従い、 仕様書から車両用 Cコードが生成 される。 すなわち、 データフローチャートおよびステートフコーチャートに対応 する Cコ一ドを書き込んだファイルが形成される。 車両用 Cコードは整数ロジッ クを採用しており、 一般の Cコードと比較して少ないメモリサイズで高速処理を 実現可能に構成されている (後述) 。 生成された車両用 Cニードは、 実際の車両 E C U 2、 例えばエンジン E C Uにダウンロードされる。
また、 プログラム生成装置 1から車両モデル装置 3へは、 車両モデルがダウン ロードされる。 D S Pを含む車両モデル装置 3は、 高速の割込処理等により、 車 両 E C U 2にとつては見かけ上は実際の車両と同様に動作する。 開発期間の短縮 と効率のよい開発のためには、 実際の車両を使ったテス卜の前にこのようなシミ ユレ一シヨンを行うことが効果的である。
車両モデル装置 3が車両 E C U 2に接続され、 車両 E Cじ 2にダウンロードし た車両用 Cコードが実行される。 これにより、 現実に近い環境でのシミュレ一シ ョンが行われる。 車両 E C U 2および車両モデル装置 3の動作がプログラム生成 装置 1により通信回路 1 7を使ってモニタされ、 そして、 プログラム主成装置 1 上でデバッグ作業が行われる。 例えば、 不適当な制御動作が発見されると、 その 原因がデータフ c;—チャートおよびステートフロ一チャートを使って調べられる。 コンピュー夕上で不具合箇所の修正が行われ、 修正後のロジツクが検証される。 デバッグ作業の終了後、 車両 E C U 2は車両 4に搭載され、 実車テス ト(actua 1 test)が行われる。 ここでは、 実際の車両の非線形要因等に起因する修正必要箇 所が検出され、 最終的なプログラム修正作業が行われる。
以下、 プログラム生成装置 1についてより詳細に説明する- 「制御仕様の入力 ·作成機能 (整数ロジック) 」
従来は、 制御仕様を入力する段階では、 物理値をそのまま表す浮動小数点数(f loating point number)を処理するチャートが作成される。 そして、 浮動小数点数 を計算したシミュレーション結果に基づいて、 制御仕様の妥当性が判断される。 従来機能によりチ 一トから自動的に生成される Cコードも浮動小数点数を含む。 しかし、 車両制御では、 低コストおよび処理速度の観点から、 E C Uの C P U の能力を最大限に引き出すことが要求される。 高速回転するエンジンなどの機器 の制御においては、 この要求が顕著である。 このような要求に応えるため、 車両 E C U用の Cコードに整数ロジック (固定小数点数(fixed point number) ) を適 用し、 一般 Cコードとはデ一夕ビッ ト数を異ならせることが好適である。 この点 が、 車両用 Cコードと自動生成される一般 Cコードとの大きな相違点であり、 開 発者による手作業での車両用 Cコード作成を余儀なくする理由であった。
本実施形態で 、 後述する整数ブロックを導入することにより、 制御仕様の作 成段階から整数ロジックを考慮できるようにし、 そして、 制御仕様から整数ロジ ックの車両用 Cニードを自動生成可能にする。 ( 1 ) 浮動小数点数から整数への変換
浮動小数点数から整数への変換は、 下式 ( 1) に従って行われる。
X— int = i n t ( x_float 一 OFFSET ) / SLOPE · · · ( 1 ) ここで、 x— floatは浮動小数点数であり、 x_intは整数であり、 OFFSET (また は b i a s) およ SLOPE (または LSB) は整数変換条件である。
(2) 整数ロジックの概要
図 4には、 車両 E CUにおける整数ロジックの概念が示されている。 センサ 2 1は、 検出した物理量 pに応じた電圧信号 Vを A/D変換 ¾22に送る。 A/D 変換器 22は電圧信号 Vを整数デ一夕 Pに変換し、 車両 ECU 2に送る。 車両 E CU2は、 整数ロジックを用いて、 検出信号の整数データ Pから制御パラメ一夕 の整数デ一夕 Qを得る。 整数デ一夕は、 例えば、 16 b i tの符号無し整数 (uns igned integer)である。 整数データ Qは制御信号に変換され、 制御対象のァクチ ユエ一夕 23に出力される。 そして、 ァクチユエ一夕 23が動作して物理量 qが 生じる。
図 4において、 整数ロジックは、 物理値を対象とするオリジナルの制御ロジヅ クと同等の結果をもたらさなければならない。 車両 E CU 2の入出力部の S L 0 PE、 OFF SETは、 それぞれ lp、 l q、 op、 o qである。 整数ロジック には実際には複数段階の演算処理が設けられ、 中間過程の幾つもの S LOPE, 0 F F S E Tが設けられる。 これらの SL0PE、 OFF SETは、 メモリサイ ズおよび実行時間の観点から整数ロジックを最適化するように設定されるべきで ある。
例えば、 ユーザが作成した制御仕様 (ロジック) の一部に、 図 5に示すような 伝達関数があつたとする。 整数ロジックの構成にあたり、 伝達関数の 7つの項の すべてについて同じ S LOPEを使ったとする。 第 1項と第 7項では係数が大幅 に違うため、 第 1項に適した SLOPEを採用すると、 第 7項の数値は常にゼロ になってしまい得る。
一般的に、 小さすぎる S LOPEはオーバ一フローの原因になる。 また、 大き すぎる S LOPEは結果的に一部のセンサの入力の無視を招くことになる。 さら に、 不適当な S LOPE設定が原因で制御ロジックが冗長成分を含むこともあり 得る。 このようなことを回避するため、 適切な整数変換条件を容易に設定可能に することが求められる。
(3) 整数プロ 'ソク
デ—タフローチ ート上で適切な整数ロジックを構成し、 適切な整数変換条件 を容易に設定できるようにするために、 本実施形態では、 その特徴として図 6の 整数ブロック(Integer Block)を導入する。 整数ブロックは、 データフローチヤ一 ト内の一つのプロソクシンボルである。 ユーザは、 整数ブロックのシンボルをデ —夕フローチャートに書き込むことができる。
整数ブロックは、 図 6に示すように、 (l)int e ge r (整数) 、 (2)SL0 P E (LSB) 、 (3)0 F F SET (b i as) 、 (4) f l o at (浮動小数点数) 、 (5)D a t a Type, (6) "i nt e ge rx SL0PE + OFFSET" の 6種の情報をもつ。 (6) は、 i n t e ge rから f 10 a tを逆算した結果 (逆算 1 o a t ) である。
図 7および図 8を参照し、 かけ算を例にして、 整数ブロックの機能を説明する。 図 7のデ一夕フローチャートにおいて、 かけ算ブロヅクには、 入力データ 1、 2 とともに、 それぞれ、 SLOPEおよび OFF SETが入力される。 かけ算ブロ ツクは、 これらのデ一夕から上記の 6つの情報を求めて出力する。
図 8には、 かけ算ブロックの処理が式で示されている。 入力値 x、 yがそれそ れ 0 f f s e t 1、 2および s 1 o p e 1、 2を用いて整数に変換され、 これら 2つの整数の積が出力される (int e ge r出力) 。 一方、 f l o a t出力は、 xyである。 第 1式を xyと比較すると、 出力側の SLOPEおよび OFF SE Tが分かる (図 8、 第 2式および第 3式) 。 さらに、 逆算 f l o a t (= i nt e ge rx SLOPE。ut + OFF SET。ut) が出力される。
ユーザは、 図 7 O表示を見て、 シミュレーション結果を知ることができる。 f 1 o atを見ることで、 基本の制御ロジックが正しいか否かが分かる。 さらに、 f l o atと逆算された f l o a tが比較される。 両者の差 ( 0. 1 ) が許容範 囲内であれば、 整数ロジックが適当であることが分かる。 一方、 両者の差が許容 範囲外であれば、 整数ロジック、 すなわち整数変換条件である s 10 p e 1、 2 の設定が不適当であることが分かる。 そこで、 適当な結果が得られるまで s 1 o pe l, 2が調整される。
図 7および図 8には、 制御仕様の一部のみが例示されている。 しかし、 実際の 制御仕様は、 連結された一連の多数のブロックで構成される。 本実施形態によれ ば、 制御過程の各ブロックで S LOPEの検証と調整を行うことができる。 例え ばあるブロックで f 1 o a tと i n t e g e rのずれが大きければ、 着目プロヅ ク以前のいずれかのプロックの整数変換条件が調整される:
従って、 制御過程の全体において、 f 1 o a tと i n t e g e rが実質的に同 等の意味をもつことができる。 言い換えれば、 後段のブロックにいくに従って f l o atと i nt e ge rとのずれが拡大するというような事態の発生が回避さ れる。 また、 不適当な S LOPEの設定によってあるセンサの入力が無視される というような事態の発生も回避される。
図 8では、 その第 3式に示されるように、 出力側の OFFSETが、 入力値 x、 yを含んでいる。 この影響が無視できない場合には、 ユーザは、 図 9の変形処理 を選択できる。 図 9では、 その第 1式に示されるように、 かけ算の前に整数に " o f f s e t/s l ope" を足すことにより、 出力側の o f f s e tの項がゼ 口になる。
また、 上記説明では、 かけ算を例にして整数ブロックの^能を述べたが、 他の 種類の演算に関しても同様の機能が設けられる。 図 10〜図 16は、 整数ロジッ クをサポートする各種の整数ブロックを示している。 なお、 図 10に示すように、 このツールでは、 整数ブロックに情報 y (5) 〜y (8) が付加されているが、 基本的な情報 y ( 1) 〜y (4) は上記と同様である。 また、 図 10〜図 16で は、 L S Bが s 10 p eに相当している。
以上のように、 本実施形態では、 整数ブロックの導入により、 チャート形式の 制御仕様書が、 整数ロジックを表現する。 理論的な制御ロジック (実数演算) と 整数ロジック (整数演算) とを比較しながら適切な整数変換条件を設定できるの で、 バグの少ない適正な整数ロジックを容易に作成できる。 作成された制御仕様 書は、 それ自体がコンピュータ上でシミュレーション可能である。 さらに、 制御 仕様書の整数ロシ ノク部分を抽出して cコ一ドを生成すれば、 車両用 Cコードを 自動的に生成できる。 制御仕様書と車両用 cコードが共通性をもつので、 コード 生成段階でのバグ発生が低減し、 また、 デバッグ等のプログラム検証も容易にな る。
「優先付け機能 (演算順序の規定) 」
複数のモジュールまたは演算式の順序を規定する場合、 一 ¾には、 図 1 7に示 すように、 各モシユールまたは演算式がトリガー付きサブシステム (Triggered Subsystem)とされ、 それらのサブシステムに対してステートフローチヤ一卜から ファンクションニール(function- cal l )が行われる。
本実施形態では、 さらに、 図 1 8の優先付け機能が設けられている。 ユーザは、 データフローチ —トに優先順位を表す番号を付ける。 各モジュールまたは演算 式は、 優先付けされたサブシステム (Prioritized Subsystem)となる(1— Prior— S ubsystenu 2一 Prior— Subsystem)。 演算は、 サブシステムの名前の順に行われる。 この優先付け機能によれば、 同一階層のデータフローチャートの演算順序の規 定が容易にできるという利点が得られる。 また、 図 1 9に示すように、 生成され る Cコードが従来より簡単になるという利点があり、 これは可読性およびメモリ 容量の面から好適である。
「Cコ一ド生成 (ラベリング) 」
Cコード生成は、 ユーザの指示に応えて行われる。 前述のように、 整数ブロヅ クの適用により、 データフローチャートの各ブロックが整数情報をもつ。 従って、 一連のプロック群を整数演算で迪ることができる。 整数演算を書き出すことによ り、 整数口ジッ で構成された車両用 Cコードが生成される: 具体的には、 図 7 の例を参照すると、 チャートの段階でかけ算ブロックに入出力される情報群の中 から、 整数演算 ( 2つの整数の入力と 1つの整数の出力) が抽出される。
既存のソフト ニァ製品を変形して利用する場合には、 チャートから一般 Cコ —ドを自動生成するツールと、 Cコードを書き込む雛形ツールとを用意し、 そし て、 整数ロジック:二適するように雛形を変形すればよい。 このとき、 一般 Cコー ドにはない専用二マンド、 および一般 Cコードを変形した専用コマンド等に関す る処置も施される: 図 2 0は、 デ一タフローチャー卜から主成される Cコー の一例を示している 通常の Cコード生成方法では、 図 2 0に示すように、 コンビユー夕が決めた変数 名が各部に割り付けられる。 そのため、 生成された Cコードは、 人間にとっては 非常に読みづらいものになる。
このように一般的な Cコード自動生成方法では、 可読性はあまり考慮されてい ない。 主として Cコードとチャートの一致が求められているからである。 しかし、 車両システム開発では、 実際の E C Uを使ったテストで動作検証が行われる。 こ のとき、 開発者が Cコードを読みとらなけらばならない機会が多い。 従って、 車 両用 Cコ一ドの自動生成では、 可読性が高いことが求められる。
本実施形態で 、 可読性向上のために、 図 2 1に示すラベリング機能が設けら れている。 ユーザは、 デ一夕フローチャート内のブロックシンボルの接続ライン をクリックする。 選択した接続ラインに所望のラベルが付けられる。 図 2 1では、 例として、 ラベル " t_x" "t_y" "t_z" "t— xyz" が付けられているが、 実際に は、 該当するモジュール名やセンサ名などの分かりやすいラベルを付けることが 好適である。 Cニード生成の際には、 ラベルが付けられた箇所の変数名として該 当ラベルが使われる。 その結果、 図 2 1に示すように、 読みやすい Cコードが生 成される。
なお、 図 2 1の例ではすべての接続ラインにラベルが付けられている。 しかし、 ユーザは、 Cコードを読みやすくするために適当な所望のラインにラベルを付け ればよい。 ラベ ングされないラインについては、 コンピュータが割り付けた変 数名がそのまま使用される。
「Cコ一ド生 におけるグループ化」
( 1 ) 通常の Cコード生成では、 デ一夕フローチャートの一つ一つのプロヅク に個別の変数名が付けられる。 そして、 各ブロックに対応して、 一つの変数を導 き出す式が生成される。 そのため、 生成された Cコードは、 多数の変数と式を含 み、 冗長で読みづらい。
そこで、 本実旌形態では、 可読性の向上のためにグルーピング機能が設けられ ている。 図 2 2を参照すると、 デ一夕フローチャートでは、 入出力の間に 2つの ブロックがある: グループ化が行われていない左側の Cコードでは、 ブロック数 に応じた 2つの式が生成されている。 一方、 グループ化された右側の Cコードで は、 2つのブロックの演算がまとめられ、 一つの式で表されている。 人間が Cコ —ドを読む上では不要な変数名が削減されており、 従って、 読みやすい Cコード が生成されている。
ただし、 多数のブロックをグルーピングすると、 一つの式が長くなりすぎて、 かえって可読性を低下させる可能性がある。 そこで、 一つのグループに含まれる ブロックの数を規定する制限条件を設けることが好適である。 ここでは、 ブロッ クの数の最大値を 2つとする。 従って、 Cコードの一つの式は、 最大 2段階の演 算を行う。
図 2 3および図 2 4を参照し、 グルーピング処理を説明する。 Cコード生成の 際、 データフローチャートの各ブロックに I Dが付けられ、 その I Dが変数名と して使われる。 I Dとユーザがつけたラベルとを関連づける変数名 (信号名) デ —夕ベース (図 2 3 ( a ) ) が作成される。 ラベルが付けられていない場合には、 I Dがそのまま使用される。
図 2 4において、 まず、 入力信号を調べる関数によって、 着目するブロックの 入力信号の I Dが調べられる (S 1 1 ) 。 そして、 式のデータべ一ス (図 2 3 ( b ) ) を参照して、 各入力信号について、 グルービング条件 (最大 2回) が成 立しているか否かが判断される (S 1 2 ) = 条件未成立 (2回未満) であれば、 数式のデータベースが検索される (S 1 3 ) 。 そして、 入力 I Dに対応する式が 採用される。 一方、 条件が成立すれば、 変数名のデ一夕ベースが検索され (S 1 4 ) 、 該当するラベルが変数名として採用される。 ラベルがなければ I Dが採用 される。
S 1 3の式または S 1 4の変数名を用いて、 着目プロックの式が作成される ( S 1 5 ) 。 作成した式に関してグルーピング条件が成立したか否かが判断され る (S 1 6 ) 。 条件未成立であれば、 次のブロックでの処理のために、 式のデ一 夕べ一スに、 S 1 5で作った式が登録される (S 1 7 ) 。 グルーピング条件が成 立すれば、 S 1 5で作った式がファイルに書き出される (S 1 8 ) 。 図 2 2では、 2つのプロックをまとめた式が出力される。
図 2 5を参照して、 上記のグルーピング処理の具体例を説明する。 入力信号は s 1および s 2である。 入力信号 s 1について式のデータベースを検索すると、 式 (x+ 1) が得られる。 この式のグルーピング回数はまだ 1回である (条件未 成立) 。 そこで、 式 (x+ 1) を入力信号として採用する c 次に、 入力信号 s 2 についての検索を行うと、 入力信号 s 2のグルーピング回数は 2回であることが 分かる。 そこで、 変数のデータベースが検索され、 ラベル X 2が入力信号として 採用される。 従って、 着目しているブロック内の演算は、 (x+ 1) X X 2であ る (かけ算) 。
次に、 変数名 Cデ一夕ベースから出力信号名 t—xが検索される。 入力信号 s 1に 関して 2回目のグルーピングを行っているので、 グルーピング条件が成立してい る。 そこで、 t— χ=(χ+ 1) χχ 2が出力される。 もしこの段階でまだグルーピ ング条件が成立していなければ、 作成された式はデータベースに登録される。
(2) グルーピング処理では、 さらに、 チャート内でラベルが付けられた場所 は、 必ずグループの区切りとされる。 ユーザが付けたラベルはすべて Cコードの 演算式に含まれる。 ユーザがチャート内の適当な場所にラベルを付ければ、 チヤ —卜の構造に対応する構成をもつ Cコ一ドが生成される。 このような処理により、 自動生成される Cコ一ドがさらに読みやすくなる。
例えば、 ユーザが、 デ一夕フローチャートの最初と最後にラベルを付けたとす る。 この場合、 最初と最後の変数を明瞭に示し、 かつ、 処理過程を適当な間隔で 区切られた、 可読性の高い Cコードが自動生成される。
以上より、 本実施形態によれば、 Cコード生成の際に適切なグルーピングを行 うことにより、 自動生成される Cコ一ドの可読性をさらに高めることが可能とな る。 また、 変数名を減らしてメモリを節約することができる。
「車両 E CUへのダウンロード」
図 1を参照して述べたように、 プログラム生成装置 1は、 ユーザの指示に応え、 自動生成した車両弔 Cコードを車両 E CU 2にダウンロードする。 車両 E CU 2 は車両用 Cコ一 を実行して車両モデル装置 3 (DSP) を制御する。 プログラ ム生成装置 1は、 制御の実行の様子をモニタし、 ディスプレイ上に適当なかたち で表示する。 図 26は、 車両 E CU 2にエンジン E CUを適用した場合のモニタ 画面例を示している。 ユーザは、 プログラム生成装置 1を操作して、 車両用 Cコ ―ドの動作検証およびデバッグ作業を行う。
本実施形態では、 バグの少ない適正な車両用 Cコードが生或されている。 車両 用 Cコードと元の制御ロジックが共通している。 さらに、 蚩両用 Cコードの可読 性が高い。 従って、 デバッグ作業を効率よく容易に行うことができる。
以上に説明したように、 本発明によれば、 ユーザが入力した制御仕様に対応す る車両用コードが自動的に生成されるので、 コーディング作業の工数が大幅に削 減される。 入力された制御仕様は、 それ自体がコンピュータ上でシミュレ一ショ ン可能なものであり、 かつ、 車両用コードに変換して車両 E C Uでも使用可能な ものであり、 従って、 デバッグ作業の工数の大幅削減が可能となる。 その結果、 信頼性保証のためにかかる工数が削減され、 さらに、 開発期間の短縮および開発 コス トの低減が可能になる。 特に、 車両制御プログラムの肥大化と複雑化という 背景の下では、 仕様書作成からロジックデバッグまでを支援する本発明の利点が 顕著に得られる。
また、 本発明によれば、 ラベリングやグルーピングを行う適切な Cコード生成 処理により、 可読性の高い車両用コードが自動生成される。 これにより、 デバッ グ作業等の工数をさらに削減することができる。
産業上の利用可能性
以上のように、 本発明に係る車両用プログラム開発支援方法および装置は、 車 両を制御するため:こ車両 E C Uが実行するプログラムの開発作業に利用されるこ とができる。

Claims

請求の範囲
1 . 入力された制御仕様から車両用コードを生成する機能をもつプログラム生成 装置を用いて、 車両制御プログラムを生成するプログラム生成ステップと、 生成された前記車両制御プログラムを車両 E C Uにダウン口一ドするダウン口 ―ドステップと、
前記車両 E C U :こ前記車両制御プログラムを実行させて、 前記車両制御プログ ラムのデバッグを行うデバッグステツプと、
を含む車両用プログラム開発支援方法。
2 . 請求の範囲第 1項に記載の車両用プログラム開発支援方法において、 前記デバッグステップのデバッグ作業は、 前記車両 E C Uが前記車両制御プロ グラムを実行した結果を監視する前記プログラム生成装置上で行われる車両用プ ログラム開発支援方法。
3 . 請求の範囲第 2項に記載の車両用プログラム開発支援方法において、 制御対象の車両をモデル化した車両モデル装置に前記車両 E C Uを接続し、 前 記車両 E C Uに前記車両モデル装置を制御させる制御実行ステップと、
制御実行中の前記車両 E C Uおよび前記車両モデル装置を監視する監視ステツ プと、
を含む車両用プログラム開発支援方法。
4 . 請求の範囲第 3項に記載の車両用プログラム開発支援方法において、 入力された車両仕様に基づいて車両モデルを前記プログラム生成装置上で生成 するモデル生成ステツプと、
前記モデル生成ステップで生成された車両モデルを前記車両モデル装置にダウ ンロードするモデルダウンロードステップと、
を含む車両用プコグラム開発支援方法。 δ . 請求の範囲第 1項〜第 4項のいずれかに記載の車両用プコグラム開発支援方 法において、
前記車両用コードは、 車両 E C Uで処理される整数ロジックに適合するように 一般コードを変形したものである車両用プログラム開発支援方法。
6 · 請求の範囲第 5項に記載の車両用プログラム開発支援方法において、 前記プログラム主成ステップでは、 前記プログラム生成装置に入力された整数 変換条件に従った車両制御プログラムが生成される車両用プログラム開発支援方 法。
7 . 車両の制御仕様を入力する入力手段と、
前記制御仕様に基づいて、 車両制御プログラムの車両用コードを生成するプロ グラム生成手段と、
前記車両制御プログラムを外部の車両 E C Uにダウンロードするダウンロード 手段と、
前記車両 E C Uで前記車両制御プログラムを実行した実行結果を出力する出力 手段と、
を含む車両用プコグラム開発支援装置。
8 . 車両の制御仕様を表すデ一夕フローチャートおよびステートフ口一チヤ一ト を作成するチヤ一ト作成機能と、
作成されたチ—ートに基づいて、 車両 E C Uで処理される整数ロジックで構成 された車両制御プコグラムの車両用コ一ドを生成するプログラムコード生成機能 と、
を有する車両用プログラム開発支援装置。
9 . 請求の範囲第 8項に記載の車両用プログラム開発支援装置において、 物理値に対応する浮動小数点数および浮動小数点数から変換された整数をそれ ぞれ適用して前記デ一タフ口一チヤ一卜のシミユレ一ションを行い、 浮動小数点 数および整数のシミユレーシヨン結果を出力するシミユレーション機能を有する 車両用プログラム開発支援装置。
1 0 . 請求の範囲第 9項に記載の車両用プログラム開発支援装置において、 浮動小数点数および整数を適用したときのシミユレ一シミン結果の相違を判定 可能なように、 整数のシミユレ一シヨン結果から浮動小数点数を逆算した結果を 表示する車両用プログラム開発支援装置。
1 1 . 請求の範囲第 1 0項に記載の車両用プログラム開発支援装置において、 前記デ一夕フローチャートのブロックシンボルに、 浮動小数点数、 整数、 浮動 小数点数から整数への整数変換条件、 および該整数変換条件を用いて浮動小数点 数から整数を逆算した結果、 についての情報をもたせる車両用プログラム開発支
1 2 . 請求の範囲第 1 1項に記載の車両用プログラム開発支援装置において、 前記シミユレーシヨン結果に基づいて前記整数変換条件を調整可能である車両 用プログラム開発支援装置。
1 3 . 請求の範囲第 8項〜第 1 2項のいずれかに記載の車両用プログラム開発支 援装置において、
前記ステートフローチャート上で同一階層の複数の前記データフローチヤ一ト を実行する順番を定義する優先付け機能を有する車両用プログラム開発支援装置
1 4 . 請求の範 E第 8項〜第 1 3項のいずれかに記載の車両 ¾プログラム開発支 援装置において、
前記デ一タフ匚一チャート内の所望のシンボル接続ラインを選択して所望のラ ベルを付けるラベリング機能を有し、
該当個所の変数名として前記ラベルを用いた前記車両用ニードが生成される車 両用プログラム開発支援装置。
1 5 . 請求の範匿第 8項〜第 1 4項のいずれかに記載の車両用プログラム開発支 援装置において、
前記車両用コ一ドを生成するときに、 前記データフローチャート内の複数のブ ロックシンボルに対応する複数の処理をグルーピングするグ几一ビング機能を有 する車両用プログラム開発支援装置。
1 6 . 請求の範囲第 1 5項に記載の車両用プログラム開発支援装置において、 グルーピングされるブロックシンボルの数を規定する所定のグルーピング制限 条件に従ってグルーピングを行う車両用プログラム開発支援装置。
1 7 . 請求の範囲第 1 5項または第 1 6項に記載の車両用プログラム開発支援装 置において、
前記デ一タフ π—チャート内の所望のシンボル接続ラインを選択して所望のラ ベルを付けるラベリング機能を有し、
前記ラベルを けられた箇所が、 グルーピングの区切りとされる車両用プログ ラム開発支援装置:
1 8 . 請求の範 S第 8項〜第 1 7項のいずれかに記載の車両用プログラム開発支 援装置において、
前記プログラ—コ一ド主成機能により、 一般の Cコ一ドを車両 E C Uに適合す るように変形した車両用 Cコードが生成される車両用プログラム開発支援装置。
1 9 . 車両の制 ί£辻様を表すデータフローチヤ一トおよびステートフローチヤ一 トを作成するチ ート作成機能と、
作成されたチ —卜に基づいて、 車両 E C Uで処理される整数ロジックで構成 された車両制御プコグラムの車両用コ一ドを生成するプログラムコード生成機能 と、
をコンビユー?:::実現させるためのプログラムを記録した、 車両用プログラム 開発支援に用いられるコンピュータ読取可能な記録媒体。
PCT/JP1999/003146 1998-07-06 1999-06-14 Procede et appareil pour faciliter le developpement d'un programme d'automobile WO2000002106A1 (fr)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP99925309A EP1111483A4 (en) 1998-07-06 1999-06-14 METHOD AND APPARATUS FOR FACILITATING THE DEVELOPMENT OF AN AUTOMOTIVE PROGRAM

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP10190815A JP2000020291A (ja) 1998-07-06 1998-07-06 車両用プログラム開発支援方法および装置
JP10/190815 1998-07-06

Publications (1)

Publication Number Publication Date
WO2000002106A1 true WO2000002106A1 (fr) 2000-01-13

Family

ID=16264222

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP1999/003146 WO2000002106A1 (fr) 1998-07-06 1999-06-14 Procede et appareil pour faciliter le developpement d'un programme d'automobile

Country Status (3)

Country Link
EP (1) EP1111483A4 (ja)
JP (1) JP2000020291A (ja)
WO (1) WO2000002106A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103455027A (zh) * 2013-08-16 2013-12-18 深圳市元征科技股份有限公司 一种汽车ecu刷写系统及刷写方法
CN109709532A (zh) * 2017-10-26 2019-05-03 福特全球技术公司 基于传感器数据而致动车辆部件的方法和装置
US11496506B2 (en) * 2017-07-03 2022-11-08 Denso Corporation Program generation method and electronic control unit for changing importance of functions based on detected operation state in a vehicle

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3897948B2 (ja) 2000-02-14 2007-03-28 富士通株式会社 支援システムおよび支援プログラムを記録したコンピュータ読み取り可能な記録媒体
AUPQ966400A0 (en) * 2000-08-24 2000-09-21 Xemplex Pty Ltd Method of graphically defining a formula
CN100395715C (zh) 2001-11-30 2008-06-18 富士通天株式会社 微型计算机的逻辑开发装置
JP2003173256A (ja) 2001-12-06 2003-06-20 Denso Corp プログラムコード生成装置及びプログラム
FR2846117B1 (fr) * 2002-10-21 2008-08-22 Renault Sas Procede et dispositif pour synthetiser une architecture electrique
JP4403794B2 (ja) 2003-02-28 2010-01-27 株式会社デンソー 制御プログラムの検査方法及び検査装置及び検査プログラム
EP1530137A1 (en) * 2003-11-10 2005-05-11 Robert Bosch Gmbh Simulation system and computer-implemented method for simulation and verifying a control system
JP4403945B2 (ja) 2003-12-19 2010-01-27 株式会社デンソー 制御プログラムの検査方法及び検査装置及び検査プログラム
JP5040320B2 (ja) * 2007-01-15 2012-10-03 富士電機株式会社 プログラム開発支援装置、プログラム開発支援方法およびプログラム開発支援プログラム
US8161454B2 (en) 2007-01-22 2012-04-17 Ford Motor Company Software architecture for developing in-vehicle software applications
JP2009181446A (ja) 2008-01-31 2009-08-13 Toshiba Corp プログラム生成装置およびブロック線図生成装置
JP5011221B2 (ja) * 2008-06-30 2012-08-29 株式会社日立製作所 コントローラ開発ツールとそれを利用して開発したモータドライブシステムを有する機器
JP2011118637A (ja) * 2009-12-03 2011-06-16 Hitachi Ltd システムテスト仕様生成装置及び試験装置
CN101797907B (zh) * 2010-04-09 2012-05-23 中国科学院电工研究所 一种插头控制车载电控系统程序下载电路
EP2642359A1 (de) * 2012-03-20 2013-09-25 dSPACE digital signal processing and control engineering GmbH Entwicklungseinrichtung und Verfahren zum Erstellen eines Steuergeräteprogramms
CN106292462B (zh) * 2016-10-10 2018-11-23 无锡伟博汽车科技有限公司 一种基于ccp协议的ecu行车记录采集方法
CN109240694B (zh) * 2017-06-07 2023-03-07 上海蔚来汽车有限公司 用于智能驾驶辅助系统控制算法的快速原型开发验证系统及方法
KR102038131B1 (ko) * 2017-09-08 2019-10-31 주식회사 경신 차량용 제어기 소프트웨어 설계 자동화 장치 및 방법
JP7139866B2 (ja) * 2018-10-18 2022-09-21 トヨタ自動車株式会社 車両用調停システム

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01319880A (ja) * 1988-06-20 1989-12-26 Nec Corp 塗りつぶし処理装置
JPH0793137A (ja) * 1994-03-30 1995-04-07 Hitachi Ltd 自動車制御装置とプログラム開発装置

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01319880A (ja) * 1988-06-20 1989-12-26 Nec Corp 塗りつぶし処理装置
JPH0793137A (ja) * 1994-03-30 1995-04-07 Hitachi Ltd 自動車制御装置とプログラム開発装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP1111483A4 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103455027A (zh) * 2013-08-16 2013-12-18 深圳市元征科技股份有限公司 一种汽车ecu刷写系统及刷写方法
US11496506B2 (en) * 2017-07-03 2022-11-08 Denso Corporation Program generation method and electronic control unit for changing importance of functions based on detected operation state in a vehicle
CN109709532A (zh) * 2017-10-26 2019-05-03 福特全球技术公司 基于传感器数据而致动车辆部件的方法和装置

Also Published As

Publication number Publication date
EP1111483A1 (en) 2001-06-27
EP1111483A4 (en) 2006-11-15
JP2000020291A (ja) 2000-01-21

Similar Documents

Publication Publication Date Title
WO2000002106A1 (fr) Procede et appareil pour faciliter le developpement d'un programme d'automobile
US5557774A (en) Method for making test environmental programs
EP1952210A1 (en) A method of modelling the effect of a fault on the behaviour of a system
Haberl et al. Model-level debugging of embedded real-time systems
JP2005078243A (ja) マイコンリソース消費見積もりプログラム、マイコンリソース消費見積もり装置、およびプログラム生成方法
CN110637521B (zh) 一种基于模型仿真的数据实时存储方法和系统
US20170220712A1 (en) Computer-implemented method for simulating a restbus control unit network
Doukidis et al. SIPDES: A simulation program debugger using an expert system
JP2005301568A (ja) 表示情報記憶制御装置および表示情報記憶制御プログラム
Parasch et al. Development and application of a designer oriented cyclic simulator
Luke et al. A commercial off-the-shelf based replacement strategy for aging avionics computers
JP2020144509A (ja) 自動コード生成方法、及び自動コード生成プログラム
EP2148274B1 (en) Controller development tool and motor drive system developed by the tool
US20240184538A1 (en) Method for configuring model components of a system model
Wennberg et al. The use of a virtual system simulator and executable specifications to enhance software validation, verification, and safety assurance
Rauscher A unified approach to microcomputer software development
Sakura et al. The Energy-Based Auto-Verification Focused on Hierarchical Model Structure for Model Based Development
JPH0895817A (ja) 情報処理装置の試験方法
JPH04358232A (ja) 情報処理装置の機能試験方法
CN111737108A (zh) 基于单元测试的测试用例覆盖率合并技术
JPH07253876A (ja) プログラム作成装置
Denert Software engineering: experience and convictions
Gamble et al. Co-modelling of faults and fault tolerance mechanisms
Baldissera et al. The benefits of Software Rapid Prototyping and Automatic Production Code Generation
Kum et al. Model-based automated validation techniques for automotive embedded systems

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): US

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE

DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 1999925309

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 09673504

Country of ref document: US

WWP Wipo information: published in national office

Ref document number: 1999925309

Country of ref document: EP

WWW Wipo information: withdrawn in national office

Ref document number: 1999925309

Country of ref document: EP