Signal interaction verification method, device, electronic device and storage medium
By adopting signal interaction inspection methods in new energy vehicles, and using accumulation and subtraction operations combined with timers for signal verification, the problems of long and high labor cost of signal interaction detection in the prior art are solved, and the automation of signal interaction is realized Checksum accuracy reduces labor costs.
Patent Information
- Application Number
- CN202411230793.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-09-04
AI Technical Summary
The prior art has problems in the accuracy, consistency and real-time detection of signal interactions in new energy vehicles, which consume a lot of manpower and material resources, cumbersome steps and long time, especially in the vehicle communication protocol, how many signal verification needs to be processed. There are hundreds of signals, and the actual vehicle testing requirements are high.
Provide a signal interaction verification method. By receiving the signal value to be checked, the initial signal value is extracted after receiving the simulation flag bit trigger, and the accumulated operation is performed during mode switching, and the timer is used to perform timing calculations, and the accumulated accumulation is compared. If the signal value is equal to the signal value to be checked, the verification will be successful. Otherwise, the failure log will be recorded and the signal processing system and the automation generation system will be used for automatic verification.
Automatic verification of signal interaction is realized, ensuring the accuracy and reliability of simulation, reducing labor costs, and improving detection efficiency.
Smart Images

Figure CN118734051B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent control software testing, and in particular to a signal interaction testing method, device, electronic equipment and storage medium. Background Art
[0002] The accuracy, consistency, and real-time nature of signal interaction are crucial to new energy vehicle software. The gateway is the central hub of the in-vehicle network, and can help different types of networks in the vehicle to safely and reliably transmit, process data, convert protocols, and route data across functional domains (power chassis, body control, infotainment, and driver assistance).
[0003] The invention with application number [CN116055358A] provides a method and system for independent gateway testing. This method also does not need to be tested on a test vehicle. However, there are hundreds or thousands of signals in the vehicle communication protocol, and the transmission cycle is also in the millisecond level. It takes a lot of manpower, material resources and time to send and verify one signal at a time through DBC (Dynamic Body Control). In addition, testing on a real vehicle has cumbersome steps, long execution time, large workload, and high requirements for the vehicle. Summary of the invention
[0004] The present application provides a signal interaction verification method, device and vehicle-mounted terminal to solve the above-mentioned technical problems.
[0005] A signal interaction verification method provided by an embodiment of the present application includes: receiving a signal value to be verified, and after receiving a simulation flag trigger, extracting an initial signal value, performing an accumulation operation on the initial signal value, and timing the accumulation operation to output a cumulative signal value; after the trigger mode is switched, extracting a current cumulative signal value corresponding to the mode switching moment, and performing a cumulative subtraction operation on the current cumulative signal value to output a cumulative signal value; comparing the cumulative signal value with the signal value to be verified, if the cumulative signal value at the same moment is equal to the signal value to be verified, the verification is successful; if the cumulative signal value at the same moment is not equal to the signal value to be verified, the verification fails, and a failure log is recorded.
[0006] In one embodiment of the present application, the accumulation operation is timed and calculated, and the accumulated signal value is output, including: after the simulation start flag is triggered, the simulation timing is started, and the minimum signal value is extracted in the assignment module as the initial signal value; according to a first preset step size and a first preset amplitude, the initial signal value is accumulated, and the accumulation operation is timed and calculated by a first timer to obtain a first timing result; the accumulated signal value is sent to the bus through the output module.
[0007] In one embodiment of the present application, after the trigger mode is switched, the current accumulated signal value is subjected to a cumulative subtraction operation and the accumulated signal value is output, including: if the simulation timing result is equal to the first timing result, the accumulation operation is stopped, the reset module is reset, the simulation timing is restarted, and the current accumulated signal value is output; the current accumulated signal value is subjected to a cumulative subtraction operation according to a second preset step size and a second preset amplitude, and the cumulative subtraction operation is timed and calculated by a second timer to obtain a second timing result; if the simulation timing result is equal to the second timing result, the simulation is stopped, and the accumulated signal value is sent to the bus through the output module.
[0008] In one embodiment of the present application, the accumulation operation is timed and calculated by a first timer to obtain a first timing result, including: initializing a first timing module and obtaining a period of an initial signal value; obtaining a first preset step size based on the period and simulation accuracy of the signal value; and performing a timing calculation on the accumulation operation according to the first preset step size and the first preset amplitude to obtain a first timing result.
[0009] In one embodiment of the present application, the accumulation and subtraction operation is timed and calculated by a second timer to obtain a second timing result, including: initializing a second timing module and obtaining the period of the current accumulated signal value; obtaining a second preset step size based on the period and simulation accuracy of the current accumulated signal value; and timing the addition operation according to the second preset step size and the second preset amplitude to obtain a second timing result.
[0010] In one embodiment of the present application, before receiving the signal value to be checked, it also includes: reading a data array from a preset table; traversing the data array, configuring an assignment module, a receiving module, a timing module, an accumulation module, a calculation module, a reset module and an output module in the initial signal verification model; setting the name, position and initial parameters of each module, and establishing a connection relationship between each module to form a complete signal flow to obtain the signal verification model.
[0011] In one embodiment of the present application, recording a failure log also includes: extracting configuration parameters of a signal verification model and extracting a signal transmission path; recording a mode switching time and counting the number of errors, error types and error times during the simulation process; and accumulating the number of times that the cumulative signal value at the same moment is not equal to the signal value to be checked.
[0012] The signal interaction verification device provided in the embodiment of the present application includes: an accumulation module, which is used to receive the signal value to be verified, and after receiving the simulation flag trigger, extract the initial signal value in the assignment module, perform accumulation operation on the initial signal value, and time the accumulation operation to output the accumulated signal value; a subtraction module, which is used to extract the current accumulated signal value corresponding to the mode switching moment after the trigger mode is switched, and perform accumulation operation on the current accumulated signal value to output the accumulated signal value; a verification module, which is used to compare the accumulated signal value with the signal value to be verified, if the accumulated signal value at the same moment is equal to the signal value to be verified, the verification is successful; if the accumulated signal value at the same moment is not equal to the signal value to be verified, the verification fails, and a failure log is recorded.
[0013] An electronic device provided by an embodiment of the present application includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device implements the above-mentioned signal interaction verification method.
[0014] An embodiment of the present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor of a computer, the computer executes the above-mentioned signal interaction verification method.
[0015] The beneficial effects of the present application are as follows: by receiving the signal value to be checked, and after receiving the simulation flag trigger, extracting the initial signal value, performing an accumulation operation on the initial signal value, and timing the accumulation operation, and outputting the accumulated signal value; after the trigger mode is switched, extracting the current accumulated signal value corresponding to the mode switching moment, and performing an accumulation subtraction operation on the current accumulated signal value, and outputting the accumulated signal value; comparing the accumulated signal value with the signal value to be checked, if the accumulated signal value at the same moment is equal to the signal value to be checked, the verification is successful. On the basis of the original signal forwarding test system method, a signal processing system and an automatic generation system are added. Abandoning the original method of interacting and verifying signals by manpower, it is chosen to use a verification model to input and output signals, simulate signal changes, and automatically verify the consistency of signals. Through precise signal processing and mode switching control, the accuracy and reliability of the simulation can be ensured, which not only detects accurately but also saves labor costs.
[0016] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0018] Figure 1 is a flow chart of a signal interaction verification method shown in an exemplary embodiment of the present application;
[0019] Figure 2 A schematic diagram of a signal interaction verification system shown in an embodiment of the present application;
[0020] Figure 3 is a block diagram of a signal interaction verification device shown in an exemplary embodiment of the present application;
[0021] Figure 4 This is a flowchart of an automated generation system according to an embodiment of the present application;
[0022] Figure 5 is a flow chart of a signal interaction verification method shown in an exemplary embodiment of the present application;
[0023] Figure 6 It is a structural schematic diagram of a vehicle-mounted terminal shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0024] The following will describe the implementation methods of the present application with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be understood that the preferred embodiments are only for illustrating the present application, not for limiting the scope of protection of the present application.
[0025] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0026] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present application difficult to understand.
[0027] The embodiments of the present application respectively propose a signal interaction verification method, a signal interaction verification device, an electronic device and a storage medium, which are specifically applied to new energy vehicles. These embodiments will be described in detail below.
[0028] See also Figure 1 , Figure 1 FIG. 4 is a flow chart showing a signal interaction verification method according to an embodiment of the present application. Figure 1 As shown, the method at least includes steps S110 to S130, which are described in detail as follows:
[0029] Step S110, receiving the signal value to be checked, and after receiving the trigger of the simulation flag, extracting the initial signal value, performing an accumulation operation on the initial signal value, timing the accumulation operation, and outputting the accumulated signal value.
[0030] Step S120, after the trigger mode switch is triggered, extract the current accumulated signal value corresponding to the mode switch moment, perform a cumulative subtraction operation on the current accumulated signal value, and output the accumulated signal value.
[0031] Step S130, compare the accumulated signal value with the signal value to be checked. If the accumulated signal value at the same time is equal to the signal value to be checked, the verification is successful; if the accumulated signal value at the same time is not equal to the signal value to be checked, the verification fails and a failure log is recorded.
[0032] exist Figure 1In the technical solution shown, by receiving the signal value to be checked, and after receiving the simulation flag trigger, the initial signal value is extracted, the initial signal value is accumulated, and the accumulation operation is timed to output the accumulated signal value; after the trigger mode is switched, the current accumulated signal value corresponding to the mode switching moment is extracted, and the current accumulated signal value is accumulated and subtracted to output the accumulated signal value; the accumulated signal value is compared with the signal value to be checked, and if the accumulated signal value at the same moment is equal to the signal value to be checked, the verification is successful. On the basis of the original signal forwarding test system method, a signal processing system and an automatic generation system are added. Abandoning the original method of human interaction and verification of signals, choose to use a verification model to input and output signals, simulate signal changes, automatically verify signal consistency, and through precise signal processing and mode switching control, the accuracy and reliability of the simulation can be ensured, which not only accurately detects but also saves labor costs.
[0033] In one embodiment of the present application, Figure 2 A schematic diagram of a signal interaction verification system shown in an embodiment of the present application specifically includes a host computer, an automatic speech generation system, a signal processing system, a HIL (Hardware-in-the-Loop) control cabinet, a CAN (Controller Area Network) communication board, a virtual gateway board, a real-time control module board, and a controller. On the basis of the original signal forwarding test system method, a signal processing system and an automatic generation system are added. Abandoning the original method of signal interaction and verification by manpower, choose to use a verification model, for example: Simulink model to input and output signals, and simulate signal changes to automatically verify signal consistency. Use the automatic generation system to generate a model according to demand, load the model into the HIL control cabinet, trigger the verification system, and feedback the results after the simulation is completed.
[0034] In one embodiment of the present application, the accumulation operation is timed and calculated, and the accumulated signal value is output, including: after the flag bit of the simulation start is triggered, the simulation timing is started, and the minimum signal value is extracted in the assignment module as the initial signal value; according to the first preset step length and the first preset amplitude, the initial signal value is accumulated, and the accumulation operation is timed and calculated by the first timer to obtain the first timing result; the accumulated signal value is sent to the bus through the output module. The signal calculation module can accumulate the signal according to the specific step length and amplitude, realizes a highly configurable signal processing flow, automatically verifies the consistency of the signal by simulating the change of the signal, and can ensure the accuracy and reliability of the simulation through precise signal processing and mode switching control, which not only detects accurately but also saves labor costs.
[0035] In one embodiment of the present application, after the trigger mode is switched, the current cumulative signal value is subjected to a cumulative subtraction operation, and the cumulative signal value is output, including: if the simulation timing result is equal to the first timing result, the cumulative operation is stopped, reset by the reset module, the simulation timing is restarted, and the current cumulative signal value is output; the current cumulative signal value is subjected to a cumulative subtraction operation according to the second preset step length and the second preset amplitude, and the cumulative subtraction operation is timed and calculated by the second timer to obtain a second timing result; if the simulation timing result is equal to the second timing result, the simulation is stopped, and the cumulative signal value is sent to the bus through the output module. The signal calculation module can perform a cumulative subtraction operation on the signal according to a specific step length and amplitude, realizes a highly configurable signal processing flow, automatically verifies the consistency of the signal by simulating the change of the signal, and ensures the accuracy and reliability of the simulation through precise signal processing and mode switching control, which not only detects accurately but also saves labor costs.
[0036] In one embodiment of the present application, a first timer is used to perform timing calculation on the accumulation operation to obtain a first timing result, including: initializing the first timing module and obtaining the period of the initial signal value; obtaining a first preset step size based on the period of the signal value and the simulation accuracy; performing timing calculation on the accumulation operation according to the first preset step size and the first preset amplitude to obtain a first timing result. The timing module dynamically adjusts the simulation step size according to the signal period, avoiding unnecessary waste of computing resources and improving simulation efficiency. The collaborative work of the reset module and the signal calculation module can quickly realize mode jumping and signal processing, further improving simulation efficiency.
[0037] In one embodiment of the present application, a second timer is used to perform timing calculations on the cumulative subtraction operation to obtain a second timing result, including: initializing the second timing module and obtaining the period of the current cumulative signal value; obtaining a second preset step length based on the period of the current cumulative signal value and the simulation accuracy; performing timing calculations on the accumulation operation according to the second preset step length and the second preset amplitude to obtain a second timing result. The timing module dynamically adjusts the simulation step length according to the signal period, avoiding unnecessary waste of computing resources and improving simulation efficiency. The collaborative work of the reset module and the signal calculation module can quickly realize mode jumping and signal processing, further improving simulation efficiency.
[0038] As an example, Figure 3 A flowchart of a signal interaction verification method shown in an embodiment of the present application, specifically comprising the following steps;
[0039] Step S301, receiving the signal value to be checked, starting the simulation timing after receiving the simulation flag trigger, extracting the minimum signal value in the assignment module as the initial signal value, and then executing step S302.
[0040] Step S302, performing an accumulation operation on the initial signal value according to the first preset step length and the first preset amplitude, and performing timing calculation on the accumulation operation through a first timer to obtain a first timing result, and then executing step S303.
[0041] Step S303, determining whether the simulation time is equal to the first timing result, if not, executing step S302, if equal, executing step S304.
[0042] Step S304, stop the accumulation operation, reset through the reset module, restart the simulation timing, and output the current accumulated signal value, and then execute step S305.
[0043] Step S305, performing a cumulative subtraction operation on the current accumulated signal value according to the second preset step length and the second preset amplitude, and performing timing calculation on the cumulative subtraction operation through a second timer to obtain a second timing result, and then executing step S306.
[0044] Step S306: If the simulation timing result is equal to the second timing result, the simulation stops, and the accumulated signal value is sent to the bus through the output module, and then ends.
[0045] exist Figure 3 In the technical solution shown, a signal processing system and an automatic generation system are added on the basis of the original signal forwarding test system method. The original method of human signal interaction and verification is abandoned, and the verification model is selected to input and output the signal, simulate the signal change, and automatically verify the consistency of the signal. Through precise signal processing and mode switching control, the accuracy and reliability of the simulation can be ensured, which not only has accurate detection but also saves labor costs.
[0046] In one embodiment of the present application, before receiving the signal value to be checked, it also includes: reading a data array from a preset table; traversing the data array, configuring an assignment module, a receiving module, a timing module, an accumulation module, a calculation module, a reset module, and an output module in the initial signal verification model; setting the name, position, and initial parameters of each module, and establishing a connection relationship between each module to form a complete signal flow to obtain a signal verification model. The signal verification model provides a rich module library and powerful simulation functions, supports multi-field simulation and model-based design, facilitates the construction, configuration, and simulation of dynamic systems, and conducts in-depth analysis and optimization of simulation results.
[0047] As an example, the signal verification model is a Simulink model. The Simulink model is a visual simulation model based on MATLAB. Simulink supports simulation in multiple fields, including control systems, communication systems, signal processing, image processing, etc. It provides a variety of simulation options and parameter settings to support different types of simulation requirements, such as simulation of continuous time, discrete time or mixed signal systems.
[0048] As an example, Figure 4 The flowchart of the automatic generation system is shown in an embodiment of the present application. After reading the preset table content, assign values to the corresponding array, open the initial verification model, and traverse the array data, configure the assignment module, receiving module, timing module, accumulation module, calculation module, reset module and output module in the initial signal verification model, set the name, position and initial parameters of each module, and establish the connection relationship between each module to form a complete signal flow to obtain a signal verification model.
[0049] As a specific example, based on the script editor provided by Matlab, it includes calling the xlsread function to read the data in the Excel table, filtering out the required name, ID, maximum value, minimum value, cycle and precision, and assigning them to the corresponding array for use; calling the for function to traverse each array, calling the add_block function to add a module in the for loop, calling the set_param function to set the position, name, and initial parameters of the module, calling the add_line function to connect the line, and when the for loop reaches the last value, jump out of the loop; calling the open_system function to open the model; calling the save_system function to save the model.
[0050] In one embodiment of the present application, recording the failure log also includes: extracting the configuration parameters of the signal verification model and extracting the path of signal transmission; recording the mode switching time, and counting the number of errors, error types and error times during the simulation process; accumulating the number of times the cumulative signal value at the same time is not equal to the signal value to be checked. During the simulation process, by calculating the values of the signal output module and the signal receiving module in real time, if the two are not equal, they are recorded as errors and accumulated. It is convenient to timely discover and count abnormal situations during the simulation process, and provide strong data support for subsequent fault analysis and system optimization.
[0051] Figure 5 FIG. 1 is a block diagram of a signal interaction verification device according to an exemplary embodiment of the present application. Figure 5As shown, according to an embodiment of the present application, the signal interaction verification device 500 includes: an accumulation module 510, a cumulative subtraction module 520 and a verification module 530. The accumulation module is used to receive the signal value to be verified, and after receiving the simulation flag trigger, extract the initial signal value in the assignment module, perform accumulation operation on the initial signal value, and time the accumulation operation, and output the accumulated signal value; the cumulative subtraction module is used to extract the current accumulated signal value corresponding to the mode switching moment after the trigger mode is switched, and perform cumulative subtraction operation on the current accumulated signal value, and output the accumulated signal value; the verification module is used to compare the accumulated signal value with the signal value to be verified. If the accumulated signal value at the same time is equal to the signal value to be verified, the verification is successful; if the accumulated signal value at the same time is not equal to the signal value to be verified, the verification fails and a failure log is recorded. By receiving the signal value to be checked, and after receiving the simulation flag trigger, the initial signal value is extracted, the initial signal value is accumulated, and the accumulation operation is timed to output the accumulated signal value; after the trigger mode is switched, the current accumulated signal value corresponding to the mode switching moment is extracted, and the current accumulated signal value is accumulated and subtracted to output the accumulated signal value; the accumulated signal value is compared with the signal value to be checked, and if the accumulated signal value at the same moment is equal to the signal value to be checked, the verification is successful. On the basis of the original signal forwarding test system method, a signal processing system and an automatic generation system are added. Abandoning the original method of human signal interaction and verification, the verification model is selected to input and output the signal, simulate the signal change, and automatically verify the consistency of the signal. Through precise signal processing and mode switching control, the accuracy and reliability of the simulation can be ensured, which not only accurately detects but also saves labor costs.
[0052] In one embodiment of the present application, the accumulation module is used to start the simulation timing after the simulation start flag is triggered, and extract the minimum signal value in the assignment module as the initial signal value; according to the first preset step size and the first preset amplitude, the initial signal value is accumulated, and the accumulation operation is timed by the first timer to obtain a first timing result; the accumulated signal value is sent to the bus through the output module.
[0053] In one embodiment of the present application, the accumulation module is used to stop the accumulation operation if the simulation timing result is equal to the first timing result, reset it through the reset module, restart the simulation timing, and output the current accumulated signal value; perform an accumulation operation on the current accumulated signal value according to a second preset step size and a second preset amplitude, and at the same time perform timing calculation on the accumulation operation through a second timer to obtain a second timing result; if the simulation timing result is equal to the second timing result, the simulation stops, and the accumulated signal value is sent to the bus through the output module.
[0054] In one embodiment of the present application, the signal interaction verification device also includes a timing module 540, which is used to initialize a first timing module and obtain the period of an initial signal value; obtain a first preset step size based on the period of the signal value and the simulation accuracy; perform timing calculations on the accumulation operation according to the first preset step size and the first preset amplitude to obtain a first timing result.
[0055] In one embodiment of the present application, the timing module 540 is used to initialize the second timing module and obtain the period of the current accumulated signal value; based on the period of the current accumulated signal value and the simulation accuracy, a second preset step size is obtained; and the accumulation operation is timed and calculated according to the second preset step size and the second preset amplitude to obtain a second timing result.
[0056] In one embodiment of the present application, the signal interaction verification device also includes a configuration module 550, which is used to read a data array from a preset table; traverse the data array, configure an assignment module, a receiving module, a timing module, an accumulation module, a calculation module, a reset module and an output module in the initial signal verification model; set the name, position and initial parameters of each module, and establish a connection relationship between each module to form a complete signal flow to obtain a signal verification model.
[0057] In one embodiment of the present application, the verification module is used to extract the configuration parameters of the signal verification model and the signal transmission path; record the mode switching time, and count the number of errors, error types and error time during the simulation process; and accumulate the number of times the cumulative signal value at the same time is not equal to the signal value to be checked.
[0058] It should be noted that the device provided in the above embodiment and the method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment, and will not be repeated here. In practical applications, the device provided in the above embodiment can distribute the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0059] See also Figure 6 , Figure 6 is a structural diagram of a vehicle-mounted terminal shown in an exemplary embodiment of the present application. It should be noted that: Figure 6 The vehicle-mounted terminal 600 shown is only an example and should not bring any limitation to the functions and usage area of the embodiments of the present application.
[0060] like Figure 6As shown, the vehicle terminal 600 includes a processor 601, a memory 602 and a communication bus 603; the communication bus 603 is used to connect the processor 601 and the memory 602; the processor 601 is used to execute the computer program stored in the memory 602 to implement one or more methods in the above embodiments.
[0061] The vehicle-mounted terminal provided in the present application includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used to communicate, and the processor and the transceiver are used to run computer programs so that the electronic device executes the various steps of the above method.
[0062] In this embodiment, the memory may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0063] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0064] The above embodiments are merely illustrative of the principles and effects of the present application, and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A signal interaction verification method, characterized in that: The method comprises: Receive the signal value to be checked, and after receiving the trigger of the simulation flag, extract the initial signal value, perform an accumulation operation on the initial signal value, and time the accumulation operation to output the accumulated signal value; After the trigger mode is switched, the current accumulated signal value corresponding to the mode switching moment is extracted, and the current accumulated signal value is subjected to a cumulative subtraction operation to output the accumulated signal value; Compare the accumulated signal value with the signal value to be checked. If the accumulated signal value at the same time is equal to the signal value to be checked, the verification is successful; if the accumulated signal value at the same time is not equal to the signal value to be checked, the verification fails and a failure log is recorded; Performing timing calculation on the accumulation operation and outputting the accumulated signal value includes: After the flag bit of the simulation start is triggered, the simulation timing starts, and the minimum value of the signal is extracted in the assignment module as the initial signal value; According to a first preset step length and a first preset amplitude, the initial signal value is accumulated, and a first timer is used to perform timing calculation on the accumulation operation to obtain a first timing result; Send the accumulated signal value to the bus through the output module; After the trigger mode is switched, the current accumulated signal value is subjected to a cumulative subtraction operation and the accumulated signal value is output, including: If the simulation timing result is equal to the first timing result, the accumulation operation is stopped, the reset module is used to reset, the simulation timing is restarted, and the current accumulated signal value is output; The current accumulated signal value is subjected to a cumulative subtraction operation according to a second preset step length and a second preset amplitude, and a second timer is used to perform timing calculation on the cumulative subtraction operation to obtain a second timing result; If the simulation timing result is equal to the second timing result, the simulation stops, and the accumulated signal value is sent to the bus through the output module.
2. The signal interaction verification method according to claim 1, characterized in that: The first timer performs timing calculation on the accumulation operation to obtain a first timing result, including: Initialize the first timing module and obtain the period of the initial signal value; Based on the period and simulation accuracy of the signal value, a first preset step size is obtained; The accumulation operation is timed and calculated according to the first preset step length and the first preset amplitude to obtain a first timing result.
3. The signal interaction verification method according to claim 1, characterized in that: The second timer performs timing calculation on the cumulative subtraction operation to obtain a second timing result, including: Initialize the second timing module and obtain the period of the current accumulated signal value; Based on the period and simulation accuracy of the current accumulated signal value, a second preset step size is obtained; The accumulation operation is timed and calculated according to the second preset step size and the second preset amplitude to obtain a second timing result.
4. The signal interaction verification method according to claim 1, characterized in that: Before receiving the signal value to be checked, it also includes: Read data array from preset table; Traversing the data array, configuring an assignment module, a receiving module, a timing module, an accumulation module, a calculation module, a reset module and an output module in an initial signal verification model; The name, position and initial parameters of each module are set, and the connection relationship between the modules is established to form a complete signal flow to obtain the signal verification model.
5. The signal interaction verification method according to claim 1, characterized in that: Record failure logs, including: Extract the configuration parameters of the signal verification model and extract the signal transmission path; Record the mode switching time and count the number of errors, error types and error time during the simulation process; The number of times that the accumulated signal value at the same time is not equal to the signal value to be checked is accumulated.
6. A signal interaction verification device, characterized in that: The device comprises: The accumulation module is used to receive the signal value to be checked, and after receiving the trigger of the simulation flag, extract the initial signal value, perform an accumulation operation on the initial signal value, and time the accumulation operation to output the accumulated signal value; The accumulation and subtraction module is used to extract the current accumulated signal value corresponding to the mode switching moment after the trigger mode switching, and perform an accumulation and subtraction operation on the current accumulated signal value to output the accumulated signal value; A verification module is used to compare the accumulated signal value with the signal value to be checked. If the accumulated signal value at the same time is equal to the signal value to be checked, the verification is successful; if the accumulated signal value at the same time is not equal to the signal value to be checked, the verification fails and a failure log is recorded; timing calculation is performed on the accumulation operation and the accumulated signal value is output, including: after the flag bit of the simulation start is triggered, the simulation timing is started, and the minimum signal value is extracted in the assignment module as the initial signal value; according to the first preset step size and the first preset amplitude, the initial signal value is accumulated, and the accumulation operation is timed by a first timer to obtain a first timing result result; sending the accumulated signal value to the bus through the output module; after the trigger mode is switched, performing a cumulative subtraction operation on the current accumulated signal value and outputting the accumulated signal value, including: if the simulation timing result is equal to the first timing result, stopping the accumulation operation, resetting through the reset module, restarting the simulation timing, and outputting the current accumulated signal value; performing a cumulative subtraction operation on the current accumulated signal value according to a second preset step size and a second preset amplitude, and performing a timing calculation on the cumulative subtraction operation through a second timer to obtain a second timing result; if the simulation timing result is equal to the second timing result, the simulation stops, and the accumulated signal value is sent to the bus through the output module.
7. An electronic device, characterized in that: The device comprises: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the signal interaction verification method as described in any one of claims 1 to 5.
8. A storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the signal interaction verification method according to any one of claims 1 to 5.
