CN113867318A - Automatic integration method for hardware-in-loop test engineering of CAN communication controller - Google Patents

Automatic integration method for hardware-in-loop test engineering of CAN communication controller Download PDF

Info

Publication number
CN113867318A
CN113867318A CN202111156818.9A CN202111156818A CN113867318A CN 113867318 A CN113867318 A CN 113867318A CN 202111156818 A CN202111156818 A CN 202111156818A CN 113867318 A CN113867318 A CN 113867318A
Authority
CN
China
Prior art keywords
signal
information
dbc
message
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111156818.9A
Other languages
Chinese (zh)
Other versions
CN113867318B (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.)
Dongfeng Motor Corp
Original Assignee
Dongfeng Motor Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongfeng Motor Corp filed Critical Dongfeng Motor Corp
Priority to CN202111156818.9A priority Critical patent/CN113867318B/en
Publication of CN113867318A publication Critical patent/CN113867318A/en
Application granted granted Critical
Publication of CN113867318B publication Critical patent/CN113867318B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0208Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system
    • G05B23/0213Modular or universal configuration of the monitoring system, e.g. monitoring system having modules that may be combined to build monitoring program; monitoring system that can be applied to legacy systems; adaptable monitoring system; using different communication protocols
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides an automatic integration method of CAN communication controller hardware-in-the-loop test engineering, which comprises the following steps: s1, merging the dbc files; s2, importing and preprocessing files; s3, extracting message information; s4, extracting signal information; s5, data sorting; s6, checking; s7, generating a CAN simulation model; s8, configuring a signal channel; and S9, automatically mapping the signal. According to the invention, under the conditions of related dbc file change and the like under the same project, the HIL test engineering can quickly integrate and respond to the test requirement, and more time is reserved for testing; the integration speed and the accuracy of the HIL test project are improved, and equipment maintenance manpower resources are saved for a development team.

Description

