WO2023193547A1 - Method for generating and storing waveform data during circuit simulation, electronic device and storage medium - Google Patents

Method for generating and storing waveform data during circuit simulation, electronic device and storage medium Download PDF

Info

Publication number
WO2023193547A1
WO2023193547A1 PCT/CN2023/078855 CN2023078855W WO2023193547A1 WO 2023193547 A1 WO2023193547 A1 WO 2023193547A1 CN 2023078855 W CN2023078855 W CN 2023078855W WO 2023193547 A1 WO2023193547 A1 WO 2023193547A1
Authority
WO
WIPO (PCT)
Prior art keywords
signal
data set
circuit
waveform
waveform data
Prior art date
Application number
PCT/CN2023/078855
Other languages
French (fr)
Chinese (zh)
Inventor
詹宏
邵宸晟
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023193547A1 publication Critical patent/WO2023193547A1/en

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

Definitions

  • the present disclosure relates to the field of electronics, and more particularly to methods, electronic devices, computer programs, and storage media for generating and storing waveform data during circuit simulation.
  • VCD value change dump
  • VCD files In some conventional solutions, effective information extraction is performed on VCD files and redundant information is removed. This is similar to Huffman encoding of VCD data. Therefore, the data file size will decrease to a certain extent, but in the actual simulation process, due to the limited encoding and decoding capabilities, the actual amount of waveform data is still relatively large. In addition, the simulation time is still long.
  • embodiments of the present disclosure aim to provide a method, electronic device, computer program and storage medium for generating and storing waveform data during circuit simulation, so as to reduce the amount of data generated by circuit simulation and the simulation time. .
  • a method for generating and storing waveform data during circuit simulation includes compiling a circuit file representing the circuit to generate a hierarchy data set for the circuit in a compiled database, the hierarchy data set being associated with a plurality of signals at a plurality of nodes in the circuit.
  • the method also includes simulating the circuit based on the hierarchical data set and the circuit file to selectively generate a target waveform data set in the waveform database.
  • the waveform database is configured to provide an interface to access the compiled database.
  • the method also includes storing at least a portion of the target waveform data set in a memory.
  • a dedicated compilation database is set up in the compilation phase to store hierarchical data sets, and in the simulation phase, the compilation database can be accessed through the dedicated waveform database to selectively generate corresponding waveform data based on the digital circuit business characteristics and further selectively store the waveform data. , thus reducing the amount of waveform data generated and saved during simulation and correspondingly reducing simulation time.
  • the technical solution of the present disclosure can perform waveform file processing through preprocessing in the compilation phase. Compression and storage have previously greatly reduced the size of files that need to be saved. Combined with business-level feature extraction, redundant information can be removed during the compilation phase.
  • the method further includes storing all data of the target waveform data set in the memory.
  • the circuit file used to represent the circuit includes a register transfer level description file.
  • the hierarchical data set is organized in the form of a hierarchical tree, and the hierarchical data set includes at least one of the following: serialized sequence information used to represent multiple signals, Path information of the transmission path, address information corresponding to the plurality of signals, driving information for driving the plurality of signals, and load information for being driven by the plurality of signals.
  • the plurality of signals includes a first signal and a second signal
  • the hierarchical data set includes a hierarchical mapping relationship between the first signal and the second signal.
  • Generating a hierarchical data set for the circuit in the compiled database includes matching the first signal and the second signal with signals in the circuit model set in the register transfer level description file to determine the hierarchical level between the first signal and the second signal. Mapping relations.
  • selectively generating the target waveform data set in the waveform database includes: determining the target signal set based on the hierarchical mapping relationship, the target signal set includes the first signal, and the target signal set does not include the third signal.
  • Two signals based on the determined target signal set, simulate the circuit to selectively generate a target waveform data set in the waveform database, the target waveform data set includes the simulated waveform data of the first signal, and the target waveform data set does not include Simulated waveform data of the second signal.
  • the method further includes: receiving a storage time indication for the target signal.
  • Storing at least a portion of the target waveform data set in the memory includes: storing in the memory a data portion of a time period corresponding to the storage time indication in the simulated waveform data of the target signal in the target waveform data set.
  • the plurality of signals includes a third signal.
  • Selectively generating the target waveform data set in the waveform database includes: simulating the circuit based on the hierarchical data set and the circuit file to generate simulated waveform data for the third signal in the waveform database, where the simulated waveform for the third signal
  • the data includes glitch data.
  • the glitch data includes a plurality of glitch values for the third signal within a unit time period; and storing at least a part of the target waveform data set in the memory includes: converting the plurality of glitch values according to The chronological order is stored in memory.
  • storing the plurality of glitch values in a memory in time sequence includes: determining whether adjacent glitch values in the plurality of glitch values are the same; and if the adjacent glitch values are the same, then Either one of the adjacent glitch values is stored in memory without the other one of the adjacent glitch values. Waveform data volume can be further reduced by merging multiple adjacent glitch values into a single glitch value.
  • the method further includes: adjusting the hierarchical data set based on user input. Adjustments to hierarchical data sets give designers flexibility in circuit verification. In addition, circuit simulation time and waveform signal data volume can be further reduced when designers adjust the hierarchical data set to retain only the signals of interest.
  • a computer-readable storage medium that stores a plurality of programs.
  • a plurality of programs is configured for execution by one or more processors, the plurality of programs including instructions for performing the method of the first aspect.
  • a computer program product includes a plurality of programs configured for execution by one or more processors, the plurality of programs comprising instructions for performing the method of the first aspect.
  • an electronic device includes: one or more processors; and a memory including computer instructions that, when executed by the one or more processors of the electronic device, cause the electronic device to perform the method of the first aspect.
  • an electronic device includes a compilation unit, a simulation unit and a storage unit.
  • the compilation unit is configured to compile a circuit file representing the circuit to generate a hierarchical data set for the circuit in the compilation database, the hierarchical data set being associated with a plurality of signals at a plurality of nodes in the circuit.
  • the simulation unit is configured to simulate the circuit based on the hierarchical data set and the circuit file to selectively generate the target waveform data set in the waveform database, and the waveform database is configured to access the compilation database.
  • the storage unit is configured to store at least a portion of the target waveform data set in the memory.
  • a dedicated compilation database is set up in the compilation phase to store hierarchical data sets, and the compilation database can be accessed through a dedicated waveform database in the simulation phase, corresponding waveform data can be selectively generated and stored selectively during the simulation process based on the business characteristics of the digital circuit. Waveform data, thus reducing the amount of waveform data generated and saved during simulation and correspondingly reducing simulation time.
  • the technical solution of the present disclosure can perform waveform file processing through preprocessing in the compilation phase. Compression and storage have previously greatly reduced the size of waveform files that need to be saved.
  • the circuit file used to represent the circuit includes a register transfer level description file.
  • the hierarchical data set is organized in the form of a hierarchical tree, and the hierarchical data set includes at least one of the following: serialized sequence information used to represent multiple signals, Path information of the transmission path, address information corresponding to the plurality of signals, driving information for driving the plurality of signals, and load information for being driven by the plurality of signals.
  • the plurality of signals includes a first signal and a second signal
  • the hierarchical data set includes a hierarchical mapping relationship between the first signal and the second signal.
  • the compilation unit is further configured to: match the first signal and the second signal with signals in the circuit model set in the register transfer level description file to determine a hierarchical mapping relationship between the first signal and the second signal.
  • the simulation unit is further configured to: determine the target signal set based on the hierarchical mapping relationship, the target signal set includes the first signal, and the target signal set does not include the second signal; based on the determined a target signal set, simulating the circuit to selectively generate a target waveform data set in the waveform database, the target waveform data set includes simulated waveform data of the first signal, and the target waveform data set does not include simulated waveform data of the second signal .
  • the relationship of another signal can be determined based on a single signal, which can avoid the simulation calculation and storage of multiple signals, thereby further reducing simulation time and reducing the storage capacity of signal waveforms. .
  • the electronic device further includes a receiving unit.
  • the receiving unit is configured to receive a storage time indication for the target signal.
  • the storage unit is further configured to: store in the memory a data portion of the time period corresponding to the storage time indication in the simulation waveform data of the target signal in the target waveform data set.
  • the plurality of signals includes a third signal.
  • the simulation unit is further configured to: simulate the circuit based on the hierarchical data set and the circuit file to generate simulated waveform data for the third signal in the waveform database, where the simulated waveform data for the third signal includes glitch data.
  • the glitch data includes a plurality of glitch values for the third signal within a unit time period.
  • the storage unit is further configured to store the plurality of glitch values in the memory in time sequence.
  • the storage unit is further configured to: determine whether adjacent glitch values among the plurality of glitch values are the same; and if the adjacent glitch values are the same, convert any of the adjacent glitch values to A glitch value is stored in memory without storing another glitch value within an adjacent glitch value.
  • the storage unit is further configured to determine whether adjacent glitch values among the plurality of glitch values are the same; and if the adjacent glitch values are the same, then convert any one of the adjacent glitch values into The value is stored in memory without storing another glitch value within the adjacent glitch value. Waveform data volume can be further reduced by merging multiple adjacent glitch values into a single glitch value.
  • the electronic device further includes an adjustment unit.
  • the adjustment unit is configured to adjust the hierarchical data set based on user input. Adjustments to hierarchical data sets give designers flexibility in circuit verification. In addition, when designers adjust the hierarchical data set to retain only the signal waveforms they are interested in, the time and data volume of waveform processing during circuit simulation can be further reduced.
  • Figure 1 shows a schematic diagram of a conventional circuit simulation process.
  • Figure 2 shows a circuit simulation schematic in accordance with some embodiments of the present disclosure.
  • FIG. 3 illustrates a schematic flowchart of a method for generating and storing waveform data during circuit simulation in accordance with some embodiments of the present disclosure.
  • Figure 4 shows a schematic diagram of a circuit simulation process according to some embodiments of the present disclosure.
  • Figure 5 shows a schematic diagram of a glitch signal according to some embodiments of the present disclosure.
  • Figure 6 shows a schematic diagram of a signal writing process according to some embodiments of the present disclosure.
  • Figure 7 shows a schematic diagram of a signal reading process according to some embodiments of the present disclosure.
  • Figure 8 shows a schematic block diagram of an electronic device according to some embodiments of the present disclosure.
  • Figure 9 shows a schematic block diagram of an example device that may be used to implement embodiments of the present disclosure.
  • the term “include” and its variations mean an open inclusion, ie, "including but not limited to.” Unless otherwise stated, the term “or” means “and/or”. The term “based on” means “based at least in part on.” The terms “one example embodiment” and “an embodiment” mean “at least one example embodiment.” The term “another embodiment” means “at least one additional embodiment”. The terms “first,” “second,” etc. may refer to different or the same object. Other explicit and implicit definitions may be included below.
  • FIG. 1 shows a schematic diagram of a conventional circuit simulation process.
  • an electronic device such as a computer, receives a file describing or representing a circuit, such as a register transfer level (RTL) file, and compiles the RTL file.
  • the electronic device performs a simulation run on the compiled file.
  • the electronic device may generate a full waveform 114, that is, a collection of waveform signals at various nodes in the circuit.
  • the electronic device can store the full waveform.
  • the electronic device can compress 116 the generated waveform data to generate a dedicated waveform format file, thereby achieving the purpose of reducing the size of the waveform file.
  • the pursuit of the ultimate compression ratio may even cause the compressed encoding and decoding time to greatly affect the simulation performance, for example, the encoding and decoding time increases significantly.
  • the electronic device may display the waveform at 108 at any time in response to input from the designer.
  • circuit simulation usually does not perform processing related to signal waveform information on the compilation side. Instead, the execution process is scheduled during the simulation runtime to construct signal connection relationships, record waveform information, and other operations, and perform waveform files. output. This brings great degradation to the simulation time.
  • effective information extraction and redundant information are removed from waveform files such as VCD files, in the actual simulation process, due to limited encoding and decoding capabilities, the actual amount of data is still relatively small. is large and the simulation time is still long.
  • a dedicated compile database (compile database) and a waveform database are respectively set up on the compilation side and the simulation running side to transmit and store hierarchical data sets. Since a dedicated compilation database is set up in the compilation phase to store hierarchical data sets, and the compilation database can be accessed through a dedicated waveform database in the simulation phase, corresponding waveform data can be selectively generated and stored selectively during the simulation process based on the business characteristics of the digital circuit. Waveform data, thus reducing the amount of waveform data generated and saved during simulation and correspondingly reducing simulation time.
  • the technical solution of the present disclosure can perform waveform file processing through preprocessing in the compilation phase. Compression and storage have previously greatly reduced the size of waveform files that need to be saved. Combined with business-level feature extraction, redundant information can be removed during the compilation phase. On the premise of avoiding the loss of effective information, the waveform file size has been reduced from the source before performing the compression algorithm, thereby reducing the pressure of encoding and decoding on simulation time and reducing the simulation time accordingly.
  • the method further includes storing all data of the target waveform data set in the memory.
  • FIG. 2 shows a schematic diagram of a circuit simulation 200 in accordance with some embodiments of the present disclosure.
  • An electronic device with computing capabilities such as a computer, may receive a file 201 such as an RTL file describing a circuit, and at 202 The electronic device can compile file 201.
  • the file 201 may be parsed and then compiled. Understandably, preliminary analysis is not necessary. In some embodiments, preliminary analysis may be performed integrated with compilation.
  • a dedicated compilation database 212 may be provided on the compilation side.
  • the compilation database 212 may be used to store information related to signal waveforms of the circuit to be simulated.
  • compilation database 212 may store hierarchical data sets.
  • the hierarchical data set is organized in a hierarchical tree (i.e., a hierarchical tree), and the hierarchical data set includes at least one of the following: serialized sequence information for representing a plurality of signals; Path information of the transmission path of the signals, address information corresponding to the plurality of signals, drive information for driving the plurality of signals, and load information for being driven by the plurality of signals.
  • the hierarchical data set can be used to obtain the above information when back-checking the signal using the Verilog programming language interface (VPI). This can be used to build hierarchical structure information of the chip design code when generating waveform files. In one embodiment, this can be done by selecting the chip level during circuit debugging and selecting signals at a certain level for waveform display.
  • VPI Verilog programming language interface
  • compilation database 212 may also provide serialization and deserialization of signals.
  • the compilation database 212 may serialize multiple signals and pass the serialized information to the simulation side.
  • the emulation side can deserialize multiple serialized signals to determine the expected signal.
  • the compilation database 212 can extract the relevant information of the hierarchical tree from the construction process of the abstract syntax tree (AST) and the intermediate representation (IR), and store it in the compilation database after serializing each information. in database 212.
  • AST abstract syntax tree
  • IR intermediate representation
  • the hierarchical data set is organized in the form of a hierarchical tree here, this is only illustrative and does not limit the scope of the present disclosure.
  • Other data structures can also be used to organize hierarchical data sets. By organizing hierarchical data sets in the form of a hierarchical tree, it is easier to find, modify, and save hierarchical data based on individual attributes (such as driver relationships, load relationships, memory addresses, module calls, etc.), and accordingly it is easier to do so selectively.
  • Signal simulation and storage Although described here as simulation run 204, it is understood that other tool chains 212 (such as circuit debuggers) may also access the compilation database 212 and/or the waveform database 214. This disclosure does not limit this.
  • the electronic device can perform simulation operation on the compiled file.
  • the electronic device may generate waveforms of each signal, and may store the desired target waveform data set in the waveform database 214 .
  • Waveform database 214 is configured to access compilation database 212 .
  • Compiled database 212 can therefore efficiently transfer hierarchical data sets to waveform database 214.
  • Other tool chains 220 such as debuggers may also read and/or modify hierarchical data sets.
  • the electronic device can continuously generate target simulation data such as waveform data.
  • the waveform database 214 is configured to provide a waveform writing service and record the target simulation data in the simulation process into the waveform database 214 .
  • the waveform database 214 supports generating waveform files in multiple formats, such as fast signal database (FSDB) format, VCD format, etc. Waveform files in various formats can be converted to each other.
  • FSDB fast signal database
  • VCD VCD format
  • Waveform files in various formats can be converted to each other.
  • the waveform database 214 can provide a reading service to read data in the waveform file generated by the simulation.
  • waveform database 214 is also configured to provide an interface to access hierarchical data sets in compiled database 212 .
  • Designers can control the dump scope through input options based on hierarchical datasets.
  • the electronic device can dynamically resolve the dump range through an interface such as a command line interface.
  • the target waveform data is saved in the waveform file, and there is no need to save the waveform data of each signal in the complete hierarchy. As a result, repeated reading and writing of useless signals can be avoided and simulation overhead can be reduced.
  • the waveform database 214 is also configured to save glitch information within a unit time period of the signal. For example, within a unit time period, the simulation result changes the value of the same signal multiple times, or the simulation result assigns multiple values to the same signal. In one embodiment, values may be saved in the waveform database 214 in real time after each region is updated. By saving glitch information, circuit designers can be provided with more accurate and detailed waveform information to determine the accuracy of circuit design.
  • Figure 3 illustrates a method for generating and storing waveform data during circuit simulation in accordance with some embodiments of the present disclosure.
  • Schematic flow chart of Method 300 It can be understood that various aspects described above with respect to FIG. 2 can be selectively applied to the method 300, so the relevant parts will not be described again here.
  • Method 300 may be performed by an electronic device such as a computer. Alternatively, the method 300 may also be executed by other electronic devices with computing capabilities, which will not be described in detail in this disclosure.
  • the electronic device compiles a circuit file representing the circuit to generate a hierarchical data set for the circuit in the compilation database 212, the hierarchical data set being associated with a plurality of signals at a plurality of nodes in the circuit.
  • circuit files representing circuits include register transfer level description files.
  • the hierarchical data set is organized in the form of a hierarchical tree, and the hierarchical data set includes at least one of the following: sequence information representing the serialization of a plurality of signals, a path representing a transmission path of the plurality of signals information, address information corresponding to the plurality of signals, driving information for driving the plurality of signals, and load information for being driven by the plurality of signals.
  • Hierarchical data sets in the form of a hierarchical tree, it is easier to find, modify, and save hierarchical data based on individual attributes (such as driver relationships, load relationships, memory addresses, module calls, etc.), and accordingly it is easier to do so selectively.
  • individual attributes such as driver relationships, load relationships, memory addresses, module calls, etc.
  • FIG. 4 shows a schematic diagram of a circuit simulation process 400 in accordance with some embodiments of the present disclosure.
  • hierarchical data 412 may be generated.
  • hierarchical data 412 may be a hierarchical tree as described above.
  • the hierarchical tree can be intercepted or saved on the AST obtained after being parsed.
  • the hierarchical tree can be organized according to various parameters, and each tree node can include a certain range of signal sets and each signal parameter (leaf node) within the signal set.
  • the hierarchical data 412 may include node data branched by one or more of signal types, transfer paths, address assignments, driving relationships, load relationships, and the like.
  • the compiler performs step-by-step analysis (elaboration) of signal key information in the layer-by-layer intermediate expression downgrading (IR lowering) process.
  • the compiler will also allocate corresponding memory space for all signals.
  • the compilation database 212 can also implement serialization of signals, and save key information such as driver information, load information, module calling relationships, memory address allocation, etc. on the corresponding nodes of the tree structure, so as to Find it later.
  • the hierarchical data 412 may be further classified or branched by one or more of the above items.
  • part or all of the hierarchical data 412 may be further divided into repetitive signals, regular signals, combinational logic signals, delayed signals, periodic signals, etc.
  • a clock signal may be classified as a repetitive, regular, or periodic signal.
  • the output signals of AND gates can be classified as combinational logic signals.
  • the output of the buffer can be classified as a delayed signal. It can be understood that the above divisions are only illustrative and do not limit the scope of the present disclosure, and corresponding divisions can be made as needed.
  • the plurality of signals includes a first signal and a second signal
  • the hierarchical data set includes a hierarchical mapping relationship between the first signal and the second signal.
  • the first signal may be the input of an inverter and the second signal be the output of the inverter. Therefore, when the waveform of the first signal is known, the waveform of the second signal can be obtained through a simple inversion operation. In this case, the hierarchical mapping relationship can be expressed as a negation operation.
  • the hierarchical data set includes hierarchical mapping relationships between the first signal and the fourth signal and the second signal. For example, the first signal and the fourth signal are the two inputs of the AND gate, while the second signal is the output of the AND gate.
  • the waveform of the second signal can be obtained through a simple logical AND operation.
  • the electronic device may include a model library that includes various signal mapping models, such as signal mapping models for inverters, AND gates, OR gates, and the like.
  • the circuit design may include multiple circuit modules, logic gate devices and other sub-circuit modules that can be split. Each circuit sub-circuit module may include respective signal inputs and outputs.
  • generating the hierarchical data set for the circuit in the compilation database 212 includes matching the first signal and the second signal with the signals in the circuit model set in the register transfer level description file to determine the relationship between the first signal and the second signal. hierarchical mapping relationship between. For example, combine the signal of the module used to represent the AND gate function in the circuit file with the signal in the model library. Compare the AND gate signals to determine the hierarchical mapping relationship of the signals in the circuit file.
  • the method further includes adjusting the hierarchical data set based on user input.
  • the user can call the interface of the compilation database 212 to delete, add or modify the signal nodes of the hierarchical tree. For example, driver information, load information, module call information, address information and other information can be modified. Adjustments to hierarchical data sets give designers flexibility in circuit verification. In addition, circuit simulation time and waveform signal data volume can be further reduced when designers adjust the hierarchical data set to retain only the signals of interest.
  • the electronic device simulates the circuit based on the hierarchical data set and the circuit file to selectively generate a target waveform data set in the waveform database 214 , where the waveform database 214 has a function for performing compilation database 212 Access interface.
  • waveform database 214 is configured to store and read simulation data, such as simulation waveform data, in a digital chip design.
  • the waveform database 214 is also configured to read waveform data on the debug side.
  • the waveform database 214 may include, for example, three modules: a writing module, a reading module and an auxiliary tool module, each module providing independent functions to the outside world.
  • the writing module is configured to dump the waveform data input by the emulator or accessory tool into a waveform file.
  • the reading module is configured to convert waveform data into memory waveform data and return it to the upper-layer caller through API form.
  • the accessory tool module is configured to support users to input parameters on the terminal and perform operations such as exporting, statistics, modification, and format conversion of waveform files.
  • the electronic device may obtain some or all information in the hierarchical data set from the compilation database 212, such as memory address information or other key information.
  • the electronic device is configured to call a reading application program interface (API) of the compiled database 212 to perform deserialization to implement the reading function.
  • API application program interface
  • the waveform information can be filtered and simulated by chip level, by simulation time, by simulation events and other dimensions and partially saved at 406, so that only the required key information is retained.
  • the user can use options or input to determine whether the signal at the first node is a desired signal or a target signal, and the signal at the second node is an undesired signal. Signal or unwanted signal.
  • the electronic device can thereby simulate, output and store only the signal at the first node. This can greatly reduce the file size that needs to be processed before compression in the 416 box, reduces the need for the ultimate compression ratio, and can greatly improve simulation efficiency.
  • the electronic device can display the waveform data at 408 as needed (such as user input or command).
  • the electronic device is configured to determine the target signal set based on the hierarchical mapping relationship.
  • the target signal set includes the first signal, and the target signal set does not include the second signal.
  • the circuit is simulated to selectively generate a target waveform data set in the waveform database, the target waveform data set includes simulated waveform data of the first signal, and the target waveform data set does not include the second signal simulation waveform data.
  • the first signal is the input signal of the inverter and the second signal is the output signal of the inverter. It can be understood that the second signal is the inverted signal of the first signal.
  • the first signal and the second signal are both desired signals, since there is a fixed hierarchical mapping relationship between the second signal and the first signal (in other words, the second signal can be determined based on the first signal), therefore In fact, there is no need to simulate output and store the second signal.
  • the relationship of another signal can be determined based on a single signal, which can avoid the waveform calculation and storage of multiple signals, thereby further reducing the time of waveform processing and storage and reducing the size of the waveform. storage capacity.
  • Glitch signals can be important to verify the correctness of a circuit design, so in some cases it is necessary to record the glitches in the signal.
  • Circuit simulation usually obtains the final simulation value in a time period or time slot (such as a unit time period) through gradual approximation or multiple assignments. But in some cases, the signal may have multiple values during this time period. To ensure the accuracy of circuit simulation, in some embodiments, multiple values may be simulated and output and stored.
  • the plurality of signals may include a third signal.
  • Selectively generating target waveform data sets in the waveform database includes: simulating the circuit based on the hierarchical data set and circuit files, To generate simulated waveform data for the third signal in the waveform database, where the simulated waveform data for the third signal includes glitch data.
  • the glitch data may include a plurality of glitch values for the third signal within a unit time period.
  • Electronic devices store multiple glitch values in memory in chronological order.
  • the waveform database 214 may store signal values that change multiple times within each time period. For example, during the time period T1, for the third signal, the waveform database 214 sequentially obtains the first value 1, the second value 2, the third value 3 and the third value 3 through simulation. It can be understood that during the time period T1, the third signal changes twice, that is, from the first value 1 to the second value 2, and from the second value 2 to the third value 3.
  • the waveform database 214 may store the first value 1, the second value 2, and the third value 3 for the time period T1.
  • the electronic device may be further configured to determine whether adjacent glitch values among the plurality of glitch values are the same; and if the adjacent glitch values are the same, store any one of the adjacent glitch values in the memory , without storing another glitch value within an adjacent glitch value. As shown in Figure 5, during the time period T1, the simulation obtains two third values 3.
  • the waveform database 214 may only store one third value 3. Waveform data volume can be further reduced by merging multiple adjacent glitch values into a single glitch value. In another embodiment, if there are other values between the two third values 3 during the time period T1, the two third values 3 and other values between them need to be saved.
  • the waveform data generated by the simulation can be located in a cache, for example, and the user can choose to be stored in a non-volatile memory such as a non-volatile memory based on options selected on the graphical interface or command input. simulation waveform data in the memory.
  • the electronic device may store in the memory a data portion of the time period corresponding to the storage time indication in the simulated waveform data of the target signal in the target waveform data set. For example, the user may only be interested in the waveform from the beginning of the simulation to the end of time period T2.
  • the waveform database 214 may store only at least a portion of all signals from the start of the simulation to the end of the time period T2 based on the user's options or input commands. By setting the waveform time period to be simulated and stored by the user, the amount of data and time can be further reduced compared to simulation and data storage for the entire period.
  • the time period T2 is used for description here, it can be understood that this is only illustrative and does not limit the scope of the present disclosure.
  • the user may select some or all of the signal during other time periods. For example, the user can select part or all of the signals within the time period from the end of T1 to the end of T3, such as the second signal of the square.
  • signals of non-consecutive time periods may also be selected. For example, you can select a signal from the start of the simulation to the end of time period T1 and a signal from the end of time period T2 to the end of time period T3.
  • the electronic device can correspondingly transfer the signal of the selected interval to the non-volatile memory.
  • a dedicated compilation database is set up in the compilation phase to store hierarchical data sets, and the compilation database can be accessed through a dedicated waveform database in the simulation phase, corresponding waveform data can be selectively generated during the simulation process based on the business characteristics of the digital circuit. And the waveform data is selectively stored, so the amount of waveform data generated and saved during the simulation can be reduced and the simulation time can be reduced accordingly.
  • the technical solution of the present disclosure can perform waveform file processing through preprocessing in the compilation phase. Compression and storage have previously greatly reduced the size of files that need to be saved.
  • Figure 6 shows a schematic diagram of a signal writing process according to some embodiments of the present disclosure.
  • the upper calling module of the class can transmit the data stream to the waveform writing module in the waveform database.
  • the data processing module in the waveform writing module has a database (database, DB) interface. After receiving the data through the DB interface, the data processing module can perform verification, deduplication, encoding and other processing on it, and put the processed data into the data cache.
  • the waveform writing module then analyzes the data in the cache to determine the basic information of the data, design structure, analog signal or digital signal and other attributes or parameters.
  • Waveform files can be stored in non-volatile memory. Although a specific waveform writing method is shown here, it can be understood that this is only illustrative and does not limit the scope of the present disclosure. Other waveform writing methods can be used as needed.
  • FIG. 7 shows a schematic diagram of a signal reading process according to some embodiments of the present disclosure.
  • the upper display module is configured to display waveforms on the waveform display interface.
  • the display module can transmit control parameters to the underlying processing module.
  • the processing module includes a data processing module and a waveform processing module. After the data processing module receives the control parameters via its data interface, it can export them to the waveform processing module. After receiving the processed parameters through the DB interface, the waveform processing module can read the waveform data in the first format or the second format from the memory, decompress, decode and/or transfer it to the cache, and transmit it through the DB interface to the data processing module. Alternatively, during this process, the waveform data can also be format-converted as needed.
  • the waveform data may be converted from the third format to the first format or the second format.
  • the data processing module samples, searches, counts and/or calculates the data from the waveform processing module, and displays the data flow on the waveform interface through the data interface.
  • the modules shown in Figures 6 and 7 can be implemented by programs, and each module can be combined, separated, called or nested as needed, and this disclosure is not limiting.
  • the waveform writing module of FIG. 6 can be embedded in the waveform processing module of FIG. 7 .
  • each module shown in FIGS. 6 and 7 may include functions or sub-modules that are not limited to those shown, but may include more or fewer modules as needed.
  • the data processing module shown in FIGS. 6 and 7 only shows a part of the data processing module, and the data processing module may include more items.
  • FIG. 8 shows a schematic block diagram of an electronic device 800 in accordance with some embodiments of the present disclosure.
  • Electronic device 800 may include a plurality of modules for performing corresponding steps in the method as discussed in FIG. 3 .
  • the electronic device 800 includes a compilation unit 802, a simulation unit 804, and a storage unit 806.
  • the compilation unit 802 is configured to compile a circuit file representing the circuit to generate a hierarchical data set for the circuit in the compilation database, the hierarchical data set being associated with a plurality of signals at a plurality of nodes in the circuit.
  • the simulation unit 804 is configured to simulate the circuit based on the hierarchical data set and the circuit file to selectively generate the target waveform data set in the waveform database, and the waveform database is configured to provide an interface for accessing the compiled database.
  • the storage unit 806 is configured to store at least a portion of the target waveform data set in a memory. Since a dedicated compilation database is set up in the compilation phase to store hierarchical data sets, and the compilation database can be accessed through a dedicated waveform database in the simulation phase, corresponding waveform data can be selectively generated and stored selectively during the simulation process based on the business characteristics of the digital circuit. Waveform data, thus reducing the amount of waveform data generated and saved during simulation and correspondingly reducing simulation time.
  • the technical solution of the present disclosure can perform waveform file processing through preprocessing in the compilation phase. Compression and storage have previously greatly reduced the size of files that need to be saved. Combined with business-level feature extraction, redundant information can be removed during the compilation phase. On the premise of avoiding the loss of effective information, the waveform file size has been reduced from the source before performing the compression algorithm, thereby reducing the pressure of encoding and decoding on simulation time and reducing the simulation time accordingly.
  • circuit files representing circuits include register transfer level description files.
  • the hierarchical data set is organized in the form of a hierarchical tree, and the hierarchical data set includes at least one of the following: sequence information representing the serialization of a plurality of signals, a path representing a transmission path of the plurality of signals information, address information corresponding to the plurality of signals, driving information for driving the plurality of signals, and load information for being driven by the plurality of signals.
  • the plurality of signals includes a first signal and a second signal
  • the hierarchical data set includes a hierarchical mapping relationship between the first signal and the second signal.
  • the compilation unit 802 is further configured to: match the first signal and the second signal with signals in the circuit model set in the register transfer level description file to determine a hierarchical mapping relationship between the first signal and the second signal.
  • the simulation unit 804 is further configured to: determine a target signal set based on the hierarchical mapping relationship, the target signal set includes the first signal, and the target signal set does not include the second signal; based on the determined target signal set, The circuit is simulated to selectively generate a target waveform data set in the waveform database, the target waveform data set includes simulated waveform data of the first signal, and the target waveform data set does not include simulated waveform data of the second signal.
  • the electronic device 800 further includes a receiving unit.
  • the receiving unit is configured to receive a storage time indication for the target signal.
  • the storage unit 806 is further configured to store in the memory a data portion of the time period corresponding to the storage time indication in the simulation waveform data of the target signal in the target waveform data set.
  • the plurality of signals includes a third signal.
  • the simulation unit 804 is further configured to: simulate the circuit based on the hierarchical data set and the circuit file to generate simulated waveform data for the third signal in the waveform database, where the simulated waveform data for the third signal includes glitch data.
  • the glitch data includes a plurality of glitch values for the third signal within a unit time period.
  • the storage unit 806 is further configured to store the plurality of glitch values in the memory in chronological order. In some embodiments, the storage unit 806 is further configured to: determine whether adjacent glitch values among the plurality of glitch values are the same; and if the adjacent glitch values are the same, store any one of the adjacent glitch values in memory without storing another glitch value within an adjacent glitch value.
  • the storage unit 806 is further configured to determine whether adjacent glitch values among the plurality of glitch values are the same; and if the adjacent glitch values are the same, store any of the adjacent glitch values in the memory , without storing another glitch value within an adjacent glitch value. Waveform data volume can be further reduced by merging multiple adjacent glitch values into a single glitch value.
  • the electronic device 800 further includes an adjustment unit.
  • the adjustment unit is configured to adjust the hierarchical data set based on user input. Adjustments to hierarchical data sets give designers flexibility in circuit verification. In addition, circuit simulation time and waveform signal data volume can be further reduced when designers adjust the hierarchical data set to retain only the signals of interest.
  • Figure 9 shows a schematic block diagram of an example device 900 that may be used to implement embodiments of the present disclosure.
  • Figure 9 shows a schematic block diagram of an example device 900 that may be used to implement embodiments of the present disclosure.
  • device 900 includes a computing unit 901 that may be loaded into RAM 903 and/or from storage unit 908 in accordance with computer program instructions stored in random access memory (RAM) and/or read only memory (ROM) 902 Computer program instructions in ROM 902 to perform various appropriate actions and processes.
  • RAM 903 and/or ROM 902 various programs and data required for operation of device 900 may also be stored.
  • Computing unit 901 and RAM 903 and/or ROM 902 are connected to each other via bus 904 .
  • An input/output (I/O) interface 905 is also connected to bus 904.
  • I/O interface 905 Multiple components in device 900 are connected to I/O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of displays, speakers, etc.; storage unit 908, such as magnetic disk, optical disk, etc. ; and communication unit 909, such as a network card, modem, wireless communication transceiver, etc.
  • the communication unit 909 allows the device 900 to exchange information/data with other devices through computer networks such as the Internet and/or various telecommunications networks.
  • Computing unit 901 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processing processor (DSP), and any appropriate processor, controller, microcontroller, etc.
  • the computing unit 901 performs various methods and processes described above, such as method 300.
  • method 300 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 908.
  • part or all of the computer program may be loaded and/or installed onto device 900 via RAM and/or ROM and/or communication unit 909 .
  • a computer program When a computer program is loaded into RAM and/or ROM and executed by computing unit 901, one or more steps of method 300 described above may be performed.
  • computing unit 901 may be configured to perform method 300 in any other suitable manner (eg, by means of firmware).
  • Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that the program codes, when executed by the processor or controller, cause the functions specified in the flowcharts and/or block diagrams/ The operation is implemented.
  • the program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM portable compact disk read-only memory
  • magnetic storage device or any suitable combination of the above.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Design And Manufacture Of Integrated Circuits (AREA)

