CN116384305B - Data communication method, device, system, equipment and computer storage medium - Google Patents

Data communication method, device, system, equipment and computer storage medium Download PDF

Info

Publication number
CN116384305B
CN116384305B CN202310653362.XA CN202310653362A CN116384305B CN 116384305 B CN116384305 B CN 116384305B CN 202310653362 A CN202310653362 A CN 202310653362A CN 116384305 B CN116384305 B CN 116384305B
Authority
CN
China
Prior art keywords
command
forced assignment
data
data communication
assignment command
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
Application number
CN202310653362.XA
Other languages
Chinese (zh)
Other versions
CN116384305A (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.)
Innoda Chengdu Electronic Technology Co ltd
Original Assignee
Innoda Chengdu Electronic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Innoda Chengdu Electronic Technology Co ltd filed Critical Innoda Chengdu Electronic Technology Co ltd
Priority to CN202310653362.XA priority Critical patent/CN116384305B/en
Publication of CN116384305A publication Critical patent/CN116384305A/en
Application granted granted Critical
Publication of CN116384305B publication Critical patent/CN116384305B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/32Circuit design at the digital level
    • G06F30/33Design verification, e.g. functional simulation or model checking
    • G06F30/3308Design verification, e.g. functional simulation or model checking using simulation
    • G06F30/331Design verification, e.g. functional simulation or model checking using simulation with hardware acceleration, e.g. by using field programmable gate array [FPGA] or emulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0002Serial port, e.g. RS232C
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a data communication method, a device, a system, equipment and a computer storage medium, and relates to the technical field of communication. The data communication method comprises the following steps: receiving a debug command for a specified input signal; converting target characters in the debugging command based on the tool command language script to obtain a target coding value; generating a forced assignment command corresponding to the target character; the forced assignment command is used for forcedly assigning the value of the appointed input signal to a target coding value; the forced assignment command is a command supported by the hardware simulation accelerator; and sending the forced assignment command to the hardware simulation accelerator so that the hardware simulation accelerator generates a data frame supported by the serial port communication protocol corresponding to the forced assignment command based on the forced assignment command, and outputting the data frame according to the preset baud rate. According to the embodiment of the application, when the tested is accelerated to verify through the hardware simulation accelerator, the tested is not limited by external hardware as much as possible, and the complexity of the verification flow is not increased.

Description