Automatic integration method for hardware-in-loop test engineering of CAN communication controller
Technical Field
The invention belongs to the technical field of hardware-in-loop simulation, and particularly relates to an automatic integration method for a CAN communication controller hardware-in-loop test project.
Background
Before the integrated test is carried out on the whole vehicle, each electric control system can carry out sufficient test verification, such as software unit test, software integration test, software and hardware integration test, system integration test and the like. After the integration of software and Hardware is completed, the method depends on a Test method of the HIL (Hardware In the loop) to a great extent, that is, the developed controller or electric control system is used as a DUT (Device Under Test), and the related electric control system is used as a simulation model and integrated on the HIL Test equipment for testing.
From the automotive industry perspective, HIL testing will be more fully applied in automotive development and the volume will be growing. However, current HIL testing also exposes some problems:
1) the integration period of HIL test equipment is long, and a lot of manual work exists, such as the realization of CAN communication under the HIL environment, the extraction of information from dbc files, the establishment of corresponding simulation models, manual mapping signals and tests.
2) The change of the project causes the change of the dbc file, and the HIL engineering integration needs adaptive adjustment and test.
3) The contradiction between limited human resources and unlimited integration of HIL test engineering.
Disclosure of Invention
The invention aims to provide an automatic integration method of CAN communication controller hardware in-the-loop test engineering, which automatically converts a dbc file into a CAN simulation model and automatically finishes signal mapping, reduces manual operation, improves working efficiency and improves standardization degree.
The technical scheme adopted by the invention is as follows:
an automatic integration method of CAN communication controller hardware in loop test engineering comprises the following steps:
s1, merging dbc files: merging the same field information of a plurality of dbc files together;
s2, file import and preprocessing: importing the merged dbc file in an ASCII file format, deleting empty lines, and spaces at the beginning and the end of each line, and storing the empty lines and the spaces as an array dbc _ info;
in an array dbc _ info, acquiring the line number of a line with the first 4 characters being BO _, and recording the line number as a vector M _ C, wherein the number of the vector M _ C is the number of messages acquired by the merged dbc file; meanwhile, acquiring the line number of the line with the first 4 characters being 'SG _', and recording the line number as a vector S _ C, wherein the number of the vector S _ C is the number of signals acquired by the combined dbc file;
taking out the information of min (M _ C) to max (S _ C) lines from the array dbc _ info, and storing the information as an array analog _ info;
in the array analy _ info, acquiring the line number of a line with the first 4 characters being BO _, and updating a vector M _ C; meanwhile, the line number of the line with the first 4 characters being 'SG _' is obtained, and the vector S _ C is updated;
s3, extracting message information;
s4, extracting signal information;
s5, data sorting: the extracted message information and the extracted signal information are sorted to enable the message information to correspond to the signal information;
s7, generating a CAN simulation model;
s8, configuring a signal channel;
and S9, automatically mapping the signal.
Preferably, the dbc file merge includes:
defining N fields of the dbc file, and establishing N field units, wherein each field unit is used for storing corresponding field information;
searching each dbc file, and merging the rows with the defined fields as the beginning into the corresponding field units;
and after all dbc files are searched, sequentially combining the N field units, writing the combined field information into the txt file, and modifying the file format of the txt file into the dbc file format.
Preferably, the dbc file has 18 fields, which in turn include: VERSION ", NS _, BS _, BU _, VAL _ TABLE _, BO _, SG _, EV _, CM _, BA _ DEF _ EV _, BA _ DEF _ SG _, BA _ DEF _ BO _, BA _ DEF _ BU _, BA _ DEF _ DEF _ DEF _, BA _, VAL _, SIG _ GROUP _.
Preferably, the message information extraction includes:
in the array analog _ info, the characters of M _ C rows are sequentially segmented, the message ID, the message name, the message data length and the message sending node are extracted, and the extracted message ID, the message name, the message data length and the message sending node are stored in 1-4 columns of the M _ C rows of the newly-built array get _ info.
Preferably, the signal information extraction comprises:
in the array analog _ info, the characters of S _ C row are sequentially divided, the signal name, the multiplex code, the start word bit, the data bit number, the data type, the byte order, the coefficient, the offset, the minimum value, the maximum value, the signal unit and the signal receiving node are extracted, and 5 to 16 columns of S _ C row of the newly created array get _ info are stored.
Preferably, the data arrangement comprises:
and assigning blank rows of 1 to 4 columns of the array get _ info as information of 1 to 4 columns of the last M _ C row, and deleting the M _ C row.
Preferably, the method further comprises the steps of:
s6, checking: checking whether the signal value ranges of the messages conflict or not; if the signal value ranges of the messages conflict, generating early warning information; and simultaneously checking the quantity of the messages and the signals of the combined dbc file, comparing the quantity with the quantity of the M _ C, S _ C, and if the quantity is different, indicating that the extracted message information and the extracted signal information are omitted, and generating early warning information.
Preferably, the verifying comprises:
for each message, generating a 0-element matrix of 8 rows and columns of DLC according to the data length DLC of the message;
executing +1 on elements at corresponding positions of the matrix according to the start bit, the data bit number and the byte sequence of the signal;
and when a certain element exceeds 1, early warning is carried out, the signal value range of the message is shown to conflict, and modification is suggested.
Preferably, generating the CAN simulation model comprises:
determining Real _ ECU according to the node name corresponding to the object to be tested in the combined dbc file, and bringing other nodes into Soft _ ECU;
in columns 17 to 19 of the array get _ info, information for generating a CAN simulation model is added: the method comprises the following steps of (1) signal name + unified signal tracing identifier, signal name + unified switching identifier and signal name + unified signal routing identifier;
and respectively establishing subsystems and adding modules and connecting lines at the lowest layer according to the hierarchy information from top to bottom to finish the CANIO simulation model.
Preferably, the signal path arrangement comprises: compiling the generated CAN simulation model, generating a dynamic link library file, loading the dynamic link library file in a test management system, and configuring a channel of a CAN signal in a test project;
the automatic mapping of the signals comprises: and completing the links of the signals from the third-party model to the CAN card to the real _ ECU and from the real _ ECU to the Bus to the third-party model based on the grouping of the signals, the uniform signal tracing identifier and the uniform signal routing identifier.
The invention has the beneficial effects that:
1) under the conditions of realizing related dbc file change under the same project and the like, the HIL test engineering quickly integrates and responds to the test requirement, and more time is reserved for testing;
2) the integration speed and the correctness of the HIL test project are improved;
3) equipment maintenance human resources are saved for development teams.
Drawings
Fig. 1 is a schematic diagram of software and hardware architecture of the HIL test system.
FIG. 2 is a flow chart of an automated integration method of CAN communication controller hardware in the loop test engineering.
FIG. 3 is a diagram illustrating file import and preprocessing.
Fig. 4 is a schematic diagram of message information extraction.
Fig. 5 is a schematic diagram of signal information extraction.
Fig. 6 is a schematic diagram of data collation.
Fig. 7 is a 0-element matrix diagram.
FIG. 8 is a diagram of information added to generate a CAN simulation model.
FIG. 9 is a schematic diagram of generating a CAN simulation model, signal channel configuration and signal auto-mapping.
Detailed Description
The invention will be further described with reference to the accompanying drawings in which:
fig. 1 is a schematic diagram of software and hardware architecture of the HIL test system. As shown in fig. 1, the test management system includes a third-party model, such as a scene and vehicle dynamics module, a digital/analog hard-line signal, and the like; the communication simulation model is mainly used for establishing a CAN communication channel according to input and output messages and signals of a DUT (device under test), and establishing logic connection between a simulation model of a related electric control system and the DUT; the input and output of the communication simulation model are mapped to a CAN card by matching with NI-XNET hardware (the CAN card, namely a communication board card) and the CAN wiring harness, and the physical connection between the simulation model of the related electric control system and a DUT is established; the communication simulation model is required to make clear the number of CAN channels according to a CAN network topological graph of a DUT, each channel is matched with one DBC file, and a submodule of the communication simulation model is generated.
The bus protocol types in the automobile industry are more, such as CAN, LIN, flexray, Ethernet, most and the like, but the CAN is the most widely applied, so the invention focuses on HIL test of ECU of CAN bus communication; the general scheme is optimized, and comprises the following steps:
1) automation, namely acquiring messages and signals received by a DUT and ECU node information thereof, and messages and signals sent by the DUT and the ECU node information thereof from a dbc file which is input as necessary; and the method comprises the steps of dbc file format standardization inspection, information integrity acquisition and correctness verification; problems 1 and 2 of the background art are solved;
2) the CANIOModel is automatically generated, each message is a subsystem, and an interface for converting a physical value into a binary value is reserved for each signal, so that safety algorithms such as CRC (cyclic redundancy check) and the like are conveniently performed; problems 1 and 2 of the background art are solved;
3) automatically establishing signal mapping; problem 1 of the background art is solved;
4) automatic verification and report output of signal mapping; problem 3 of the background art is solved.
The automatic integration method of the CAN communication controller hardware-in-loop test engineering, as shown in FIG. 2, comprises the following steps:
s1 merging DBC files
Dbc _ head { 'VERSION' "; 'NS _'; 'BS _'; BU _:'; 'VAL _ TABLE _'; 'BO _'; 'SG _'; 'EV _'; 'CM _'; 'BA _ DEF _ EV'; 'BA _ DEF _ SG _'; 'BA _ DEF _ BO _'; 'BA _ DEF _ BU _'; 'BA _ DEF _'; 'BA _ DEF _ DEF'; 'BA _'; 'VAL _'; 'SIG _ GROUP _'; totaling 18 fields;
newly building 18 blank cells: cell _ VERSION, cell _ NS _, cell _ BS _, cell _ BU _, cell _ VAL _ TABLE _, cell _ BO _, cell _ SG _, cell _ EV _, cell _ CM _, cell _ BA _ DEF _ EV _, cell _ BA _ DEF _ SG _, cell _ BA _ DEF _ BO _, cell _ BA _ DEF _ BU _, cell _ BA _ cell _ VAL _, cell _ SIG _ GROUP _, for storing 18-segment information;
for each field, merging the rows beginning with the search field into the corresponding cell (for example, for the dbc to be merged, the rows beginning with VAL _ TABLE are retrieved, and all the rows are merged into the cell _ VAL _ TABLE);
sequentially combining the 18 cells after the information retrieval is completed;
and writing the merged cell into txt, and modifying the txt suffix into ". dbc", namely completing the merging of the dbc file.
S2, file import and preprocessing
As shown in fig. 3, the dbc file is imported in ASCII file format (multiple selection is possible, and each selected file is processed according to the method of the present invention), blank spaces at the beginning and end of each line are deleted (format normalization is possible and meaningless information is avoided to be processed), and the blank spaces are saved as character cell array dbc _ info;
dbc _ info, obtaining the line number of the line with the first 4 characters being BO _, marking as a vector M _ C, wherein the vector length is the number of the messages obtained by the dbc file;
dbc _ info, acquiring the line number of the line with the first 4 characters being 'SG _', recording the line number as a vector S _ C, wherein the length of the vector is the number of signals acquired by the dbc file;
taking out the information of the section from min (M _ C) to max (S _ C) in the array dbc _ info, and storing the information as cell array analy _ info;
analy _ info, acquiring the line number of the line with the first 4 characters being BO _, and updating the vector M _ C;
analy _ info, acquiring the line number of the line of which the first 4 characters are 'SG _', and updating a vector S _ C;
and creating a blank cell array get _ info.
S3, message information extraction
As shown in FIG. 4, the character string of the analy _ info, M _ C line is first replaced with a space ("); recognizing the continuous spaces of the replaced character strings as one space for segmentation to obtain 5 character strings; taking the 2 nd to 5 th to obtain 4 character strings of a message ID, a message name, a message data length and a message sending node; store into get _ info M _ C row, columns 1-4.
S4, signal information extraction
As shown in FIG. 5, the characters of the analy _ info, S _ C line are split first by ": to obtain two character strings, a first character string Str1 and a second character string Str 2;
str1, where the continuous space is recognized as a space and divided into character string arrays, from 2 nd to last, written into the 5 th or 5-6 th column of get _ info (according to the character string array length);
example 1:
SG_multi_sig m0:2|8@1+(1,0)[0|255]""node1,node2
splitting in the mode of 'I' to obtain two character strings, namely a first character string Str11 and a second character string Str 12; str11-SG _ multi _ sig m 0;
identifying the continuous blank as a blank to be divided to obtain a character string array [ SG _; multi _ sig; m0], length 3.
Example 2:
SG_normal_signal:0|8@1+(1,0)[0|255]""ADAS
splitting in the mode of 'I' to obtain two character strings, namely a first character string Str11 and a second character string Str 12; str11-SG _ normal _ signal
Identifying the continuous blank as a blank to be divided to obtain a character string array [ SG _; normal _ signal ], length 2.
Str2, the continuous space is recognized as a space and divided, and 5 character strings Str21, Str22, Str23, Str24 and Str25 are obtained;
str21, divided by "@" to obtain two character strings Str211, Str 212;
str211, which is divided by "|" to obtain the start bit and data bit number, and is written into the 7 th and 8 th columns of get _ info;
str212, replacing the last character with the following correspondence, to obtain the data type of the signal, and writing the data type into the 9 th column of get _ info;
str212, which takes the second last character, replaces it with the following correspondence 0 ═ little endian and 1 ═ big endian to obtain the byte order of the signal, and writes it into the 10 th column of get _ info;
str22, dividing by "(") "after" dividing ", taking out the number to obtain the coefficient and offset, and writing in the 11 th and 12 th columns of get _ info;
str23, dividing with "|", then dividing with "[" ] ", taking out the number to obtain the minimum value and the maximum value, and writing into the 13 th and 14 th columns of get _ info;
str24, Signal Unit, written in get _ info column 15;
str25, signal receiving node, writes to get _ info column 16.
S5, data arrangement
The columns of get _ info, 1-4 add message related information to the signal; the empty rows, columns 1-4, between the M _ C rows are assigned as the previous M _ C rows, columns 1-4. The top of FIG. 6 is before sorting, the middle graph is after assigning, and the bottom graph is for get _ info delete M _ C line.
S6, checking
As shown in fig. 7, for each packet, a 0-element matrix Array _ packet sequence number of DLC row and 8 columns is generated according to DLC (packet data length);
executing +1 on the matrix elements according to the start bit, the data bit number and the byte sequence of the signal;
traversing all signals under the message;
and when a certain element exceeds 1, early warning is carried out, the signal value range of the message is shown to conflict, and modification is suggested.
Example (c):
BO_186ACU_Crash:7ACU
SG_ACU_CheckSum_ACU:44|8@0+(1,0)[0|255]""NODE1
SG_ACU_RollingCount_ACU:47|4@0+(1,0)[0|15]""NODE1
the ID is the message ACU _ Crash of 186, DLC is 7-generate the 0 element matrix Array _186 of 7 rows, 8 columns;
the first signal ACU _ CheckSum _ ACU, @0 signal sequence is big end sequence, the start bit is 44 ═ 5 × 8+4, it occupies Array _186 line 5+1 ═ 6, the 4+1 ═ 5 positions start 4 positions to the left;
the second signal ACU _ RollingCount _ ACU, @0 signal sequence is big end sequence, the start bit is 41 ═ 5 × 8+1, the Array _186 line 5+1 ═ 6 is occupied, the 1+1 ═ 2 positions start 4 positions to the left;
Figure BDA0003288914650000071
and at the positions of 7 rows and 4 columns, the element value exceeds 1, the signal matrix design specification is not met, and early warning is performed.
And the dbc editor opens the dbc file, checks the number of messages and signals of the dbc file, compares the number of messages and signals with the length of the M _ C, S _ C, and if the difference exists, the information extracted from the dbc file is omitted, and early warning information is generated.
S7, generating CAN simulation model
And determining the Real _ ECU according to the node name corresponding to the DUT in the dbc file. This identifier may provide an aid to signal mapping. Such as: the DUT is ADAS, then Real _ ECU is 'ADAS'.
Other nodes in the dbc file are brought into the Soft _ ECU array;
get _ info, column 17, 18, 19, add information to generate a CAN simulation model; correspondingly, as shown in fig. 8, two cases:
the sending node of the signal is a Soft _ ECU, and respectively comprises a signal name + a unified signal tracing identifier (such as a _FromSoft' + sending node), a signal name + a unified switching identifier (such as a _Valueswitch), and a signal name + a unified signal routing identifier (such as a _ToBus);
secondly, the sending node of the signal is Real _ ECU, and the sending node of the signal is respectively a signal name + a unified signal tracing identifier (such as _FromBus), _ a signal name + a unified switching identifier (such as _ValueSwitch), "_ a signal name + a unified signal routing identifier (such as _ToReal" + receiving node).
And respectively establishing subsystems from top to bottom according to the level information, and adding modules and connecting lines to the lowest layer to finish the CANIO simulation model.
S8, signal path configuration
As shown in fig. 9, the generated CAN simulation model is compiled, a dynamic link library file is generated, and then the dynamic link library file is loaded in the test management system, and a channel of the CAN signal in the test engineering is configured.
S9, automatic mapping of signal
And completing the links of the signals from the third-party model to the CAN card to the real _ ECU and from the real _ ECU to the Bus to the third-party model based on the grouping of the signals, the uniform signal tracing identifier and the uniform signal routing identifier.
In the specific implementation aspect, the method is divided into three parts:
the output of the scene and vehicle dynamics module-the input of the communication simulation model;
output of the communication simulation model-input of the communication board card;
output of the communication board card-input of the scene and vehicle dynamics module.
Several key points for establishing automatic mapping:
tracing a matrix: dbc files
Figure BDA0003288914650000081
Two channel tables CANIOModel _ channel XNET _ channel
② uniform identifier MDLSSoft ECUDataToBus
Third message name
Fourthly, name of signal
Outputting a communication simulation model: Targets/controllers/Simuling
Models/Models/CANIOModel/Outports/CAN2Chassi_canio/MDLSoftECUDataToBus/EPS/EPS2/EPS_SteerintTorqueSensorSt_ToBus
Inputting the communication board card:
Targets/Controller/Hardware/Chassis/NI-XNET/CAN/CAN2Chassi_xnet/Outgoing/Cyclic/EPS2(378)/EPS_SteerintTorqueSensorSt
s10, automatic verification of signal mapping
And acquiring the channels configured in the S8, assigning values one by one, and comparing the values with the acquired CAN bus values to finish checking.
For ease of understanding, a dbc file is attached:
Figure BDA0003288914650000091
Figure BDA0003288914650000101
Figure BDA0003288914650000111
in summary, the invention automatically acquires the message, the signal and the ECU node information thereof received by the DUT, and the message, the signal and the ECU node information thereof sent by the DUT from the dbc file; and the method comprises the steps of dbc file format standardization inspection, information integrity acquisition and correctness verification; a CAN simulation model is automatically generated, each message is a subsystem, and an interface for converting a physical value into a binary value is reserved in each signal, so that safety algorithms such as CRC (cyclic redundancy check) and the like are conveniently performed; automatically establishing signal mapping; automated verification of signal mapping and reporting output.
It will be understood by those skilled in the art that the foregoing is merely a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included within the scope of the present invention.