Abstract

A method for generating and storing waveform data during circuit simulation. The method comprises: compiling a circuit file which is used for representing a circuit, so as to generate a hierarchy data set for the circuit in a compilation database; simulating the circuit on the basis of the hierarchy data set and the circuit file, so as to selectively generate a target waveform data set in a waveform database, wherein the waveform database is configured to provide an interface to access the compilation database; and storing at least part of the target waveform data set in a memory. A dedicated compilation database is set in a compilation stage, so as to store a hierarchy data set; and in a simulation stage, the compilation database can be accessed by means of a dedicated waveform database, so that during simulation, corresponding waveform data is selectively generated on the basis of a digital circuit service feature, and the waveform data is selectively stored. Therefore, the amount of waveform data generated and stored during simulation can be reduced, thereby correspondingly reducing simulation time.

Description

用于生成和存储电路仿真过程中的波形数据的方法、电子设备和存储介质Method, electronic device and storage medium for generating and storing waveform data during circuit simulation
本申请要求于2022年4月8日提交中国专利局、申请号为202210369305.4、发明名称为“用于生成和存储电路仿真过程中的波形数据的方法、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application is required to be submitted to the China Patent Office on April 8, 2022, with the application number 202210369305.4 and the invention title "Method, electronic device and storage medium for generating and storing waveform data in the circuit simulation process". priority, the entire contents of which are incorporated into this application by reference.
技术领域Technical field
本公开涉及电子领域,更具体而言涉及用于生成和存储电路仿真过程中的波形数据的方法、电子设备、计算机程序和存储介质。The present disclosure relates to the field of electronics, and more particularly to methods, electronic devices, computer programs, and storage media for generating and storing waveform data during circuit simulation.
背景技术Background technique
在电路设计过程中,通常需要验证电路设计的正确性。在一些情形下,需要使用数字电路仿真器来满足仿真调试的功能。为了满足仿真调试,通常需要生成一些精确高效的波形信号。波形的产生需要在仿真过程中监控相关信号,并保存其值的变化过程,这将产生大量的参数传递和事件记录,极大影响仿真性能。During the circuit design process, it is usually necessary to verify the correctness of the circuit design. In some cases, it is necessary to use a digital circuit simulator to meet the simulation debugging function. In order to meet the needs of simulation debugging, it is usually necessary to generate some accurate and efficient waveform signals. The generation of waveforms requires monitoring relevant signals during the simulation process and saving the change process of their values. This will generate a large number of parameter transfers and event records, which greatly affects the simulation performance.
电气电子工程师学会(institute of electrical and electronics engineers,IEEE)在IEEE1364标准中定义了值改变转存(value change dump,VCD)格式的文件。VCD文件包括头信息、变量的预定义和变量值的变化信息。由于VCD文件包含了信号的变化信息,相当于记录了整个仿真的信息,因此其可以用这个文件来再现仿真,也就能够显示波形。此外,由于VCD文件是Verilog硬件描述语言标准的一部分,因此所有的Verilog仿真器都要能够实现这个功能,也要允许用户在Verilog代码中通过系统函数来转存(dump)VCD文件。The Institute of Electrical and Electronics Engineers (IEEE) defines a value change dump (VCD) format file in the IEEE1364 standard. The VCD file includes header information, predefinition of variables and change information of variable values. Since the VCD file contains signal change information, which is equivalent to recording the entire simulation information, it can use this file to reproduce the simulation and display the waveform. In addition, since VCD files are part of the Verilog hardware description language standard, all Verilog simulators must be able to implement this function and also allow users to dump VCD files through system functions in Verilog code.
在一些常规方案中,针对VCD文件进行了有效信息提取,去除了冗余信息。这类似于对VCD数据进行霍夫曼(huffman)编码。因此其数据文件大小会有一定下降,但在实际仿真过程中,由于编解码能力有限,实际的波形数据量还是相对较大。此外,仿真时间还是较长。In some conventional solutions, effective information extraction is performed on VCD files and redundant information is removed. This is similar to Huffman encoding of VCD data. Therefore, the data file size will decrease to a certain extent, but in the actual simulation process, due to the limited encoding and decoding capabilities, the actual amount of waveform data is still relatively large. In addition, the simulation time is still long.
发明内容Contents of the invention
根据上述问题,本公开的实施例旨在提供一种用于生成和存储电路仿真过程中的波形数据的方法、电子设备、计算机程序和存储介质,用于降低电路仿真产生的数据量和仿真时间。Based on the above problems, embodiments of the present disclosure aim to provide a method, electronic device, computer program and storage medium for generating and storing waveform data during circuit simulation, so as to reduce the amount of data generated by circuit simulation and the simulation time. .
根据本公开第一方面,提供一种用于生成和存储电路仿真过程中的波形数据的方法。该方法包括:对用于表示电路的电路文件进行编译,以在编译数据库中生成针对电路的层级(hierarchy)数据集,层级数据集与电路中的多个节点处的多个信号相关联。该方法还包括基于层级数据集和电路文件,对电路进行仿真,以在波形数据库中选择性地生成目标波形数据集。波形数据库被配置为提供接口以对编译数据库进行访问。该方法还包括在存储器中存储目标波形数据集的至少一部分。由于在编译阶段设置专用的编译数据库以存储层级数据集,并且在仿真阶段可以通过专用的波形数据库访问编译数据库来基于数字电路业务特征来选择性地生成相应波形数据并且进一步地选择性存储波形数据,因此可以减少仿真过程中所生成和保存的波形数据的量并且相应地减少仿真时间。相比于常规数字仿真工具直接在仿真阶段调度执行过程进行构建信号连接关系、记录波形信息等操作并且进行全波形文件输出,本公开的技术方案通过在编译阶段的预处理,可以在进行波形文件压缩和存储之前已经大大减小了需要保存的文件大小。结合业务级别的特征提取可以在编译阶段实现去除冗余信息。在避 免有效信息缺失的前提下,在进行压缩算法之前就已经从源头减少了波形文件大小,从而减小了编解码对于仿真时间的压力并且相应减少了仿真时间。在第一方面的一种实现方式中,该方法还包括在存储器中存储目标波形数据集的全部数据。According to a first aspect of the present disclosure, a method for generating and storing waveform data during circuit simulation is provided. The method includes compiling a circuit file representing the circuit to generate a hierarchy data set for the circuit in a compiled database, the hierarchy data set being associated with a plurality of signals at a plurality of nodes in the circuit. The method also includes simulating the circuit based on the hierarchical data set and the circuit file to selectively generate a target waveform data set in the waveform database. The waveform database is configured to provide an interface to access the compiled database. The method also includes storing at least a portion of the target waveform data set in a memory. Since a dedicated compilation database is set up in the compilation phase to store hierarchical data sets, and in the simulation phase, the compilation database can be accessed through the dedicated waveform database to selectively generate corresponding waveform data based on the digital circuit business characteristics and further selectively store the waveform data. , thus reducing the amount of waveform data generated and saved during simulation and correspondingly reducing simulation time. Compared with conventional digital simulation tools that directly schedule the execution process in the simulation phase to construct signal connection relationships, record waveform information, and output full waveform files, the technical solution of the present disclosure can perform waveform file processing through preprocessing in the compilation phase. Compression and storage have previously greatly reduced the size of files that need to be saved. Combined with business-level feature extraction, redundant information can be removed during the compilation phase. Avoiding On the premise of avoiding the loss of effective information, the waveform file size has been reduced from the source before performing the compression algorithm, thereby reducing the pressure of encoding and decoding on simulation time and reducing the simulation time accordingly. In an implementation of the first aspect, the method further includes storing all data of the target waveform data set in the memory.
在第一方面的一种实现方式中,用于表示电路的电路文件包括寄存器传输级描述文件。在第一方面的一种实现方式中,层级数据集以层级树形式被组织,并且层级数据集包括以下至少一项:用于表示多个信号的序列化的序列信息、用于表示多个信号的传输路径的路径信息、与多个信号对应的地址信息、用于驱动多个信号的驱动信息和用于被多个信号驱动的负载信息。通过将层级数据集以层级树的形式组织,可以便于基于各个属性(诸如驱动关系、负载关系、内存地址、模块调用等)来查找、修改和保存层级数据,并且相应地更易于选择性地进行信号生成和存储。In an implementation of the first aspect, the circuit file used to represent the circuit includes a register transfer level description file. In an implementation of the first aspect, the hierarchical data set is organized in the form of a hierarchical tree, and the hierarchical data set includes at least one of the following: serialized sequence information used to represent multiple signals, Path information of the transmission path, address information corresponding to the plurality of signals, driving information for driving the plurality of signals, and load information for being driven by the plurality of signals. By organizing hierarchical data sets in the form of a hierarchical tree, it is easier to find, modify, and save hierarchical data based on individual attributes (such as driver relationships, load relationships, memory addresses, module calls, etc.), and accordingly it is easier to do so selectively. Signal generation and storage.
在第一方面的一种实现方式中,多个信号包括第一信号和第二信号,层级数据集包括在第一信号和第二信号之间的层级映射关系。在编译数据库中生成针对电路的层级数据集包括:将第一信号和第二信号与寄存器传输级描述文件中的电路模型集中的信号进行匹配以确定在第一信号和第二信号之间的层级映射关系。In an implementation manner of the first aspect, the plurality of signals includes a first signal and a second signal, and the hierarchical data set includes a hierarchical mapping relationship between the first signal and the second signal. Generating a hierarchical data set for the circuit in the compiled database includes matching the first signal and the second signal with signals in the circuit model set in the register transfer level description file to determine the hierarchical level between the first signal and the second signal. Mapping relations.
在第一方面的一种实现方式中,在波形数据库中选择性地生成目标波形数据集包括:基于层级映射关系,确定目标信号集,目标信号集包括第一信号,并且目标信号集不包括第二信号;基于所确定的目标信号集,对电路进行仿真,以在波形数据库中选择性地生成目标波形数据集,目标波形数据集包括第一信号的仿真波形数据,并且目标波形数据集不包括第二信号的仿真波形数据。通过在多个关联信号之间建立层级映射关系,可以基于单个信号来确定另一信号的关系,这可以避免多个信号的波形数据集的计算和存储,从而进一步减少仿真时间并且减小仿真信号的存储容量。In an implementation manner of the first aspect, selectively generating the target waveform data set in the waveform database includes: determining the target signal set based on the hierarchical mapping relationship, the target signal set includes the first signal, and the target signal set does not include the third signal. Two signals; based on the determined target signal set, simulate the circuit to selectively generate a target waveform data set in the waveform database, the target waveform data set includes the simulated waveform data of the first signal, and the target waveform data set does not include Simulated waveform data of the second signal. By establishing a hierarchical mapping relationship between multiple associated signals, the relationship of another signal can be determined based on a single signal, which can avoid the calculation and storage of waveform data sets for multiple signals, thereby further reducing simulation time and reducing simulation signals. storage capacity.
在第一方面的一种实现方式中,该方法还包括:接收针对目标信号的存储时间指示。在存储器中存储目标波形数据集的至少一部分包括:在存储器中存储目标波形数据集中的目标信号的仿真波形数据中的、与存储时间指示对应的时间段的数据部分。通过由用户设定需要处理和保存波形的时间段,相比于全部时段的仿真和数据存储,可以进一步减少波形数据处理量和时间。In an implementation of the first aspect, the method further includes: receiving a storage time indication for the target signal. Storing at least a portion of the target waveform data set in the memory includes: storing in the memory a data portion of a time period corresponding to the storage time indication in the simulated waveform data of the target signal in the target waveform data set. By allowing the user to set the time period during which waveforms need to be processed and saved, the amount and time of waveform data processing can be further reduced compared to simulation and data storage for the entire period.
在第一方面的一种实现方式中,多个信号包括第三信号。在波形数据库中选择性地生成目标波形数据集包括:基于层级数据集和电路文件,对电路进行仿真,以在波形数据库中生成针对第三信号的仿真波形数据,其中针对第三信号的仿真波形数据包括毛刺数据。在第一方面的一种实现方式中,毛刺数据包括在单位时间段内的针对第三信号的多个毛刺值;以及在存储器中存储目标波形数据集的至少一部分包括:将多个毛刺值按时间顺序存储在存储器中。通过提供毛刺信号记录功能,可以为电路设计人员提供更为准确和详细的波形信息,以便于确定电路设计的准确性。In an implementation of the first aspect, the plurality of signals includes a third signal. Selectively generating the target waveform data set in the waveform database includes: simulating the circuit based on the hierarchical data set and the circuit file to generate simulated waveform data for the third signal in the waveform database, where the simulated waveform for the third signal The data includes glitch data. In an implementation of the first aspect, the glitch data includes a plurality of glitch values for the third signal within a unit time period; and storing at least a part of the target waveform data set in the memory includes: converting the plurality of glitch values according to The chronological order is stored in memory. By providing glitch signal recording function, circuit designers can be provided with more accurate and detailed waveform information to determine the accuracy of circuit design.
在第一方面的一种实现方式中,将多个毛刺值按时间顺序存储在存储器中包括:确定多个毛刺值中的相邻毛刺值是否相同;以及如果相邻毛刺值相同,则将相邻毛刺值中的任一毛刺值存储在存储器中,而不存储相邻毛刺值中的另一毛刺值。通过将多个相邻的毛刺值合并为单个毛刺值,可以进一步减少波形数据量。In an implementation of the first aspect, storing the plurality of glitch values in a memory in time sequence includes: determining whether adjacent glitch values in the plurality of glitch values are the same; and if the adjacent glitch values are the same, then Either one of the adjacent glitch values is stored in memory without the other one of the adjacent glitch values. Waveform data volume can be further reduced by merging multiple adjacent glitch values into a single glitch value.
在第一方面的一种实现方式中,该方法还包括:基于用户输入,对层级数据集进行调整。通过对层级数据集进行调整,可以为设计人员赋予电路验证的灵活性。此外,在设计人员将层级数据集调整以仅保留自己所关注的信号的情形下,可以进一步减少电路仿真的时间和波形信号的数据量。 In an implementation of the first aspect, the method further includes: adjusting the hierarchical data set based on user input. Adjustments to hierarchical data sets give designers flexibility in circuit verification. In addition, circuit simulation time and waveform signal data volume can be further reduced when designers adjust the hierarchical data set to retain only the signals of interest.
根据本公开第二方面,提供一种计算机可读存储介质,存储多个程序。多个程序被配置为一个或多个处理器执行,多个程序包括用于执行第一方面的方法的指令。According to a second aspect of the present disclosure, a computer-readable storage medium is provided that stores a plurality of programs. A plurality of programs is configured for execution by one or more processors, the plurality of programs including instructions for performing the method of the first aspect.
根据本公开第三方面,提供一种计算机程序产品。计算机程序产品包括多个程序,多个程序被配置为一个或多个处理器执行,多个程序包括用于执行第一方面的方法的指令。According to a third aspect of the present disclosure, a computer program product is provided. The computer program product includes a plurality of programs configured for execution by one or more processors, the plurality of programs comprising instructions for performing the method of the first aspect.
根据本公开第四方面,提供一种电子设备。电子设备包括:一个或多个处理器;包括计算机指令的存储器,计算机指令在由电子设备的一个或多个处理器执行时使得电子设备执行第一方面的方法。According to a fourth aspect of the present disclosure, an electronic device is provided. The electronic device includes: one or more processors; and a memory including computer instructions that, when executed by the one or more processors of the electronic device, cause the electronic device to perform the method of the first aspect.
根据本公开第五方面,提供一种电子设备。电子设备包括编译单元、仿真单元和存储单元。编译单元被配置为对用于表示电路的电路文件进行编译,以在编译数据库中生成针对电路的层级数据集,层级数据集与电路中的多个节点处的多个信号相关联。仿真单元被配置为基于层级数据集和电路文件,对电路进行仿真,以在波形数据库中选择性地生成目标波形数据集,波形数据库被配置为访问编译数据库。存储单元被配置为在存储器中存储目标波形数据集的至少一部分。由于在编译阶段设置专用的编译数据库以存储层级数据集,并且在仿真阶段可以通过专用的波形数据库访问编译数据库来基于数字电路业务特征在仿真过程中选择性地生成相应波形数据并且选择性地存储波形数据,因此可以减少仿真过程中所生成和保存的波形数据量并且相应地减少仿真时间。相比于常规数字仿真工具直接在仿真阶段调度执行过程进行构建信号连接关系、记录波形信息等操作并且进行全波形文件输出,本公开的技术方案通过在编译阶段的预处理,可以在进行波形文件压缩和存储之前已经大大减小了需要保存的波形文件大小。结合业务级别的特征提取可以在编译阶段实现去除冗余信息。在避免有效信息缺失的前提下,在进行压缩算法之前就已经从源头减少了波形文件大小,从而减小了编解码对于仿真时间的压力并且相应减少了仿真时间。According to a fifth aspect of the present disclosure, an electronic device is provided. The electronic equipment includes a compilation unit, a simulation unit and a storage unit. The compilation unit is configured to compile a circuit file representing the circuit to generate a hierarchical data set for the circuit in the compilation database, the hierarchical data set being associated with a plurality of signals at a plurality of nodes in the circuit. The simulation unit is configured to simulate the circuit based on the hierarchical data set and the circuit file to selectively generate the target waveform data set in the waveform database, and the waveform database is configured to access the compilation database. The storage unit is configured to store at least a portion of the target waveform data set in the memory. Since a dedicated compilation database is set up in the compilation phase to store hierarchical data sets, and the compilation database can be accessed through a dedicated waveform database in the simulation phase, corresponding waveform data can be selectively generated and stored selectively during the simulation process based on the business characteristics of the digital circuit. Waveform data, thus reducing the amount of waveform data generated and saved during simulation and correspondingly reducing simulation time. Compared with conventional digital simulation tools that directly schedule the execution process in the simulation phase to construct signal connection relationships, record waveform information, and output full waveform files, the technical solution of the present disclosure can perform waveform file processing through preprocessing in the compilation phase. Compression and storage have previously greatly reduced the size of waveform files that need to be saved. Combined with business-level feature extraction, redundant information can be removed during the compilation phase. On the premise of avoiding the loss of effective information, the waveform file size has been reduced from the source before performing the compression algorithm, thereby reducing the pressure of encoding and decoding on simulation time and reducing the simulation time accordingly.
在第五方面的一种实现方式中,用于表示电路的电路文件包括寄存器传输级描述文件。在第五方面的一种实现方式中,层级数据集以层级树形式被组织,并且层级数据集包括以下至少一项:用于表示多个信号的序列化的序列信息、用于表示多个信号的传输路径的路径信息、与多个信号对应的地址信息、用于驱动多个信号的驱动信息和用于被多个信号驱动的负载信息。通过将层级数据集以层级树的形式组织,可以便于基于各个属性(诸如驱动关系、负载关系、内存地址、模块调用等)来查找、修改和保存层级数据,并且相应地更易于选择性地进行信号仿真和存储。In an implementation of the fifth aspect, the circuit file used to represent the circuit includes a register transfer level description file. In an implementation of the fifth aspect, the hierarchical data set is organized in the form of a hierarchical tree, and the hierarchical data set includes at least one of the following: serialized sequence information used to represent multiple signals, Path information of the transmission path, address information corresponding to the plurality of signals, driving information for driving the plurality of signals, and load information for being driven by the plurality of signals. By organizing hierarchical data sets in the form of a hierarchical tree, it is easier to find, modify, and save hierarchical data based on individual attributes (such as driver relationships, load relationships, memory addresses, module calls, etc.), and accordingly it is easier to do so selectively. Signal simulation and storage.
在第五方面的一种实现方式中,多个信号包括第一信号和第二信号,层级数据集包括在第一信号和第二信号之间的层级映射关系。编译单元被进一步配置为:将第一信号和第二信号与寄存器传输级描述文件中的电路模型集中的信号进行匹配以确定在第一信号和第二信号之间的层级映射关系。In an implementation manner of the fifth aspect, the plurality of signals includes a first signal and a second signal, and the hierarchical data set includes a hierarchical mapping relationship between the first signal and the second signal. The compilation unit is further configured to: match the first signal and the second signal with signals in the circuit model set in the register transfer level description file to determine a hierarchical mapping relationship between the first signal and the second signal.
在第五方面的一种实现方式中,仿真单元被进一步配置为:基于层级映射关系,确定目标信号集,目标信号集包括第一信号,并且目标信号集不包括第二信号;基于所确定的目标信号集,对电路进行仿真,以在波形数据库中选择性地生成目标波形数据集,目标波形数据集包括第一信号的仿真波形数据,并且目标波形数据集不包括第二信号的仿真波形数据。通过在多个关联信号之间建立层级映射关系,可以基于单个信号来确定另一信号的关系,这可以避免多个信号的仿真计算和存储,从而进一步减少仿真时间并且减小信号波形的存储容量。In an implementation manner of the fifth aspect, the simulation unit is further configured to: determine the target signal set based on the hierarchical mapping relationship, the target signal set includes the first signal, and the target signal set does not include the second signal; based on the determined a target signal set, simulating the circuit to selectively generate a target waveform data set in the waveform database, the target waveform data set includes simulated waveform data of the first signal, and the target waveform data set does not include simulated waveform data of the second signal . By establishing a hierarchical mapping relationship between multiple associated signals, the relationship of another signal can be determined based on a single signal, which can avoid the simulation calculation and storage of multiple signals, thereby further reducing simulation time and reducing the storage capacity of signal waveforms. .
在第五方面的一种实现方式中,电子设备还包括接收单元。接收单元被配置为接收针对目标信号的存储时间指示。存储单元被进一步配置为:在存储器中存储目标波形数据集中的目标信号的仿真波形数据中的、与存储时间指示对应的时间段的数据部分。通过由用户设定 待仿真和待存储的时间段的波形,相比于全部时段的仿真和数据存储,可以进一步减少数据量和时间。In an implementation manner of the fifth aspect, the electronic device further includes a receiving unit. The receiving unit is configured to receive a storage time indication for the target signal. The storage unit is further configured to: store in the memory a data portion of the time period corresponding to the storage time indication in the simulation waveform data of the target signal in the target waveform data set. By setting by user The waveforms of the time period to be simulated and stored can further reduce the amount of data and time compared to the simulation and data storage of the entire period.
在第五方面的一种实现方式中,多个信号包括第三信号。仿真单元被进一步配置为:基于层级数据集和电路文件,对电路进行仿真,以在波形数据库中生成针对第三信号的仿真波形数据,其中针对第三信号的仿真波形数据包括毛刺数据。In an implementation of the fifth aspect, the plurality of signals includes a third signal. The simulation unit is further configured to: simulate the circuit based on the hierarchical data set and the circuit file to generate simulated waveform data for the third signal in the waveform database, where the simulated waveform data for the third signal includes glitch data.
在第五方面的一种实现方式中,毛刺数据包括在单位时间段内的针对第三信号的多个毛刺值。存储单元被进一步配置为:将多个毛刺值按时间顺序存储在存储器中。在第五方面的一种实现方式中,存储单元被进一步配置为:确定多个毛刺值中的相邻毛刺值是否相同;以及如果相邻毛刺值相同,则将相邻毛刺值中的任一毛刺值存储在存储器中,而不存储相邻毛刺值中的另一毛刺值。通过提供毛刺信号记录功能,可以为电路设计人员提供更为准确和详细的波形信息,以便于确定电路设计的准确性。In an implementation manner of the fifth aspect, the glitch data includes a plurality of glitch values for the third signal within a unit time period. The storage unit is further configured to store the plurality of glitch values in the memory in time sequence. In an implementation manner of the fifth aspect, the storage unit is further configured to: determine whether adjacent glitch values among the plurality of glitch values are the same; and if the adjacent glitch values are the same, convert any of the adjacent glitch values to A glitch value is stored in memory without storing another glitch value within an adjacent glitch value. By providing glitch signal recording function, circuit designers can be provided with more accurate and detailed waveform information to determine the accuracy of circuit design.
在第五方面的一种实现方式中,存储单元被进一步配置为确定多个毛刺值中的相邻毛刺值是否相同;以及如果相邻毛刺值相同,则将相邻毛刺值中的任一毛刺值存储在存储器中,而不存储相邻毛刺值中的另一毛刺值。通过将多个相邻的毛刺值合并为单个毛刺值,可以进一步减少波形数据量。In an implementation manner of the fifth aspect, the storage unit is further configured to determine whether adjacent glitch values among the plurality of glitch values are the same; and if the adjacent glitch values are the same, then convert any one of the adjacent glitch values into The value is stored in memory without storing another glitch value within the adjacent glitch value. Waveform data volume can be further reduced by merging multiple adjacent glitch values into a single glitch value.
在第五方面的一种实现方式中,电子设备还包括调整单元。调整单元被配置为基于用户输入,对层级数据集进行调整。通过对层级数据集进行调整,可以为设计人员赋予电路验证的灵活性。此外,在设计人员将层级数据集调整以仅保留自己所关注的信号波形的情形下,可以进一步减少电路仿真过程中的波形处理的时间和数据量。In an implementation manner of the fifth aspect, the electronic device further includes an adjustment unit. The adjustment unit is configured to adjust the hierarchical data set based on user input. Adjustments to hierarchical data sets give designers flexibility in circuit verification. In addition, when designers adjust the hierarchical data set to retain only the signal waveforms they are interested in, the time and data volume of waveform processing during circuit simulation can be further reduced.
应当理解,发明内容部分中所描述的内容并非旨在限定本公开的实施例的关键或重要特征,亦非用于限制本公开的范围。本公开的其它特征将通过以下的描述变得容易理解。It should be understood that what is described in this summary is not intended to identify key or important features of the embodiments of the disclosure, nor to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the description below.
附图说明Description of the drawings
结合附图并参考以下详细说明,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。在附图中,相同或相似的附图标记表示相同或相似的元素,其中:The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent with reference to the following detailed description taken in conjunction with the accompanying drawings. In the drawings, the same or similar reference numbers represent the same or similar elements, where:
图1示出了一种常规电路仿真过程的示意图。Figure 1 shows a schematic diagram of a conventional circuit simulation process.
图2示出了根据本公开的一些实施例的电路仿真示意图。Figure 2 shows a circuit simulation schematic in accordance with some embodiments of the present disclosure.
图3示出了根据本公开的一些实施例的用于生成和存储电路仿真过程中的波形数据的方法的示意流程图。3 illustrates a schematic flowchart of a method for generating and storing waveform data during circuit simulation in accordance with some embodiments of the present disclosure.
图4示出了根据本公开的一些实施例的电路仿真过程的示意图。Figure 4 shows a schematic diagram of a circuit simulation process according to some embodiments of the present disclosure.
图5示出了根据本公开的一些实施例的毛刺信号的示意图。Figure 5 shows a schematic diagram of a glitch signal according to some embodiments of the present disclosure.
图6示出了根据本公开的一些实施例的信号写入过程的示意图。Figure 6 shows a schematic diagram of a signal writing process according to some embodiments of the present disclosure.
图7示出了根据本公开的一些实施例的信号读取过程的示意图。Figure 7 shows a schematic diagram of a signal reading process according to some embodiments of the present disclosure.
图8示出了根据本公开的一些实施例的电子设备的示意性框图。Figure 8 shows a schematic block diagram of an electronic device according to some embodiments of the present disclosure.
图9示出了可以用来实施本公开的实施例的示例设备的示意性框图。Figure 9 shows a schematic block diagram of an example device that may be used to implement embodiments of the present disclosure.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开 的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the disclosure are shown in the drawings, it should be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, which rather are provided for A more thorough and complete understanding of this disclosure. It should be understood that this disclosure The drawings and embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure.
在本公开的实施例的描述中,术语“包括”及其类似用语应当理解为开放性包含,即“包括但不限于”。术语“基于”应当理解为“至少部分地基于”。术语“一个实施例”或“该实施例”应当理解为“至少一个实施例”。术语“第一”、“第二”等等可以指代不同的或相同的对象。下文还可能包括其他明确的和隐含的定义。In the description of embodiments of the present disclosure, the term "including" and similar expressions shall be understood as an open inclusion, that is, "including but not limited to." The term "based on" should be understood to mean "based at least in part on." The terms "one embodiment" or "the embodiment" should be understood to mean "at least one embodiment". The terms "first," "second," etc. may refer to different or the same object. Other explicit and implicit definitions may be included below.
下面将参照附图更详细地描述本公开的优选实施例。虽然附图中显示了本公开的优选实施例,然而应该理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了使本公开更加透彻和完整,并且能够将本公开的范围完整地传达给本领域的技术人员。Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
在本文中使用的术语“包括”及其变形表示开放性包括,即“包括但不限于”。除非特别申明,术语“或”表示“和/或”。术语“基于”表示“至少部分地基于”。术语“一个示例实施例”和“一个实施例”表示“至少一个示例实施例”。术语“另一实施例”表示“至少一个另外的实施例”。术语“第一”、“第二”等等可以指代不同的或相同的对象。下文还可能包括其他明确的和隐含的定义。As used herein, the term "include" and its variations mean an open inclusion, ie, "including but not limited to." Unless otherwise stated, the term "or" means "and/or". The term "based on" means "based at least in part on." The terms "one example embodiment" and "an embodiment" mean "at least one example embodiment." The term "another embodiment" means "at least one additional embodiment". The terms "first," "second," etc. may refer to different or the same object. Other explicit and implicit definitions may be included below.
图1示出了一种常规电路仿真过程的示意图。在102处,诸如计算机之类的电子设备接收用于描述或表示电路的文件,例如寄存器传输级(register transmit level,RTL)文件,并且对该RTL文件进行编译。在104,电子设备对经编译的文件进行仿真运行。在仿真运行的过程中,电子设备可以产生全量波形114,即,电路中各个节点处的波形信号的集合。在116,电子设备可以对全量波形进行存储。可选地,在波形存储的过程中,电子设备可以对所生成的波形数据进行压缩116,以生成专用的波形格式文件,从而达到减小波形文件大小的目的。在一些常规方案中,为了追求极致的压缩比,甚至可能导致经压缩的编解码时间极大地影响仿真性能,例如编解码的时间显著增加。在将波形存储在存储器中之后,电子设备可以随时响应于设计人员的输入而在108显示波形。Figure 1 shows a schematic diagram of a conventional circuit simulation process. At 102, an electronic device, such as a computer, receives a file describing or representing a circuit, such as a register transfer level (RTL) file, and compiles the RTL file. At 104, the electronic device performs a simulation run on the compiled file. During the simulation run, the electronic device may generate a full waveform 114, that is, a collection of waveform signals at various nodes in the circuit. At 116, the electronic device can store the full waveform. Optionally, during the process of waveform storage, the electronic device can compress 116 the generated waveform data to generate a dedicated waveform format file, thereby achieving the purpose of reducing the size of the waveform file. In some conventional solutions, the pursuit of the ultimate compression ratio may even cause the compressed encoding and decoding time to greatly affect the simulation performance, for example, the encoding and decoding time increases significantly. After the waveform is stored in memory, the electronic device may display the waveform at 108 at any time in response to input from the designer.
如上所述,在常规方案中,电路的仿真通常不在编译侧做与信号的波形信息相关的处理,而是在仿真运行时调度执行过程进行构建信号连接关系、记录波形信息等操作并且进行波形文件输出。这给仿真时间带来较大劣化。此外,在一些常规方案中,虽然对诸如VCD文件之类的波形文件进行了有效信息提取,去除了冗余信息,但在实际仿真过程中,由于编解码能力有限,实际的数据量还是相对较大并且仿真时间还是较长。As mentioned above, in conventional solutions, circuit simulation usually does not perform processing related to signal waveform information on the compilation side. Instead, the execution process is scheduled during the simulation runtime to construct signal connection relationships, record waveform information, and other operations, and perform waveform files. output. This brings great degradation to the simulation time. In addition, in some conventional solutions, although effective information extraction and redundant information are removed from waveform files such as VCD files, in the actual simulation process, due to limited encoding and decoding capabilities, the actual amount of data is still relatively small. is large and the simulation time is still long.
在本公开中,在编译侧和仿真运行侧分别设置专用的编译数据库(compile database)和波形数据库来进行层级数据集的传输和存储。由于在编译阶段设置专用的编译数据库以存储层级数据集,并且在仿真阶段可以通过专用的波形数据库访问编译数据库来基于数字电路业务特征在仿真过程中选择性地生成相应波形数据并且选择性地存储波形数据,因此可以减少仿真过程中所生成和保存的波形数据量并且相应地减少仿真时间。相比于常规数字仿真工具直接在仿真阶段调度执行过程进行构建信号连接关系、记录波形信息等操作并且进行全波形文件输出,本公开的技术方案通过在编译阶段的预处理,可以在进行波形文件压缩和存储之前已经大大减小了需要保存的波形文件大小。结合业务级别的特征提取可以在编译阶段实现去除冗余信息。在避免有效信息缺失的前提下,在进行压缩算法之前就已经从源头减少了波形文件大小,从而减小了编解码对于仿真时间的压力并且相应减少了仿真时间。在第一方面的一种实现方式中,该方法还包括在存储器中存储目标波形数据集的全部数据。In the present disclosure, a dedicated compile database (compile database) and a waveform database are respectively set up on the compilation side and the simulation running side to transmit and store hierarchical data sets. Since a dedicated compilation database is set up in the compilation phase to store hierarchical data sets, and the compilation database can be accessed through a dedicated waveform database in the simulation phase, corresponding waveform data can be selectively generated and stored selectively during the simulation process based on the business characteristics of the digital circuit. Waveform data, thus reducing the amount of waveform data generated and saved during simulation and correspondingly reducing simulation time. Compared with conventional digital simulation tools that directly schedule the execution process in the simulation phase to construct signal connection relationships, record waveform information, and output full waveform files, the technical solution of the present disclosure can perform waveform file processing through preprocessing in the compilation phase. Compression and storage have previously greatly reduced the size of waveform files that need to be saved. Combined with business-level feature extraction, redundant information can be removed during the compilation phase. On the premise of avoiding the loss of effective information, the waveform file size has been reduced from the source before performing the compression algorithm, thereby reducing the pressure of encoding and decoding on simulation time and reducing the simulation time accordingly. In an implementation of the first aspect, the method further includes storing all data of the target waveform data set in the memory.
图2示出了根据本公开的一些实施例的电路仿真200的示意图。诸如计算机之类的具有计算能力的电子设备可以接收诸如RTL文件之类的用于描述电路的文件201,并且在202处 电子设备可以对文件201进行编译。可选地,文件201可以被初步分析(parser)之后被编译。可以理解,初步分析并非必须。在一些实施例中,初步分析可以与编译集成在一起执行。在一个实施例中,在编译侧,可以设置专用的编译数据库212。编译数据库212可以用于存储与待仿真的电路的信号波形相关的信息。在一个实施例中,编译数据库212可以存储层级数据集。在一个实施例中,该层级数据集以层级树形式被组织(即,层级树),并且层级数据集包括以下至少一项:用于表示多个信号的序列化的序列信息、用于表示多个信号的传输路径的路径信息、与多个信号对应的地址信息、用于驱动多个信号的驱动信息和用于被多个信号驱动的负载信息。层级数据集可以用于Verilog编程语言接口(Verilog programming language interface,VPI)反查信号时获取上述信息。这可以用于在生成波形文件时构建芯片设计代码的层级结构信息。在一个实施例中,这可以在电路调试(debug)时选择芯片层级并选择某个层级下的信号进行波形展示。在一个实施例中,编译数据库212还可以提供对于信号的序列化和反序列化。例如,编译数据库212可以对多个信号进行序列化,并且将序列化的信息传递至仿真端。仿真端可以对序列化的多个信号进行反序列化,以确定期望的信号。Figure 2 shows a schematic diagram of a circuit simulation 200 in accordance with some embodiments of the present disclosure. An electronic device with computing capabilities, such as a computer, may receive a file 201 such as an RTL file describing a circuit, and at 202 The electronic device can compile file 201. Optionally, the file 201 may be parsed and then compiled. Understandably, preliminary analysis is not necessary. In some embodiments, preliminary analysis may be performed integrated with compilation. In one embodiment, on the compilation side, a dedicated compilation database 212 may be provided. The compilation database 212 may be used to store information related to signal waveforms of the circuit to be simulated. In one embodiment, compilation database 212 may store hierarchical data sets. In one embodiment, the hierarchical data set is organized in a hierarchical tree (i.e., a hierarchical tree), and the hierarchical data set includes at least one of the following: serialized sequence information for representing a plurality of signals; Path information of the transmission path of the signals, address information corresponding to the plurality of signals, drive information for driving the plurality of signals, and load information for being driven by the plurality of signals. The hierarchical data set can be used to obtain the above information when back-checking the signal using the Verilog programming language interface (VPI). This can be used to build hierarchical structure information of the chip design code when generating waveform files. In one embodiment, this can be done by selecting the chip level during circuit debugging and selecting signals at a certain level for waveform display. In one embodiment, compilation database 212 may also provide serialization and deserialization of signals. For example, the compilation database 212 may serialize multiple signals and pass the serialized information to the simulation side. The emulation side can deserialize multiple serialized signals to determine the expected signal.
具体而言,编译数据库212可以从抽象语法树(abstract syntax tree,AST)以及中间表达(intermediate representation,IR)的构建过程中提取层级树的相关信息,并且在对各个信息序列化之后存储在编译数据库212中。虽然在此以层级树的形式来组织层级数据集,但是这仅是示意,而非对本公开的范围进行限制。也可以使用其它的数据结构形式来组织层级数据集。通过将层级数据集以层级树的形式组织,可以便于基于各个属性(诸如驱动关系、负载关系、内存地址、模块调用等)来查找、修改和保存层级数据,并且相应地更易于选择性地进行信号仿真和存储。虽然在此以仿真运行204来描述,但是可以理解还可以有其它工具链212(例如电路调试器)访问编译数据库212和/或波形数据库214。本公开对此不进行限制。Specifically, the compilation database 212 can extract the relevant information of the hierarchical tree from the construction process of the abstract syntax tree (AST) and the intermediate representation (IR), and store it in the compilation database after serializing each information. in database 212. Although the hierarchical data set is organized in the form of a hierarchical tree here, this is only illustrative and does not limit the scope of the present disclosure. Other data structures can also be used to organize hierarchical data sets. By organizing hierarchical data sets in the form of a hierarchical tree, it is easier to find, modify, and save hierarchical data based on individual attributes (such as driver relationships, load relationships, memory addresses, module calls, etc.), and accordingly it is easier to do so selectively. Signal simulation and storage. Although described here as simulation run 204, it is understood that other tool chains 212 (such as circuit debuggers) may also access the compilation database 212 and/or the waveform database 214. This disclosure does not limit this.
在204,电子设备可以对经编译的文件进行仿真运行。在仿真运行的过程中,电子设备可以产生各个信号的波形,并且可以将期望的目标波形数据集存储在波形数据库214中。波形数据库214被配置为访问编译数据库212。编译数据库212因此可以将层级数据集高效传递至波形数据库214。诸如调试器之类的其它工具链220也可以读取和/或修改层级数据集。At 204, the electronic device can perform simulation operation on the compiled file. During the simulation run, the electronic device may generate waveforms of each signal, and may store the desired target waveform data set in the waveform database 214 . Waveform database 214 is configured to access compilation database 212 . Compiled database 212 can therefore efficiently transfer hierarchical data sets to waveform database 214. Other tool chains 220 such as debuggers may also read and/or modify hierarchical data sets.
具体而言,在仿真过程中,电子设备可以不断地产生诸如波形数据之类的目标仿真数据。波形数据库214被配置为提供波形写入服务,将仿真过程中的目标仿真数据记录到波形数据库214中。波形数据库214支持生成多种格式的波形文件,例如快速信号数据库(fast signal database,FSDB)格式、VCD格式等。多种格式波形文件可以相互转换。仿真结束后,波形数据库214可以提供读取服务以读取仿真生成的波形文件中的数据。Specifically, during the simulation process, the electronic device can continuously generate target simulation data such as waveform data. The waveform database 214 is configured to provide a waveform writing service and record the target simulation data in the simulation process into the waveform database 214 . The waveform database 214 supports generating waveform files in multiple formats, such as fast signal database (FSDB) format, VCD format, etc. Waveform files in various formats can be converted to each other. After the simulation is completed, the waveform database 214 can provide a reading service to read data in the waveform file generated by the simulation.
在一个实施例中,波形数据库214还被配置为提供接口以对编译数据库212中的层级数据集进行访问。设计人员可以基于层级数据集来通过输入选项控制转存范围。基于层级数据集,电子设备可以通过诸如命令行接口之类的接口来动态解析转存范围。对应地,波形文件中也仅保存目标波形数据,而不需要保存完整的层级中各个信号的波形数据。由此,可以避免对于无用信号的重复读写,减少仿真开销。In one embodiment, waveform database 214 is also configured to provide an interface to access hierarchical data sets in compiled database 212 . Designers can control the dump scope through input options based on hierarchical datasets. Based on the hierarchical data set, the electronic device can dynamically resolve the dump range through an interface such as a command line interface. Correspondingly, only the target waveform data is saved in the waveform file, and there is no need to save the waveform data of each signal in the complete hierarchy. As a result, repeated reading and writing of useless signals can be avoided and simulation overhead can be reduced.
此外,在一些实施例中,波形数据库214还被配置为保存信号的单位时间段内的毛刺(glitch)信息。例如,在单位时间段内,仿真结果多次改变同一个信号的值,或仿真结果给同一个信号赋予多个值。在一个实施例中,可以在每个域(region)更新之后,将值实时保存在波形数据库214中。通过保存毛刺信息,可以为电路设计人员提供更为准确和详细的波形信息,以便于确定电路设计的准确性。In addition, in some embodiments, the waveform database 214 is also configured to save glitch information within a unit time period of the signal. For example, within a unit time period, the simulation result changes the value of the same signal multiple times, or the simulation result assigns multiple values to the same signal. In one embodiment, values may be saved in the waveform database 214 in real time after each region is updated. By saving glitch information, circuit designers can be provided with more accurate and detailed waveform information to determine the accuracy of circuit design.
图3示出了根据本公开的一些实施例的用于生成和存储电路仿真过程中的波形数据的方 法300的示意流程图。可以理解,上面针对图2描述的各个方面可以选择性地适用于方法300,因此相关部分在此不再赘述。方法300可以由诸如计算机之类的电子设备执行。备选地,方法300还可以由具有计算能力的其它电子设备执行,本公开对此不进行赘述。Figure 3 illustrates a method for generating and storing waveform data during circuit simulation in accordance with some embodiments of the present disclosure. Schematic flow chart of Method 300. It can be understood that various aspects described above with respect to FIG. 2 can be selectively applied to the method 300, so the relevant parts will not be described again here. Method 300 may be performed by an electronic device such as a computer. Alternatively, the method 300 may also be executed by other electronic devices with computing capabilities, which will not be described in detail in this disclosure.
在302,电子设备对用于表示电路的电路文件进行编译,以在编译数据库212中生成针对电路的层级数据集,层级数据集与电路中的多个节点处的多个信号相关联。在一些实施例中,用于表示电路的电路文件包括寄存器传输级描述文件。在一些实施例中,层级数据集以层级树形式被组织,并且层级数据集包括以下至少一项:用于表示多个信号的序列化的序列信息、用于表示多个信号的传输路径的路径信息、与多个信号对应的地址信息、用于驱动多个信号的驱动信息和用于被多个信号驱动的负载信息。通过将层级数据集以层级树的形式组织,可以便于基于各个属性(诸如驱动关系、负载关系、内存地址、模块调用等)来查找、修改和保存层级数据,并且相应地更易于选择性地进行信号仿真和存储。At 302, the electronic device compiles a circuit file representing the circuit to generate a hierarchical data set for the circuit in the compilation database 212, the hierarchical data set being associated with a plurality of signals at a plurality of nodes in the circuit. In some embodiments, circuit files representing circuits include register transfer level description files. In some embodiments, the hierarchical data set is organized in the form of a hierarchical tree, and the hierarchical data set includes at least one of the following: sequence information representing the serialization of a plurality of signals, a path representing a transmission path of the plurality of signals information, address information corresponding to the plurality of signals, driving information for driving the plurality of signals, and load information for being driven by the plurality of signals. By organizing hierarchical data sets in the form of a hierarchical tree, it is easier to find, modify, and save hierarchical data based on individual attributes (such as driver relationships, load relationships, memory addresses, module calls, etc.), and accordingly it is easier to do so selectively. Signal simulation and storage.
图4示出了根据本公开的一些实施例的电路仿真过程400的示意图。在402,通过对电路文件的编译,可以生成层级数据412。在一个实施例中,层级数据412可以是如上所述的层级树。在一个实施例中,层级树可以在被解析之后得到的AST上进行截取或保存。层级树可以按各种参数进行组织,并且每个树节点上可以包括一定范围的信号集以及信号集内的各个信号参数(叶节点)。换言之,层级数据412可以包括按信号类型、传递路径、地址分配、驱动关系、负载关系等中的一项或多项分支的节点数据。Figure 4 shows a schematic diagram of a circuit simulation process 400 in accordance with some embodiments of the present disclosure. At 402, through compilation of the circuit file, hierarchical data 412 may be generated. In one embodiment, hierarchical data 412 may be a hierarchical tree as described above. In one embodiment, the hierarchical tree can be intercepted or saved on the AST obtained after being parsed. The hierarchical tree can be organized according to various parameters, and each tree node can include a certain range of signal sets and each signal parameter (leaf node) within the signal set. In other words, the hierarchical data 412 may include node data branched by one or more of signal types, transfer paths, address assignments, driving relationships, load relationships, and the like.
可以理解,在一些实施例中,在编译过程中,编译器在层层中间表达降级(IR lowering)过程中对信号关键信息进行逐步分析(elaboration)。此外,编译器也会给所有的信号分配对应的内存空间。在另一些实施例中,编译数据库212还可以实现对于信号的序列化,以及把驱动信息、负载信息、模块调用关系、内存地址分配等关键信息也保存在了树形结构的对应节点上,以便于后续查找。It can be understood that in some embodiments, during the compilation process, the compiler performs step-by-step analysis (elaboration) of signal key information in the layer-by-layer intermediate expression downgrading (IR lowering) process. In addition, the compiler will also allocate corresponding memory space for all signals. In other embodiments, the compilation database 212 can also implement serialization of signals, and save key information such as driver information, load information, module calling relationships, memory address allocation, etc. on the corresponding nodes of the tree structure, so as to Find it later.
进一步地,层级数据412可以按上述项中的一项或多项进一步分类或分支。例如,针对信号类型,层级数据412中的一部分或全部可以进一步分为重复信号、规律信号、组合逻辑信号、延迟信号、周期信号等。例如,时钟信号可以被归为重复信号、规律信号或周期信号。与门的输出信号可以被归类为组合逻辑信号。缓冲器的输出可以被归类为延迟信号。可以理解,上述划分仅是示意而非对本公开的范围进行限制,可以根据需要进行相应划分。Further, the hierarchical data 412 may be further classified or branched by one or more of the above items. For example, with respect to signal types, part or all of the hierarchical data 412 may be further divided into repetitive signals, regular signals, combinational logic signals, delayed signals, periodic signals, etc. For example, a clock signal may be classified as a repetitive, regular, or periodic signal. The output signals of AND gates can be classified as combinational logic signals. The output of the buffer can be classified as a delayed signal. It can be understood that the above divisions are only illustrative and do not limit the scope of the present disclosure, and corresponding divisions can be made as needed.
在一些实施例中,多个信号包括第一信号和第二信号,层级数据集包括在第一信号和第二信号之间的层级映射关系。例如,第一信号可以是反相器的输入,并且第二信号是反相器的输出。因此,在知晓第一信号的波形的情形下,可以通过简单的取反操作,即可获得第二信号的波形。在此情形下,层级映射关系可以表达为取反操作。在另一实施例中,层级数据集包括在第一信号和第四信号与第二信号之间的层级映射关系。例如,第一信号和第四信号是与门的两个输入,而第二信号是与门的输出。因此,在知晓第一信号和第四信号的波形的情形下,可以通过简单的逻辑与操作,即可获得第二信号的波形。虽然在此使用反相器和与门进行描述,但是本公开不限于此。在两个信号或更多信号之间具有可预测的层级映射关系的情形也适用。具体而言,电子设备可以包括模型库,该模型库包括了各种信号映射模型,例如针对反相器、与门、或门等的信号映射模型。另一方面,电路设计中可以包括可以被拆分的多个电路模块、逻辑门器件等子电路模块。每个电路子电路模块可以包括各自的信号输入和输出。因此,在编译数据库212中生成针对电路的层级数据集包括:将第一信号和第二信号与寄存器传输级描述文件中的电路模型集中的信号进行匹配以确定在第一信号和第二信号之间的层级映射关系。例如,将电路文件中用于表示与门功能的模块的信号与模型库中的 针对与门的信号进行比对,以确定电路文件中的信号的层级映射关系。In some embodiments, the plurality of signals includes a first signal and a second signal, and the hierarchical data set includes a hierarchical mapping relationship between the first signal and the second signal. For example, the first signal may be the input of an inverter and the second signal be the output of the inverter. Therefore, when the waveform of the first signal is known, the waveform of the second signal can be obtained through a simple inversion operation. In this case, the hierarchical mapping relationship can be expressed as a negation operation. In another embodiment, the hierarchical data set includes hierarchical mapping relationships between the first signal and the fourth signal and the second signal. For example, the first signal and the fourth signal are the two inputs of the AND gate, while the second signal is the output of the AND gate. Therefore, when the waveforms of the first signal and the fourth signal are known, the waveform of the second signal can be obtained through a simple logical AND operation. Although described herein using inverters and AND gates, the disclosure is not limited thereto. This also applies when there is a predictable hierarchical mapping between two or more signals. Specifically, the electronic device may include a model library that includes various signal mapping models, such as signal mapping models for inverters, AND gates, OR gates, and the like. On the other hand, the circuit design may include multiple circuit modules, logic gate devices and other sub-circuit modules that can be split. Each circuit sub-circuit module may include respective signal inputs and outputs. Accordingly, generating the hierarchical data set for the circuit in the compilation database 212 includes matching the first signal and the second signal with the signals in the circuit model set in the register transfer level description file to determine the relationship between the first signal and the second signal. hierarchical mapping relationship between. For example, combine the signal of the module used to represent the AND gate function in the circuit file with the signal in the model library. Compare the AND gate signals to determine the hierarchical mapping relationship of the signals in the circuit file.
在一些实施例中,该方法还包括:基于用户输入,对层级数据集进行调整。在编译过程中,用户可以调用编译数据库212的接口对层级树的信号节点进行删除、增加或修改。例如,可以对驱动信息、负载信息、模块调用信息、地址信息等信息进行修改。通过对层级数据集进行调整,可以为设计人员赋予电路验证的灵活性。此外,在设计人员将层级数据集调整以仅保留自己所关注的信号的情形下,可以进一步减少电路仿真的时间和波形信号的数据量。In some embodiments, the method further includes adjusting the hierarchical data set based on user input. During the compilation process, the user can call the interface of the compilation database 212 to delete, add or modify the signal nodes of the hierarchical tree. For example, driver information, load information, module call information, address information and other information can be modified. Adjustments to hierarchical data sets give designers flexibility in circuit verification. In addition, circuit simulation time and waveform signal data volume can be further reduced when designers adjust the hierarchical data set to retain only the signals of interest.
返回至图3,在304,电子设备基于层级数据集和电路文件,对电路进行仿真,以在波形数据库214中选择性地生成目标波形数据集,其中波形数据库214具有用于对编译数据库212进行访问的接口。在一些实施例中,波形数据库214被配置为存储和读取数字芯片设计中的仿真数据,例如仿真波形数据。在另一些实施例中,波形数据库214还被配置为在调试侧读取波形数据。波形数据库214可以例如包括三个模块:写入模块、读取模块和附属工具模块,每个模块对外提供独立功能。在一个实施例中,写入模块被配置为将仿真器或附属工具输入的波形数据转存为波形文件。读取模块被配置为将波形数据转换为内存波形数据,并且通过API形式返回给上层调用者。附属工具模块被配置为支持用户在终端输入参数,对波形文件进行导出、统计、修改、格式转换等操作。Returning to FIG. 3 , at 304 , the electronic device simulates the circuit based on the hierarchical data set and the circuit file to selectively generate a target waveform data set in the waveform database 214 , where the waveform database 214 has a function for performing compilation database 212 Access interface. In some embodiments, waveform database 214 is configured to store and read simulation data, such as simulation waveform data, in a digital chip design. In other embodiments, the waveform database 214 is also configured to read waveform data on the debug side. The waveform database 214 may include, for example, three modules: a writing module, a reading module and an auxiliary tool module, each module providing independent functions to the outside world. In one embodiment, the writing module is configured to dump the waveform data input by the emulator or accessory tool into a waveform file. The reading module is configured to convert waveform data into memory waveform data and return it to the upper-layer caller through API form. The accessory tool module is configured to support users to input parameters on the terminal and perform operations such as exporting, statistics, modification, and format conversion of waveform files.
在一些实施例中,电子设备可以从编译数据库212获取层级数据集中的一些或全部信息,例如内存地址信息或者其他关键信息。例如,电子设备被配置为调用编译数据库212的读取应用程序接口(application program interface,API)进行反序列化以实现读取功能。在一些实施例中,如框414所示,可以按芯片层级、按仿真时间、按仿真事件等维度对波形信息进行筛选仿真和在406处部分保存,从而仅保留需要的关键信息。例如对于电路节点中的第一节点和第二节点处的信号而言,用户可以使用选项或通过输入来确定第一节点处的信号是期望信号或目标信号,而第二节点处的信号是非期望信号或是不需要的信号。电子设备由此可以仅对第一节点处的信号进行仿真输出和存储。这可以在进行在416框中的压缩之前就已经大大减少了需要处理的文件大小,降低了对于极致压缩比的需求,可以大大提高仿真效率。电子设备在保存了波形之后,可以根据需要(例如用户输入或命令)在408处显示该波形数据。In some embodiments, the electronic device may obtain some or all information in the hierarchical data set from the compilation database 212, such as memory address information or other key information. For example, the electronic device is configured to call a reading application program interface (API) of the compiled database 212 to perform deserialization to implement the reading function. In some embodiments, as shown in block 414, the waveform information can be filtered and simulated by chip level, by simulation time, by simulation events and other dimensions and partially saved at 406, so that only the required key information is retained. For example, for signals at a first node and a second node in a circuit node, the user can use options or input to determine whether the signal at the first node is a desired signal or a target signal, and the signal at the second node is an undesired signal. Signal or unwanted signal. The electronic device can thereby simulate, output and store only the signal at the first node. This can greatly reduce the file size that needs to be processed before compression in the 416 box, reduces the need for the ultimate compression ratio, and can greatly improve simulation efficiency. After saving the waveform, the electronic device can display the waveform data at 408 as needed (such as user input or command).
在一些实施例中,电子设备被配置为基于层级映射关系,确定目标信号集。目标信号集包括第一信号,并且目标信号集不包括第二信号。基于所确定的目标信号集,对电路进行仿真,以在波形数据库中选择性地生成目标波形数据集,目标波形数据集包括第一信号的仿真波形数据,并且目标波形数据集不包括第二信号的仿真波形数据。在一个实施例中,例如第一信号是反相器的输入信号,而第二信号是反相器的输出信号。可以理解,第二信号是第一信号的取反信号。在此情形下,虽然第一信号和第二信号都是期望信号,但是由于第二信号和第一信号之间具有固定层级映射关系(换言之,可以基于第一信号确定出第二信号),因此实际上无需对第二信号进行仿真输出和存储。通过在多个关联信号之间建立层级映射关系,可以基于单个信号来确定另一信号的关系,这可以避免多个信号的波形计算和存储,从而进一步减少波形处理和存储的时间并且减小波形存储容量。In some embodiments, the electronic device is configured to determine the target signal set based on the hierarchical mapping relationship. The target signal set includes the first signal, and the target signal set does not include the second signal. Based on the determined target signal set, the circuit is simulated to selectively generate a target waveform data set in the waveform database, the target waveform data set includes simulated waveform data of the first signal, and the target waveform data set does not include the second signal simulation waveform data. In one embodiment, for example, the first signal is the input signal of the inverter and the second signal is the output signal of the inverter. It can be understood that the second signal is the inverted signal of the first signal. In this case, although the first signal and the second signal are both desired signals, since there is a fixed hierarchical mapping relationship between the second signal and the first signal (in other words, the second signal can be determined based on the first signal), therefore In fact, there is no need to simulate output and store the second signal. By establishing a hierarchical mapping relationship between multiple associated signals, the relationship of another signal can be determined based on a single signal, which can avoid the waveform calculation and storage of multiple signals, thereby further reducing the time of waveform processing and storage and reducing the size of the waveform. storage capacity.
可以理解,在一些仿真中,可能存在毛刺信号。毛刺信号对于验证电路设计的正确性可能是重要的,因此在一些情形下需要记录信号中的毛刺信号。电路仿真通常是在一个时间段或时隙(例如单位时间段)内通过逐步逼近或是多次赋值来获得该时间段或时隙内的仿真最终值。但是在一些情形下,这个时间段内信号可能具有多个值。为了确保电路仿真的准确性,在一些实施例中,可以仿真输出和存储多个值。例如,多个信号可以包括第三信号。在波形数据库中选择性地生成目标波形数据集包括:基于层级数据集和电路文件,对电路进行仿真, 以在波形数据库中生成针对第三信号的仿真波形数据,其中针对第三信号的仿真波形数据包括毛刺数据。具体而言,毛刺数据可以包括在单位时间段内的针对第三信号的多个毛刺值。电子设备将多个毛刺值按时间顺序存储在存储器中。It is understood that in some simulations, glitches may exist. Glitch signals can be important to verify the correctness of a circuit design, so in some cases it is necessary to record the glitches in the signal. Circuit simulation usually obtains the final simulation value in a time period or time slot (such as a unit time period) through gradual approximation or multiple assignments. But in some cases, the signal may have multiple values during this time period. To ensure the accuracy of circuit simulation, in some embodiments, multiple values may be simulated and output and stored. For example, the plurality of signals may include a third signal. Selectively generating target waveform data sets in the waveform database includes: simulating the circuit based on the hierarchical data set and circuit files, To generate simulated waveform data for the third signal in the waveform database, where the simulated waveform data for the third signal includes glitch data. Specifically, the glitch data may include a plurality of glitch values for the third signal within a unit time period. Electronic devices store multiple glitch values in memory in chronological order.
图5示出了根据本公开的一些实施例的毛刺信号的示意图500,其中六边形、矩形和圆形分别表示第一信号、第二信号和第三信号。波形数据库214可以保存各个时间段内多次改变的信号值。例如在时间段T1期间,针对第三信号,波形数据库214通过仿真依次得到第一值①、第二值②、第三值③和第三值③。可以理解,在时间段T1期间,第三信号改变了2次,即从第一值①改变为第二值②,并且从第二值②改变为第三值③。波形数据库214可以存储针对时间段T1的第一值①、第二值②和第三值③。通过提供毛刺信号记录功能,可以为电路设计人员提供更为准确和详细的波形信息,以便于确定电路设计的准确性。5 shows a schematic diagram 500 of a glitch signal according to some embodiments of the present disclosure, in which hexagons, rectangles, and circles represent the first signal, the second signal, and the third signal, respectively. The waveform database 214 may store signal values that change multiple times within each time period. For example, during the time period T1, for the third signal, the waveform database 214 sequentially obtains the first value ①, the second value ②, the third value ③ and the third value ③ through simulation. It can be understood that during the time period T1, the third signal changes twice, that is, from the first value ① to the second value ②, and from the second value ② to the third value ③. The waveform database 214 may store the first value ①, the second value ②, and the third value ③ for the time period T1. By providing glitch signal recording function, circuit designers can be provided with more accurate and detailed waveform information to determine the accuracy of circuit design.
在一些实施例中,电子设备可以被进一步配置为确定多个毛刺值中的相邻毛刺值是否相同;以及如果相邻毛刺值相同,则将相邻毛刺值中的任一毛刺值存储在存储器中,而不存储相邻毛刺值中的另一毛刺值。如图5所示,在时间段T1期间,仿真得到两个第三值③。波形数据库214可以仅保存一个第三值③。通过将多个相邻的毛刺值合并为单个毛刺值,可以进一步减少波形数据量。在另一个实施例中,如果在时间段T1期间在两个第三值③之间还存在其它值,则需要保存两个第三值③以及两者之间的其它值。In some embodiments, the electronic device may be further configured to determine whether adjacent glitch values among the plurality of glitch values are the same; and if the adjacent glitch values are the same, store any one of the adjacent glitch values in the memory , without storing another glitch value within an adjacent glitch value. As shown in Figure 5, during the time period T1, the simulation obtains two third values ③. The waveform database 214 may only store one third value ③. Waveform data volume can be further reduced by merging multiple adjacent glitch values into a single glitch value. In another embodiment, if there are other values between the two third values ③ during the time period T1, the two third values ③ and other values between them need to be saved.
返回至图3,在306,在存储器中存储目标波形数据集的至少一部分。在一些实施例中,电子设备在仿真时,仿真产生的波形数据例如可以位于高速缓存中,用户可以根据在图像界面上选择的选项或命令输入来选择待存储在诸如非易失性存储器之类的存储器中的仿真波形数据。此外,为了进一步减少存储的数据量,电子设备可以在存储器中存储目标波形数据集中的目标信号的仿真波形数据中的、与存储时间指示对应的时间段的数据部分。例如,用户可能仅关心从仿真开始到时间段T2结束处的波形。在此情形下,波形数据库214可以基于用户的选项或输入命令仅存储从仿真开始到时间段T2结束处的所有信号中的至少一部分的信号。通过由用户设定待仿真和待存储的波形时间段,相比于全部时段的仿真和数据存储,可以进一步减少数据量和时间。虽然在此使用时间段T2来描述,但是可以理解这仅是示意而非对本公开的范围进行限制。在另一些实施例中,用户可以选择其它时间段期间的一部分或全部信号。例如,用户可以选择从T1结束处到T3结束处的时间段内的一部分或全部信号,例如正方形的第二信号。此外,在一些实施例中,还可以选择非连续的时间段的信号。例如,可以选择从仿真开始到时间段T1结束处的信号以及从时间段T2结束处到时间段T3结束处的信号。电子设备可以相应地将所选择的区间的信号转存到非易失性存储器中。Returning to Figure 3, at 306, at least a portion of the target waveform data set is stored in memory. In some embodiments, when the electronic device is being simulated, the waveform data generated by the simulation can be located in a cache, for example, and the user can choose to be stored in a non-volatile memory such as a non-volatile memory based on options selected on the graphical interface or command input. simulation waveform data in the memory. In addition, in order to further reduce the amount of stored data, the electronic device may store in the memory a data portion of the time period corresponding to the storage time indication in the simulated waveform data of the target signal in the target waveform data set. For example, the user may only be interested in the waveform from the beginning of the simulation to the end of time period T2. In this case, the waveform database 214 may store only at least a portion of all signals from the start of the simulation to the end of the time period T2 based on the user's options or input commands. By setting the waveform time period to be simulated and stored by the user, the amount of data and time can be further reduced compared to simulation and data storage for the entire period. Although the time period T2 is used for description here, it can be understood that this is only illustrative and does not limit the scope of the present disclosure. In other embodiments, the user may select some or all of the signal during other time periods. For example, the user can select part or all of the signals within the time period from the end of T1 to the end of T3, such as the second signal of the square. In addition, in some embodiments, signals of non-consecutive time periods may also be selected. For example, you can select a signal from the start of the simulation to the end of time period T1 and a signal from the end of time period T2 to the end of time period T3. The electronic device can correspondingly transfer the signal of the selected interval to the non-volatile memory.
综上所述,由于在编译阶段设置专用的编译数据库以存储层级数据集,并且在仿真阶段可以通过专用的波形数据库访问编译数据库来基于数字电路业务特征在仿真过程中选择性地生成相应波形数据并且选择性地存储波形数据,因此可以减少仿真过程中所生成和保存的波形数据量并且相应地减少仿真时间。相比于常规数字仿真工具直接在仿真阶段调度执行过程进行构建信号连接关系、记录波形信息等操作并且进行全波形文件输出,本公开的技术方案通过在编译阶段的预处理,可以在进行波形文件压缩和存储之前已经大大减小了需要保存的文件大小。结合业务级别的特征提取可以在编译阶段实现去除冗余信息。在避免有效信息缺失的前提下,在进行压缩算法之前就已经从源头减少了波形文件大小,从而减小了编解码对于仿真时间的压力并且相应减少了仿真时间。To sum up, since a dedicated compilation database is set up in the compilation phase to store hierarchical data sets, and the compilation database can be accessed through a dedicated waveform database in the simulation phase, corresponding waveform data can be selectively generated during the simulation process based on the business characteristics of the digital circuit. And the waveform data is selectively stored, so the amount of waveform data generated and saved during the simulation can be reduced and the simulation time can be reduced accordingly. Compared with conventional digital simulation tools that directly schedule the execution process in the simulation phase to construct signal connection relationships, record waveform information, and output full waveform files, the technical solution of the present disclosure can perform waveform file processing through preprocessing in the compilation phase. Compression and storage have previously greatly reduced the size of files that need to be saved. Combined with business-level feature extraction, redundant information can be removed during the compilation phase. On the premise of avoiding the loss of effective information, the waveform file size has been reduced from the source before performing the compression algorithm, thereby reducing the pressure of encoding and decoding on simulation time and reducing the simulation time accordingly.
上面针对各个实施例描述的本公开的一些方面,下面将介绍示例性的信号写入和读取过程。图6示出了根据本公开的一些实施例的信号写入过程的示意图。诸如仿真器或调试器之 类的上层的调用模块可以将数据流传输给波形数据库中的波形写入模块。波形写入模块中的数据处理模块具有数据库(database,DB)接口。数据处理模块在经由DB接口接收到数据之后,可以对其进行校验、去重和编码等处理,并且将处理之后的数据放入数据缓存。波形写入模块继而对缓存中的数据进行分析,以确定数据的基本信息、设计结构、模拟信号或数字信号等属性或参数。在此之后,可以进行数据分类和划分,并且将数据按类别进行划分或分块。所得到的数据块可以分块压缩并且构建索引,以得到波形文件。波形文件可以被存入非易失性存储器。虽然在此示出了一种具体的波形写入方式,但是可以理解这仅是示意而非对本公开的范围进行限制。可以根据需要使用其它的波形写入方式。Some aspects of the present disclosure are described above with respect to various embodiments, and exemplary signal writing and reading processes are described below. Figure 6 shows a schematic diagram of a signal writing process according to some embodiments of the present disclosure. such as an emulator or debugger The upper calling module of the class can transmit the data stream to the waveform writing module in the waveform database. The data processing module in the waveform writing module has a database (database, DB) interface. After receiving the data through the DB interface, the data processing module can perform verification, deduplication, encoding and other processing on it, and put the processed data into the data cache. The waveform writing module then analyzes the data in the cache to determine the basic information of the data, design structure, analog signal or digital signal and other attributes or parameters. After this, the data can be classified and partitioned, and the data divided or chunked into categories. The resulting data blocks can be chunked, compressed and indexed to obtain a wave file. Waveform files can be stored in non-volatile memory. Although a specific waveform writing method is shown here, it can be understood that this is only illustrative and does not limit the scope of the present disclosure. Other waveform writing methods can be used as needed.
图7示出了根据本公开的一些实施例的信号读取过程的示意图。上层的显示模块被配置为可以在波形显示界面上显示波形。显示模块可以将控制参数传输至下层的处理模块。处理模块包括数据处理模块和波形处理模块。数据处理模块经由其数据接口接收控制参数之后,可以将其导出至波形处理模块。波形处理模块通过DB接口接收到经处理的参数之后,可以从存储器中读取第一格式或第二格式的波形数据,对其进行解压缩、解码和/或传至缓存,并且经由DB接口传输至数据处理模块。备选地,在此过程中,还可以根据需要对波形数据进行格式转换。例如,可以从第三格式转换为第一格式或第二格式的波形数据。数据处理模块对来自波形处理模块的数据进行抽样、查找、统计和/或计算,并且将数据流经由数据接口在波形界面上显示。可以理解,图6和图7所示的模块可以由程序实现,并且各个模块可以根据需要而被组合、分离、调用或嵌套,本公开对此不进行限制。例如,图6的波形写入模块可以被嵌入在图7的波形处理模块中。此外,图6和图7中所示的各个模块可以包括不限于所示的功能或子模块,而是可以根据需要包括更多或更少的模块。例如,图6和图7所示的数据处理模块仅示出了数据处理模块的一部分,并且数据处理模块可以包括更多的项。Figure 7 shows a schematic diagram of a signal reading process according to some embodiments of the present disclosure. The upper display module is configured to display waveforms on the waveform display interface. The display module can transmit control parameters to the underlying processing module. The processing module includes a data processing module and a waveform processing module. After the data processing module receives the control parameters via its data interface, it can export them to the waveform processing module. After receiving the processed parameters through the DB interface, the waveform processing module can read the waveform data in the first format or the second format from the memory, decompress, decode and/or transfer it to the cache, and transmit it through the DB interface to the data processing module. Alternatively, during this process, the waveform data can also be format-converted as needed. For example, the waveform data may be converted from the third format to the first format or the second format. The data processing module samples, searches, counts and/or calculates the data from the waveform processing module, and displays the data flow on the waveform interface through the data interface. It can be understood that the modules shown in Figures 6 and 7 can be implemented by programs, and each module can be combined, separated, called or nested as needed, and this disclosure is not limiting. For example, the waveform writing module of FIG. 6 can be embedded in the waveform processing module of FIG. 7 . Furthermore, each module shown in FIGS. 6 and 7 may include functions or sub-modules that are not limited to those shown, but may include more or fewer modules as needed. For example, the data processing module shown in FIGS. 6 and 7 only shows a part of the data processing module, and the data processing module may include more items.
图8示出了根据本公开的一些实施例的电子设备800的示意性框图。电子设备800可以包括多个模块,以用于执行如图3中所讨论的方法中的对应步骤。电子设备800包括编译单元802、仿真单元804和存储单元806。编译单元802被配置为对用于表示电路的电路文件进行编译,以在编译数据库中生成针对电路的层级数据集,层级数据集与电路中的多个节点处的多个信号相关联。仿真单元804被配置为基于层级数据集和电路文件,对电路进行仿真,以在波形数据库中选择性地生成目标波形数据集,波形数据库被配置为提供对编译数据库进行访问的接口。存储单元806被配置为在存储器中存储目标波形数据集的至少一部分。由于在编译阶段设置专用的编译数据库以存储层级数据集,并且在仿真阶段可以通过专用的波形数据库访问编译数据库来基于数字电路业务特征在仿真过程中选择性地生成相应波形数据并且选择性地存储波形数据,因此可以减少仿真过程中所生成和保存的波形数据量并且相应地减少仿真时间。相比于常规数字仿真工具直接在仿真阶段调度执行过程进行构建信号连接关系、记录波形信息等操作并且进行全波形文件输出,本公开的技术方案通过在编译阶段的预处理,可以在进行波形文件压缩和存储之前已经大大减小了需要保存的文件大小。结合业务级别的特征提取可以在编译阶段实现去除冗余信息。在避免有效信息缺失的前提下,在进行压缩算法之前就已经从源头减少了波形文件大小,从而减小了编解码对于仿真时间的压力并且相应减少了仿真时间。Figure 8 shows a schematic block diagram of an electronic device 800 in accordance with some embodiments of the present disclosure. Electronic device 800 may include a plurality of modules for performing corresponding steps in the method as discussed in FIG. 3 . The electronic device 800 includes a compilation unit 802, a simulation unit 804, and a storage unit 806. The compilation unit 802 is configured to compile a circuit file representing the circuit to generate a hierarchical data set for the circuit in the compilation database, the hierarchical data set being associated with a plurality of signals at a plurality of nodes in the circuit. The simulation unit 804 is configured to simulate the circuit based on the hierarchical data set and the circuit file to selectively generate the target waveform data set in the waveform database, and the waveform database is configured to provide an interface for accessing the compiled database. The storage unit 806 is configured to store at least a portion of the target waveform data set in a memory. Since a dedicated compilation database is set up in the compilation phase to store hierarchical data sets, and the compilation database can be accessed through a dedicated waveform database in the simulation phase, corresponding waveform data can be selectively generated and stored selectively during the simulation process based on the business characteristics of the digital circuit. Waveform data, thus reducing the amount of waveform data generated and saved during simulation and correspondingly reducing simulation time. Compared with conventional digital simulation tools that directly schedule the execution process in the simulation phase to construct signal connection relationships, record waveform information, and output full waveform files, the technical solution of the present disclosure can perform waveform file processing through preprocessing in the compilation phase. Compression and storage have previously greatly reduced the size of files that need to be saved. Combined with business-level feature extraction, redundant information can be removed during the compilation phase. On the premise of avoiding the loss of effective information, the waveform file size has been reduced from the source before performing the compression algorithm, thereby reducing the pressure of encoding and decoding on simulation time and reducing the simulation time accordingly.
在一些实施例中,用于表示电路的电路文件包括寄存器传输级描述文件。在一些实施例中,层级数据集以层级树形式被组织,并且层级数据集包括以下至少一项:用于表示多个信号的序列化的序列信息、用于表示多个信号的传输路径的路径信息、与多个信号对应的地址信息、用于驱动多个信号的驱动信息和用于被多个信号驱动的负载信息。通过将层级数据集 以层级树的形式组织,可以便于基于各个属性(诸如驱动关系、负载关系、内存地址、模块调用等)来查找、修改和保存层级数据,并且相应地更易于选择性地进行信号仿真和存储。In some embodiments, circuit files representing circuits include register transfer level description files. In some embodiments, the hierarchical data set is organized in the form of a hierarchical tree, and the hierarchical data set includes at least one of the following: sequence information representing the serialization of a plurality of signals, a path representing a transmission path of the plurality of signals information, address information corresponding to the plurality of signals, driving information for driving the plurality of signals, and load information for being driven by the plurality of signals. By converting the hierarchical dataset Organized in the form of a hierarchical tree, it is easy to find, modify and save hierarchical data based on individual attributes (such as driver relationships, load relationships, memory addresses, module calls, etc.), and accordingly it is easier to selectively simulate and store signals.
在一些实施例中,多个信号包括第一信号和第二信号,层级数据集包括在第一信号和第二信号之间的层级映射关系。编译单元802被进一步配置为:将第一信号和第二信号与寄存器传输级描述文件中的电路模型集中的信号进行匹配以确定在第一信号和第二信号之间的层级映射关系。In some embodiments, the plurality of signals includes a first signal and a second signal, and the hierarchical data set includes a hierarchical mapping relationship between the first signal and the second signal. The compilation unit 802 is further configured to: match the first signal and the second signal with signals in the circuit model set in the register transfer level description file to determine a hierarchical mapping relationship between the first signal and the second signal.
在一些实施例中,仿真单元804被进一步配置为:基于层级映射关系,确定目标信号集,目标信号集包括第一信号,并且目标信号集不包括第二信号;基于所确定的目标信号集,对电路进行仿真,以在波形数据库中选择性地生成目标波形数据集,目标波形数据集包括第一信号的仿真波形数据,并且目标波形数据集不包括第二信号的仿真波形数据。通过在多个关联信号之间建立层级映射关系,可以基于单个信号来确定另一信号的关系,这可以避免多个信号的仿真计算和存储,从而进一步减少仿真时间并且减小仿真信号的存储容量。In some embodiments, the simulation unit 804 is further configured to: determine a target signal set based on the hierarchical mapping relationship, the target signal set includes the first signal, and the target signal set does not include the second signal; based on the determined target signal set, The circuit is simulated to selectively generate a target waveform data set in the waveform database, the target waveform data set includes simulated waveform data of the first signal, and the target waveform data set does not include simulated waveform data of the second signal. By establishing a hierarchical mapping relationship between multiple associated signals, the relationship of another signal can be determined based on a single signal, which can avoid the simulation calculation and storage of multiple signals, thereby further reducing simulation time and reducing the storage capacity of simulation signals. .
在一些实施例中,电子设备800还包括接收单元。接收单元被配置为接收针对目标信号的存储时间指示。存储单元806被进一步配置为:在存储器中存储目标波形数据集中的目标信号的仿真波形数据中的、与存储时间指示对应的时间段的数据部分。通过由用户设定待仿真和待存储的时间段的波形,相比于全部时段的仿真和数据存储,可以进一步减少数据量和时间。In some embodiments, the electronic device 800 further includes a receiving unit. The receiving unit is configured to receive a storage time indication for the target signal. The storage unit 806 is further configured to store in the memory a data portion of the time period corresponding to the storage time indication in the simulation waveform data of the target signal in the target waveform data set. By letting the user set the waveforms for the time period to be simulated and stored, the amount of data and time can be further reduced compared to simulation and data storage for the entire period.
在一些实施例中,多个信号包括第三信号。仿真单元804被进一步配置为:基于层级数据集和电路文件,对电路进行仿真,以在波形数据库中生成针对第三信号的仿真波形数据,其中针对第三信号的仿真波形数据包括毛刺数据。In some embodiments, the plurality of signals includes a third signal. The simulation unit 804 is further configured to: simulate the circuit based on the hierarchical data set and the circuit file to generate simulated waveform data for the third signal in the waveform database, where the simulated waveform data for the third signal includes glitch data.
在一些实施例中,毛刺数据包括在单位时间段内的针对第三信号的多个毛刺值。存储单元806被进一步配置为:将多个毛刺值按时间顺序存储在存储器中。在一些实施例中,存储单元806被进一步配置为:确定多个毛刺值中的相邻毛刺值是否相同;以及如果相邻毛刺值相同,则将相邻毛刺值中的任一毛刺值存储在存储器中,而不存储相邻毛刺值中的另一毛刺值。通过提供毛刺信号记录功能,可以为电路设计人员提供更为准确和详细的波形信息,以便于确定电路设计的准确性。In some embodiments, the glitch data includes a plurality of glitch values for the third signal within a unit time period. The storage unit 806 is further configured to store the plurality of glitch values in the memory in chronological order. In some embodiments, the storage unit 806 is further configured to: determine whether adjacent glitch values among the plurality of glitch values are the same; and if the adjacent glitch values are the same, store any one of the adjacent glitch values in memory without storing another glitch value within an adjacent glitch value. By providing glitch signal recording function, circuit designers can be provided with more accurate and detailed waveform information to determine the accuracy of circuit design.
在一些实施例中,存储单元806被进一步配置为确定多个毛刺值中的相邻毛刺值是否相同;以及如果相邻毛刺值相同,则将相邻毛刺值中的任一毛刺值存储在存储器中,而不存储相邻毛刺值中的另一毛刺值。通过将多个相邻的毛刺值合并为单个毛刺值,可以进一步减少波形数据量。In some embodiments, the storage unit 806 is further configured to determine whether adjacent glitch values among the plurality of glitch values are the same; and if the adjacent glitch values are the same, store any of the adjacent glitch values in the memory , without storing another glitch value within an adjacent glitch value. Waveform data volume can be further reduced by merging multiple adjacent glitch values into a single glitch value.
在一些实施例中,电子设备800还包括调整单元。调整单元被配置为基于用户输入,对层级数据集进行调整。通过对层级数据集进行调整,可以为设计人员赋予电路验证的灵活性。此外,在设计人员将层级数据集调整以仅保留自己所关注的信号的情形下,可以进一步减少电路仿真的时间和波形信号的数据量。In some embodiments, the electronic device 800 further includes an adjustment unit. The adjustment unit is configured to adjust the hierarchical data set based on user input. Adjustments to hierarchical data sets give designers flexibility in circuit verification. In addition, circuit simulation time and waveform signal data volume can be further reduced when designers adjust the hierarchical data set to retain only the signals of interest.
图9示出了可以用来实施本公开的实施例的示例设备900的示意性框图。图9示出了可以用来实施本公开的实施例的示例设备900的示意性框图。如图所示,设备900包括计算单元901,其可以根据存储在随机存取存储器(RAM)和/或只读存储器(ROM)902的计算机程序指令或者从存储单元908加载到RAM 903和/或ROM 902中的计算机程序指令,来执行各种适当的动作和处理。在RAM 903和/或ROM 902中,还可存储设备900操作所需的各种程序和数据。计算单元901和RAM 903和/或ROM 902通过总线904彼此相连。输入/输出(I/O)接口905也连接至总线904。 Figure 9 shows a schematic block diagram of an example device 900 that may be used to implement embodiments of the present disclosure. Figure 9 shows a schematic block diagram of an example device 900 that may be used to implement embodiments of the present disclosure. As shown, device 900 includes a computing unit 901 that may be loaded into RAM 903 and/or from storage unit 908 in accordance with computer program instructions stored in random access memory (RAM) and/or read only memory (ROM) 902 Computer program instructions in ROM 902 to perform various appropriate actions and processes. In RAM 903 and/or ROM 902, various programs and data required for operation of device 900 may also be stored. Computing unit 901 and RAM 903 and/or ROM 902 are connected to each other via bus 904 . An input/output (I/O) interface 905 is also connected to bus 904.
设备900中的多个部件连接至I/O接口905,包括:输入单元906,例如键盘、鼠标等;输出单元907,例如各种类型的显示器、扬声器等;存储单元908,例如磁盘、光盘等;以及通信单元909,例如网卡、调制解调器、无线通信收发机等。通信单元909允许设备900通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Multiple components in device 900 are connected to I/O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of displays, speakers, etc.; storage unit 908, such as magnetic disk, optical disk, etc. ; and communication unit 909, such as a network card, modem, wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information/data with other devices through computer networks such as the Internet and/or various telecommunications networks.
计算单元901可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元901的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元901执行上文所描述的各个方法和处理,例如方法300。例如,在一些实施例中,方法300可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元908。在一些实施例中,计算机程序的部分或者全部可以经由RAM和/或ROM和/或通信单元909而被载入和/或安装到设备900上。当计算机程序加载到RAM和/或ROM并由计算单元901执行时,可以执行上文描述的方法300的一个或多个步骤。备选地,在其他实施例中,计算单元901可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行方法300。Computing unit 901 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processing processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 901 performs various methods and processes described above, such as method 300. For example, in some embodiments, method 300 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 900 via RAM and/or ROM and/or communication unit 909 . When a computer program is loaded into RAM and/or ROM and executed by computing unit 901, one or more steps of method 300 described above may be performed. Alternatively, in other embodiments, computing unit 901 may be configured to perform method 300 in any other suitable manner (eg, by means of firmware).
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that the program codes, when executed by the processor or controller, cause the functions specified in the flowcharts and/or block diagrams/ The operation is implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of this disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。The embodiments of the present disclosure have been described above. The above description is illustrative, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。 Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims (22)

  1. 一种用于生成和存储电路仿真过程中的波形数据的方法,包括:A method for generating and storing waveform data during circuit simulation, including:
    对用于表示电路的电路文件进行编译,以在编译数据库中生成针对所述电路的层级数据集,所述层级数据集与所述电路中的多个节点处的多个信号相关联;Compiling a circuit file representing a circuit to generate a hierarchical data set for the circuit in a compiled database, the hierarchical data set associated with a plurality of signals at a plurality of nodes in the circuit;
    基于所述层级数据集和所述电路文件,对所述电路进行仿真,以在波形数据库中选择性地生成目标波形数据集,所述波形数据库被配置为提供接口以对所述编译数据库进行访问;以及Simulating the circuit based on the hierarchical data set and the circuit file to selectively generate a target waveform data set in a waveform database configured to provide an interface to access the compiled database ;as well as
    在存储器中存储所述目标波形数据集的至少一部分。At least a portion of the target waveform data set is stored in memory.
  2. 根据权利要求1所述的方法,其中所述层级数据集以层级树形式被组织,并且所述层级数据集包括以下至少一项:用于表示所述多个信号的序列化的序列信息、用于表示所述多个信号的传输路径的路径信息、与所述多个信号对应的地址信息、用于驱动所述多个信号的驱动信息和用于被所述多个信号驱动的负载信息。The method of claim 1, wherein the hierarchical data set is organized in a hierarchical tree, and the hierarchical data set includes at least one of the following: sequence information representing serialization of the plurality of signals, Path information indicating transmission paths of the plurality of signals, address information corresponding to the plurality of signals, drive information for driving the plurality of signals, and load information for being driven by the plurality of signals.
  3. 根据权利要求1或2所述的方法,其中所述多个信号包括第一信号和第二信号,所述层级数据集包括在所述第一信号和所述第二信号之间的层级映射关系;以及The method according to claim 1 or 2, wherein the plurality of signals includes a first signal and a second signal, and the hierarchical data set includes a hierarchical mapping relationship between the first signal and the second signal. ;as well as
    在编译数据库中生成针对所述电路的层级数据集包括:将所述第一信号和所述第二信号与寄存器传输级描述文件中的电路模型集中的信号进行匹配以确定在所述第一信号和所述第二信号之间的所述映射关系。Generating a hierarchical data set for the circuit in a compiled database includes matching the first signal and the second signal with signals in a circuit model set in a register transfer level description file to determine whether the first signal is and the mapping relationship between the second signal.
  4. 根据权利要求3所述的方法,其中在波形数据库中选择性地生成目标波形数据集包括:The method of claim 3, wherein selectively generating the target waveform data set in the waveform database includes:
    基于所述映射关系,确定目标信号集,所述目标信号集包括所述第一信号,并且所述目标信号集不包括所述第二信号;以及Based on the mapping relationship, a target signal set is determined, the target signal set includes the first signal, and the target signal set does not include the second signal; and
    基于所确定的目标信号集,对所述电路进行仿真,以在波形数据库中选择性地生成目标波形数据集,所述目标波形数据集包括所述第一信号的仿真波形数据,并且所述目标波形数据集不包括所述第二信号的仿真波形数据。Based on the determined target signal set, the circuit is simulated to selectively generate a target waveform data set in a waveform database, the target waveform data set includes simulated waveform data of the first signal, and the target waveform data set is The waveform data set does not include simulated waveform data of the second signal.
  5. 根据权利要求1-4中任一项所述的方法,还包括:接收针对目标信号的存储时间指示;以及The method of any one of claims 1-4, further comprising: receiving a storage time indication for the target signal; and
    其中在所述存储器中存储所述目标波形数据集的所述至少一部分包括:wherein storing the at least a portion of the target waveform data set in the memory includes:
    在所述存储器中存储所述目标波形数据集中的所述目标信号的仿真波形数据中的、与所述存储时间指示对应的时间段的数据部分。A data portion of a time period corresponding to the storage time indication in the simulated waveform data of the target signal in the target waveform data set is stored in the memory.
  6. 根据权利要求1-5中任一项所述的方法,其中所述多个信号包括第三信号;以及The method of any one of claims 1-5, wherein the plurality of signals includes a third signal; and
    其中在波形数据库中选择性地生成目标波形数据集包括:Selectively generating target waveform data sets in the waveform database includes:
    基于所述层级数据集和所述电路文件,对所述电路进行仿真,以在波形数据库中生成针对所述第三信号的仿真波形数据,其中针对所述第三信号的仿真波形数据包括毛刺数据。Based on the hierarchical data set and the circuit file, the circuit is simulated to generate simulated waveform data for the third signal in a waveform database, wherein the simulated waveform data for the third signal includes glitch data .
  7. 根据权利要求6所述的方法,其中所述毛刺数据包括在单位时间段内的针对第三信号的多个毛刺值;以及The method of claim 6, wherein the glitch data includes a plurality of glitch values for the third signal within a unit time period; and
    在存储器中存储所述目标波形数据集的至少一部分包括:将所述多个毛刺值按时间顺序存储在所述存储器中。Storing at least a portion of the target waveform data set in the memory includes storing the plurality of glitch values in the memory in chronological order.
  8. 根据权利要求7所述的方法,其中将所述多个毛刺值按时间顺序存储在所述存储器中包括:The method of claim 7, wherein storing the plurality of glitch values in the memory in chronological order includes:
    确定所述多个毛刺值中的相邻毛刺值是否相同;以及 Determine whether adjacent glitch values in the plurality of glitch values are the same; and
    如果所述相邻毛刺值相同,则将所述相邻毛刺值中的任一毛刺值存储在所述存储器中,而不存储所述相邻毛刺值中的另一毛刺值。If the adjacent glitch values are the same, any one of the adjacent glitch values is stored in the memory without storing the other one of the adjacent glitch values.
  9. 根据权利要求1-8中任一项所述的方法,还包括:The method according to any one of claims 1-8, further comprising:
    基于用户输入,对所述层级数据集进行调整。Based on user input, the hierarchical data set is adjusted.
  10. 根据权利要求1-9中任一项所述的方法,其中所述用于表示电路的电路文件包括寄存器传输级描述文件。The method of any one of claims 1-9, wherein the circuit file representing the circuit includes a register transfer level description file.
  11. 一种计算机可读存储介质,存储多个程序,所述多个程序被配置为一个或多个处理器执行,所述多个程序包括用于执行权利要求1-10中任一项所述的方法的指令。A computer-readable storage medium storing a plurality of programs configured to be executed by one or more processors, the plurality of programs including a method for executing the method described in any one of claims 1-10. Method instructions.
  12. 一种计算机程序产品,所述计算机程序产品包括多个程序,所述多个程序被配置为一个或多个处理器执行,所述多个程序包括用于执行权利要求1-10中任一项所述的方法的指令。A computer program product comprising a plurality of programs configured to be executed by one or more processors, the plurality of programs including a program for executing any one of claims 1-10 instructions for the method described.
  13. 一种电子设备,包括:An electronic device including:
    一个或多个处理器;one or more processors;
    包括计算机指令的存储器,所述计算机指令在由所述电子设备的所述一个或多个处理器执行时使得所述电子设备执行权利要求1-8中任一项所述的方法。A memory comprising computer instructions that when executed by the one or more processors of the electronic device cause the electronic device to perform the method of any one of claims 1-8.
  14. 一种电子设备,包括:An electronic device including:
    编译单元,被配置为对用于表示电路的电路文件进行编译,以在编译数据库中生成针对所述电路的层级数据集,所述层级数据集与所述电路中的多个节点处的多个信号相关联;A compilation unit configured to compile a circuit file used to represent a circuit to generate a hierarchical data set for the circuit in a compilation database, the hierarchical data set being consistent with a plurality of nodes at a plurality of nodes in the circuit. signal correlation;
    仿真单元,被配置为基于所述层级数据集和所述电路文件,对所述电路进行仿真,以在波形数据库中选择性地生成目标波形数据集,所述波形数据库被配置为提供接口以对所述编译数据库进行访问;以及a simulation unit configured to simulate the circuit based on the hierarchical data set and the circuit file to selectively generate a target waveform data set in a waveform database, the waveform database being configured to provide an interface to The compiled database is accessed; and
    存储单元,被配置为在存储器中存储所述目标波形数据集的至少一部分。A storage unit configured to store at least a portion of the target waveform data set in a memory.
  15. 根据权利要求14所述的电子设备,其中所述层级数据集以层级树形式被组织,并且所述层级数据集包括以下至少一项:用于表示所述多个信号的序列化的序列信息、用于表示所述多个信号的传输路径的路径信息、与所述多个信号对应的地址信息、用于驱动所述多个信号的驱动信息和用于被所述多个信号驱动的负载信息。The electronic device of claim 14, wherein the hierarchical data set is organized in a hierarchical tree, and the hierarchical data set includes at least one of: sequence information representing serialization of the plurality of signals, Path information indicating transmission paths of the plurality of signals, address information corresponding to the plurality of signals, drive information for driving the plurality of signals, and load information for being driven by the plurality of signals. .
  16. 根据权利要求14或15所述的电子设备,其中所述多个信号包括第一信号和第二信号,所述层级数据集包括在所述第一信号和所述第二信号之间的层级映射关系;以及The electronic device of claim 14 or 15, wherein the plurality of signals includes a first signal and a second signal, and the hierarchical data set includes a hierarchical mapping between the first signal and the second signal. relationship; and
    所述编译单元被进一步配置为:将所述第一信号和所述第二信号与寄存器传输级描述文件中的电路模型集中的信号进行匹配以确定在所述第一信号和所述第二信号之间的所述映射关系。The compilation unit is further configured to: match the first signal and the second signal with signals in a circuit model set in the register transfer level description file to determine whether the first signal and the second signal are the mapping relationship between them.
  17. 根据权利要求16所述的电子设备,其中所述仿真单元被进一步配置为:The electronic device of claim 16, wherein the simulation unit is further configured to:
    基于所述映射关系,确定目标信号集,所述目标信号集包括所述第一信号,并且所述目标信号集不包括所述第二信号;以及Based on the mapping relationship, a target signal set is determined, the target signal set includes the first signal, and the target signal set does not include the second signal; and
    基于所确定的目标信号集,对所述电路进行仿真,以在波形数据库中选择性地生成目标波形数据集,所述目标波形数据集包括所述第一信号的仿真波形数据,并且所述目标波形数据集不包括所述第二信号的仿真波形数据。Based on the determined target signal set, the circuit is simulated to selectively generate a target waveform data set in a waveform database, the target waveform data set includes simulated waveform data of the first signal, and the target waveform data set is The waveform data set does not include simulated waveform data of the second signal.
  18. 根据权利要求14-17中任一项所述的电子设备,还包括:接收单元,被配置为接收针对目标信号的存储时间指示;以及The electronic device according to any one of claims 14-17, further comprising: a receiving unit configured to receive the storage time indication for the target signal; and
    所述存储单元被进一步配置为:The storage unit is further configured to:
    在所述存储器中存储所述目标波形数据集中的所述目标信号的仿真波形数据中的、与所 述存储时间指示对应的时间段的数据部分。Store in the memory the simulated waveform data of the target signal in the target waveform data set and the The storage time indicates the data portion of the corresponding time period.
  19. 根据权利要求14-18中任一项所述的电子设备,其中所述多个信号包括第三信号;以及The electronic device of any one of claims 14-18, wherein the plurality of signals includes a third signal; and
    所述仿真单元被进一步配置为:The simulation unit is further configured to:
    基于所述层级数据集和所述电路文件,对所述电路进行仿真,以在波形数据库中生成针对所述第三信号的仿真波形数据,其中针对所述第三信号的仿真波形数据包括毛刺数据。Based on the hierarchical data set and the circuit file, the circuit is simulated to generate simulated waveform data for the third signal in a waveform database, wherein the simulated waveform data for the third signal includes glitch data .
  20. 根据权利要求19所述的电子设备,其中所述毛刺数据包括在单位时间段内的针对第三信号的多个毛刺值;以及The electronic device of claim 19, wherein the glitch data includes a plurality of glitch values for the third signal within a unit time period; and
    所述存储单元被进一步配置为:将所述多个毛刺值按时间顺序存储在所述存储器中。The storage unit is further configured to store the plurality of glitch values in the memory in chronological order.
  21. 根据权利要求20所述的电子设备,其中所述存储单元被进一步配置为:The electronic device of claim 20, wherein the storage unit is further configured to:
    确定所述多个毛刺值中的相邻毛刺值是否相同;以及Determine whether adjacent glitch values in the plurality of glitch values are the same; and
    如果所述相邻毛刺值相同,则将所述相邻毛刺值中的任一毛刺值存储在所述存储器中,而不存储所述相邻毛刺值中的另一毛刺值。If the adjacent glitch values are the same, any one of the adjacent glitch values is stored in the memory without storing the other one of the adjacent glitch values.
  22. 根据权利要求14-21中任一项所述的电子设备,还包括:The electronic device according to any one of claims 14-21, further comprising:
    调整单元,被配置为基于用户输入,对所述层级数据集进行调整。 The adjustment unit is configured to adjust the hierarchical data set based on user input.
