CN113867318B - 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 PDFInfo
- Publication number
- CN113867318B CN113867318B CN202111156818.9A CN202111156818A CN113867318B CN 113867318 B CN113867318 B CN 113867318B CN 202111156818 A CN202111156818 A CN 202111156818A CN 113867318 B CN113867318 B CN 113867318B
- Authority
- CN
- China
- Prior art keywords
- signal
- information
- dbc
- info
- 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.)
- Active
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 48
- 238000004891 communication Methods 0.000 title claims abstract description 28
- 230000010354 integration Effects 0.000 title claims abstract description 23
- 238000000034 method Methods 0.000 title claims abstract description 18
- 238000004088 simulation Methods 0.000 claims abstract description 31
- 238000013507 mapping Methods 0.000 claims abstract description 16
- 238000007781 pre-processing Methods 0.000 claims abstract description 5
- 239000013598 vector Substances 0.000 claims description 18
- 239000011159 matrix material Substances 0.000 claims description 10
- 238000000605 extraction Methods 0.000 claims description 7
- 238000012986 modification Methods 0.000 claims description 4
- 230000004048 modification Effects 0.000 claims description 4
- 230000008859 change Effects 0.000 abstract description 3
- 238000011161 development Methods 0.000 abstract description 2
- 238000012423 maintenance Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 9
- 238000012795 verification Methods 0.000 description 6
- 102100034112 Alkyldihydroxyacetonephosphate synthase, peroxisomal Human genes 0.000 description 3
- 101000799143 Homo sapiens Alkyldihydroxyacetonephosphate synthase, peroxisomal Proteins 0.000 description 3
- 238000000848 angular dependent Auger electron spectroscopy Methods 0.000 description 3
- 230000011218 segmentation Effects 0.000 description 3
- 108010076504 Protein Sorting Signals Proteins 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000008676 import Effects 0.000 description 2
- 238000010606 normalization Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000009472 formulation Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 101150035983 str1 gene Proteins 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B23/00—Testing or monitoring of control systems or parts thereof
- G05B23/02—Electric testing or monitoring
- G05B23/0205—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
- G05B23/0208—Electric 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/0213—Modular 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
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total 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 loop test engineering, which comprises the following steps: s1, merging dbc files; s2, importing and preprocessing a file; s3, extracting message information; s4, extracting signal information; s5, data arrangement; s6, checking; s7, generating a CAN simulation model; s8, configuring a signal channel; s9, signal automatic mapping. 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 the test; the integration speed and the accuracy of HIL test engineering are improved, and the manpower resources for equipment maintenance are saved for development teams.
Description
Technical Field
The invention belongs to the technical field of hardware-in-loop simulation, and particularly relates to an automatic integration method of CAN communication controller hardware-in-loop test engineering.
Background
Before the integrated into the whole vehicle, each electric control system can perform 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 is greatly dependent on the testing method of the HIL (Hardware In the loop, namely hardware in the loop), namely, a developed controller or an electric control system is used as a DUT (Device Under Test, object to be tested), and a related electric control system is used as a simulation model and is integrated on HIL testing equipment for testing.
From the automotive industry, the HIL test will find more full use in automobile research and development, and the volume will grow increasingly. However, current HIL tests also expose some problems:
1) The HIL test equipment has long integration period, and has a lot of manual work, such as realizing CAN communication under the HIL environment, extracting information from dbc files, establishing a corresponding simulation model, manually mapping signals and testing.
2) The change of the project causes the change of dbc file, and the HIL engineering integration needs to be adaptively adjusted and tested.
3) A contradiction between limited human resources and unlimited HIL test engineering integration work.
Disclosure of Invention
The invention aims to provide an automatic integration method of CAN communication controller hardware in-loop test engineering, which automatically converts dbc files into CAN simulation models and automatically completes 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 importing and preprocessing: importing the combined dbc file in an ASCII file format, deleting blank lines, and blank spaces at the beginning and the tail of each line, and storing the blank lines into a plurality of groups of dbc_info;
in the array dbc_info, acquiring row numbers of rows with the first 4 characters of BO_, and marking the row numbers as vectors M_C, wherein the number of the vectors M_C is the number of messages acquired by the combined dbc files; meanwhile, the line numbers of the first 4 lines with the character of SG_ are acquired and marked as a vector S_C, and the number of the vector S_C is the number of signals acquired by the combined dbc file;
in the array dbc_info, the information of the rows from min (M_C) to max (S_C) is fetched and stored as the array analysis_info;
in the array analysis_info, acquiring the row number of the row with the first 4 characters of BO_, and updating the vector M_C; meanwhile, acquiring row numbers of rows with the first 4 characters being SG_, and updating a vector S_C;
s3, extracting message information;
s4, extracting signal information;
s5, data arrangement: the extracted message information and the signal information are arranged, so that the message information corresponds to the signal information;
s7, generating a CAN simulation model;
s8, configuring a signal channel;
s9, signal automatic mapping.
Preferably, dbc file merging 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 beginning with the defined field into a corresponding field unit;
after the retrieval of all dbc files is completed, the N field units are sequentially combined, the combined field information is written into the txt file, and the file format of the txt file is modified into a 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_, BA_DEF_DEF_, BA_, VAL_, SIG_GROUP_.
Preferably, the message information extraction includes:
in the array analysis_info, the characters of the M_C rows are sequentially segmented, the message ID, the message name, the message data length and the message sending node are extracted, and 1 to 4 columns of the M_C rows of the newly built array get_info are stored.
Preferably, the signal information extraction includes:
in the array analysis_info, the characters of the S_C line are sequentially segmented, and 5 to 16 columns of the S_C line of the newly built array get_info are extracted, wherein the signal name, the multiplexing code, the initial 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 stored.
Preferably, the data arrangement comprises:
the 1 to 4 column blank rows of the array get_info are assigned as 1-4 column information of the last M_C row, and the M_C row is deleted.
Preferably, the method further comprises the step of:
s6, checking: checking whether signal value fields of all messages conflict or not; if the signal value fields of the messages conflict, early warning information is generated; and checking the number of the messages and signals of the combined dbc file, comparing the number with the number of M_ C, S _C, and if the difference exists, indicating that the extracted message information and signal information are missing, and generating early warning information.
Preferably, the checking comprises:
for each message, generating a 0 element matrix of DLC row 8 columns according to the data length DLC of the message;
executing +1 on the element at the corresponding position of the matrix according to the initial bit, the data bit number and the byte order of the signal;
and when a certain element exceeds 1, early warning is carried out, the signal value range conflict of the message is represented, and modification is suggested.
Preferably, generating the CAN simulation model includes:
determining a real_ECU according to node names corresponding to the detected objects in the merged dbc file, wherein other nodes are incorporated into the Soft_ECU;
in columns 17 to 19 of the array get_info, add information to generate the CAN simulation model: signal name + unified signal tracing identification, signal name + unified switching identification, signal name + unified signal routing identification;
and respectively establishing subsystems, a lowest layer adding module and a connecting line from top to bottom according to the hierarchy information 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 in a test management system, and configuring a channel of a CAN signal in a test project;
the automatic mapping of signals includes: and completing the links of the signals from the third party model to the CAN card to the real-ECU and the real-ECU to the Bus to the third party model based on the grouping of the signals, the unified signal tracing identification and the unified signal routing identification.
The beneficial effects of the invention are as follows:
1) Under the conditions of changing relevant dbc files and the like under the same project, the HIL test engineering rapidly integrates and responds to the test requirement, and more time is reserved for the test;
2) The integration speed and the accuracy of HIL test engineering are improved;
3) And the manpower resources are saved for equipment maintenance of development teams.
Drawings
FIG. 1 is a schematic diagram of the hardware and software architecture of the HIL test system.
FIG. 2 is a flow chart of an automated integration method of CAN communication controller hardware in loop test engineering.
FIG. 3 is a schematic diagram of file import and preprocessing.
Fig. 4 is a schematic diagram of message information extraction.
Fig. 5 is a signal information extraction schematic diagram.
Fig. 6 is a schematic diagram of data organization.
Fig. 7 is a schematic diagram of a 0 element matrix.
FIG. 8 is a schematic illustration of information added to generate a CAN simulation model.
FIG. 9 is a schematic diagram of generating a CAN simulation model, signal path configuration and signal auto-map.
Detailed Description
The invention will be further described with reference to the accompanying drawings:
fig. 1 is a schematic diagram of a hardware and software architecture of an HIL test system. As shown in FIG. 1, the test management system comprises a third party model, such as a scene and vehicle dynamics module, a digital/analog hard-wire signal and the like; the communication simulation model mainly establishes a CAN communication channel according to input and output messages and signals of the DUT, and establishes logic connection between the simulation model of the related electric control system and the DUT; matching with NI-XNET hardware (CAN card, i.e. communication board card) and CAN wire harness, mapping the input and output of the communication simulation model to the CAN card, and establishing the physical connection between the related electric control system simulation model and the DUT; the communication simulation model needs to determine the number of channels of CAN according to the CAN network topology diagram of the DUT, and each channel is matched with a DBC file to generate a sub-module of the communication simulation model.
The bus protocol in the automobile industry is more in types, such as CAN, LIN, flexray, ethernet, most, but CAN is the most widely applied, so the invention focuses on the HIL test of the ECU for CAN bus communication; optimizing a common scheme comprises the following steps:
1) Automatization, from one dbc file of requisite input, obtain message, signal and ECU node information that DUT received, message, signal and ECU node information that DUT send; and comprises dbc file format normalization test, information integrity acquisition and correctness verification; problems 1 and 2 of the background art are solved;
2) Automatically generating a CANIOModel, wherein each message is a subsystem, and each signal reserves an interface for converting a physical value into a binary value, so that security algorithms such as CRC and the like can be conveniently made; problems 1 and 2 of the background art are solved;
3) Automatically establishing signal mapping; solving the problem 1 of the background technology;
4) Automated verification of signal mapping and report output; solving the problem 3 of the background technology.
The automatic integration method of the hardware-in-the-loop test engineering of the CAN communication controller in the embodiment of the invention, as shown in figure 2, comprises the following steps:
s1, DBC file merging
Define 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\u DEF_'; 'BA_'; 'VAL_'; 'SIG_GROUP_'; totaling 18 fields;
newly created 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_DEF_, cell_BA_SIG_GROUP_, for storing 18 pieces of field information;
each field, each time the search of one dbc file is completed, merging the line beginning with the search field into the corresponding cell (e.g. search the line beginning with val_table for all dbcs to be merged, merge all the lines into cell_val_table_);
sequentially combining the 18 cells after information retrieval is completed;
writing the merged cell into txt, and modifying txt suffix into 'dbc', namely merging dbc files.
S2, file import and preprocessing
As shown in fig. 3, the dbc file is imported in ASCII file format (multiple selections may be made, each file selected is processed according to the method of the present invention), blank lines, and blank spaces at the beginning and end of each line are deleted (meaningless information may be normalized and avoided from being processed), and stored as a character cell array dbc_info;
dbc_info, the line number of the line with the first 4 characters of BO_ "is obtained and is marked as a vector M_C, and the vector length is the number of messages obtained by the dbc file;
dbc_info, the line number of the first 4 lines with the character of SG_ "is obtained and is marked as a vector S_C, and the vector length is the number of signals obtained by the dbc file;
the information of the segments from min (M_C) to max (S_C) is taken out from the array dbc_info and stored as a cell array analysis_info;
analy_info, acquiring the row number of the row with the first 4 characters of 'BO_', and updating the vector M_C;
analy_info, acquiring the row number of the row with the first 4 characters of SG_, and updating the vector S_C;
a blank cell array get_info is created.
S3, extracting message information
As shown in FIG. 4, the character string of the analysis_info, M_C line is replaced by a space ("" ") first; the replaced character string continuous space is identified as one space for segmentation, and 5 character strings are obtained; taking the 2 nd to 5 th character strings to obtain a message ID, a message name, a message data length and a message sending node 4 character strings; m_c row, 1-4 columns of get_info are stored.
S4, signal information extraction
As shown in FIG. 5, the characters of the analysis_info, S_C line are split by ":", so as to obtain two character strings, a first character string Str1 and a second character string Str2;
str1, recognizing continuous space as one space, dividing the space, and writing the 5 th or 5 th-6 th columns of get_info from the 2 nd to the last one (according to the length of the character string array);
example 1:
SG_multi_sig m0:2|8@1+(1,0)[0|255]""node1,node2
splitting by' to obtain two character strings, namely a first character string Str11 and a second character string Str12; str 11-sg_multi_sigm0;
the continuous space is identified as one space for segmentation, and the character string array [ SG_; multi_sig; m0], length is 3.
Example 2:
SG_normal_signal:0|8@1+(1,0)[0|255]""ADAS
splitting by' to obtain two character strings, namely a first character string Str11 and a second character string Str12; str11-SG_normal_signal
The continuous space is identified as one space for segmentation, and the character string array [ SG_; normal_signal ], length 2.
Str2, recognizing the continuous space as one space, and dividing to obtain 5 character strings Str21, str22, str23, str24 and Str25;
str21 is divided by "@" to obtain two character strings Str211 and Str212;
str211 is divided by "|" to obtain a start bit and a data bit number, and the start bit and the data bit number are written into the 7 th and 8 th columns of get_info;
str212, taking the last character, replacing the last character according to the following corresponding relations + =unsigned, - =signed to obtain the data type of the signal, and writing the data type into get_info column 9;
str212, taking the next to last character, replacing the next to last character according to the following corresponding relationship of 0=lite endian and 1=big endian to obtain the byte order of the signal, and writing the byte_info into the 10 th column;
str22, dividing by the term "dividing" and then by the term "(") "and taking out the number to obtain the coefficient and offset, and writing in the 11 th and 12 th columns of get_info;
str23 is divided by "|", then divided by "[" ] ", the numbers are taken out to obtain the minimum value and the maximum value, and the minimum value and the maximum value are written into the 13 th column and the 14 th column of get_info;
str24, signal unit, write get_info column 15;
str25, signal receiving node, write get_info column 16.
S5, data arrangement
get_info,1-4 columns add message related information to the signal; blank rows between M_C rows, 1-4 columns are assigned to the last M_C row 1-4 columns of information. Before the top of fig. 6 is sorted, the middle graph is assigned, and the bottom graph is get_info deleted m_c line.
S6, checking
As shown in fig. 7, for each message, a 0-element matrix array_message sequence number of DLC (message data length) rows and 8 columns is generated;
executing +1 on the matrix element according to the start bit, the data bit number and the byte order 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 conflict of the message is represented, and modification is suggested.
Examples:
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
message ACU_Crash with ID of 186, DLC is 7-generating 0 element matrix array_186 of 7 rows and 8 columns;
the first signal acu_checksum_acu, the @0 signal sequence is a big end sequence, the start bit is 44=5×8+4, the 5+1=6 rows of array_186 are occupied, and the 4+1=5 positions start to the left 4 positions;
the second signal acu_rollingcount_acu, the @0 signal sequence is a big end sequence, the start bit is 41=5×8+1, the 5+1=6 rows of array_186 are occupied, and the 1+1=2 positions start to the left 4 positions;
at the 7 rows and 4 columns, the element value exceeds 1, the design specification of the signal matrix is not met, and early warning is performed.
The dbc editor opens the dbc file, checks the message and signal quantity of the dbc file, compares the message and signal quantity with the length of M_ C, S _C, and if the message and signal quantity are different, the message and signal quantity indicate that information extracted from the dbc file is missing, and early warning information is generated.
S7, generating a 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 assistance for signal mapping. Such as: DUT is ADAS, then real_ECU is 'ADAS'.
While other nodes in the dbc file incorporate a soft_ECU array;
get_info, 17, 18, 19, add information to generate CAN simulation model; correspondingly, as shown in fig. 8, two cases:
(1) the signal sending node is a soft_ECU, and is respectively a signal name+a unified signal tracing identifier (such as "_FromSoft" +a sending node), a signal name+a unified switching identifier such as "_Valueswitch"), and a signal name+a unified signal routing identifier such as "_ToBus";
(2) the signal sending node is real_ecu, which is a signal name+a unified signal tracing identifier (such as "_frombus"), a signal name+a unified switching identifier such as "_valueswitch"), and a signal name+a unified signal routing identifier such as "_topeal" + a receiving node.
And respectively establishing subsystems and the lowest layer of adding modules and connecting lines from top to bottom according to the hierarchical information, thus completing the CANIO simulation model.
S8, signal channel 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 a test management system to configure the channel of CAN signals in test engineering.
S9, automatic mapping of signals
And completing the links of the signals from the third party model to the CAN card to the real-ECU and the real-ECU to the Bus to the third party model based on the grouping of the signals, the unified signal tracing identification and the unified signal routing identification.
In the specific implementation aspect, the method is divided into three parts:
the output of the scene and the vehicle dynamics module, namely the input of the communication simulation model;
output of communication simulation model-input of communication board card;
output of communication board card-scene and input of vehicle dynamics module.
Several key points for establishing an automatic mapping:
trace back matrix: dbc document
(1) Two channel tables CANIOModel_channel XNET_channel
(2) Uniform identifier MDLSOFtECUDataToBus
(3) Newspaper Wen Ming
(4) Signal name
Output of the communication simulation model: targets/Controller/formulation
Models/Models/CANIOModel/Outports/CAN2Chassi_canio/MDLSoftECUDataToBus/EPS/EPS2/EPS_SteerintTorqueSensorSt_ToBus
And (3) inputting a 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 (3) acquiring channels configured in the step (S8), assigning values one by one, and comparing the assigned values with the acquired CAN bus values to finish checking.
For ease of understanding, a dbc file is attached:
in summary, the invention automatically acquires the message, the signal and the ECU node information thereof received by the DUT from the dbc file, and the message, the signal and the ECU node information thereof sent by the DUT; and comprises dbc file format normalization test, information integrity acquisition and correctness verification; automatically generating a CAN simulation model, and reserving an interface for converting a physical value into a binary value for each signal by using one subsystem for each message, thereby being convenient for a security algorithm such as CRC; automatically establishing signal mapping; automated verification of signal mapping and report output.
It will be readily appreciated by those skilled in the art that the foregoing is merely a preferred embodiment of the invention and is not intended to limit the invention, but any modifications, equivalents, improvements or alternatives falling within the spirit and principles of the invention are intended to be included within the scope of the invention.
Claims (6)
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 importing and preprocessing: importing the combined dbc file in an ASCII file format, deleting blank lines, and blank spaces at the beginning and the tail of each line, and storing the blank lines into a plurality of groups of dbc_info;
in the array dbc_info, acquiring row numbers of rows with the first 4 characters of BO_, and marking the row numbers as vectors M_C, wherein the number of the vectors M_C is the number of messages acquired by the combined dbc files; meanwhile, the line numbers of the first 4 lines with the character of SG_ are acquired and marked as a vector S_C, and the number of the vector S_C is the number of signals acquired by the combined dbc file;
in the array dbc_info, the information of the rows from min (M_C) to max (S_C) is fetched and stored as the array analysis_info;
in the array analysis_info, acquiring the row number of the row with the first 4 characters of BO_, and updating the vector M_C; meanwhile, acquiring row numbers of rows with the first 4 characters being SG_, and updating a vector S_C;
s3, extracting message information; the message information extraction comprises the following steps:
in the array analysis_info, the characters of the M_C rows are sequentially segmented, the message ID, the message name, the message data length and the message sending node are extracted, and 1 to 4 columns of the M_C rows of the newly built array get_info are stored;
s4, extracting signal information; the signal information extraction includes:
in the array analysis_info, sequentially dividing the characters of the S_C row, extracting a signal name, a multiplexing code, a start word bit, a data bit number, a data type, a byte order, a coefficient, an offset, a minimum value, a maximum value, a signal unit and a signal receiving node, and storing 5 to 16 columns of the S_C row of the newly built array get_info;
s5, data arrangement: the extracted message information and the signal information are arranged, so that the message information corresponds to the signal information; the data arrangement includes:
assigning 1 to 4 blank rows of the array get_info as 1 to 4 column information of the last M_C row, and deleting the M_C row;
s7, generating a CAN simulation model; generating the CAN simulation model comprises the following steps:
determining a real_ECU according to node names corresponding to the detected objects in the merged dbc file, wherein other nodes are incorporated into the Soft_ECU;
in columns 17 to 19 of the array get_info, add information to generate the CAN simulation model: signal name + unified signal tracing identification, signal name + unified switching identification, signal name + unified signal routing identification;
according to the hierarchy information, respectively establishing subsystems, a lowest layer adding module and a connecting line from top to bottom, and completing a CANIO simulation model;
s8, configuring a signal channel;
s9, signal automatic mapping.
2. The automated integration method of CAN communication controller hardware-in-the-loop test engineering of claim 1, wherein dbc file merging 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 beginning with the defined field into a corresponding field unit;
after the retrieval of all dbc files is completed, the N field units are sequentially combined, the combined field information is written into the txt file, and the file format of the txt file is modified into a dbc file format.
3. The automated integration method of the CAN communication controller hardware-in-the-loop test engineering according to claim 2, wherein the dbc file has 18 fields, which sequentially comprises: 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_.
4. The automated integration method of CAN communication controller hardware-in-the-loop test engineering of claim 1, further comprising the steps of:
s6, checking: checking whether signal value fields of all messages conflict or not; if the signal value fields of the messages conflict, early warning information is generated; and checking the number of the messages and signals of the combined dbc file, comparing the number with the number of M_ C, S _C, and if the difference exists, indicating that the extracted message information and signal information are missing, and generating early warning information.
5. The automated integration method of CAN communication controller hardware-in-the-loop test engineering of claim 4, wherein the verifying comprises:
for each message, generating a 0 element matrix of DLC row 8 columns according to the data length DLC of the message;
executing +1 on the element at the corresponding position of the matrix according to the initial bit, the data bit number and the byte order of the signal;
and when a certain element exceeds 1, early warning is carried out, the signal value range conflict of the message is represented, and modification is suggested.
6. The automated integration method of CAN communication controller hardware-in-the-loop test engineering of claim 1, wherein the signal path configuration comprises: compiling the generated CAN simulation model, generating a dynamic link library file, loading in a test management system, and configuring a channel of a CAN signal in a test project;
the automatic mapping of signals includes: and completing the links of the signals from the third party model to the CAN card to the real-ECU and the real-ECU to the Bus to the third party model based on the grouping of the signals, the unified signal tracing identification and the unified signal routing identification.
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 CN113867318A (en) | 2021-12-31 |
CN113867318B true 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) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
CN116074206A (en) * | 2023-01-12 | 2023-05-05 | 东风汽车集团股份有限公司 | Hardware-in-loop simulation model bus signal generation system and method |
CN116125950A (en) * | 2023-01-19 | 2023-05-16 | 重庆赛力斯新能源汽车设计院有限公司 | Automatic generation method, equipment and medium for hardware-in-loop simulation test tool |
CN116009457B (en) * | 2023-01-19 | 2024-07-23 | 深蓝汽车科技有限公司 | HIL test method for remote fault diagnosis function of vehicle |
CN117749451B (en) * | 2023-12-12 | 2024-08-09 | 镁佳(北京)科技有限公司 | Method, device and system for verifying correctness of ADAS signal |
CN117472035B (en) * | 2023-12-27 | 2024-03-08 | 东方电气风电股份有限公司 | Verification method for software and hardware of main control system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015106605A1 (en) * | 2014-01-14 | 2015-07-23 | 国家电网公司 | Method for testing station level of intelligent substation |
CN106484616A (en) * | 2016-09-30 | 2017-03-08 | 北京新能源汽车股份有限公司 | Automatic testing method and device for interface of vehicle control unit |
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 |
CN112378420A (en) * | 2020-10-30 | 2021-02-19 | 北斗星通智联科技有限责任公司 | Signal simulation method and system for automobile navigation test and electronic equipment |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
AT10302U3 (en) * | 2008-08-04 | 2009-10-15 | Avl List Gmbh | CREATING A PERIODIC CONFIGURATION |
US8732650B2 (en) * | 2010-02-12 | 2014-05-20 | Synopsys Taiwan Co., LTD. | Method and apparatus for versatile controllability and observability in prototype system |
CN102565683B (en) * | 2010-12-31 | 2014-06-25 | 中国航空工业集团公司第六三一研究所 | Generation and verification method of test vector |
CN107132832B (en) * | 2016-02-29 | 2019-10-11 | 株洲南车时代电气股份有限公司 | 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 |
CN108965274A (en) * | 2018-06-29 | 2018-12-07 | 威马智慧出行科技(上海)有限公司 | The analysis method and device of DBC file |
CN109634258B (en) * | 2018-11-30 | 2021-05-25 | 北京新能源汽车股份有限公司 | Bus message checking method, device and system for hardware-in-loop test |
CN111817938B (en) * | 2020-07-15 | 2022-04-01 | 上汽通用五菱汽车股份有限公司 | Method, system and storage medium for compiling automobile CAN communication matrix |
CN113189970B (en) * | 2021-05-10 | 2023-04-07 | 东风康明斯发动机有限公司 | Hardware-in-loop automatic test method and system of CAN bus controller and storage medium |
-
2021
- 2021-09-30 CN CN202111156818.9A patent/CN113867318B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015106605A1 (en) * | 2014-01-14 | 2015-07-23 | 国家电网公司 | Method for testing station level of intelligent substation |
CN106484616A (en) * | 2016-09-30 | 2017-03-08 | 北京新能源汽车股份有限公司 | Automatic testing method and device for interface of vehicle control unit |
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 |
CN112378420A (en) * | 2020-10-30 | 2021-02-19 | 北斗星通智联科技有限责任公司 | Signal simulation method and system for automobile navigation test and electronic equipment |
Non-Patent Citations (2)
Title |
---|
"CAN总线控制器模型的快速测试";王凌;《组合机床与自动化加工技术》(第10期);28-32 * |
"基于Vector工具链的CAN总线自动化测试";周琪;《汽车实用技术》(第10期);110-113 * |
Also Published As
Publication number | Publication date |
---|---|
CN113867318A (en) | 2021-12-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113867318B (en) | Automatic integration method for hardware-in-loop test engineering of CAN communication controller | |
CN113189970B (en) | Hardware-in-loop automatic test method and system of CAN bus controller and storage medium | |
CN111683066B (en) | Heterogeneous system integration method, heterogeneous system integration device, computer equipment and storage medium | |
CN110968509B (en) | Method and system for batch customizing of variables | |
CN112769767B (en) | Vehicle-mounted Ethernet SOME/IP protocol data analysis method, device, medium and system | |
CN111290956A (en) | Brain graph-based testing method and device, electronic equipment and storage medium | |
CN115329556A (en) | Transformer substation CAD drawing auditing method and device | |
CN113505078B (en) | Configuration file updating method, device, equipment and storage medium | |
CN113722340A (en) | Processing method and system for remote automatic point table updating based on power distribution device | |
CN112463596B (en) | Test case data processing method, device and equipment and processing equipment | |
CN117499380A (en) | Custom protocol data acquisition method | |
CN116187270B (en) | Method and device for testing identifiers in automatic verification schematic diagram | |
CN115242861B (en) | RTE layer communication data mapping configuration file generation method and system, computer readable storage medium and electronic equipment | |
CN111045948A (en) | Method, apparatus and storage medium for checking interface signal between modules | |
CN115904978A (en) | Redfish interface testing method, computing device and storage medium | |
CN115987865A (en) | Routing code generation method and device, matrix detection method and storage medium | |
CN112861455B (en) | FPGA modeling verification system and method | |
CN112737831A (en) | Firmware upgrade package processing method and device, electronic equipment and storage medium | |
CN113485919A (en) | Test method, test device and computer readable storage medium | |
CN113377711A (en) | Data processing method, device, equipment and computer readable storage medium | |
CN102722592A (en) | Universal digital information recording device and method | |
CN113626593B (en) | Excel file verification method, device and equipment | |
CN114448851B (en) | Automatic data testing method and system | |
CN118227391A (en) | Data acquisition method, data acquisition device and computing equipment | |
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 |