Claims (10)

1. An automatic integration method of CAN communication controller hardware in loop test engineering is characterized by comprising the following steps:
s1, merging dbc files: merging the same field information of a plurality of dbc files together;
s2, file import and preprocessing: importing the merged dbc file in an ASCII file format, deleting empty lines, and spaces at the beginning and the end of each line, and storing the empty lines and the spaces as an array dbc _ info;
in an array dbc _ info, acquiring the line number of a line with the first 4 characters being BO _, and recording the line number as a vector M _ C, wherein the number of the vector M _ C is the number of messages acquired by the merged dbc file; meanwhile, acquiring the line number of the line with the first 4 characters being 'SG _', and recording the line number as a vector S _ C, wherein the number of the vector S _ C is the number of signals acquired by the combined dbc file;
taking out the information of min (M _ C) to max (S _ C) lines from the array dbc _ info, and storing the information as an array analog _ info;
in the array analy _ info, acquiring the line number of a line with the first 4 characters being BO _, and updating a vector M _ C; meanwhile, the line number of the line with the first 4 characters being 'SG _' is obtained, and the vector S _ C is updated;
s3, extracting message information;
s4, extracting signal information;
s5, data sorting: the extracted message information and the extracted signal information are sorted to enable the message information to correspond to the signal information;
s7, generating a CAN simulation model;
s8, configuring a signal channel;
and S9, automatically mapping the signal.
2. The method of claim 1 wherein dbc file consolidation comprises:
defining N fields of the dbc file, and establishing N field units, wherein each field unit is used for storing corresponding field information;
searching each dbc file, and merging the rows with the defined fields as the beginning into the corresponding field units;
and after all dbc files are searched, sequentially combining the N field units, writing the combined field information into the txt file, and modifying the file format of the txt file into the dbc file format.
3. The method of claim 2 wherein the dbc file has 18 fields, comprising in sequence: VERSION ", NS _, BS _, BU _, VAL _ TABLE _, BO _, SG _, EV _, CM _, BA _ DEF _ EV _, BA _ DEF _ SG _, BA _ DEF _ BO _, BA _ DEF _ BU _, BA _ DEF _ DEF _ DEF _, BA _, VAL _, SIG _ GROUP _.
4. The method of claim 1, wherein the message information extraction comprises:
in the array analog _ info, the characters of M _ C rows are sequentially segmented, the message ID, the message name, the message data length and the message sending node are extracted, and the extracted message ID, the message name, the message data length and the message sending node are stored in 1-4 columns of the M _ C rows of the newly-built array get _ info.
5. The method of claim 4 wherein the signal information extraction comprises:
in the array analog _ info, the characters of S _ C row are sequentially divided, the signal name, the multiplex code, the start word bit, the data bit number, the data type, the byte order, the coefficient, the offset, the minimum value, the maximum value, the signal unit and the signal receiving node are extracted, and 5 to 16 columns of S _ C row of the newly created array get _ info are stored.
6. The method of claim 5 wherein the data grooming comprises:
and assigning blank rows of 1 to 4 columns of the array get _ info as information of 1 to 4 columns of the last M _ C row, and deleting the M _ C row.
7. The method of claim 1 or 6 for automated integration of CAN communication controller hardware in a ring test project, further comprising the steps of:
s6, checking: checking whether the signal value ranges of the messages conflict or not; if the signal value ranges of the messages conflict, generating early warning information; and simultaneously checking the quantity of the messages and the signals of the combined dbc file, comparing the quantity with the quantity of the M _ C, S _ C, and if the quantity is different, indicating that the extracted message information and the extracted signal information are omitted, and generating early warning information.
8. The method of claim 7 wherein the verification comprises:
for each message, generating a 0-element matrix of 8 rows and columns of DLC according to the data length DLC of the message;
executing +1 on elements at corresponding positions of the matrix according to the start bit, the data bit number and the byte sequence of the signal;
and when a certain element exceeds 1, early warning is carried out, the signal value range of the message is shown to conflict, and modification is suggested.
9. The method of claim 6 wherein generating a CAN simulation model comprises:
determining Real _ ECU according to the node name corresponding to the object to be tested in the combined dbc file, and bringing other nodes into Soft _ ECU;
in columns 17 to 19 of the array get _ info, information for generating a CAN simulation model is added: the method comprises the following steps of (1) signal name + unified signal tracing identifier, signal name + unified switching identifier and signal name + unified signal routing identifier;
and respectively establishing subsystems and adding modules and connecting lines at the lowest layer according to the hierarchy information from top to bottom to finish the CANIO simulation model.
10. The method of claim 9 wherein configuring the signal path comprises: compiling the generated CAN simulation model, generating a dynamic link library file, loading the dynamic link library file in a test management system, and configuring a channel of a CAN signal in a test project;
the automatic mapping of the signals comprises: and completing the links of the signals from the third-party model to the CAN card to the real _ ECU and from the real _ ECU to the Bus to the third-party model based on the grouping of the signals, the uniform signal tracing identifier and the uniform signal routing identifier.
CN202111156818.9A 2021-09-30 2021-09-30 Automatic integration method for hardware-in-loop test engineering of CAN communication controller Active CN113867318B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111156818.9A CN113867318B (en) 2021-09-30 2021-09-30 Automatic integration method for hardware-in-loop test engineering of CAN communication controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111156818.9A CN113867318B (en) 2021-09-30 2021-09-30 Automatic integration method for hardware-in-loop test engineering of CAN communication controller