PCT/CN2023/078855 2022-04-08 2023-02-28 Method for generating and storing waveform data during circuit simulation, electronic device and storage medium WO2023193547A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210369305.4 2022-04-08
CN202210369305.4A CN116933699A (en) 2022-04-08 2022-04-08 Method, electronic device and storage medium for generating and storing waveform data in a circuit simulation process

Publications (1)

Publication Number Publication Date
WO2023193547A1 true WO2023193547A1 (en) 2023-10-12

Family

ID=88243968

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/078855 WO2023193547A1 (en) 2022-04-08 2023-02-28 Method for generating and storing waveform data during circuit simulation, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN116933699A (en)
WO (1) WO2023193547A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117371365A (en) * 2023-10-30 2024-01-09 北京云枢创新软件技术有限公司 Method, electronic device and medium for generating glitch signal based on timing information analysis
CN117236236B (en) * 2023-11-10 2024-04-16 杭州行芯科技有限公司 Chip design data management method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5790832A (en) * 1996-04-23 1998-08-04 Mentor Graphics Corporation Method and apparatus for tracing any node of an emulation
CN101689216A (en) * 2008-04-02 2010-03-31 新思科技有限公司 Compact circuit-simulation output
CN103678359A (en) * 2012-09-12 2014-03-26 复旦大学 Method for rapidly displaying waveform images of integrated circuits
CN103853855A (en) * 2012-11-29 2014-06-11 北京华大九天软件有限公司 Circuit simulation analog synchronizing waveform compressed format
CN106126815A (en) * 2016-06-23 2016-11-16 中国科学院微电子研究所 A kind of circuit emulation method and device
CN109669917A (en) * 2018-12-24 2019-04-23 北京华大九天软件有限公司 A kind of Waveform storage method based on priority packet
CN109937418A (en) * 2016-11-11 2019-06-25 美商新思科技有限公司 The reconstruct based on waveform for emulation
CN113343615A (en) * 2021-05-19 2021-09-03 中天恒星(上海)科技有限公司 Prototype verification method and coding device based on FPGA

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5790832A (en) * 1996-04-23 1998-08-04 Mentor Graphics Corporation Method and apparatus for tracing any node of an emulation
CN101689216A (en) * 2008-04-02 2010-03-31 新思科技有限公司 Compact circuit-simulation output
CN103678359A (en) * 2012-09-12 2014-03-26 复旦大学 Method for rapidly displaying waveform images of integrated circuits
CN103853855A (en) * 2012-11-29 2014-06-11 北京华大九天软件有限公司 Circuit simulation analog synchronizing waveform compressed format
CN106126815A (en) * 2016-06-23 2016-11-16 中国科学院微电子研究所 A kind of circuit emulation method and device
CN109937418A (en) * 2016-11-11 2019-06-25 美商新思科技有限公司 The reconstruct based on waveform for emulation
CN109669917A (en) * 2018-12-24 2019-04-23 北京华大九天软件有限公司 A kind of Waveform storage method based on priority packet
CN113343615A (en) * 2021-05-19 2021-09-03 中天恒星(上海)科技有限公司 Prototype verification method and coding device based on FPGA