Data communication method, device, system, equipment and computer storage medium
Technical Field
The present application belongs to the field of communication technologies, and in particular, relates to a data communication method, device, system, equipment, and computer storage medium.
Background
In the field of chip front-end verification, a hardware simulation accelerator has an important role in the chip design verification process because the hardware simulation accelerator can effectively accelerate the verification process of a chip to be tested. By using the hardware simulation accelerator, the cooperation of the software and the hardware of the whole chip can be possible in the early stage of the development of the chip. The application of the hardware simulation accelerator can effectively accelerate compiling, advanced debugging, power consumption analysis, hybrid hardware simulation and the like, thereby shortening the research and development period of the whole product.
Currently, two types of schemes are commonly employed in accelerating verification of a test by a hardware emulation accelerator. The first scheme is to verify the design under test on the hardware simulation accelerator and connect the hardware simulation accelerator with a device (such as a personal computer or a server) having a UART serial port through a universal asynchronous receiver Transmitter (Universal Asynchronous Receiver/Transmitter, UART) cable. However, such schemes are often subject to material limitations in the actual simulation verification process. For example, taking a hardware emulation accelerator as a palladium as an example, when the hardware emulation accelerator is in communication connection with a UART serial device, a hardware board card, a TPOD Cable (TPOD Cable), and other adapting boards and materials are often required. The TPOD interface is an interface provided by the paladium and used for converting the optical fiber into a conventional IO interface, and the number of the TPOD interfaces in the paladium is limited at present, so that the condition that the TPOD interfaces are not enough easily occurs. And in such cases, such schemes may also require an external large number of adapter cards and other materials, which further results in a greater susceptibility to material limitations when using the first type of scheme described above for simulation verification.
The second scheme is to simulate the serial port assistant on the hardware simulation accelerator through a software simulation acceleration (Simulation Acceleration, SA) mode to be responsible for simulating the receiving and transmitting of UART serial port data, and integrate UART Virtual IP (UART Virtual IP) inside the hardware simulation accelerator, and the communication channel needs to be separately introduced. For example, continuing with the example of a hardware emulation accelerator as palladium, it is often necessary to introduce a separate SCEMI 2.0 DPI Channel to enable communication with the interior of palladium. In contrast, the second type of solution does not require a large amount of hardware support simulation verification process, but introduces a more complex hardware simulation accelerator design process, thereby greatly improving the simulation verification difficulty.
Disclosure of Invention
The embodiment of the application provides a data communication method, a device, a system, equipment and a computer storage medium, which can be used for accelerating verification of a tested by a hardware simulation accelerator, is not limited by external hardware as far as possible, and does not increase the complexity of a verification flow.
In a first aspect, an embodiment of the present application provides a data communication method, which is applied to a debug device, where the debug device is in communication connection with a hardware simulation accelerator; the data communication method comprises the following steps:
Receiving a debugging command aiming at a specified input signal, wherein the debugging command comprises a command character string, and the command character string comprises target characters;
converting the target character based on the tool command language script to obtain a target coding value corresponding to the target character;
generating a forced assignment command corresponding to the target character; the forced assignment command is used for forcedly assigning the value of the appointed input signal to a target coding value; the forced assignment command is a command supported by the hardware simulation accelerator;
and sending the forced assignment command to the hardware simulation accelerator so that the hardware simulation accelerator generates a data frame supported by the serial port communication protocol corresponding to the forced assignment command based on the forced assignment command, and outputting the data frame according to the preset baud rate.
In some possible embodiments, before converting the target character based on the tool command language script to obtain the target code value corresponding to the target character, the data communication method further includes:
splitting the command character string to obtain at least one character which is orderly arranged; at least one character comprises at least a target character;
sending the forced assignment command to the hardware emulation accelerator, including:
And sequentially sending the forced assignment commands corresponding to at least one character to the hardware simulation accelerator.
In some possible embodiments, the forced assignment command corresponding to the target character includes a forced assignment enable field, a name field for specifying the input signal, and a target code value field.
In some possible embodiments, the debug command further includes an externally provided calling function; the data communication method further includes, before generating the forced assignment command corresponding to the target character:
based on the calling function, a specified input signal is determined.
In some possible embodiments, after sending the force assignment command into the hardware emulation accelerator, the data communication method further comprises:
monitoring a specified output signal in the hardware simulation accelerator based on the state description language function; the specified output signal is matched with the specified input signal;
generating a signal monitoring log, wherein the signal monitoring log is used for recording the signal change condition of the appointed output signal;
and outputting the signal monitoring log for display.
In a second aspect, an embodiment of the present application provides a data communication method, which is applied to a hardware simulation accelerator; the data communication method comprises the following steps:
Receiving a forced assignment command sent by a debugging device; the forced assignment command is used for forcedly assigning the value of the appointed input signal to a target coding value; the forced assignment command is a command supported by the hardware simulation accelerator; the target coding value is obtained by converting target characters based on a tool command language script;
generating a data frame supported by a serial port communication protocol corresponding to the forced assignment command;
and outputting the data frame according to the preset baud rate.
In some possible embodiments, the mandatory assignment command includes a target encoding value field; generating a data frame supported by a serial port communication protocol corresponding to the forced assignment command includes: adding a start bit before the byte first bit of the target coding value field; and
and adding an end bit after the byte end bit of the target coding value field to obtain a data frame.
In some possible implementations, the serial communication protocol is a universal asynchronous receiver transmitter serial communication protocol;
the hardware simulation accelerator comprises a tested design, and a universal asynchronous receiving and transmitting transmitter controller is integrated on the tested design; outputting the data frame according to the preset baud rate, including:
transmitting the data frame to a data receiving module of a universal asynchronous receiving and transmitting transmitter controller according to a preset baud rate;
Wherein the preset baud rate is adapted to the data transceiving rate of the universal asynchronous receiver transmitter controller.
In some possible implementations, the hardware simulation accelerator further comprises a serial port transmission module;
the first end of the serial port transmission module is in communication connection with the debugging equipment, and the second end of the serial port transmission module is in communication connection with the data receiving module of the universal asynchronous receiver transmitter controller;
the serial port transmission module is used for receiving the forced assignment command sent by the debugging equipment, generating a data frame supported by a serial port communication protocol corresponding to the forced assignment command, and transmitting the data frame to the data receiving module of the universal asynchronous receiver-transmitter controller according to a preset baud rate.
In some possible embodiments, after transmitting the data frame to the data receiving module of the universal asynchronous receiver transmitter controller, the data communication method further comprises:
under the condition that the tested design carries out parameter adjustment on the appointed input signal based on the data frame, outputting the appointed output signal to a data sending module of the universal asynchronous receiving and transmitting transmitter controller so as to enable the debugging equipment to detect the appointed output signal based on the state description language function;
Wherein the specified output signal matches the specified input signal.
In a third aspect, an embodiment of the present application provides a data communication method, applied to a data communication system, where the data communication system includes a debugging device and a hardware emulation accelerator, and the debugging device is communicatively connected with the hardware emulation accelerator; the data communication method comprises the following steps:
the method comprises the steps that debugging equipment receives a debugging command which is input by a user and aims at a specified input signal, wherein the debugging command comprises a command character string, and target characters are included in the command character string;
converting the target character based on the tool command language script to obtain a target coding value corresponding to the target character;
generating a forced assignment command corresponding to the target character; the forced assignment command is used for forcedly assigning the value of the appointed input signal to a target coding value; the forced assignment command is a command supported by the hardware simulation accelerator;
sending the forced assignment command to the hardware simulation accelerator;
the hardware emulation accelerator receives a forced assignment command sent by the debugging equipment;
generating a data frame supported by a serial port communication protocol corresponding to the forced assignment command;
and outputting the data frame according to the preset baud rate.
In a fourth aspect, embodiments of the present application provide a data communication apparatus that is applied to a debugging device, where the debugging device is communicatively connected to a hardware emulation accelerator; the data communication apparatus includes:
The first receiving module is used for receiving a debugging command aiming at a specified input signal and input by a user, wherein the debugging command comprises a command character string, and the command character string comprises target characters;
the first conversion module is used for converting the target character based on the tool command language script to obtain a target coding value corresponding to the target character;
the first generation module is used for generating a forced assignment command corresponding to the target character; the forced assignment command is used for forcedly assigning the value of the appointed input signal to a target coding value; the forced assignment command is a command supported by the hardware simulation accelerator;
and the first sending module is used for sending the forced assignment command to the hardware simulation accelerator so that the hardware simulation accelerator generates a data frame supported by the serial port communication protocol corresponding to the forced assignment command based on the forced assignment command and outputs the data frame according to the preset baud rate.
In a fifth aspect, embodiments of the present application provide a data communication apparatus, which is applied to a hardware simulation accelerator, including:
the second receiving module is used for receiving the forced assignment command sent by the debugging equipment; the forced assignment command is used for forcedly assigning the value of the appointed input signal to a target coding value; the forced assignment command is a command supported by the hardware simulation accelerator; the target coding value is obtained by converting target characters based on a tool command language script;
The second generation module is used for generating a data frame supported by a serial port communication protocol corresponding to the forced assignment command;
and the first output module is used for outputting the data frames according to the preset baud rate.
In a sixth aspect, embodiments of the present application provide a data communication system, where the data communication system includes a debug apparatus as provided in any of the embodiments of the present application described above, and a hardware emulation accelerator as provided in any of the embodiments of the present application described above.
In some possible implementations, the hardware emulation accelerator comprises a Palladium hardware emulation accelerator with Palladium software xeDebug running on the debug device.
In a seventh aspect, embodiments of the present application provide a data communication apparatus, including:
a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements a data communication method as provided in any one of the embodiments of the present application.
In an eighth aspect, embodiments of the present application provide a computer storage medium having stored thereon computer program instructions that, when executed by a processor, implement a data communication method as provided in any of the embodiments of the present application described above.
In a ninth aspect, embodiments of the present application provide a computer program product, the instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform a data communication method as provided in any one of the embodiments of the present application.
According to the data communication method, device, system and equipment and computer storage medium, debugging equipment receives a debugging command input by a user, characters in the debugging command are converted based on tool command language scripts to obtain target coding values corresponding to target characters, a forced assignment command corresponding to the target characters is generated, and the forced assignment command is used for forcedly assigning values of specified input signals to the target coding values; the force assign command is a command supported by the hardware emulation accelerator. And the hardware simulation accelerator generates a data frame supported by the serial port communication protocol corresponding to the forced assignment command based on the forced assignment command, and outputs the data frame according to the preset baud rate. Compared with the prior art, the data communication method, the device, the system, the equipment and the computer storage medium provided by the embodiment of the application can utilize the tool command language library in the debugging equipment to convert character string information and generate the forced assignment command adapted to the hardware simulation accelerator, and after the hardware simulation accelerator receives the forced assignment command, the hardware simulation accelerator can generate the data frame supported by the serial port communication protocol corresponding to the forced assignment command based on the forced assignment command and output the data frame according to the preset baud rate so as to realize normal data communication between the debugging equipment and the hardware simulation accelerator.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described, and it is possible for a person skilled in the art to obtain other drawings according to these drawings without inventive effort.
Fig. 1 is a flow chart of a first data communication method according to an embodiment of the present application;
FIG. 2 is a flow chart of a second data communication method according to an embodiment of the present application;
FIG. 3 is a flow chart of a third data communication method according to an embodiment of the present application;
FIG. 4 is a flow chart of a fourth data communication method according to an embodiment of the present application;
fig. 5 is an overall flow diagram of a scenario embodiment of a data communication method according to an embodiment of the present application;
FIG. 6 is a flowchart of a fifth data communication method according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a data communication device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of another data communication apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a data communication system according to an embodiment of the present application;
Fig. 10 is a schematic structural diagram of a data communication device according to an embodiment of the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application are described in detail below to make the objects, technical solutions and advantages of the present application more apparent, and to further describe the present application in conjunction with the accompanying drawings and the detailed embodiments. It should be understood that the specific embodiments described herein are intended to be illustrative of the application and are not intended to be limiting. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by showing examples of the present application.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
Before describing the technical solution provided by the embodiments of the present application, in order to facilitate understanding of the embodiments of the present application, the present application first specifically describes the problems existing in the related art:
as described in the background section, the present inventors have studied and found that in the field of chip front-end verification, two types of schemes are generally employed in accelerating verification of a test under test by a hardware simulation accelerator. The first scheme is to verify the design to be tested on the hardware simulation accelerator and to connect the hardware simulation accelerator with the device with UART serial port through the universal asynchronous receiver transmitter cable. The second scheme is to simulate a serial port assistant on the hardware simulation accelerator through a software simulation acceleration mode to be responsible for simulating the receiving and sending of UART serial port data, and integrate UART Virtual IP inside the hardware simulation accelerator, and the communication channel needs to be independently introduced.
However, the inventor of the present application has further studied and found that, for the first type of solution, since the interfaces provided by the hardware emulation accelerator are limited in general, and in the case that multiple interfaces in the hardware emulation accelerator need to be connected simultaneously for verification of the tested design, a large amount of external adaptation cards and other materials are often required. Therefore, if a hardware communication mode adopting such a scheme is adopted, the hardware communication mode is extremely easy to be limited by hardware materials.
For the second type of solution, although not requiring a lot of hardware support, the second solution may require the introduction of a complex communication design flow. Such schemes typically require the integration of IP into the design under test and the separate introduction of communication channels, etc. Therefore, the scheme is not limited by hardware materials, but greatly increases the design verification difficulty, so that the simulation verification difficulty is greatly improved.
Based on this, there is still a need in the industry for a solution that can accelerate verification of a tested design by a hardware emulation accelerator without using external hardware for verifying UART interfaces and without increasing the complexity of verification.
In view of the foregoing, in order to solve the foregoing prior art problems, embodiments of the present application provide a data communication method, apparatus, device, storage medium, and computer program product. It should be noted that the examples provided herein are not intended to limit the scope of the disclosure.
The following first describes a data communication method provided in an embodiment of the present application.
Fig. 1 is a schematic flow chart of a first data communication method according to an embodiment of the present application. The data communication method is applied to a debugging device which is in communication connection with a hardware emulation accelerator. The commissioning device may be an electronic device, such as a server, computer or other user terminal, etc. As shown in fig. 1, the data communication method includes the steps of:
S110, receiving a debugging command aiming at a specified input signal, wherein the debugging command comprises a command character string, and the command character string comprises target characters;
s120, converting the target character based on the tool command language script to obtain a target coding value corresponding to the target character;
s130, generating a forced assignment command corresponding to the target character; the forced assignment command is used for forcedly assigning the value of the appointed input signal to a target coding value; the forced assignment command is a command supported by the hardware simulation accelerator;
and S140, sending the forced assignment command to the hardware simulation accelerator so that the hardware simulation accelerator generates a data frame supported by the serial port communication protocol corresponding to the forced assignment command based on the forced assignment command, and outputting the data frame according to the preset baud rate.
The data communication method is applied to debugging equipment, and is used for converting characters in the debugging command based on tool command language scripts by receiving the debugging command input by a user to obtain target coding values corresponding to target characters, and regenerating a forced assignment command corresponding to the target characters, wherein the forced assignment command is used for forcedly assigning values of specified input signals to the target coding values; the force assign command is a command supported by the hardware emulation accelerator. And sending the forced assignment command to the hardware simulation accelerator, so that the hardware simulation accelerator generates a data frame supported by a serial port communication protocol corresponding to the forced assignment command based on the forced assignment command, and outputs the data frame according to a preset baud rate.
Compared with the prior art, the data communication method provided by the embodiment of the application can utilize the tool command language script in the debugging equipment to convert the character string information and generate the forced assignment command of the hardware simulation accelerator adaptation, and send the forced assignment command to the hardware simulation accelerator so as to realize normal data communication between the debugging equipment and the hardware simulation accelerator.
The specific implementation of the steps 110 to 140 will be described in detail below.
In S110, in a specific implementation, the user may perform operations such as touch, clicking, etc. on a certain preset interface to input information when the debugging device displays the interface.
As such, the debugging device receives a debugging command for a specified input signal input by the user in response to the above-described related operation by the user.
The debug command may include a command string, and the command string may include a target character. Illustratively, the debug command string may include a command string "root" as described below, and the target character may be any character in the command string "root", for example, "r", etc., which is not strictly limited in this application.
In S120, in a specific implementation, the target character is converted based on the tool command language script, and a target code value corresponding to the target character is obtained.
TCL (Tool Command Language ) is a scripting language for interpretation execution that provides general purpose programming capabilities: supporting variables, processes and control structures that may be used in rapid prototyping, script programming, GUI (Graphical User Interface ) and testing, for brevity, the description of TCL script is used below in place of the tool command language script described above.
In this embodiment, the TCL script is used to perform code value conversion on the target character, so as to obtain the corresponding target code value. The target code value may be hexadecimal code, binary code, or the like, and the present application is not limited to this. For example, if the target character is "r", the target code value may be 72 in 16.
In some more specific embodiments, to ensure full conversion for different characters, the target characters may be converted to Unicode codes based on TCL scripts.
In this way, in the actual code conversion, the Unicode code adopts double bytes and 16 bits to carry out numbering, 65536 characters can be coded, and the coverage for different characters is strong, so that the comprehensive and efficient code value conversion of the characters can be effectively ensured.
In a specific implementation, in S130, after the target character is converted into the target code value by using the TCL script, a forced assignment command corresponding to the target character is generated.
The forced assignment command is specifically used for forcedly assigning the value of the appointed input signal to the target coding value. The forced assignment command is a command supported by the hardware emulation accelerator.
For example, if the signal name of the specified input signal is "data_i" and the target code value is "h72", the generated forced assignment command may be used to forcibly assign "h72" to the specified input signal having the signal name of "data_i".
It should be noted that, in order to ensure that the forced assignment function of the forced assignment command is enabled to be effective in the hardware emulation accelerator so as to facilitate signal adjustment of the subsequent hardware emulation accelerator, the forced assignment command is a command supported by the hardware emulation accelerator.
In S140, in a specific implementation, after the above-mentioned forced assignment command is generated, the forced assignment command is sent to the hardware simulation accelerator. Thus, after receiving the forced assignment command sent by the debug device, the hardware emulation accelerator can generate a data frame supported by the serial port communication protocol corresponding to the forced assignment command based on the forced assignment command, and output the data frame according to the preset baud rate. Therefore, on the premise of not consuming hardware materials, the data communication between the debugging equipment and the hardware simulation accelerator is efficiently and simply realized.
In this embodiment, in combination with an application scenario of an actual hardware simulation accelerator, the hardware simulation accelerator is usually configured with control software matched with the hardware operation thereof when leaving the factory, and the software is mainly used for operations such as loading and debugging.
Based on this, when the above-described forced assignment command is sent to the hardware emulation accelerator, software corresponding to the hardware emulation accelerator may be deployed in the debug apparatus, for example. And the hardware simulation accelerator generates a data frame supported by a serial port communication protocol corresponding to the hardware simulation accelerator based on the forced assignment command, and outputs the data frame according to a preset baud rate.
It should be noted that the serial communication protocol is a convention for enabling two parties to communicate information with each other based on serial ports, and defines a protocol data frame format and a transmission mode thereof that the two parties follow.
In this embodiment, the serial communication protocol may be, for example, UART serial communication protocol, USB (Universal Serial Bus ) protocol, SPI (Serial Peripheral Interface, serial peripheral interface) protocol, etc., which is not strictly limited in this application, and may be specifically determined according to actual communication requirements.
And, in the present embodiment, the Baud rate (Baud rate) is used to measure the symbol transmission rate. In serial asynchronous communication, since there is no clock signal, both parties of communication need to have a baud rate set in order to decode the signal.
In view of this, the preset baud rate may be a predetermined fixed baud rate, for example 4800, 9600, 115200, etc., and the specific value of the preset baud rate is not specifically limited herein.
In some more specific embodiments, considering that the debug command includes a target string, where a plurality of characters may be included in the target string, in order to ensure consistency and accuracy of information in a data communication process, before converting the target character based on the tool command language script to obtain a target code value corresponding to the target character, the data communication method may further include the following steps:
splitting the command character string to obtain at least one character which is orderly arranged; at least one character may include at least a target character;
the sending the forced assignment command to the hardware emulation accelerator may include:
and sequentially sending the forced assignment commands corresponding to at least one character to the hardware simulation accelerator.
In specific implementation, after receiving a debug command, characters in a command character string included in the debug command are split in sequence, so that orderly arranged characters are obtained.
In this way, when the character code value conversion and the forced assignment command generation are performed subsequently, the related operation can be performed according to the sorting of at least one character obtained by splitting. And finally, sequentially sending the forced assignment commands corresponding to the at least one character to the hardware simulation accelerator.
In some other possible embodiments, the character code value conversion and the forced assignment command generation of the at least one character may be performed not sequentially, but only by ensuring that the forced assignment command corresponding to the at least one character is sent to the hardware simulation accelerator sequentially, so that accuracy and effectiveness of communication data are fully ensured.
In some more specific embodiments, in order to more reasonably implement generation of the forced assignment command, the forced assignment command corresponding to the target character may include a forced assignment enable field, a name field for designating an input signal, and a target code value field.
Illustratively, the force assignment command may be "force data_ i h72". Where "force" is a force assignment enable field, "data_i" is a name field specifying an input signal, and "h72" may be a target encoding value field. The assignment signal may be forcedly assigned to the assignment value by invoking the force function supported by the hardware emulation accelerator, in the above example, "force data_ i h72" is forcedly assigned to the assignment input signal data_i as "h72".
In order to more intuitively understand the processing operation for the user input command in the above embodiment, reference is made to fig. 2, and fig. 2 is a schematic flow chart of a second data communication method according to an embodiment of the present application.
In fig. 2, first, a user inputs a debug command, and after the debug device receives the debug command, the character string in the debug command is split into individual characters. And sequentially inputting the single characters obtained after segmentation, and judging whether the character input is completed or not. If so, ending the flow. If not, the input character is converted into its code value. After obtaining the code value corresponding to the character, generating a corresponding forced assignment command, sending the forced assignment command to the hardware simulation accelerator,
The data communication method shown in fig. 2 will be described in detail with reference to the flow shown in fig. 2 as a specific example. The hardware simulation accelerator is specifically palladium, and force is a command supported by palladium, and supports the function of forcing an assigned signal value.
As shown in fig. 2, illustratively, first, the user inputs a debug command with respect to a specified input signal, assuming that a target character string included in the debug command is "root". After receiving the debug command, the input command is split, i.e. the string "root" is split into individual characters "r", "o", "o", "t".
And then, inputting the single character obtained after segmentation, and judging whether the character is input completely or not. If so, ending the flow. If not, the input character is converted into its unicode code value. Assuming r characters are processed, the r characters are converted to a 16-ary 72.
After the code value corresponding to the character is obtained, the obtained code value is transmitted to the interior of the paladium through force, which is equivalent to generating a corresponding forced assignment command through force, and the forced assignment command is sent to the paladium. In connection with the above example, the force command, i.e., the force assignment command, may be "force data_ i h72". Wherein force is a paladium supported command; data_i is a defined input signal, and corresponds to the signal name of the specified input signal; h in h72 indicates that the code value is hexadecimal.
In some more specific embodiments, in order to more reasonably realize the input of the debug command of the user for the specified input signal, the debug command may further include an externally provided calling function; the data communication method may further include, before generating the forced assignment command corresponding to the target character:
based on the calling function, a specified input signal is determined.
Illustratively, the calling function may be an externally provided function obtained based on the TCL script. The calling function can be pre-packaged with
The signal name of the specified input signal and the like.
In this way, before the subsequent forced assignment command generation stage, the specific package content of the calling function is analyzed to determine the corresponding specified input signal, so that the corresponding encoded value is accurately and forcedly assigned to the specified input signal.
In some more specific embodiments, although the above embodiments of the present application focus on the transmission of data from the debug apparatus to the hardware emulation accelerator, data communication is actually a process of interaction between two parties. Based on this, correspondingly, from the aspect of data interaction requirement between the debugging device and the hardware emulation accelerator, after sending the forced assignment command into the hardware emulation accelerator, the data communication method may further include:
Monitoring a specified output signal in the hardware simulation accelerator based on the state description language function; the specified output signal is matched with the specified input signal;
generating a signal monitoring log, wherein the signal monitoring log is used for recording the signal change condition of the appointed output signal;
and outputting the signal monitoring log for display.
It should be noted that, in this embodiment, the debug apparatus has an SDL (State Description Language ) function, and the SDL function may be used to detect a change of a certain specified signal in the hardware emulation accelerator.
In the present embodiment, in a specific implementation, a specified output signal matching a specified input signal is set in advance as a specified monitor signal thereof. After a user inputs a debug command for a specified input signal and the hardware simulation accelerator receives a forced assignment command converted and generated by the hardware simulation accelerator, the debug device monitors the specified output signal in the hardware simulation accelerator based on an SDL function, generates a signal monitoring log for recording the signal change condition of the specified output signal, and then outputs and displays information in the log.
The debugging device monitors the specified output signal based on the SDL function, outputs signal information of sign change of the specified output signal to the SDL.log, and displays information collected in the SDL.log through an Xterm tool in the linux system so as to enable relevant testers to monitor and view the signals.
Referring to fig. 3, fig. 3 is a schematic flow chart of a third data communication method according to an embodiment of the present application. The data communication method shown in fig. 3 may be applied to a hardware simulation accelerator.
As shown in fig. 3, the data communication method applied to the hardware simulation accelerator provided in the embodiment of the application includes the following steps:
s310, receiving a forced assignment command sent by the debugging equipment; the forced assignment command is used for forcedly assigning the value of the appointed input signal to a target coding value; the forced assignment command is a command supported by the hardware simulation accelerator; the target coding value is obtained by converting target characters based on a tool command language script;
s320, generating a data frame supported by a serial port communication protocol corresponding to the forced assignment command;
s330, outputting the data frame according to the preset baud rate.
The data communication method is applied to a hardware simulation accelerator, and the forced assignment command is used for forcedly assigning the value of a specified input signal to a target coding value by receiving the forced assignment command sent by debugging equipment, wherein the forced assignment command is a command supported by the hardware simulation accelerator, and the target coding value is obtained by converting target characters based on a TCL script. In this way, based on the received forced assignment command, a data frame supported by the serial port communication protocol corresponding to the forced assignment command is generated, and the data frame is output according to a preset baud rate. Compared with the prior art, the data communication method provided by the embodiment of the application is characterized in that the hardware simulation accelerator receives the forced assignment command sent by the debugging equipment, generates the data frame supported by the serial port communication protocol corresponding to the forced assignment command based on the forced assignment command, and outputs the data frame according to the preset baud rate, so that normal data communication between the debugging equipment and the hardware simulation accelerator is realized. The scheme can accelerate verification of the tested time through the hardware simulation accelerator, is not limited by external hardware as much as possible, and does not increase the complexity of the verification process.
The specific implementation of steps 310 to 330 is described in detail below.
In S310, in a specific implementation, receiving a forced assignment command sent by the debug device; the forced assignment command is used for forcedly assigning the value of the appointed input signal to a target coding value; the forced assignment command is a command supported by the hardware simulation accelerator; the target coding value is obtained by converting target characters based on the TCL script.
In a specific implementation, a data frame supported by the serial communication protocol corresponding to the force assignment command is generated in S320.
In S330, in a specific implementation, the data frame is output according to a preset baud rate.
In some possible embodiments, in order to more reasonably implement the generation of the data frame, the mandatory assignment command may include a target encoding value field; generating a data frame supported by a serial communication protocol corresponding to the forced assignment command may include: adding a start bit before the byte first bit of the target coding value field; and
and adding an end bit after the byte end bit of the target coding value field to obtain a data frame.
In this embodiment, the data frame starts from the start bit to the end bit, and the middle is the valid data corresponding to the target code value, that is, the main data content of the transmission. The valid data may be binary characters, typically agreed to be 5, 6, 7 or 8 bits long.
For example, if the target encoded value field data is 8 bits, for example, 01110010, then a start bit and an end bit are attached to the data, specifically, the start bit is added before the first data bit of 01110010, the end bit is added at the last data bit of 01110010, and finally, the data frame corresponding to the data is encapsulated.
In addition, in some more specific embodiments, when generating the data frame, in addition to adding the start bit and the stop bit, a check bit may be attached to the corresponding data, which is not strictly limited in this application, and specifically may be flexibly set according to the actual communication requirement.
In some more specific embodiments, the serial communication protocol is a universal asynchronous receiver transmitter serial communication protocol;
the hardware simulation accelerator can comprise a tested design, and a universal asynchronous receiving and transmitting transmitter controller is integrated on the tested design; outputting the data frame according to the preset baud rate may include:
transmitting the data frame to a data receiving module of a universal asynchronous receiving and transmitting transmitter controller according to a preset baud rate;
wherein the preset baud rate is adapted to the data transceiving rate of the universal asynchronous receiver transmitter controller.
In this embodiment, for brevity, UART is used instead of the aforementioned universal asynchronous receiver transmitter. A hardware emulation accelerator is used to accelerate the verification process of a Design Under Test (DUT), which may be included therein. The design under test includes the logic code of the chip.
To facilitate test communications, a UART controller may be integrated into the design under test. The UART controller is a communication controller designed according to a UART serial communication protocol, and can realize full duplex communication. The UART controller includes a data receiving module (rx port) and a data transmitting module (tx port) for respectively implementing data receiving and transmitting.
In this way, after the data frame is generated, the data can be sequentially transmitted to the data receiving module (rx port) of the UART controller in a serial transmission mode according to the preset baud rate adapted to the data transceiving rate of the UART controller, so that the data transmission from the debugging device to the hardware simulation accelerator is finally realized.
In some possible embodiments, the hardware simulation accelerator further includes a serial port transmission module. The serial port transmission module is arranged in the hardware simulation accelerator. The first end of the serial port transmission module can be in communication connection with the debugging equipment, and the second end of the serial port transmission module can be in communication connection with the data receiving module of the UART controller.
The serial port transmission module can be specifically used for receiving the forced assignment command sent by the debugging equipment, generating a data frame supported by a serial port communication protocol corresponding to the forced assignment command, and transmitting the data frame to the data receiving module of the UART controller according to a preset baud rate.
Illustratively, the serial port transfer module receives a force-to-assign command sent by the commissioning device through a first end communicatively coupled to the commissioning device. The forced assignment command may include a target encoded value field, and after the forced assignment command is received, the serial port transmission module may add a start bit before a byte header of the target encoded value field and add an end bit after a byte end bit of the target encoded value field, so as to generate a data frame supported by a serial port communication protocol corresponding to the forced assignment command.
After the data frame is generated, the serial transmission module can sequentially send the data to the data receiving module (rx port) of the UART controller bit by bit in a serial transmission mode according to a preset baud rate adapted to the data receiving and transmitting rate of the UART controller.
In order to more intuitively understand the foregoing embodiments of the present application, please refer to fig. 4, fig. 4 is a schematic flow chart of a fourth data communication method according to an embodiment of the present application.
In fig. 4, optionally, a serial port transmission module in the hardware emulation accelerator receives 8-bit (bit) data input by the debug device, the serial port transmission module performs data conversion through corresponding data conversion logic, adds a start bit and a stop bit to the received 8-bit data to obtain a total 10-bit data frame, and outputs the data frame to a data receiving module of a universal asynchronous receiver-transmitter controller integrated in the tested device according to single-bit data according to a preset baud rate, namely, sequentially sends the data to the data receiving module of the universal asynchronous receiver-transmitter controller one by one in a serial transmission mode. When the data frame is output according to the preset baud rate, the start bit is used as the first bit to be output, and the stop bit is used as the last bit to be output.
The data communication method shown in fig. 4 will be described in detail with reference to the flow shown in fig. 4 by way of a specific example. If the data input by the debugging device includes target code value field data, the target code value field data is assumed to be 8bit data_i [7:1], and the target code value field data is subjected to data conversion through corresponding data conversion logic, for example, a start bit and a stop bit are added to the received 8bit data to obtain a total 10bit data frame, and then the data frame is output to a data receiving module of a UART controller (universal asynchronous receiver transmitter controller) integrated in the tested design according to a single bit according to a preset baud rate. When the data frame is output according to the preset baud rate, the start bit is used as the first bit to be output, and the stop bit is used as the last bit to be output.
In one example, the serial port transmission module in fig. 4 is mainly configured to process the encoded value data in the forced assignment command from the debug device through corresponding data conversion logic to obtain a data frame, and then output the data frame to the data receiving module (RX port of UART controller) of the universal asynchronous receiver transmitter controller integrated in the tested device according to single-bit data according to a preset baud rate. Wherein the converted data frame is supported by a serial communication protocol.
In some more specific embodiments, although the above embodiments of the present application focus on the transmission of data from the debug apparatus to the hardware emulation accelerator, data communication is actually a process of interaction between two parties. Based on this, correspondingly, from the aspect of data interaction requirement between the debugging device and the hardware emulation accelerator, after transmitting the data frame to the data receiving module of the UART controller, the data communication method may further include:
under the condition that the tested design carries out parameter adjustment on the appointed input signal based on the data frame, outputting the appointed output signal to a data sending module of the universal asynchronous receiving and transmitting transmitter controller so as to enable the debugging equipment to detect the appointed output signal based on the state description language function;
Wherein the specified output signal matches the specified input signal.
In this embodiment, in a specific implementation, the debugging device may set a specified output signal matching with the specified input signal as its specified monitor signal in advance based on the SDL function.
In this way, after a user inputs a debug command for a specified input signal, and the related data communication processing operation is performed to enable the tested design to perform parameter adjustment on the specified input signal, the debug equipment can monitor the specified output signal in the hardware simulation accelerator based on the SDL function, so as to timely feed back the test process of the tested design to the related debugger.
In some possible embodiments, further, in order to more reasonably implement data communication between the debug device and the hardware emulation accelerator, the hardware emulation accelerator may specifically include a Palladium hardware emulation accelerator, and the debug device may have Palladium software xeDebug running thereon.
The xeDebug is control software provided by a manufacturer of the hardware simulation accelerator and used for controlling compiled data to be loaded to Palladium hardware, and is mainly used for loading and debugging.
In order to facilitate a more intuitive understanding of the data communication method provided by the above embodiment, the data communication method applied to the debugging device and to the hardware simulation accelerator will be described in the following in a specific embodiment. Fig. 5 is an overall flowchart of a scenario embodiment of a data communication method according to an embodiment of the present application.
The application scenario of the present scenario embodiment may be: the hardware emulation accelerator may be specifically Palladium, and the debug device may be running Palladium software xedebuge, where TCL scripts are self-encapsulated. The serial port transmission module can be included in the hardware simulation accelerator Palladium, and the serial port transmission module is arranged in the hardware simulation accelerator Palladium. The hardware simulation accelerator paladium can also comprise a tested design DUT, and a universal asynchronous receiver transmitter controller (UART controller) can be integrated in the tested design DUT, wherein the universal asynchronous receiver transmitter controller comprises a data receiving module (rx port) and a data transmitting module (tx port) and is used for respectively realizing the receiving and transmitting of data.
With reference to fig. 5, the data communication method of the present application will be described in terms of both reception and transmission of UART data.
Specifically, in this embodiment of the present scenario, the transmit path of UART data is: the method comprises the steps that a tx port of a UART controller integrated by a tested design in a hardware simulation accelerator is used for sending out, a debugging device monitors signal change and indication signals of a data sending module (tx port) in the UART controller through a state description language function (SDL function), signals to be sent out are converted into characters and then are output to an SDL.log file, and then the output information is displayed through an Xterm tool in a Linux system.
And, in this scenario embodiment, the UART data receiving path is: calling the encapsulated TCL script in the running interface of the software xeDebug in the debugging equipment for information input. Thereafter, the input debug information is converted into machine recognizable, transmittable coded values by means of a tool command language script (TCL script). And then, the converted coded value is forcedly assigned to the appointed input signal based on the forceful assignment function, and a corresponding forceful assignment command is generated. The debugging equipment sends the forced assignment command to a serial port transmission module in the hardware simulation accelerator based on software-hardware interaction between the hardware simulation accelerators Palladium. The serial port transmission module attaches a start bit and a stop bit to corresponding data based on the forced assignment command, and sequentially transmits the data to a data receiving module (rx port) of the universal asynchronous receiver-transmitter controller in a serial transmission mode according to a preset baud rate.
The embodiment of the scene can utilize the TCL script in the debugging equipment to convert the character string information and generate the forced assignment command adapted by the hardware simulation accelerator, and send the forced assignment command to the hardware simulation accelerator, and the hardware simulation accelerator generates the data frame supported by the serial port communication protocol corresponding to the forced assignment command and outputs the data frame according to the preset baud rate, thereby realizing normal data communication between the debugging equipment and the hardware simulation accelerator. Compared with the prior art, when the UART transmitting and receiving functions are realized, the embodiment does not need additional hardware materials, and is simple to integrate and apply; meanwhile, other complex designs are not required to be introduced, the complexity of the verification process is not increased, the reusability is high, and the cost is low.
Referring to fig. 6, fig. 6 is a flowchart of a fifth data communication method according to an embodiment of the present application. Based on the same technical concept as the above embodiments, the embodiments of the present application further provide a data communication method, which is applied to a data communication system. The data communication system may include a debugging device and a hardware emulation accelerator, the debugging device being communicatively coupled to the hardware emulation accelerator.
As shown in fig. 6, the data communication method applied to the data communication system includes the steps of:
S610, the debugging equipment receives a debugging command aiming at a specified input signal, wherein the debugging command is input by a user and comprises a command character string, and the command character string comprises target characters;
s620, converting the target character based on the tool command language script to obtain a target coding value corresponding to the target character;
s630, generating a forced assignment command corresponding to the target character; the forced assignment command is used for forcedly assigning the value of the appointed input signal to a target coding value; the forced assignment command is a command supported by the hardware simulation accelerator;
s640, sending the forced assignment command to the hardware simulation accelerator;
s650, the hardware emulation accelerator receives a forced assignment command sent by the debugging equipment;
s660, generating a data frame supported by a serial port communication protocol corresponding to the forced assignment command;
s670, outputting the data frame according to the preset baud rate.
In this embodiment, a debug device receives a debug command input by a user, converts a character in the debug command based on a tool command language script to obtain a target code value corresponding to a target character, and regenerates a forced assignment command corresponding to the target character, where the forced assignment command is used to force a value of a specified input signal to be a target code value; the force assign command is a command supported by the hardware emulation accelerator.
In this way, the forced assignment command is sent to the hardware simulation accelerator, and the hardware simulation accelerator can generate a data frame supported by the serial port communication protocol corresponding to the forced assignment command based on the forced assignment command and output the data frame according to the preset baud rate, so that normal data communication between the debugging equipment and the hardware simulation accelerator can be effectively realized.
Compared with the prior art, the scheme can accelerate verification of the tested time through the hardware simulation accelerator, is not limited by external hardware as much as possible, and does not increase the complexity of the verification flow.
It should be appreciated that for brevity, the detailed implementation of steps 610 through 670 described above is not described in this application. For a specific implementation of steps 610 to 640, reference is made to the foregoing detailed description of the specific embodiments of steps 110 to 140; the specific implementation manners of the foregoing steps 650 to 670 may be referred to in the foregoing detailed description of the specific embodiments of the steps 310 to 3300, etc., and are not repeated herein.
Based on the data communication method applied to the debugging equipment provided by the embodiment, correspondingly, the application also provides a data communication device corresponding to the data communication method applied to the debugging equipment. The data communication device is applied to a debugging apparatus, which is communicatively connected to a hardware emulation accelerator, and is described in detail below with reference to fig. 7.
Fig. 7 is a schematic structural diagram of a data communication device according to an embodiment of the present application, where the data communication device is applied to a debugging apparatus, and the debugging apparatus is communicatively connected to a hardware emulation accelerator. Fig. 7 shows that the data communication apparatus includes:
a first receiving module 710, configured to receive a debug command for a specified input signal, where the debug command may include a command string, and the command string may include a target character;
a first conversion module 720, configured to convert the target character based on the tool command language script, to obtain a target encoding value corresponding to the target character;
a first generating module 730, configured to generate a forced assignment command corresponding to the target character; the forced assignment command is used for forcedly assigning the value of the appointed input signal to a target coding value; the forced assignment command is a command supported by the hardware simulation accelerator;
the first sending module 740 is configured to send the forced assignment command to the hardware emulation accelerator, so that the hardware emulation accelerator generates a data frame supported by the serial port communication protocol corresponding to the forced assignment command based on the forced assignment command, and outputs the data frame according to a preset baud rate.
The data communication device is applied to debugging equipment, can receive a debugging command input by a user by setting a corresponding functional module, converts characters in the debugging command based on a TCL script to obtain a target coding value corresponding to a target character, and regenerates a forced assignment command corresponding to the target character, wherein the forced assignment command is used for forcedly assigning a value of a specified input signal to the target coding value; the force assign command is a command supported by the hardware emulation accelerator. And sending the forced assignment command to the hardware simulation accelerator, so that the hardware simulation accelerator generates a data frame supported by a serial port communication protocol corresponding to the forced assignment command based on the forced assignment command, and outputs the data frame according to a preset baud rate. Compared with the prior art, the data communication device provided by the embodiment of the application can utilize the TCL library in the debugging equipment to convert the character string information and generate the forced assignment command of the hardware simulation accelerator adaptation, and send the forced assignment command to the hardware simulation accelerator so as to realize normal data communication between the debugging equipment and the hardware simulation accelerator.
In some possible embodiments, before converting the target character based on the tool command language script to obtain the target code value corresponding to the target character, the data communication apparatus may further include:
the splitting module can be used for splitting the command character string to obtain at least one character which is arranged in sequence; at least one character may include at least a target character;
the first sending module 740 sends the forced assignment command to the hardware emulation accelerator, which may be specifically configured to:
and sequentially sending the forced assignment commands corresponding to at least one character to the hardware simulation accelerator.
In some possible embodiments, the forced assignment command corresponding to the target character may include a forced assignment enable field, a name field specifying the input signal, and a target code value field.
In some possible embodiments, the debug command may further include an externally provided calling function; the data communication apparatus may specifically further include, before generating the forced assignment command corresponding to the target character:
the first determination module may be configured to determine the specified input signal based on the calling function.
In some possible embodiments, after the forcing assignment command is sent to the hardware emulation accelerator, the data communication apparatus may specifically further include:
The monitoring module can be used for monitoring the appointed output signal in the hardware simulation accelerator based on the state description language function; the specified output signal is matched with the specified input signal;
the third generation module can be used for generating a signal monitoring log, and the signal monitoring log is used for recording the signal change condition of the appointed output signal;
and the output display module can be used for outputting the signal monitoring log for display.
Based on the data communication method applied to the hardware simulation accelerator provided by the embodiment, correspondingly, the application also provides a data communication device corresponding to the data communication method applied to the hardware simulation accelerator, and the data communication device is applied to the hardware simulation accelerator, and is described in detail below through fig. 8.
Fig. 8 is a schematic structural diagram of another data communication device according to an embodiment of the present application, where the data communication device is applied to a hardware simulation accelerator. The data communication apparatus shown in fig. 8 includes:
a second receiving module 810, configured to receive a forced assignment command sent by a debug device; the forced assignment command is used for forcedly assigning the value of the appointed input signal to a target coding value; the forced assignment command is a command supported by the hardware simulation accelerator; the target coding value is obtained by converting target characters based on a tool command language script;
A second generating module 820, configured to generate a data frame supported by a serial port communication protocol corresponding to the forced assignment command;
the first output module 830 is configured to output the data frame according to a preset baud rate.
The data communication device is applied to a hardware simulation accelerator, and receives a forced assignment command sent by debugging equipment through setting a corresponding functional module, wherein the forced assignment command is used for forcedly assigning a value of a specified input signal to a target coding value, the forced assignment command is a command supported by the hardware simulation accelerator, and the target coding value is obtained by converting a target character based on a TCL script. In this way, based on the received forced assignment command, a data frame supported by the serial port communication protocol corresponding to the forced assignment command is generated, and the data frame is output according to a preset baud rate. Compared with the prior art, the data communication device provided by the embodiment of the application realizes normal data communication between the debugging equipment and the hardware simulation accelerator by receiving the forced assignment command sent by the debugging equipment, generating the data frame supported by the serial port communication protocol corresponding to the forced assignment command based on the forced assignment command, and outputting the data frame according to the preset baud rate. The scheme can accelerate verification of the tested time through the hardware simulation accelerator, is not limited by external hardware as much as possible, and does not increase the complexity of the verification process.
In some possible embodiments, the mandatory assignment command may include a target encoding value field; the second generating module 820, configured to generate a data frame supported by a serial port communication protocol corresponding to the forced assignment command, may include: the first adding module can be used for adding a start bit before the byte first bit of the target coding value field; and
and the second adding module can be used for adding an end bit after the byte end bit of the target coding value field to obtain a data frame.
In some possible implementations, the serial communication protocol may be a universal asynchronous receiver-transmitter serial communication protocol;
the hardware simulation accelerator can comprise a tested design, and a universal asynchronous receiving and transmitting transmitter controller is integrated on the tested design; the first output module 830 outputs the data frame according to a preset baud rate, which may be specifically configured to:
transmitting the data frame to a data receiving module of a universal asynchronous receiving and transmitting transmitter controller according to a preset baud rate;
wherein the preset baud rate is adapted to the data transceiving rate of the universal asynchronous receiver transmitter controller.
In some possible implementations, the hardware simulation accelerator further comprises a serial port transmission module;
The first end of the serial port transmission module is in communication connection with the debugging equipment, and the second end of the serial port transmission module is in communication connection with the data receiving module of the UART controller;
the serial port transmission module is used for receiving the forced assignment command sent by the debugging equipment, generating a data frame supported by a serial port communication protocol corresponding to the forced assignment command, and transmitting the data frame to the data receiving module of the universal asynchronous receiver-transmitter controller according to a preset baud rate.
In some possible embodiments, after transmitting the data frame to the data receiving module of the universal asynchronous receiver transmitter controller, the data communication apparatus may further include:
the second output module can be used for outputting the appointed output signal to the data sending module of the universal asynchronous receiving and transmitting transmitter controller under the condition that the tested design carries out parameter adjustment on the appointed input signal based on the data frame, so that the debugging equipment detects the appointed output signal based on the state description language function;
wherein the specified output signal matches the specified input signal.
Based on the data communication method applied to the data communication system provided by the above embodiment, correspondingly, the present application further provides a data communication system, and the hardware simulation accelerator is described in detail below through fig. 9.
Fig. 9 is a schematic structural diagram of a data communication system according to an embodiment of the present application. The data communication system 1000 shown in fig. 9 includes a debugging device 700, and a hardware emulation accelerator 800.
In some possible embodiments, the hardware emulation accelerator 800 may comprise a Palladium hardware emulation accelerator, and the debug device 700 may have Palladium software xeDebug running thereon.
Fig. 10 is a schematic structural diagram of a data communication device according to an embodiment of the present application.
The data communication device may include a processor 1001 and a memory 1002 storing computer program instructions.
In particular, the processor 1001 described above may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more integrated circuits of embodiments of the present application.
Memory 1002 may include mass storage for data or instructions. By way of example, and not limitation, memory 1002 may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. The memory 1002 may include removable or non-removable (or fixed) media, where appropriate. Memory 1002 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 1002 is a non-volatile solid state memory.
The memory may include Read Only Memory (ROM), random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors) it is operable to perform the operations described with reference to methods in accordance with aspects of the present disclosure.
The processor 1001 implements any of the data communication methods of the above embodiments by reading and executing computer program instructions stored in the memory 1002.
In one example, the data communication device may also include a communication interface 1003 and a bus 1010. As shown in fig. 10, the processor 1001, the memory 1002, and the communication interface 1003 are connected to each other by a bus 1010, and perform communication with each other.
The communication interface 1003 is mainly used for implementing communication among the modules, devices, units and/or apparatuses in the embodiments of the present application.
Bus 1010 includes hardware, software, or both, coupling components of the data communication device to each other. By way of example, and not limitation, the buses may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a micro channel architecture (MCa) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus, or a combination of two or more of the above. Bus 1010 may include one or more buses, where appropriate. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
The data communication apparatus executes the data communication method in the embodiment of the present application, thereby realizing the data communication method described in the foregoing embodiment.
In addition, in combination with the data communication method in the above embodiment, the embodiment of the application may be implemented by providing a computer storage medium. The computer storage medium has stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the data communication methods of the above embodiments.
Based on the data communication method in the foregoing embodiments, embodiments of the present application provide a computer program product, where instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the data communication method as provided in any one of the foregoing embodiments of the present application.
It should be clear that the present application is not limited to the particular arrangements and processes described above and illustrated in the drawings. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions, or change the order between steps, after appreciating the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the present application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine readable medium or transmitted over transmission media or communication links by a data signal carried in a carrier wave. A "machine-readable medium" may include any medium that can store or transfer information. Examples of machine-readable media include electronic circuitry, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio Frequency (RF) links, and the like. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be different from the order in the embodiments, or several steps may be performed simultaneously.
Aspects of the present disclosure are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to being, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware which performs the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the foregoing, only the specific embodiments of the present application are described, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the systems, modules and units described above may refer to the corresponding processes in the foregoing method embodiments, which are not repeated herein. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, which are intended to be included in the scope of the present application.