Publications (2)

Publication Number Publication Date
CN113867318A true CN113867318A (en) 2021-12-31
CN113867318B CN113867318B (en) 2023-07-18

Family

ID=79000962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111156818.9A Active CN113867318B (en) 2021-09-30 2021-09-30 Automatic integration method for hardware-in-loop test engineering of CAN communication controller

Country Status (1)

Country Link
CN (1) CN113867318B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114460925A (en) * 2022-01-29 2022-05-10 重庆长安新能源汽车科技有限公司 Automatic HIL (high-level intelligence) testing method for CAN (controller area network) interface of electric automobile controller
CN114785634B (en) * 2022-04-30 2023-05-02 重庆长安新能源汽车科技有限公司 Implementation method for CRC (cyclic redundancy check) of data transmitted by CAN (controller area network) communication system in HIL (high-performance liquid chromatography) test process
CN116125950A (en) * 2023-01-19 2023-05-16 重庆赛力斯新能源汽车设计院有限公司 Automatic generation method, equipment and medium for hardware-in-loop simulation test tool
CN117472035A (en) * 2023-12-27 2024-01-30 东方电气风电股份有限公司 Verification method for software and hardware of main control system
CN117749451A (en) * 2023-12-12 2024-03-22 镁佳(北京)科技有限公司 Method, device and system for verifying correctness of ADAS signal

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100077376A1 (en) * 2008-08-04 2010-03-25 Avl List Gmbh Creating an executable configuration
CN102565683A (en) * 2010-12-31 2012-07-11 中国航空工业集团公司第六三一研究所 Generation and verification method of test vector
US20130035925A1 (en) * 2010-02-12 2013-02-07 Springsoft Usa, Inc. Method and apparatus for versatile controllability and observability in prototype system
WO2015106605A1 (en) * 2014-01-14 2015-07-23 国家电网公司 Method for testing station level of intelligent substation
CN106330618A (en) * 2016-09-19 2017-01-11 中国第汽车股份有限公司 Gateway routing automatic test system and test method based on CAN/LIN/MOST hybrid buses
CN106484616A (en) * 2016-09-30 2017-03-08 北京新能源汽车股份有限公司 A kind of automatic interface testing method of entire car controller and device
CN107132832A (en) * 2016-02-29 2017-09-05 株洲南车时代电气股份有限公司 A kind of DBC document analysis and its Programming Methodology based on CAN communication
KR101797005B1 (en) * 2017-03-09 2017-12-13 슈어소프트테크주식회사 Method for producing test case by vehicle type
CN108415408A (en) * 2018-03-16 2018-08-17 宁波杉杉汽车有限公司 Automobile packet parsing based on CAN communication and method for diagnosing faults
US10133837B1 (en) * 2017-01-13 2018-11-20 Cadence Design Systems, Inc. Method and apparatus for converting real number modeling to synthesizable register-transfer level emulation in digital mixed signal environments
CN108965274A (en) * 2018-06-29 2018-12-07 威马智慧出行科技(上海)有限公司 The analysis method and device of DBC file
CN109634258A (en) * 2018-11-30 2019-04-16 北京新能源汽车股份有限公司 It is a kind of for the bus message method of calibration of hardware-in―the-loop test, apparatus and system
CN111817938A (en) * 2020-07-15 2020-10-23 上汽通用五菱汽车股份有限公司 Method, system and storage medium for compiling automobile CAN communication matrix
CN112378420A (en) * 2020-10-30 2021-02-19 北斗星通智联科技有限责任公司 Signal simulation method and system for automobile navigation test and electronic equipment
CN113189970A (en) * 2021-05-10 2021-07-30 东风康明斯发动机有限公司 Hardware-in-loop automatic test method and system of CAN bus controller and storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100077376A1 (en) * 2008-08-04 2010-03-25 Avl List Gmbh Creating an executable configuration
US20130035925A1 (en) * 2010-02-12 2013-02-07 Springsoft Usa, Inc. Method and apparatus for versatile controllability and observability in prototype system
CN102565683A (en) * 2010-12-31 2012-07-11 中国航空工业集团公司第六三一研究所 Generation and verification method of test vector
WO2015106605A1 (en) * 2014-01-14 2015-07-23 国家电网公司 Method for testing station level of intelligent substation
CN107132832A (en) * 2016-02-29 2017-09-05 株洲南车时代电气股份有限公司 A kind of DBC document analysis and its Programming Methodology based on CAN communication
CN106330618A (en) * 2016-09-19 2017-01-11 中国第汽车股份有限公司 Gateway routing automatic test system and test method based on CAN/LIN/MOST hybrid buses
CN106484616A (en) * 2016-09-30 2017-03-08 北京新能源汽车股份有限公司 A kind of automatic interface testing method of entire car controller and device
US10133837B1 (en) * 2017-01-13 2018-11-20 Cadence Design Systems, Inc. Method and apparatus for converting real number modeling to synthesizable register-transfer level emulation in digital mixed signal environments
KR101797005B1 (en) * 2017-03-09 2017-12-13 슈어소프트테크주식회사 Method for producing test case by vehicle type
CN108415408A (en) * 2018-03-16 2018-08-17 宁波杉杉汽车有限公司 Automobile packet parsing based on CAN communication and method for diagnosing faults
CN108965274A (en) * 2018-06-29 2018-12-07 威马智慧出行科技(上海)有限公司 The analysis method and device of DBC file
CN109634258A (en) * 2018-11-30 2019-04-16 北京新能源汽车股份有限公司 It is a kind of for the bus message method of calibration of hardware-in―the-loop test, apparatus and system
CN111817938A (en) * 2020-07-15 2020-10-23 上汽通用五菱汽车股份有限公司 Method, system and storage medium for compiling automobile CAN communication matrix
CN112378420A (en) * 2020-10-30 2021-02-19 北斗星通智联科技有限责任公司 Signal simulation method and system for automobile navigation test and electronic equipment
CN113189970A (en) * 2021-05-10 2021-07-30 东风康明斯发动机有限公司 Hardware-in-loop automatic test method and system of CAN bus controller and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
周琪: ""基于Vector工具链的CAN总线自动化测试"", 《汽车实用技术》, no. 10, pages 110 - 113 *
王凌: ""CAN总线控制器模型的快速测试"", 《组合机床与自动化加工技术》, no. 10, pages 28 - 32 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114460925A (en) * 2022-01-29 2022-05-10 重庆长安新能源汽车科技有限公司 Automatic HIL (high-level intelligence) testing method for CAN (controller area network) interface of electric automobile controller
CN114460925B (en) * 2022-01-29 2023-05-23 重庆长安新能源汽车科技有限公司 Automatic test method for CAN interface HIL of electric automobile controller
CN114785634B (en) * 2022-04-30 2023-05-02 重庆长安新能源汽车科技有限公司 Implementation method for CRC (cyclic redundancy check) of data transmitted by CAN (controller area network) communication system in HIL (high-performance liquid chromatography) test process
CN116125950A (en) * 2023-01-19 2023-05-16 重庆赛力斯新能源汽车设计院有限公司 Automatic generation method, equipment and medium for hardware-in-loop simulation test tool
CN117749451A (en) * 2023-12-12 2024-03-22 镁佳(北京)科技有限公司 Method, device and system for verifying correctness of ADAS signal
CN117472035A (en) * 2023-12-27 2024-01-30 东方电气风电股份有限公司 Verification method for software and hardware of main control system
CN117472035B (en) * 2023-12-27 2024-03-08 东方电气风电股份有限公司 Verification method for software and hardware of main control system