Also Published As

Publication number Publication date
CN116933699A (en) 2023-10-24

Similar Documents

Publication Publication Date Title
WO2023193547A1 (en) Method for generating and storing waveform data during circuit simulation, electronic device and storage medium
CN110603528B (en) Debugging system and method
US8347245B2 (en) Hardware definition language generation for frame-based processing
Erbas et al. A framework for system-level modeling and simulation of embedded systems architectures
US7360180B2 (en) Computer program product, method, and system for hardware model conversion
US20040093186A1 (en) Method and apparatus for decomposing and verifying configurable hardware
CN111400338A (en) SQ L optimization method, device, storage medium and computer equipment
JP5791149B2 (en) Computer-implemented method, computer program, and data processing system for database query optimization
WO2018220974A1 (en) Systemc model generation method and systemc model generation program
WO2017114472A1 (en) Method and apparatus for data mining from core traces
CN115952758A (en) Chip verification method and device, electronic equipment and storage medium
CN102270262A (en) Method and device for compressing and decompressing analog waveform of integrated circuit
CN106354515A (en) SystemC code generation system based on model
CN116501415B (en) Command execution method and device, electronic equipment and computer readable storage medium
CN116228515B (en) Hardware acceleration system, method and related device
US5960171A (en) Dynamic signal loop resolution in a compiled cycle based circuit simulator
CN115146485B (en) Radio frequency link simulation method based on GPU acceleration
CN113806431A (en) Method for transmitting simulation data, electronic system and storage medium
US20140325468A1 (en) Storage medium, and generation apparatus for generating transactions for performance evaluation
CN115292347A (en) Active SQL algorithm performance checking device and method based on rules
CN111191106B (en) DSL construction method, system, electronic device and medium
CN113609052A (en) Chip simulation system based on FPGA and microprocessor and implementation method
TWI427496B (en) Method and system of generating a model of an integrated circuit
JP6305644B2 (en) Architecture generation apparatus and architecture generation program
US20030125918A1 (en) VHDL technology library method for efficient customization of chip gate delays

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23784111

Country of ref document: EP

Kind code of ref document: A1