Claims (17)

1. The data communication method is characterized by being applied to debugging equipment, wherein the debugging equipment is in communication connection with a hardware simulation accelerator; the data communication method comprises the following steps:
receiving a debug command input by a user and aiming at a specified input signal, wherein the debug command comprises a command character string, and the command character string comprises target characters;
converting the target character based on a tool command language script to obtain a target coding value corresponding to the target character;
generating a forced assignment command corresponding to the target character; the forced assignment command is used for forcedly assigning the value of the appointed input signal to the target coding value; the forced assignment command is a command supported by the hardware simulation accelerator;
And sending the forced assignment command to the hardware simulation accelerator so that the hardware simulation accelerator generates a data frame supported by a serial port communication protocol corresponding to the forced assignment command based on the forced assignment command, and outputting the data frame according to a preset baud rate.
2. The data communication method according to claim 1, wherein before the converting the target character based on the tool command language script, the data communication method further comprises:
splitting the command character string to obtain at least one character which is arranged in sequence; at least the target character is included in the at least one character;
the sending the forced assignment command to the hardware emulation accelerator includes:
and sequentially sending the forced assignment commands corresponding to the at least one character to the hardware simulation accelerator.
3. The data communication method according to claim 1, wherein the forced assignment command corresponding to the target character includes a forced assignment enable field, a name field of the specified input signal, and the target code value field.
4. The data communication method according to claim 1, wherein the debug command further includes a call function provided externally; before the generation of the forced assignment command corresponding to the target character, the data communication method further includes:
the specified input signal is determined based on the calling function.
5. The data communication method according to any one of claims 1 to 4, characterized in that after said sending said forced assignment command into said hardware emulation accelerator, said data communication method further comprises:
monitoring a specified output signal in the hardware simulation accelerator based on a state description language function; the specified output signal is matched with the specified input signal;
generating a signal monitoring log, wherein the signal monitoring log is used for recording the signal change condition of the appointed output signal;
and outputting the signal monitoring log for display.
6. A data communication method applied to a hardware simulation accelerator, the data communication method comprising:
receiving a forced assignment command sent by a debugging device; the forced assignment command is used for forcedly assigning the value of the appointed input signal to a target coding value; the forced assignment command is a command supported by the hardware simulation accelerator; the target coding value is obtained by converting target characters based on a tool command language script;
Generating a data frame supported by a serial port communication protocol corresponding to the forced assignment command;
and outputting the data frame according to a preset baud rate.
7. The data communication method according to claim 6, wherein the forced assignment command includes the target code value field; the generating the data frame supported by the serial port communication protocol corresponding to the forced assignment command comprises the following steps: adding a start bit before the byte first bit of the target coding value field; and
and adding an end bit after the byte end bit of the target coding value field to obtain the data frame.
8. The data communication method according to claim 6 or 7, wherein the serial communication protocol is a universal asynchronous receiver-transmitter serial communication protocol;
the hardware simulation accelerator comprises a tested design, wherein a universal asynchronous receiving and transmitting transmitter controller is integrated on the tested design; the outputting the data frame according to the preset baud rate comprises the following steps:
transmitting the data frame to a data receiving module of the universal asynchronous receiver transmitter controller according to the preset baud rate;
wherein the preset baud rate is adapted to a data transceiving rate of the universal asynchronous receiver transmitter controller.
9. The data communication method according to claim 8, wherein the hardware simulation accelerator further comprises a serial port transmission module;
the first end of the serial port transmission module is in communication connection with the debugging equipment, and the second end of the serial port transmission module is in communication connection with the data receiving module of the universal asynchronous receiver transmitter controller;
the serial port transmission module is used for receiving the forced assignment command sent by the debugging equipment, generating a data frame supported by a serial port communication protocol corresponding to the forced assignment command, and transmitting the data frame to the data receiving module of the universal asynchronous receiving and transmitting transmitter controller according to the preset baud rate.
10. The data communication method according to claim 8, wherein after the transmitting the data frame to the data receiving module of the universal asynchronous receiver transmitter controller, the data communication method further comprises:
outputting a specified output signal to a data sending module of the universal asynchronous receiver transmitter controller under the condition that the tested design carries out parameter adjustment on the specified input signal based on the data frame, so that the debugging equipment detects the specified output signal based on a state description language function;
Wherein the specified output signal matches the specified input signal.
11. A data communication method, which is characterized by being applied to a data communication system, wherein the data communication system comprises a debugging device and a hardware simulation accelerator, and the debugging device is in communication connection with the hardware simulation accelerator; the data communication method comprises the following steps:
the debugging equipment receives a debugging command which is input by a user and aims at a specified input signal, wherein the debugging command comprises a command character string, and the command character string comprises target characters;
converting the target character based on a tool command language script to obtain a target coding value corresponding to the target character;
generating a forced assignment command corresponding to the target character; the forced assignment command is used for forcedly assigning the value of the appointed input signal to the target coding value; the forced assignment command is a command supported by the hardware simulation accelerator;
sending the forced assignment command to the hardware simulation accelerator;
the hardware emulation accelerator receives the forced assignment command sent by the debugging equipment;
generating a data frame supported by a serial port communication protocol corresponding to the forced assignment command;
And outputting the data frame according to a preset baud rate.
12. A data communication device, characterized by being applied to a debugging device, wherein the debugging device is in communication connection with a hardware simulation accelerator; the data communication apparatus includes:
the first receiving module is used for receiving a debugging command which is input by a user and aims at a specified input signal, wherein the debugging command comprises a command character string, and the command character string comprises target characters;
the first conversion module is used for converting the target character based on the tool command language script to obtain a target coding value corresponding to the target character;
the first generation module is used for generating a forced assignment command corresponding to the target character; the forced assignment command is used for forcedly assigning the value of the appointed input signal to the target coding value; the forced assignment command is a command supported by the hardware simulation accelerator;
and the first sending module is used for sending the forced assignment command to the hardware simulation accelerator so that the hardware simulation accelerator generates a data frame supported by a serial port communication protocol corresponding to the forced assignment command based on the forced assignment command and outputs the data frame according to a preset baud rate.
13. A data communication apparatus, for use with a hardware emulation accelerator, comprising:
the second receiving module is used for receiving the forced assignment command sent by the debugging equipment; the forced assignment command is used for forcedly assigning the value of the appointed input signal to a target coding value; the forced assignment command is a command supported by the hardware simulation accelerator; the target coding value is obtained by converting target characters based on a tool command language script;
the second generation module is used for generating a data frame supported by a serial port communication protocol corresponding to the forced assignment command;
and the first output module is used for outputting the data frames according to a preset baud rate.
14. A data communication system comprising the debugging device of claim 12 and the hardware emulation accelerator of claim 13.
15. The data communication system of claim 14, wherein the hardware emulation accelerator comprises a Palladium hardware emulation accelerator, and wherein the debug device has Palladium software xeDebug running thereon.
16. A data communication device, the device comprising: a processor and a memory storing computer program instructions;
The processor, when executing the computer program instructions, implements a data communication method as claimed in any one of claims 1-11.
17. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon computer program instructions, which when executed by a processor, implement the data communication method according to any of claims 1-11.
CN202310653362.XA 2023-06-05 2023-06-05 Data communication method, device, system, equipment and computer storage medium Active CN116384305B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310653362.XA CN116384305B (en) 2023-06-05 2023-06-05 Data communication method, device, system, equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310653362.XA CN116384305B (en) 2023-06-05 2023-06-05 Data communication method, device, system, equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN116384305A CN116384305A (en) 2023-07-04
CN116384305B true CN116384305B (en) 2023-08-01

Family

ID=86971598

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310653362.XA Active CN116384305B (en) 2023-06-05 2023-06-05 Data communication method, device, system, equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN116384305B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117910401B (en) * 2024-03-19 2024-06-28 英诺达(成都)电子科技有限公司 Method, apparatus, device, storage medium and program product for configuring operation mode

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1039903A (en) * 1996-07-24 1998-02-13 Kazuo Kitano Program development supporting device
EP1235152A2 (en) * 2001-02-27 2002-08-28 Korea Advanced Institute of Science and Technology Apparatus and method for in-circuit emulation using a high-level programming language
JP2005301981A (en) * 2003-11-18 2005-10-27 Quickturn Design Syst Inc Optimized interface for simulation and visualization data transfer between emulation system and simulator
CN101352013A (en) * 2005-10-07 2009-01-21 安吉尔系统公司 Method and apparatus for rtp egress streaming using complementary directing file
CN110134561A (en) * 2019-05-20 2019-08-16 北京嘉楠捷思信息技术有限公司 Method and device for outputting debugging information in software and hardware collaborative verification
CN114265786A (en) * 2021-12-31 2022-04-01 飞腾信息技术有限公司 Automatic testing method and device, computer equipment and readable storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002366602A (en) * 2001-04-06 2002-12-20 Seiko Epson Corp Simulation method, system and program for software and hardware
US7194497B2 (en) * 2001-11-19 2007-03-20 Em Photonics, Inc. Hardware-based accelerator for time-domain scientific computing
US7665015B2 (en) * 2005-11-14 2010-02-16 Sun Microsystems, Inc. Hardware unit for parsing an XML document
US7865346B2 (en) * 2007-03-30 2011-01-04 International Business Machines Corporation Instruction encoding in a hardware simulation accelerator
US12079098B2 (en) * 2013-02-21 2024-09-03 Advantest Corporation Automated test equipment with hardware accelerator
US10235272B2 (en) * 2017-03-06 2019-03-19 Xilinx, Inc. Debugging system and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1039903A (en) * 1996-07-24 1998-02-13 Kazuo Kitano Program development supporting device
EP1235152A2 (en) * 2001-02-27 2002-08-28 Korea Advanced Institute of Science and Technology Apparatus and method for in-circuit emulation using a high-level programming language
JP2005301981A (en) * 2003-11-18 2005-10-27 Quickturn Design Syst Inc Optimized interface for simulation and visualization data transfer between emulation system and simulator
CN101352013A (en) * 2005-10-07 2009-01-21 安吉尔系统公司 Method and apparatus for rtp egress streaming using complementary directing file
CN110134561A (en) * 2019-05-20 2019-08-16 北京嘉楠捷思信息技术有限公司 Method and device for outputting debugging information in software and hardware collaborative verification
CN114265786A (en) * 2021-12-31 2022-04-01 飞腾信息技术有限公司 Automatic testing method and device, computer equipment and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于PCIe接口的高速数据传输系统技术研究;都乐;中国优秀硕士学位论文全文数据库信息科技辑(第1期);I136-770 *

Also Published As

Publication number Publication date
CN116384305A (en) 2023-07-04

Similar Documents

Publication Publication Date Title
CN116384305B (en) Data communication method, device, system, equipment and computer storage medium
CN105991358B (en) Method, device, test board and system for testing interface board flow
CN116340073B (en) Test method, device and system
CN113179192A (en) SENT protocol test system and method thereof
US6195768B1 (en) System and method for monitoring high speed data bus
CN112285538A (en) Chip testing method and system
CN103346927A (en) System and method for testing terminal consistency
CN111770074B (en) Data path test message generation device and method
CN112039728B (en) Port communication test method and port communication test box
KR100883392B1 (en) Universal Approach for Simulating, Emulating, and Testing a Variety of Serial Bus Types
KR20220111302A (en) Multi-antenna channel device and configuration method
CN103532686A (en) Serial data transceiver circuit with line sequence self-adaptive function and control method thereof
CN111736924A (en) Method, device, equipment and medium for accessing data acquisition instrument based on Lua script
CN111190786A (en) UVM-based test framework, test platform and test method
CN114325355B (en) Chip testing system and method
CN109981394B (en) Communication method and device based on enhanced CAN bus protocol analyzer
CN203554485U (en) CAN bus test equipment
CN109167640B (en) Error code instrument
CN112445195A (en) Function test method and device for vehicle controller
CN117170350B (en) Service testing method and device, electronic equipment and storage medium
CN116996590B (en) Ethernet speed reducer of FPGA prototype verification platform and data transmission method
CN110442548B (en) System on chip and interface data processing method and device thereof
CN212095279U (en) Machining center with additional shaft
CN114416629B (en) Communication circuit and communication method for sharing serial port
CN115550101B (en) Automobile audio bus test system

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