Also Published As

Publication number Publication date
CN113867318B (en) 2023-07-18

Similar Documents

Publication Publication Date Title
CN113867318B (en) Automatic integration method for hardware-in-loop test engineering of CAN communication controller
US7865344B2 (en) Method and system for automatically generating a global simulation model of an architecture
CN113189970B (en) Hardware-in-loop automatic test method and system of CAN bus controller and storage medium
US4922445A (en) Logic circuit simulation method
CN104699613B (en) A kind of spacecraft-testing demand automatic creation system and its method
CN110968509B (en) Method and system for batch customizing of variables
CN112085865B (en) Aerial real-time early warning system based on flight data
CN111176991B (en) Automatic generation method for embedded software interface use cases
CN116415206B (en) Operator multiple data fusion method, system, electronic equipment and computer storage medium
CN116049014A (en) AMBA bus verification platform generation method and device
CN113505078B (en) Configuration file updating method, device, equipment and storage medium
CN114492258A (en) Random constraint and coverage group synchronization method
CN114527991A (en) Code scanning method, device, equipment, storage medium and program product
CN112769767B (en) Vehicle-mounted Ethernet SOME/IP protocol data analysis method, device, medium and system
CN111045948A (en) Method, apparatus and storage medium for checking interface signal between modules
CN112861455B (en) FPGA modeling verification system and method
CN111142013B (en) MAX7000 series CPLD (Complex programmable logic device) based logic reduction method
CN103164526A (en) Generation method and generation device of test report
Rhein et al. A Holistic Approach to Model-Based Avionics Systems Development
CN113239651A (en) Artificial intelligence implementation method and system for circuit design
CN113485919A (en) Test method, test device and computer readable storage medium
KR20220099745A (en) A spatial decomposition-based tree indexing and query processing methods and apparatus for geospatial blockchain data retrieval
CN113360388B (en) Method for integrally managing test process of unmanned aerial vehicle ground station software
CN114448851B (en) Automatic data testing method and system
CN117032175A (en) Automatic test method and system for vehicle-mounted controller

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant