WO2023283891A1 - Simulation method, apparatus, and device - Google Patents

Simulation method, apparatus, and device Download PDF

Info

Publication number
WO2023283891A1
WO2023283891A1 PCT/CN2021/106565 CN2021106565W WO2023283891A1 WO 2023283891 A1 WO2023283891 A1 WO 2023283891A1 CN 2021106565 W CN2021106565 W CN 2021106565W WO 2023283891 A1 WO2023283891 A1 WO 2023283891A1
Authority
WO
WIPO (PCT)
Prior art keywords
logic
circuit
fault
simulation
gates
Prior art date
Application number
PCT/CN2021/106565
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 华为技术有限公司
Priority to PCT/CN2021/106565 priority Critical patent/WO2023283891A1/en
Priority to CN202180098418.9A priority patent/CN117377961A/en
Publication of WO2023283891A1 publication Critical patent/WO2023283891A1/en

Links

Images

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, apparatus and apparatus for simulation of integrated circuits.
  • EDA electronic design automation
  • VLSI very large scale integration
  • Conventional logic simulation includes, for example, hard-coded-based logic simulation and event-driven technology-based logic simulation.
  • the fault simulation takes the simulation results of the logic simulation as the background.
  • Conventional fault simulation includes, for example, fault simulation based on single fault vector parallel simulation technology (PPSFP) and fault simulation based on Hope technology.
  • PPSFP single fault vector parallel simulation technology
  • Integrated circuits usually include tens of thousands of logic gates, and conventional logic simulation or fault simulation consumes a considerable amount of simulation time.
  • the embodiments of the present disclosure aim to provide a simulation method, storage medium, program product and electronic device, which are used for logic simulation and/or fault simulation of digital circuits.
  • a method for simulation includes staging the logic circuit to determine a first level circuit comprising a plurality of sequential logic gates and a plurality of primitive inputs and a second level circuit comprising a plurality of combinational logic gates.
  • the method further includes determining a set of clock logic values of clock input ports of the plurality of sequential logic gates of the first level circuit in the plurality of time frames based on the time frame data representing the plurality of time frames and the original clock input set.
  • the method further includes determining a set of logic simulation outputs based on the set of clocked logic values and the set of raw data inputs.
  • the logic simulation output set includes: the output logic values of the output ports of the multiple sequential logic gates in the first-level circuit in multiple time frames, and the output ports of the multiple combinational logic gates in the second-level circuit in multiple time frames Output logical value in frame. Since logic gates in a logic circuit are classified by type, the data of logic gates of the same type are thus largely located in adjacent or close storage areas, eg in adjacent or close areas in a memory. When the processor reads the data of one or some logic gates from the memory into the cache, due to the spatial locality design principle of the cache, the data of adjacent or nearby logic gates will be read into the cache together .
  • each logic gate (including sequential logic gates and combinational logic gates) is traversed in a hard-coded manner to calculate each logic gate When outputting logic values of , there is no need to repeatedly traverse all logic gates as in conventional hard-coded logic simulation. This can further significantly reduce logic simulation time for logic circuits.
  • classifying the logic circuit to determine the first-level circuit and the second-level circuit includes: classifying the logic circuit to determine the first-level circuit, the first sub-level circuit, and the second-level circuit Two sub-level circuits.
  • the first level of subcircuits includes combinational logic gates of the plurality of combinational logic gates in the second level of circuitry that are directly coupled to the first level of circuitry.
  • the second sub-circuit level includes combinational logic gates of the plurality of combinational logic gates in the second level circuit that are directly coupled to the first sub-circuit level. The accuracy and efficiency of logic simulation can be improved by further dividing the second-level circuit according to the connection relationship of combinational logic gates.
  • the method further includes receiving simulation period data; and determining time frame data based on the simulation period data.
  • the clock logic value set includes: adding the original clock input port in multiple time frames to the event queue; adding the combinational logic gate between the original clock input port and multiple sequential logic gates to the event queue; computing (compute) the combinational logic gate outputting logic values; and determining clock logic value sets of clock ports of the plurality of sequential logic gates in the first level circuit in a plurality of time frames based on the output logic values of the combinational logic gates.
  • the clock ports of the sequential logic gates to be calculated are correspondingly less. Even when calculated in an event-driven manner, this generally has little impact on logic simulation time. Furthermore, since the logic circuit is staged and there are no other sequential logic gates between the original clock input port and the sequential logic gate, the logic value of the clock port can be directly determined. After the clock logic values of the clock ports of all sequential logic gates in the first-level circuit in each time frame are calculated in an event-driven manner, multiple times indicated by the time frame data of the clock input ports of the sequential logic gate can be obtained Set of clock logic values in a frame. By using a set of clocked logic values, the output logic values of sequential logic gates can be made deterministic, and thus the time for logic simulation is further significantly reduced as described above.
  • determining the logic simulation output set based on the clock logic value set and the original data input set includes using the clock logic value set and the original data input set to sequentially determine the first level according to the order of the level circuits
  • the plurality of output logic values of the plurality of logic gates in the circuit and the second level circuit, the logic simulation output set includes the plurality of output logic values.
  • classifying the logic circuits to determine the first-level circuits and the second-level circuits includes storing data of the first-level circuits in the first area of the memory according to the levels of the logic circuits, and Data for the second level of circuitry is stored in a second area of the memory, the second area being different from the first area.
  • adjacent logic gates are basically located in adjacent positions, which can significantly increase the use probability of spatial locality and further reduce the simulation time.
  • the method further includes receiving a logic simulation output set and a fault input set for the logic circuit; at least based on the logic simulation output set, determining in the logic circuit in multiple time frames a plurality of transfer logic gates that may pass signals; and determining a set of fault simulation outputs based at least on the determined plurality of transfer logic gates and the set of fault inputs.
  • determining a plurality of transmission logic gates in the logic circuit that can transmit signals in multiple time frames includes: based on the logic simulation output set, according to time Frame determines whether the sequential logic gates in the logic circuit are correspondingly triggered in at least one time frame in the plurality of time frames; and in response to the first group of sequential logic gates in the logic circuit being triggered in at least one time frame, will
  • the combinational logic gates associated with the inputs of the first set of sequential logic gates and the first set of sequential logic gates are defined as a plurality of transfer logic gates.
  • determining whether each sequential logic gate in the logic circuit is correspondingly triggered in multiple time frames based on the logic simulation output set includes: based on the logic simulation output set, and each timing The clock logic values corresponding to the clock ports of the logic gate determine whether each sequential logic gate in the logic circuit is triggered in multiple time frames.
  • determining the failure simulation output set based at least on the determined plurality of transmission logic gates and failure input sets includes: determining whether the logic gate to be calculated is a transmission logic gate; and in response to determining The logic gate to be calculated is a transfer logic gate, and the logic value derived from the fault input set is used to determine the fault output logic value of the logic gate to be computed, and the fault simulation output set includes the fault output logic value.
  • determining at least based on the logic simulation output set a plurality of transmission logic gates in the logic circuit that can transmit signals in multiple time frames includes: based on the logic simulation output set and the fault input set, determine whether the original fault input corresponding to the fault input port in the logic circuit in the fault input set is excited; A plurality of transmission logic gates that may pass signals in multiple time frames among the logic gates associated with the fault input port. By determining whether to be activated, the observable transmission logic gates can be traced back, so that the observable logic gates can be determined in a simple manner to reduce the calculation amount of fault simulation and correspondingly reduce the simulation time.
  • determining the multiple transmission logic gates in the logic circuit that can transmit signals in multiple time frames includes: at least based on the logic simulation output set, Multiple transmit logic gates in a logic circuit that can transmit signals in multiple time frames are determined in parallel in a multi-threaded manner. Since the data of each logic gate is not modified during the process of determining the transmission logic gate, the data of each logic gate can be simultaneously accessed by multiple threads. The fault simulation time can be further reduced by using multi-threaded fault mode.
  • a computer-readable storage medium storing a plurality of programs.
  • a plurality of programs are configured to be executed by the one or more processors, the plurality of programs including instructions for performing the method according to the first aspect.
  • a computer program product comprises a plurality of programs configured for execution by one or more processors, the plurality of programs comprising instructions for performing the method according to the first aspect.
  • an electronic device comprises one or more processors; a memory comprising computer instructions which, when executed by the one or more processors of the electronic device, cause the electronic device to perform the method according to the first aspect.
  • an electronic device includes a logic circuit classification unit for classifying the logic circuit to determine a first-level circuit and a second-level circuit, the first-level circuit includes a plurality of sequential logic gates and a plurality of original inputs, and the second-level circuit includes a plurality of a combinational logic gate; a clock logic value determining unit, configured to determine the clock input ports of the multiple sequential logic gates of the first-level circuit in multiple time frames based on the time frame data representing multiple time frames and the original clock input set The clock logic value set; and a logic simulation output set determining unit, configured to determine a logic simulation output set based on the clock logic value set and the original data input set.
  • the logic simulation output set includes: the output logic values of the output ports of the multiple sequential logic gates in the first-level circuit in multiple time frames, and the output ports of the multiple combinational logic gates in the second-level circuit in multiple time frames Output logical value in frame. Since logic gates in a logic circuit are classified by type, the data of logic gates of the same type are thus largely located in adjacent or close storage areas, for example in adjacent or close areas in a memory. When the processor reads the data of one or some logic gates from the memory into the cache, due to the spatial locality design principle of the cache, the data of adjacent or nearby logic gates will be read into the cache together .
  • each logic gate (including sequential logic gates and combinational logic gates) is traversed in a hard-coded manner to calculate each logic gate When outputting logic values of , there is no need to repeatedly traverse all logic gates as in conventional hard-coded logic simulation. This can further significantly reduce logic simulation time for logic circuits.
  • the logic circuit classification unit is further configured to classify the logic circuit to determine a first-level circuit, a first sub-level circuit, and a second sub-level circuit
  • the first sub-circuit level includes The combinational logic gates of the plurality of combinational logic gates in the second level circuit that are directly coupled to the first level circuit
  • the second sub-circuit level includes the combinational logic gates of the plurality of combinational logic gates in the second level circuit that are directly coupled to the first level circuit. Directly coupled combinational logic gates at the subcircuit level. The accuracy and efficiency of logic simulation can be improved by further dividing the second-level circuit according to the connection relationship of combinational logic gates.
  • the clock logic value determination unit is further used to add the original clock input ports in multiple time frames to the event queue;
  • the combinational logic gate is added to the event queue;
  • the output logic value of the combinational logic gate is calculated;
  • the clock logic value of the clock port of the plurality of sequential logic gates in the first-level circuit in multiple time frames is determined based on the output logic value of the combinational logic gate set. Since the sequential logic gates generally only occupy a relatively small proportion in a logic circuit, the clock ports of the sequential logic gates to be calculated are correspondingly less. Even when calculated in an event-driven manner, this generally has little impact on logic simulation time.
  • the logic value of the clock port can be directly determined. After the clock logic values of the clock ports of all sequential logic gates in the first-level circuit in each time frame are calculated in an event-driven manner, multiple times indicated by the time frame data of the clock input ports of the sequential logic gate can be obtained Set of clock logic values in a frame. By using a set of clocked logic values, the output logic values of sequential logic gates can be made deterministic, and thus the time for logic simulation is further significantly reduced as described above.
  • the logic simulation output set determining unit is further used to use the clock logic value set and the original data input set to sequentially determine the first-level circuits and the second-level circuits according to the order of the level circuits.
  • the plurality of output logic values of the plurality of logic gates, the logic simulation output set includes the plurality of output logic values.
  • the logic circuit grading unit is further configured to store the data of the first-level circuits in the first area of the memory and store the data of the second-level circuits in the memory according to the levels of the logic circuits
  • the second area of , the second area is different from the first area.
  • the electronic device further includes: a receiving unit, configured to receive a logic simulation output set and a fault input set for a logic circuit; a transmission logic gate determination unit, configured to at least based on the logic simulation output a plurality of transmission logic gates in the set determination logic circuit capable of transmitting signals in a plurality of time frames; and a failure simulation output set determination unit for determining a failure simulation based at least on the determined plurality of transmission logic gates and failure input sets output set.
  • the transmission logic gate determination unit is further configured to determine, based on the logic simulation output set, the sequential logic gate in the logic circuit in at least one of the multiple time frames according to the time frame is triggered accordingly; and in response to the first set of sequential logic gates in the logic circuit being triggered in at least one time frame, combining the combinational logic gates associated with the inputs of the first set of sequential logic gates and the first set of sequential logic gates identified as multiple transfer logic gates.
  • the transmission logic gate determination unit is further configured to determine each timing in the logic circuit based on the clock logic values in the logic simulation output set that correspond to the clock ports of each sequential logic gate. Whether the logic gate is triggered in multiple timeframes.
  • the transfer logic gate determining unit is further configured to determine whether the logic gate to be calculated is a transfer logic gate; and in response to determining that the logic gate to be calculated is a transfer logic gate, using the source from The logic value of the fault input set is used to determine the fault output logic value of the logic gate to be calculated, and the fault simulation output set includes the fault output logic value.
  • the transfer logic gate determination unit is further configured to determine the original fault in the fault input set corresponding to the fault input port in the logic circuit based on the logic simulation output set and the fault input set whether the input is activated; and in response to the original fault input being activated at the fault input port, based on the set of logic simulation outputs, determining how many of the logic gates in the logic circuit that are associated with the fault input port can transmit signals in the plurality of time frames transmission logic gates.
  • the observable transmission logic gates can be traced back, so that the observable logic gates can be determined in a simple manner to reduce the calculation amount of fault simulation and correspondingly reduce the simulation time.
  • the transmission logic gate determination unit is further configured to determine in parallel in a multi-threaded manner the transferable signals in the logic circuit in multiple time frames based on at least the logic simulation output set multiple transfer logic gates. Since the data of each logic gate is not modified during the process of determining the transmission logic gate, the data of each logic gate can be simultaneously accessed by multiple threads. The fault simulation time can be further reduced by using multi-threaded fault mode.
  • a method for simulation includes receiving a set of logic simulation outputs and a set of fault inputs for a logic circuit; determining, based at least on the set of logic simulation outputs, a plurality of transmission logic gates in the logic circuit that can transmit signals in a plurality of time frames; and based at least on the set of logic simulation outputs; The determined plurality of transmission logic gates and fault input sets determine the fault simulation output set.
  • determining the multiple transmission logic gates in the logic circuit that can transmit signals in multiple time frames includes: based on the logic simulation output set, determining the logic circuit according to the time frame whether the sequential logic gates in the logic circuit are correspondingly triggered in at least one of the plurality of time frames; and in response to the first group of sequential logic gates in the logic circuit being triggered in at least one time frame, will
  • the combinational logic gates associated with the inputs of the sequential logic gates and the first group of sequential logic gates are determined as a plurality of transfer logic gates.
  • determining whether each sequential logic gate in the logic circuit is correspondingly triggered in multiple time frames based on the logic simulation output set includes: based on the logic simulation output set and the clock of each sequential logic gate The clock logic values corresponding to the ports respectively determine whether each sequential logic gate in the logic circuit is triggered in multiple time frames.
  • determining the fault simulation output set based at least on the determined plurality of transmission logic gates and the fault input set includes: determining whether the logic gate to be calculated is a transmission logic gate; and determining the logic gate to be calculated in response to The gates are transmission logic gates, and a fault output logic value of the logic gate to be calculated is determined using a logic value derived from a fault input set, the fault simulation output set including the fault output logic value.
  • determining a plurality of transmission logic gates in the logic circuit that can transmit signals in multiple time frames includes: based on the logic simulation output set and the fault input set, determining the fault Whether the original fault input corresponding to the fault input port in the logic circuit in the input set is excited; and in response to the original fault input being excited at the fault input port, based on the logic simulation output set, determine the relationship between the fault input port in the logic circuit Multiple transmission logic gates in a logic gate that can pass signals in multiple time frames. By determining whether to be activated, the observable transmission logic gates can be traced back, so that the observable logic gates can be determined in a simple manner to reduce the calculation amount of fault simulation and correspondingly reduce the simulation time.
  • determining a plurality of transmission logic gates in the logic circuit that can transmit signals in multiple time frames includes: at least based on the logic simulation output set, using a multi-threaded
  • the method determines in parallel multiple transmission logic gates in a logic circuit that can transmit signals in multiple time frames. Since the data of each logic gate is not modified during the process of determining the transmission logic gate, the data of each logic gate can be simultaneously accessed by multiple threads. The fault simulation time can be further reduced by using multi-threaded fault mode.
  • a computer-readable storage medium storing a plurality of programs.
  • a plurality of programs are configured to be executed by the one or more processors, the plurality of programs including instructions for performing the method according to the seventh aspect.
  • a computer program product comprises a plurality of programs configured for execution by one or more processors, the plurality of programs comprising instructions for performing the method according to the seventh aspect.
  • an electronic device comprising: one or more processors; a memory comprising computer instructions which, when executed by the one or more processors of the electronic device, cause the electronic device to perform the method according to the seventh aspect.
  • an electronic device includes: a receiving unit, configured to receive a logic simulation output set and a fault input set for the logic circuit; a transmission logic gate determination unit, configured to determine the logic circuit in multiple time frames based on at least the logic simulation output set. a plurality of transmission logic gates transmitting signals; and a failure simulation output set determining unit for determining a failure simulation output set based at least on the determined plurality of transmission logic gates and the failure input set.
  • the transmission logic gate determination unit is further configured to determine, based on the logic simulation output set, the sequential logic gate in the logic circuit in at least one of the multiple time frames according to the time frame is triggered accordingly; and in response to the first set of sequential logic gates in the logic circuit being triggered in at least one time frame, combining the combinational logic gates associated with the inputs of the first set of sequential logic gates and the first set of sequential logic gates identified as multiple transfer logic gates.
  • the transmission logic gate determination unit is further configured to determine each timing in the logic circuit based on the clock logic values in the logic simulation output set corresponding to the clock ports of each sequential logic gate. Whether the logic gate is triggered in multiple timeframes.
  • the transfer logic gate determination unit is further configured to determine whether the logic gate to be calculated is a transfer logic gate; and in response to determining that the logic gate to be calculated is a transfer logic gate, using the source from The logic value of the fault input set is used to determine the fault output logic value of the logic gate to be calculated, and the fault simulation output set includes the fault output logic value.
  • the transmission logic gate determination unit is further configured to determine the original fault in the fault input set corresponding to the fault input port in the logic circuit based on the logic simulation output set and the fault input set whether the input is activated; and in response to the original fault input being activated at the fault input port, based on the set of logic simulation outputs, determining how many of the logic gates in the logic circuit that are associated with the fault input port can transmit signals in the plurality of time frames transmission logic gates.
  • the transmission logic gate determination unit is further configured to determine in parallel in a multi-threaded manner the transferable signals in the logic circuit in multiple time frames based on at least the logic simulation output set multiple transfer logic gates. Since the data of each logic gate is not modified during the process of determining the transmission logic gate, the data of each logic gate can be simultaneously accessed by multiple threads. The fault simulation time can be further reduced by using multi-threaded fault mode.
  • FIG. 1 shows a schematic diagram of a logic circuit simulation system 100 according to some embodiments of the present disclosure.
  • FIG. 2 shows a schematic block diagram of a simulation process of a logic circuit according to some embodiments of the present disclosure.
  • FIG. 3 shows an example circuit diagram of an illustrative logic circuit according to some embodiments of the present disclosure.
  • FIG. 4 shows a hierarchical schematic diagram of the logic circuit in FIG. 3 .
  • FIG. 5 shows a schematic diagram of the logic circuit in FIG. 3 expanded in time frames.
  • Fig. 6 shows a schematic flowchart of a simulation method according to some embodiments of the present disclosure.
  • Fig. 7 shows a schematic flowchart of a simulation method according to some embodiments of the present disclosure.
  • FIG. 8 shows a schematic diagram of a logic circuit with logic simulation background values according to some embodiments of the present disclosure.
  • FIG. 9 shows a schematic diagram of a logic circuit with transferable flags according to some embodiments of the present disclosure.
  • FIG. 10 shows a schematic diagram of a logic circuit for describing fault excitation according to some embodiments of the present disclosure.
  • Fig. 11 shows a schematic block diagram of an electronic device according to some embodiments of the present disclosure.
  • Fig. 12 shows a schematic block diagram of an electronic device according to other embodiments of the present disclosure.
  • Figure 13 shows a block diagram of an example device that may be used to implement some embodiments of the present disclosure.
  • the term “comprising” and its similar expressions should be interpreted as an open inclusion, that is, “including but not limited to”.
  • the term “based on” should be understood as “based at least in part on”.
  • the term “one embodiment” or “the embodiment” should be read as “at least one embodiment”.
  • the terms “first”, “second”, etc. may refer to different or the same object.
  • the term “and/or” means at least one of the two items associated with it. For example "A and/or B" means A, B, or A and B. Other definitions, both express and implied, may also be included below.
  • sequential logic gate means a logic gate with a clocked input. The output of a sequential logic gate at any moment not only depends on the input signal at that time, but also depends on the clock signal and the original state of the sequential logic gate, in other words, it can also be related to the previous input.
  • Sequential logic gates include, for example, flip-flops, registers, and latches.
  • "combinational logic gate” means a logic gate that does not have a clocked input. The output of a combinational logic gate at any moment depends only on the input at that moment, and has nothing to do with the original state of the combinational logic gate.
  • Combination logic gates include, for example, AND gates, OR gates, NAND gates, XOR gates, NOT gates, and buffers. In logic circuits, usually sequential logic gates only account for a small proportion, while most of the logic gates in logic circuits are combinational logic gates.
  • the processor classifies the logic gates in the logic circuit described in the netlist file according to the types of logic gates, so as to classify the sequential logic gates, original input ports and original The output ports are placed into the first level of circuitry, and the combinational logic gates are placed into the second level of circuitry.
  • the data of the logic gates in the logic circuit can be stored in the memory according to the hierarchical levels. For example, data for logic gates in various levels of circuitry may be stored in adjacent or nearby locations in memory.
  • the processor can access the memory by addressing to obtain the data of the logic gate to be calculated.
  • the processor uses the ATPG data from the automatic test pattern generation (ATPG) device, specifically, the raw clock input for the clock port of each sequential logic gate in the ATPG data, to determine the clock port of the sequential logic gate Logical value in each timeframe.
  • ATPG automatic test pattern generation
  • the state of each sequential logic gate in multiple time frames can be determined, for example, whether it is triggered or not.
  • triggered means that the sequential logic gate is turned on to output a logic output at the output port of the sequential logic gate depending on the input of the sequential logic gate and the previous state of the sequential logic gate.
  • the sequential logic gate maintains (stores) the current logic output regardless of the logic input of the sequential logic gate.
  • the data of the logic gates in the logic circuit are classified by type, the data of the logic gates of the same type are largely located in adjacent or close storage areas, for example, in adjacent or close storage areas in the memory. nearby area.
  • the processor reads the data of one or some logic gates from the memory into the cache (cache), due to the space locality design principle of the cache, the data of adjacent or nearby multiple logic gates will be read into the cache together.
  • the processor calculates the logic value of the next logic gate after calculating the logic value of the current logic gate, due to the correlation of the next logic gate Data has already been read into the cache, so memory accesses do not need to be re-addressed.
  • each logic gate (including sequential logic gates and combinational logic gates) is traversed in a hard-coded manner to calculate each logic gate When outputting logic values of , there is no need to repeatedly traverse all logic gates as in conventional hard-coded logic simulation. This can further significantly reduce logic simulation time for logic circuits.
  • the processor first calculates the logic value of the clock port of the sequential logic gate in an event-driven manner, and then calculates the logic output of the sequential logic gate and the combinational logic gate in a hard-coded manner. Since sequential logic gates usually represent only a small fraction of the number of logic gates in a logic circuit, even computing the logic value of the clock port of a sequential logic gate in an event-driven manner does not cause the cache to be always high during logic simulation Frequent access to memory, which can reduce the time of logic simulation.
  • the processor calculates the logic output of the sequential logic gate and the combinational logic gate
  • the logic output of the sequential logic gate and the combinational logic gate is calculated sequentially in the manner of a hierarchical circuit, and the state of the sequential logic gate passes through the logic of the previous clock port
  • the output calculations are already determined, so there is no need to recalculate all logic values for all logic gates multiple times. This further reduces logic simulation time.
  • FIG. 1 shows a schematic diagram of a logic circuit simulation system 100 according to some embodiments of the present disclosure.
  • the simulation system 100 includes, for example, an electronic device 10 and an ATPG device 20 .
  • the electronic device 10 is, for example, a computer.
  • Electronic device 10 includes processor 14 and memory 12 , wherein processor 14 includes cache memory 16 .
  • the cache memory 16 may also be independent of the processor 14, and the scope of the present disclosure is not limited thereto.
  • the ATPG device 20 is configured to generate ATPG data for logic simulation and transmit the ATPG data to the electronic device 10 .
  • the electronic device 10 and the ATPG device 20 are limited independently in FIG.
  • the ATPG device 20 may be integrated with the electronic device 10 , which is not limited by the present disclosure.
  • the electronic device 10 may include input devices, communication devices, displays, audio devices and other components not shown here.
  • the electronic device 10 may include, for example, devices with computing functions such as desktop computers, notebooks, workstations, and servers.
  • the netlist file used to describe the logic circuit can be transmitted to the electronic device 10 in various wired or wireless ways. Alternatively, the electronic device 10 may also use a storage medium storing the netlist file to read the netlist file.
  • the ATPG device 20 can generate different ATPG data for different logic circuits.
  • the ATPG data includes, for example, simulation cycle data, raw data input, fault simulation data, and the like.
  • Simulation cycle data includes, for example, tick data, ie, data representing a time frame in which a processor is executed for logic simulation and/or fault simulation.
  • the time frames of logic simulation and fault simulation may be the same or different, which is not limited in the present disclosure.
  • the original input includes, for example, the original data input for each original data input port in the logic circuit in the logic simulation and the original clock input corresponding to the original clock port used to calculate the logic value of the clock port of the sequential logic gate. Since a time frame is usually multiple time frames, the raw data input for a single raw data input port may be a raw data input set for the multiple time frames, which includes a series of bit values, eg 64-bit bit values.
  • the fault simulation data includes, for example, fault data inputs for fault data inputs.
  • the raw fault data input for a single fault input can be a fault input set that includes a series of bit values for the multiple time frames, e.g. 64-bit bit value. There can be more or fewer bit values.
  • FIG. 2 shows a schematic diagram of a simulation process 200 according to some embodiments of the present disclosure.
  • the simulation process 200 is executed by the electronic device 10 in FIG. 1 , so the content described for the electronic device 10 can be applied to the simulation process 200 .
  • the simulation process may include logic simulation 210 and fault simulation 220 , for example.
  • the logic simulation 210 uses the ATPG data 202 from the ATPG device 20 and the netlist file 204 obtained through wireless, wired or reading storage media.
  • the netlist file 204 includes data for describing various logic gates (including sequential logic gates and combinational logic gates), original inputs, original outputs, and coupling relationships among various components in the logic circuit.
  • Electronic device 10 may perform logic simulation 210 to generate a set of logic simulation outputs.
  • Fault simulation 220 uses a set of fault inputs 222 from ATPG device 20 in addition to the set of logic simulation outputs. Fault simulation 220 has a set of fault inputs 222 and a set of logic simulation outputs to generate a set of fault simulation outputs 224 . Alternatively, fault simulation 220 may also use a set of logic simulation outputs and a set of fault inputs 222 independent of logic simulation 210 to generate set of fault simulation outputs 224 . Fault simulation 220 may also generate test vectors for automatic test equipment (ATE). After generating set of fault simulation outputs 224 , electronic device 10 may generate fault coverage include 228 based on set of fault simulation outputs 224 and expected fault outcomes. The specific process of fault simulation 220 can be referred to below.
  • ATE automatic test equipment
  • FIG. 3 shows an example circuit diagram of an illustrative logic circuit 30 according to some embodiments of the present disclosure.
  • the logic circuit 30 is only used to illustrate the principle of the present disclosure, but not to limit the scope of the present disclosure. It is understood that other configurations of logic circuits are also possible.
  • the logic circuit 30 may include, for example, a first original data input PI1, an AND gate 31, a first flip-flop U1, a second original data input PI2, an inverter 32, a second flip-flop U2, a first buffer 33, a second buffer device 34 and the original output PO.
  • the input of the AND gate 31 is coupled to the first raw data input PI1 and the output of the first flip-flop U1.
  • the clock port C1 of the first flip-flop U1 is configured to receive the first clock signal, the reset terminal of the first flip-flop U1 is coupled to the output of the second buffer 34 , and the output of the first flip-flop U1 is coupled to the original output PO.
  • the input of the inverter 32 is coupled to the second raw data input PI2, and the output of the inverter 32 is coupled to the input of the second flip-flop U2.
  • the clock port C2 of the second flip-flop U2 is configured to receive the second clock signal, and the output of the second haptic U2 is coupled to the input of the first buffer 33, and the output of the first buffer 33 is coupled to the second buffer 34 inputs.
  • the logic circuit 30 includes a first type of sequential logic gate and a second type of combinational logic gate.
  • the first type of sequential logic gates includes a first buffer U1 and a second buffer U2
  • the second type of combinational logic gates includes an AND gate 31 , an inverter 32 , a first buffer 33 and a second buffer
  • FIG. 4 shows a hierarchical schematic diagram of the logic circuit in FIG. 3 .
  • the processor splits the logic circuit into two levels of circuits according to the coupling relationship of each logic gate in the logic circuit described in the netlist file, wherein the first level The circuits include sequential logic gates, primitive inputs and primitive outputs, and the second level circuits include combinational logic gates.
  • the second-level circuits can be further classified with respect to the relationship between the combinational logic gates and the first-level circuits and the relationship between the combinational logic gates.
  • the second-level circuit includes a first sub-level circuit, a second sub-level circuit...Nth sub-level circuit, where N represents an integer greater than 1, and the specific value of N depends on the logic circuit to be simulated.
  • the first sub-level circuit includes combinational logic gates directly coupled to the first sub-level circuit
  • the second sub-level circuit includes combinational logic gates directly coupled to the first sub-level circuit, and so on.
  • the logic circuit 30 can be divided into three levels, wherein level 0 shown in FIG. 4 corresponds to the first level circuit, and level 1 corresponds to the first sublevel of the second level circuit circuit, and level 2 corresponds to the second sub-level circuit of the second level circuit.
  • the first level circuit includes an original output PO, a first original data input PI1, a second original data input PI2, a first flip-flop U1 and a second flip-flop U2.
  • the first sub-level circuit includes an AND gate 31 , a first buffer 33 and an inverter 32 .
  • the second sub-level circuit includes a second buffer 34 .
  • the clock signal is not directly applied to the clock port of the sequential logic gate, but is applied to the clock port of the sequential logic gate of the first level circuit via one or more combinational logic gates.
  • the second level circuit may not include combinational logic gates between the original clock input port to the clock port of the sequential logic gate.
  • FIG. 5 shows a schematic diagram of the logic circuit in FIG. 3 expanded in time frames.
  • Fig. 4 shows a hierarchical diagram of a logic circuit in a time frame, but logic simulation usually does not target a single time frame, but multiple time frames to simulate logic outputs under different inputs.
  • a single logic level on the clock port usually does not reflect whether it is triggered, but requires multiple consecutive logic levels to determine. For example, a register requires a low (logic "0") to high (logic "1") transition on the clock port to trigger. Therefore, for logic circuits with sequential logic gates, multiple time frames are required to determine whether a trigger is present.
  • the clock signal is usually provided in the form of pulses and includes a series of high and low pulses such as "...10101010", as shown in the upper part of Figure 5.
  • a segment of the clock signal of "010” can be used to Determine if a trigger exists. For example, you can select the second half of the period when the clock signal is "0" (low level) as the first "0" of the above “010” segment, and use the successive complete “1” (high level) of the clock signal as The “1” of the above “010” segment, and use the first half period of successive "0"s of the clock signal as the second "0” of the above “010” segment.
  • one clock cycle corresponds to one cycle for determining the presence or absence of a trigger. This clock cycle consists of three logic values and thus corresponds to 3 time frames.
  • a segment of the clock signal of "101" may also be used to determine whether a trigger exists.
  • FIG. 5 shows a time frame expansion schematic diagram of three time frames corresponding to one cycle of the logic circuit 30 .
  • Frame 0 corresponds to the first "0" of the aforementioned “010” segment
  • frame 1 corresponds to the "1" of the aforementioned “010” segment
  • frame 2 corresponds to the second "0” of the aforementioned “010” segment.
  • the logic simulation usually includes a plurality of original input sets to determine the simulation results of the logic circuit under different inputs, for example, the logic input value for the first original data input PI1 is, for example, the first logic input set, which may include, for example, a 64-bit bit value . Therefore, M cycles may be required for simulation, where M represents an integer greater than 1, such as 64.
  • M represents an integer greater than 1, such as 64.
  • Fig. 6 shows a schematic flowchart of a simulation method 600 according to some embodiments of the present disclosure.
  • the simulation method 600 is used for logic simulation, for example, it can be an implementation of the logic simulation 210 in FIG. 2 , so the various aspects described above with respect to FIGS. 1-5 can be applied to the simulation method 600 , which will not be repeated here.
  • the processor 14 may receive, for example, a netlist file describing a logic circuit via wire, wirelessly, or by reading a storage medium.
  • the netlist file includes various data used to describe each logic gate, original input and original output, and connection relationship between various components.
  • processor 14 may rank logic circuits based on a netlist file representing the logic circuits to determine first-level circuits and second-level circuits.
  • the first level of circuitry includes a plurality of sequential logic gates and a plurality of primitive inputs
  • the second level of circuitry includes a plurality of combinational logic gates.
  • the first level circuit is, for example, the level 0 circuit in FIG. 4
  • the second level circuit includes, for example, the level 1 circuit and the level 2 circuit in FIG. 4
  • the second-level circuit includes, for example, a first sub-level circuit and a second sub-level circuit, wherein the first sub-level circuit includes the level 1 circuit in FIG. 4 , and the second sub-level circuit includes the circuit in FIG. 4 2-level circuit.
  • data corresponding to a first level of circuitry is stored in an adjacent or adjacent first area of memory 12, and data corresponding to a second level of circuitry is stored in an adjacent or adjacent area of memory 12. of the second area. Furthermore, the data corresponding to the first sub-level circuit in the second level circuit is stored in the adjacent or close first sub-region in the second area, and corresponds to the first sub-level circuit in the second level circuit The data are stored in adjacent or similar second sub-areas in the second area.
  • the processor 14 When the processor 14 performs addressing access to the memory 12 to obtain the data of a certain logic gate, due to the design principle of the spatial locality of the cache memory 16, the processor 14 can read the data near the data of the logic gate into the high-speed Cache16.
  • the processor 14 needs to process the data of the next logic gate after the data processing of the logic gate is completed, since the data of the next logic gate has been read into the cache memory 16, there is no need to address and access the memory 12 again, which saves Lots of access times.
  • the logic gates in the logic circuit can be stored according to the level, and the processor 14 is prevented from frequently accessing the memory 12 when processing the data of the logic gate according to the level circuit, which can significantly reduce the time of logic simulation.
  • processor 14 uses the time frame data to perform logic simulations by time frame.
  • processor 14 determines the time frame data based on simulation cycle data in the automated test vector generation data.
  • logic simulation typically provides multiple logic input values, such as 64-bit bit values, at the raw data input, multiple cycles, such as 64 cycles, are required to perform the logic simulation.
  • Processor 14 receives ATPG data from ATPG device 20 .
  • APTG data may include simulation cycle data, eg, data representing 64 test cycles.
  • the APTG data may directly include multiple time frame data, for example, data representing 192 time frames.
  • processor 14 may directly determine the data as time frame data.
  • the logic values of each logic gate (including sequential logic gates and combinational logic gates) in each time frame can be sequentially calculated according to the order of the time frames, such as the logic value and output of the clock port logical value. After the time frame is calculated, the logic values of each logic gate (including sequential logic gates and combinational logic gates) in the next time frame are calculated, such as the logic value and output logic value of the clock port. Alternatively, after calculating the logic value of each level circuit in all time frames, the logic value of the next level circuit in all time frames may be calculated.
  • the processor 14 determines clock logic value sets of clock input ports of the plurality of sequential logic gates in the plurality of time frames based on the original clock input data set and the time frame data in the ATPG data.
  • a logic circuit typically includes a raw clock input port for a clock port of a sequential logic gate that receives, for example, a raw clock input set from a raw data input set.
  • the logic circuit may have one or more combinational logic gates (not shown in FIG. 3 ) between the raw clock input port and the clock port of the sequential logic gate.
  • the clock logic value of the clock port of the sequential logic gate at each time can be determined from the original clock input port in an event-driven manner. For example, in one time frame, the processor 14 adds the original data input port to the event queue, and adds the combinational logic gate between the original clock input port and multiple sequential logic gates to the event queue.
  • the processor 14 then sequentially calculates the output logic values of the combinatorial logic gates between the original clock input port and the multiple sequential logic gates in a first-in-first-out order. After that, the processor 14 determines a set of clock logic values of the clock ports of the plurality of sequential logic gates in the first-level circuit based on the output logic values. For example, the processor 14 judges whether the current logic gate to be calculated is a sequential logic gate. If it is not a sequential logic gate, the output logic value of the logic gate is calculated, and the logic gate of the subsequent node of the logic gate is added to the event queue. If it is a sequential logic gate, it can be determined that it has been calculated from the original clock input port to the sequential logic gate.
  • the output logic value of each combinatorial logic gate from the next original clock input port to the clock port of the next sequential logic gate can be calculated, and then the clock logic value of the clock port of the next sequential logic gate can be determined.
  • the above process is repeated to calculate the next time frame until the clock logic values of all clock ports in all time frames are calculated to determine the clock logic value set.
  • the clock ports of the sequential logic gates to be calculated are correspondingly less. Even when calculated in an event-driven manner, this generally has little impact on logic simulation time. Furthermore, since the logic circuit is staged and there are no other sequential logic gates between the original clock input port and the sequential logic gate, the logic value of the clock port can be directly determined. After the clock logic values of the clock ports of all sequential logic gates in the first-level circuit in each time frame are calculated in an event-driven manner, multiple times indicated by the time frame data of the clock input ports of the sequential logic gate can be obtained Set of clock logic values in a frame.
  • the clock logic values of the clock ports of the first flip-flop U1 and the second flip-flop U2 in each time frame can be calculated, and based on this, the first flip-flop U1 and the second flip-flop U2 can be judged Whether to be triggered during this time. For example, if the clock port of the first flip-flop U1 is determined to be "0" at frame 0, "1" at frame 1, and "0" at frame "2", then the first flip-flop can be determined U1 is toggled during the clock cycle including Frame 0-Frame 2.
  • processor 14 may further determine whether a sequential logic gate is triggered within a clock cycle comprising a plurality of time frames.
  • processor 14 determines a set of logic simulation outputs based on the set of clocked logic values and the set of raw data inputs.
  • the logic simulation output set includes the output logic values of the output ports of the multiple sequential logic gates in the first-level circuit and the multiple combinational logic gates in the second-level circuit in the time frame indicated by the time frame data.
  • the logic gates may be put into a queue to be calculated in the order of the hierarchical circuits. Then the processor 14 traverses all the logic gates in a hard-coded manner to sequentially calculate the output logic values of each logic gate in the queue in each time frame, so as to obtain a logic simulation output set for the logic circuit.
  • determining the logic simulation output set based on the clock logic value set and the original data input set includes: using the clock logic value set and the original data input set to sequentially determine the first-level circuit and the second-level circuit according to the order of the level circuits Multiple output logic values for multiple logic gates in .
  • the logic simulation output set includes the plurality of output logic values. For example, referring to FIG. 4 , assuming that frame 0 is the first frame indicated by the time frame data, since the original data input of the original input port included in the first-level circuit need not be calculated here, the calculation of the processor 14 is directly related to the original input port.
  • the first sub-level circuits ie, the AND gate 31 , the first buffer 33 and the inverter 32 ) in the second level of circuits are connected. Since each logic gate in the first sub-level circuit is stored adjacently or close to each other, the processor 14 can, for example, read the data of the AND gate 31 from the memory 12 into the cache, and can invert the sum of the first buffer 33 and The data of the device 32 is also read into the cache together.
  • the processor 14 calculates the output logic value of the first buffer 33 and the inverter 32 after calculating the output logic value of the AND gate 31, since the data of the first buffer 33 and the inverter 32 have been read into the high-speed cache so that memory does not need to be accessed again, which reduces simulation time.
  • the processor 14 when the first sub-level circuit includes 100 logic gates, assuming that the processor 14 reads data of 10 adjacent logic gates from the memory 12 each time, the processor 14 only needs to access the memory 12 ten times. Compared with conventional event-driven, the processor 14 frequently accesses the memory (for example, for 100 logic gates, the memory may be accessed at most 100 times), which may reduce the access time by 90%.
  • the processor 14 calculates the output logic value of the logic gate (that is, the second buffer 34 ) in the second sub-level circuit in frame 0, the first-level circuit in frame 1 (that is, the first trigger U1 and second flip-flop U2), the output logic value of the first sub-level circuit (ie, AND gate 31, first buffer 33 and inverter 32) in frame 1... and so on , until the output logic values of all logic gates in all time frames are calculated to obtain a logic simulation output set for the logic circuit.
  • the processor 14 calculates the output logic value of the logic gate (that is, the second buffer 34 ) in the second sub-level circuit in frame 0, the first-level circuit in frame 1 (that is, the first trigger U1 and second flip-flop U2), the output logic value of the first sub-level circuit (ie, AND gate 31, first buffer 33 and inverter 32) in frame 1... and so on , until the output logic values of all logic gates in all time frames are calculated to obtain a logic simulation output set for the logic circuit.
  • the processor 14 can use the logic simulation output set to perform fault simulation.
  • a logic simulation output set independent from method 600 may also be used as a background for fault simulation for fault simulation.
  • Fault simulation uses the results of logic simulation as the background to determine which faults can be detected in the input fault set.
  • Conventional fault simulation includes single fault vector parallel simulation technology (parallel pattern single fault propagation, PPSFP) and so on.
  • PPSFP is based on event-driven and machine word parallel algorithm ideas.
  • a breadth-first search is performed from the original input and timing gates until the calculation of the logic values of all gates in the netlist is completed.
  • the fault is triggered at the corresponding position of the fault, and the breadth-first search is performed based on this, and the search queue ends when it is empty.
  • PPSFP uses an event-driven method for fault simulation, when a fault propagates from a fault input node to subsequent nodes, the outputs of all subsequent nodes are calculated, which consumes a lot of simulation time.
  • FIG. 7 shows a schematic flowchart of a simulation method 700 for performing fault simulation on logic circuits according to some embodiments of the present disclosure.
  • the simulation method 700 may be, for example, a specific implementation of the fault simulation 220 in FIG. 2 .
  • Various aspects described with respect to FIGS. 1-5 may therefore be applicable to the simulation method 700 .
  • processor 14 receives a set of logic simulation outputs and a set of fault inputs for a logic circuit.
  • the logic simulation output set may be, for example, the logic simulation output set generated by the method 600 .
  • a logic simulation output set generated by other logic simulation methods may also be used, which is not limited in the present disclosure.
  • FIG. 8 shows a schematic diagram of a specific logic simulation output set.
  • a fault input set includes a set of logical input values representing a particular fault type provided for each fault input node or port.
  • Common fault inputs include, for example, "stuck at 1 fault”, “stuck at 0 fault”, bridging fault, and the like.
  • Fault simulation determines whether a fault can be detected by entering a logical input representing a fault type at a fault input node or port, retrieving the corresponding logical output at a downstream observation point, and comparing the logical output with the expected output.
  • a plurality of transmission logic gates in the logic circuit that can transmit signals in the plurality of time frames are determined.
  • the calculation of many logic gates is actually unnecessary, because the output logic value of these logic gates will not be observed by the fault observation node and will not have actual significance. Therefore, by excluding logic gates that are not observed, the calculation amount and simulation time of fault simulation can be reduced.
  • the processor 14 determines whether the sequential logic gates in the logic circuit are correspondingly triggered in at least one of the plurality of time frames based on the set of logic simulation outputs, eg, in time frames. For example, during a time frame, processor 14 responds to one or more sequential logic gates in the logic circuit being triggered (e.g., by determining the logic value of a clock port, e.g., by determining whether the current time frame and the next time frame exist transition from logic "0" to logic "1"), the one or more sequential logic gates and the one or more combinational logic gates associated with their data input ports are determined as a plurality of transfer logic gates.
  • processor 14 may backtrack to logic gates upstream of the one or more sequential logic gates until all valid logic gates are marked in the time frame.
  • the effective logic gates represent all logic gates (including the sequential logic gates to which the data input terminals belong) from the data input port of each sequential logic gate to the upstream sequential logic gate or the original input port.
  • transmitting logic gates represent logic gates that can pass signals in the current time frame, including sequential logic gates that are triggered and combinational logic gates that have inputs, while non-signaling logic gates are included in the current time frame Sequential logic gates that are not triggered and combinational logic gates that have no inputs.
  • processor 14 also marks other sequential logic gates in the time frame as well as combinational logic gates associated with their data input ports as logic gates that cannot transmit signals. After processor 14 determines that the time frame is complete, the next time frame may be determined. By traversing each sequential logic gate in each time frame, processor 14 can determine a first set of sequential logic gates, that is, sequential logic gates that can pass signals, and can determine how many sequential logic gates can pass signals based on the first set of sequential logic gates. transmission logic gates. In one embodiment, processor 14 may generate a transfer flag set to mark a first group of logic gates and one or more combinatorial logic gates connected to their data input ports as transfer logic gates, and to mark other untriggered Sequential logic gates and the active combinational logic gates coupled to them are marked as logic gates that do not transmit signals.
  • the processor 14 may similarly determine the transmission logic gate of the next time frame in the above-mentioned manner until all time frames have been determined to be completed.
  • the determination of the transmission logic gates in each time frame by time frame is described here in a serial manner, this is only for illustration and not to limit the scope of the present disclosure. Since the data of each logic gate is not modified during the process of determining the transmission logic gate, the data of each logic gate can be accessed by multiple threads at the same time, thus it is also possible to determine the corresponding multiple in each time frame in parallel in a multi-threaded manner. Portal. This further reduces the time for fault simulation.
  • the processor 14 may establish a corresponding transfer flag in each time frame for each valid logic gate in the logic circuit, so as to mark whether the logic gate is a transfer logic gate in a certain time frame.
  • a set of fault simulation outputs is determined based at least on the determined plurality of transmission logic gates and the set of fault inputs.
  • processor 14 determines fault simulation outputs in an event-driven manner using data from fault input sets for transfer logic gates.
  • the set of fault simulation outputs includes multiple simulation outputs for multiple faults in multiple time frames derived in this manner. For example, for a faulty input in a time frame, processor 14 determines whether the logic gate connected to the faulty input node is a transmission logic gate in the time frame, starting from the faulty input node. If the logic gate is a transmission logic gate, calculate the fault logic output of the logic gate and confirm whether the subsequent logic gate is a transmission logic gate, and so on until the fault simulation output of the fault observation point is calculated.
  • the failure observation point is usually the output of a certain sequential logic gate.
  • the processor 14 finds that a logic gate extending downstream from the faulty input node is not a transmission logic gate, the processor 14 skips the faulty transmission path and starts processing the next faulty input. After the calculation of one time frame is completed, the processor 14 may calculate the fault simulation outputs of observation points for multiple fault inputs in the next time frame until the fault simulation outputs of all time frames are obtained. Since the processor 14 gives up the transmission path that cannot transmit the fault excitation signal and does not perform logic calculations on the logic gates in the transmission path during the fault simulation process, the calculation amount of the fault simulation is significantly reduced and the time of the fault simulation is shortened.
  • the processor 14 can further reduce the fault simulation calculation amount and fault simulation time by judging whether the fault can be triggered.
  • the processor 14 determines whether a plurality of original fault inputs in the fault input set corresponding to fault input nodes in the logic circuit are activated based on the logic simulation output set and the fault input set. In response to the original fault input being active at the fault input node, the processor 14 determines, based on the set of logic simulation outputs, a number of transferable signals in logic gates associated with the fault input node in the logic circuit that can deliver signals in multiple time frames logic gate. If the original fault input is not activated at the fault input node, processor 14 skips fault simulation calculations for that fault.
  • the processor 14 may skip the calculation of the failure, that is, the processor 14 does not calculate the logic output value of the logic gate starting from the failure input port in the time frame. In this way, computing resources and time can be further saved.
  • FIG. 8 shows a schematic diagram of a logic circuit 800 with logic simulation background values according to some embodiments of the present disclosure. It can be understood that the logic circuit 800 is only used to describe the fault simulation according to the present disclosure, but not to limit the scope of the present disclosure. Logic circuits may have other circuit structures, and the fault simulation method according to the embodiments of the present disclosure is also applicable to other logic circuits.
  • the logic circuit 800 includes a first flip-flop 802 , a second flip-flop 804 , an OR gate 806 , an inverter 808 , a buffer 810 and an AND gate 812 .
  • the data input port of the first flip-flop 802 is connected to the output of the OR gate 806, and the two input ports of the OR gate 806 are respectively connected to the output port of the buffer 810 and the output port of the AND gate 812.
  • the data input port of the second flip-flop 804 is connected to the output port of the inverter 808 , and the input port of the inverter 808 is connected to the output port of the AND gate 812 .
  • the input port of the buffer 810 and the input port of the AND gate 812 may be connected to the original input port.
  • each logic gate shows the logic simulation values of the input ports in two time frames, where the right box represents the logic simulation value of the previous time frame, and the left box Boxes represent logical simulation values for the next timeframe.
  • logic simulation values for two time frames are shown, this is for illustration only and not to limit the present disclosure.
  • Other numbers of time frames are possible, eg each input port can have consecutive 32-bit, 64-bit or 128-bit bit values as logic emulation values.
  • These logic simulation values may be, for example, logic simulation results obtained by the method 600 . Alternatively, it can also be provided by other logic simulation methods.
  • the processor 14 may first determine whether the first flip-flop 802 and the second flip-flop 804 , which are sequential logic gates, are triggered within a time frame. Since the clock port of the first flip-flop 802 is "1" in the current time frame and the next time frame, there is no transition from "0" to "1", so the first flip-flop 802 is not activated in the current time frame trigger. Correspondingly, the valid logic gates traced back from the first flip-flop 802 to the original input port are logic gates that cannot transmit signals in the current time frame, including the first flip-flop 802 , the OR gate 806 and the buffer 810 .
  • the valid logic gates traced back from the second flip-flop 804 to the original input port in the current time frame are transmission logic gates, which include the second flip-flop 804 , the inverter 808 and the AND gate 812 .
  • FIG. 9 shows a schematic diagram of a logic circuit with transferable flags according to some embodiments of the present disclosure.
  • the processor 14 may generate a corresponding transfer flag set to indicate whether each logic gate is a transfer logic gate in the time frame.
  • the logic circuit 900 in FIG. 9 corresponds to the logic circuit 800 , but the numbers at each input port indicate that the input port of the logic gate can transmit signals, that is, transmit events.
  • the second flip-flop 804 is a transfer logic gate in the first time frame, so the transfer flags on the data input port and the clock port of the second flip-flop 804 are shown with "1".
  • the processor 14 may decide whether to perform subsequent calculation of the transmission path based on the transmission flag. For example, assume that the input port of the buffer 810 is connected to a fault input node, and the output port of the first flip-flop 802 is a fault observation node. When the processor 14 determines that the transfer flag of the input port of the buffer 810 is "0", it may abandon the subsequent calculation of the fault, but turn to the next fault. For example, assume that one input port of the AND gate 812 is connected to a fault input node, and the output port of the second flip-flop 804 is a fault observation node.
  • Processor 14 determines that the transfer flags of both input ports of AND gate 812 are "1" in this time frame, so processor 14 computes the logical output of AND gate 812, and then turns to subsequent logic gates (i.e., inverter 808). Processor 14 similarly determines that the transfer flag of the input port of inverter 808 is "1" and performs the calculation for inverter 808 . By analogy, until the logic output of the second flip-flop 804 is calculated, and the logic output is compared with a predetermined output to determine whether the fault is detected.
  • FIG. 10 shows a schematic diagram of a logic circuit for describing fault excitation according to some embodiments of the present disclosure.
  • the logic circuit 1000 in FIG. 10 corresponds to the logic circuit 800 , and the same logic simulation values as those in FIG. 8 are similarly shown on each input port. Therefore, various aspects described in relation to FIG. 8 can be applied to FIG. 10 , and will not be repeated here.
  • the processor 14 can further reduce the fault simulation calculation amount and fault simulation time by judging whether the fault can be triggered.
  • the fault input node is located, for example, at the first input port of the AND gate 812 , and the fault to be input is a "fixed at 1" fault.
  • processor 14 may thus determine whether a plurality of original fault inputs in the fault input set corresponding to fault input nodes in the logic circuit are activated based on the set of logic simulation outputs and the set of fault inputs.
  • the processor 14 determines, based on the logic simulation output set, a plurality of transmission logics in logic gates associated with the fault input node in the logic circuit that can transmit signals in multiple time frames Door. If it cannot be activated, the processor 14 may skip the calculation of the logic values of the logic gates from the fault input point to the observation point to save computing resources and fault simulation time.
  • FIG. 11 shows a schematic block diagram of an electronic device 1100 according to some embodiments of the present disclosure.
  • the electronic device 1100 may be implemented as or included in the electronic device 10 of FIG. 1 .
  • the electronic device 1100 may include a plurality of modules for performing corresponding steps in the method 600 as discussed in FIG. 6 .
  • the electronic device 1100 includes a logic circuit classification unit 1102 configured to classify logic circuits to determine a first-level circuit and a second-level circuit.
  • the first level of circuitry includes a plurality of sequential logic gates and a plurality of primitive inputs
  • the second level of circuitry includes a plurality of combinational logic gates.
  • the electronic device 1100 further includes a clock logic value determination unit 1104, configured to determine the clock input ports of the multiple sequential logic gates of the first-level circuit in the multiple time frames based on the time frame data representing the multiple time frames and the original clock input set. The set of clock logic values in .
  • the electronic device 1100 further includes a logic simulation output set determining unit 1106, configured to determine a logic simulation output set based on the clock logic value set and the original data input set.
  • the logic simulation output set includes the output logic values of the output ports of the multiple sequential logic gates in the first-level circuit and the multiple combinational logic gates in the second-level circuit in multiple time frames.
  • the logic circuit classifying unit 1102 is further used to classify the logic circuit to determine the first-level circuit, the first sub-level circuit and the second sub-level circuit, the first sub-circuit level includes the second level circuit combinational logic gates of the plurality of combinational logic gates directly coupled to the first level of circuitry, and the second subcircuit level includes those of the plurality of combinational logic gates in the second level of circuitry directly coupled to the first subcircuit level Combination logic gates.
  • the clock logic value determination unit 1104 is further used to add the original clock input port in multiple time frames to the event queue; add the combinational logic gate between the original clock input port and multiple sequential logic gates to the event queue ; calculating output logic values of the combinational logic gates; and determining clock logic value sets of clock ports of the plurality of sequential logic gates in the first level circuit in a plurality of time frames based on the output logic values of the combinational logic gates.
  • the logic simulation output set determination unit 1106 is further configured to use the clock logic value set and the original data input set to sequentially determine the multiple logic gates in the first-level circuit and the second-level circuit in sequence according to the order of the level circuits A plurality of output logic values, the logic simulation output set includes a plurality of output logic values.
  • the logic circuit grading unit 1102 is further configured to store the data of the first-level circuits in the first area of the memory and store the data of the second-level circuits in the second area of the memory according to the levels of the logic circuits.
  • the second area is different from the first area.
  • Fig. 12 shows a schematic block diagram of an electronic device 1200 according to some embodiments of the present disclosure.
  • the electronic device 1200 may be implemented as or included in the electronic device 10 of FIG. 1 .
  • the electronic device 1200 may include a plurality of modules for performing corresponding steps in the method 700 as discussed in FIG. 7 .
  • the electronic device 1200 includes a receiving unit 1202 configured to receive a logic simulation output set and a fault input set for a logic circuit.
  • the electronic device 1200 further includes a transmission logic gate determination unit 1204 configured to determine a plurality of transmission logic gates in the logic circuit that can transmit signals in a plurality of time frames based at least on the logic simulation output set.
  • the electronic device 1200 further includes a fault simulation output set determining unit 1206, configured to determine a fault simulation output set based at least on the determined plurality of transmission logic gates and the fault input set.
  • the transmission logic gate determination unit 1204 is further configured to determine whether the sequential logic gates in the logic circuit are correspondingly triggered in at least one of the multiple time frames according to the time frame based on the logic simulation output set; and in response to the first set of sequential logic gates in the logic circuit being triggered in at least one time frame, determining combinational logic gates associated with inputs to the first set of sequential logic gates and the first set of sequential logic gates as a plurality of transfer logic Door.
  • the transfer logic gate determination unit 1204 is further configured to determine the timing of each sequential logic gate in the logic circuit at multiple times based on the clock logic values in the logic simulation output set corresponding to the clock ports of each sequential logic gate. Whether to trigger in frame.
  • the transmission logic gate determination unit 1204 is further configured to determine whether the logic gate to be calculated is a transmission logic gate; and in response to determining that the logic gate to be calculated is a transmission logic gate, using the logic value derived from the fault input set To determine the fault output logic value of the logic gate to be calculated, the fault simulation output set includes the fault output logic value.
  • the transmission logic gate determination unit 1204 is further used to determine whether the original fault input corresponding to the fault input port in the logic circuit in the fault input set is activated based on the logic simulation output set and the fault input set; and In response to the original fault input being activated at the fault input port, based on the set of logic simulation outputs, a plurality of transmission logic gates of the logic circuit associated with the fault input port that can transmit signals in a plurality of time frames is determined.
  • FIG. 13 shows a schematic block diagram of an example device 1300 that may be used to implement embodiments of the present disclosure.
  • the device 1300 may be used to implement the electronic device 10 , 1100 or 1200 .
  • device 1300 includes computing unit 1301, which may be loaded into RAM and/or ROM according to computer program instructions stored in random access memory (RAM) and/or read only memory (ROM) 1302 or from storage unit 1307 1302 to perform various appropriate actions and processes.
  • RAM random access memory
  • ROM read only memory
  • various programs and data necessary for the operation of the device 1300 may also be stored.
  • the computing unit 1301 and the RAM and/or ROM 1302 are connected to each other via a bus 1303.
  • An input/output (I/O) interface 1304 is also connected to the bus 1303 .
  • I/O input/output
  • the I/O interface 1304 includes: an input unit 1305, such as a keyboard, a mouse, etc.; an output unit 1306, such as various types of displays, speakers, etc.; a storage unit 1307, such as a magnetic disk, an optical disk, etc. ; and a communication unit 1308, such as a network card, a modem, a wireless communication transceiver, and the like.
  • the communication unit 1308 allows the device 1300 to exchange information/data with other devices over a computer network such as the Internet and/or various telecommunication networks.
  • the computing unit 1301 may be various general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of computing units 1301 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc.
  • the computing unit 1301 executes various methods and processes described above, such as method 600 and/or method 700 .
  • method 600 and/or method 700 may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 1307 .
  • part or all of the computer program may be loaded and/or installed onto device 1300 via RAM and/or ROM and/or communication unit 1308 .
  • a computer program When a computer program is loaded into RAM and/or ROM and executed by computing unit 1301, one or more steps of method 600 and/or method 700 described above may be performed.
  • the computing unit 1301 may be configured to execute the method 600 and/or the method 700 in any other suitable manner (for example, by means of firmware).
  • Program codes 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, a special purpose computer, or other programmable data processing devices, so that the program codes, when executed by the processor or controller, make the functions/functions specified in the flow diagrams and/or block diagrams Action 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 conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.

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)
  • Tests Of Electronic Circuits (AREA)

Abstract

The present disclosure relates to a logic circuit simulation method and device. The method comprises dividing a logic circuit into different levels depending on the type of logic gates, a first-level circuit comprising sequential logic gates, raw inputs, and raw outputs, a second level circuit comprising combinational logic gates; calculating logic values of clock ports of the sequential logic gates in an event-driven manner to determine whether the sequential logic gates are triggered, and then traversing, by means of hard coding, output logic values of all logic gates comprising the sequential logic gates and combinational logic gates. Because the state of the sequential logic gates at each time frame has been determined before traversing by means of hard coding, it is unnecessary to repeatedly calculate the logic output of the logic circuit by means of hard coding, thereby greatly saving computing resources and shortening simulation time.

Description

用于仿真的方法、装置及设备Method, device and equipment for simulation 技术领域technical field
本公开涉及电子领域,更具体而言涉及用于集成电路的仿真的方法、装置和设备。The present disclosure relates to the field of electronics, and more particularly to methods, apparatus and apparatus for simulation of integrated circuits.
背景技术Background technique
已经开发出多种电子设计自动化(electronic design automation,EDA)工具来完成超大规模集成电路(very large scale integration,VLSI)芯片的功能设计、综合、验证、物理设计(包括布局、布线、版图、设计规则检查等)等设计流程。在诸如数字集成电路之类的集成电路的设计过程中,一个重要的阶段是逻辑电路的仿真,其可以在流片之前验证电路设计的正确性。逻辑电路的仿真通常包括逻辑仿真和故障仿真两个阶段。在逻辑仿真中,仿真设备读取网表文件并且接收测试向量,在进行逻辑运算之后生成逻辑仿真结果。在故障仿真中,仿真设备接收故障向量集,并且使用逻辑仿真生成的逻辑仿真结果作为背景来确定检测哪些故障可以被检测到。A variety of electronic design automation (EDA) tools have been developed to complete the functional design, synthesis, verification, and physical design (including layout, wiring, layout, and design) of very large scale integration (VLSI) chips. rule checking, etc.) and other design processes. In the design process of integrated circuits such as digital integrated circuits, an important stage is the simulation of logic circuits, which can verify the correctness of circuit design before tape-out. The simulation of logic circuit usually includes two stages of logic simulation and fault simulation. In logic simulation, the simulation device reads the netlist file and receives test vectors, and generates logic simulation results after performing logic operations. In fault simulation, the simulation device receives a set of fault vectors and uses the logic simulation results generated by the logic simulation as a background to determine which faults can be detected.
常规逻辑仿真例如包括基于硬编码的逻辑仿真和基于事件驱动技术的逻辑仿真。故障仿真以逻辑仿真的仿真结果作为背景。常规故障仿真例如包括基于单故障向量并行仿真技术(PPSFP)的故障仿真和基于Hope技术的故障仿真。集成电路通常包括成千上万的逻辑门,常规的逻辑仿真或故障仿真都消耗相当长的仿真时间。Conventional logic simulation includes, for example, hard-coded-based logic simulation and event-driven technology-based logic simulation. The fault simulation takes the simulation results of the logic simulation as the background. Conventional fault simulation includes, for example, fault simulation based on single fault vector parallel simulation technology (PPSFP) and fault simulation based on Hope technology. Integrated circuits usually include tens of thousands of logic gates, and conventional logic simulation or fault simulation consumes a considerable amount of simulation time.
发明内容Contents of the invention
鉴于上述问题,本公开的实施例旨在提供一种用于仿真的方法、存储介质、程序产品和电子设备,用于数字电路的逻辑仿真和/或故障仿真。In view of the above problems, the embodiments of the present disclosure aim to provide a simulation method, storage medium, program product and electronic device, which are used for logic simulation and/or fault simulation of digital circuits.
根据本公开的第一方面,提供一种用于仿真的方法。该方法包括对逻辑电路进行分级以确定第一层级电路和第二层级电路,第一层级电路包括多个时序逻辑门和多个原始输入,并且第二层级电路包括多个组合逻辑门。该方法还包括基于表示多个时间帧的时间帧数据和原始时钟输入集,确定第一层级电路的多个时序逻辑门的时钟输入端口在多个时间帧中的时钟逻辑值集。该方法进一步包括基于时钟逻辑值集和原始数据输入集,确定逻辑仿真输出集。逻辑仿真输出集包括:第一层级电路中的多个时序逻辑门的输出端口在多个时间帧中的输出逻辑值,和第二层级电路中的多个组合逻辑门的输出端口在多个时间帧中的输出逻辑值。由于逻辑电路中的逻辑门按类型被分级,相同类型的逻辑门的数据因此很大程度上位于相邻或相近的存储区域,例如位于存储器中的相邻或相近的区域。处理器在将某个或某些逻辑门的数据从存储器读入高速缓存时,由于高速缓存的空间局部性设计原理,因此相邻或附近的多个逻辑门的数据会被一起读入高速缓存。在相邻或相近的多个逻辑门的数据被读入高速缓存之后,当处理器在计算完当前逻辑门的逻辑值之后计算下一逻辑门的逻辑值时,由于该下一逻辑门的相关数据已被读入高速缓存,因此无需重新寻址访问存储器。这样,可以大大减少高速缓存访问存储器的次数,从而节省了大量的仿真时间。另一方面,在一些实施例中,由于时序逻辑门的触发状态已被确定,因此在以硬编码的方式按层级电路遍历各个逻辑门(包括时序逻辑门和组合逻辑门)以计算各个逻辑门的输出逻辑值时,也无需像常规硬编码逻辑仿真那样重复遍历全部逻辑门。这可以进一步显著减少逻辑电路的逻辑仿真时间。According to a first aspect of the present disclosure, a method for simulation is provided. The method includes staging the logic circuit to determine a first level circuit comprising a plurality of sequential logic gates and a plurality of primitive inputs and a second level circuit comprising a plurality of combinational logic gates. The method further includes determining a set of clock logic values of clock input ports of the plurality of sequential logic gates of the first level circuit in the plurality of time frames based on the time frame data representing the plurality of time frames and the original clock input set. The method further includes determining a set of logic simulation outputs based on the set of clocked logic values and the set of raw data inputs. The logic simulation output set includes: the output logic values of the output ports of the multiple sequential logic gates in the first-level circuit in multiple time frames, and the output ports of the multiple combinational logic gates in the second-level circuit in multiple time frames Output logical value in frame. Since logic gates in a logic circuit are classified by type, the data of logic gates of the same type are thus largely located in adjacent or close storage areas, eg in adjacent or close areas in a memory. When the processor reads the data of one or some logic gates from the memory into the cache, due to the spatial locality design principle of the cache, the data of adjacent or nearby logic gates will be read into the cache together . After the data of adjacent or similar logic gates are read into the cache, when the processor calculates the logic value of the next logic gate after calculating the logic value of the current logic gate, due to the correlation of the next logic gate Data has already been read into the cache, so memory accesses do not need to be re-addressed. In this way, the number of cache memory accesses can be greatly reduced, thus saving a lot of simulation time. On the other hand, in some embodiments, since the trigger states of the sequential logic gates have been determined, each logic gate (including sequential logic gates and combinational logic gates) is traversed in a hard-coded manner to calculate each logic gate When outputting logic values of , there is no need to repeatedly traverse all logic gates as in conventional hard-coded logic simulation. This can further significantly reduce logic simulation time for logic circuits.
在第一方面的一种可能的实现方式中,对逻辑电路进行分级以确定第一层级电路和第二层级电路包括:对逻辑电路进行分级以确定第一层级电路、第一子层级电路和第二子层级电路。第一子电路层级包括第二层级电路中的多个组合逻辑门中的、与第一层级电路直接耦合的组合逻辑门。第二子电路层级包括第二层级电路中的多个组合逻辑门中的、与第一子电路层级直接耦合的组合逻辑门。通过将第二层级电路按照组合逻辑门的连接关系进一步划分,可以提高逻辑仿真的准确性和效率。In a possible implementation manner of the first aspect, classifying the logic circuit to determine the first-level circuit and the second-level circuit includes: classifying the logic circuit to determine the first-level circuit, the first sub-level circuit, and the second-level circuit Two sub-level circuits. The first level of subcircuits includes combinational logic gates of the plurality of combinational logic gates in the second level of circuitry that are directly coupled to the first level of circuitry. The second sub-circuit level includes combinational logic gates of the plurality of combinational logic gates in the second level circuit that are directly coupled to the first sub-circuit level. The accuracy and efficiency of logic simulation can be improved by further dividing the second-level circuit according to the connection relationship of combinational logic gates.
在第一方面的一种可能的实现方式中,该方法还包括接收仿真周期数据;以及基于仿真周期数据确定时间帧数据。In a possible implementation manner of the first aspect, the method further includes receiving simulation period data; and determining time frame data based on the simulation period data.
在第一方面的一种可能的实现方式中,基于表示多个时间帧的时间帧数据和原始时钟输入集确定第一层级电路的多个时序逻辑门的时钟输入端口在多个时间帧中的时钟逻辑值集包括:将多个时间帧中的原始时钟输入端口加入事件队列;将原始时钟输入端口与多个时序逻辑门之间的组合逻辑门加入事件队列;计算(compute)组合逻辑门的输出逻辑值;以及基于组合逻辑门的输出逻辑值确定第一层级电路中的多个时序逻辑门的时钟端口在多个时间帧中的时钟逻辑值集。由于时序逻辑门在逻辑电路中通常仅占相对少的比例,因此待计算的时序逻辑门的时钟端口也相应地较少。即使以事件驱动的方式来计算,这也对于逻辑仿真的时间总体影响不大。此外,由于逻辑电路已被分级并且原始时钟输入端口和时序逻辑门之间并无其它时序逻辑门,因此可以直接确定时钟端口的逻辑值。在以事件驱动的方式计算完第一层级电路中的所有时序逻辑门的时钟端口在各个时间帧中的时钟逻辑值之后,可以获得时序逻辑门的时钟输入端口在时间帧数据指示的多个时间帧中的时钟逻辑值集。通过使用时钟逻辑值集,可以使得时序逻辑门的输出逻辑值是确定的,并因此如上所述地进一步显著减小逻辑仿真的时间。In a possible implementation of the first aspect, based on the time frame data representing the multiple time frames and the original clock input set, the clock input ports of the multiple sequential logic gates of the first-level circuit in the multiple time frames are determined The clock logic value set includes: adding the original clock input port in multiple time frames to the event queue; adding the combinational logic gate between the original clock input port and multiple sequential logic gates to the event queue; computing (compute) the combinational logic gate outputting logic values; and determining clock logic value sets of clock ports of the plurality of sequential logic gates in the first level circuit in a plurality of time frames based on the output logic values of the combinational logic gates. Since the sequential logic gates generally only occupy a relatively small proportion in a logic circuit, the clock ports of the sequential logic gates to be calculated are correspondingly less. Even when calculated in an event-driven manner, this generally has little impact on logic simulation time. Furthermore, since the logic circuit is staged and there are no other sequential logic gates between the original clock input port and the sequential logic gate, the logic value of the clock port can be directly determined. After the clock logic values of the clock ports of all sequential logic gates in the first-level circuit in each time frame are calculated in an event-driven manner, multiple times indicated by the time frame data of the clock input ports of the sequential logic gate can be obtained Set of clock logic values in a frame. By using a set of clocked logic values, the output logic values of sequential logic gates can be made deterministic, and thus the time for logic simulation is further significantly reduced as described above.
在第一方面的一种可能的实现方式中,基于时钟逻辑值集和原始数据输入集确定逻辑仿真输出集包括使用时钟逻辑值集和原始数据输入集来按照层级电路的顺序依次确定第一层级电路和第二层级电路中的多个逻辑门的多个输出逻辑值,逻辑仿真输出集包括多个输出逻辑值。通过依次确定逻辑门的输出逻辑值,可以进一步降低仿真时间并且提供仿真准确率。In a possible implementation manner of the first aspect, determining the logic simulation output set based on the clock logic value set and the original data input set includes using the clock logic value set and the original data input set to sequentially determine the first level according to the order of the level circuits The plurality of output logic values of the plurality of logic gates in the circuit and the second level circuit, the logic simulation output set includes the plurality of output logic values. By sequentially determining the output logic values of the logic gates, the simulation time can be further reduced and the simulation accuracy can be improved.
在第一方面的一种可能的实现方式中,对逻辑电路进行分级以确定第一层级电路和第二层级电路包括按照逻辑电路的层级将第一层级电路的数据存储在存储器的第一区域并且将第二层级电路的数据存储在存储器的第二区域,第二区域不同于第一区域。通过将第一层级电路和第二层级电路分区存储,相邻的逻辑门基本上位于相邻的位置,这可以显著提供空间局部性的使用概率,进一步降低仿真的时间。In a possible implementation manner of the first aspect, classifying the logic circuits to determine the first-level circuits and the second-level circuits includes storing data of the first-level circuits in the first area of the memory according to the levels of the logic circuits, and Data for the second level of circuitry is stored in a second area of the memory, the second area being different from the first area. By partitioning and storing the first-level circuits and the second-level circuits, adjacent logic gates are basically located in adjacent positions, which can significantly increase the use probability of spatial locality and further reduce the simulation time.
在第一方面的一种可能的实现方式中,该方法还包括接收针对逻辑电路的逻辑仿真输出集和故障输入集;至少基于逻辑仿真输出集,确定逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门;以及至少基于所确定的多个传输逻辑门和故障输入集,确定故障仿真输出集。通过确定在各个时间帧中可以传递信号的多个传输逻辑门,可以仅计算可传递故障信号的传递路径中的逻辑门的输出值,而不计算不可传递信号的路径中的逻辑门的输出值。这显著降低了故障仿真的计算量,大大节省了故障仿真的时间。In a possible implementation of the first aspect, the method further includes receiving a logic simulation output set and a fault input set for the logic circuit; at least based on the logic simulation output set, determining in the logic circuit in multiple time frames a plurality of transfer logic gates that may pass signals; and determining a set of fault simulation outputs based at least on the determined plurality of transfer logic gates and the set of fault inputs. By determining the number of transmitting logic gates that can pass the signal in various time frames, it is possible to calculate the output value of only the logic gates in the transmission path of the passable fault signal, but not the output value of the logic gate in the path of the non-transferable signal . This significantly reduces the calculation load of fault simulation and greatly saves the time of fault simulation.
在第一方面的一种可能的实现方式中,至少基于逻辑仿真输出集确定逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门包括:基于逻辑仿真输出集,按照时间帧确定逻辑电路中的时序逻辑门在多个时间帧中的至少一个时间帧中是否被相应地触发;以及响应于逻辑电路中的第一组时序逻辑门在至少一个时间帧中被触发,将与第一组时序逻辑门的输入 相关的组合逻辑门和第一组时序逻辑门确定为多个传输逻辑门。通过确定时序逻辑门在时间帧中被触发,可以以简易的方式确定该时序逻辑门是否是传输逻辑门。这可以进一步降低故障仿真的时间并且提高故障仿真的效率。In a possible implementation manner of the first aspect, at least based on the logic simulation output set, determining a plurality of transmission logic gates in the logic circuit that can transmit signals in multiple time frames includes: based on the logic simulation output set, according to time Frame determines whether the sequential logic gates in the logic circuit are correspondingly triggered in at least one time frame in the plurality of time frames; and in response to the first group of sequential logic gates in the logic circuit being triggered in at least one time frame, will The combinational logic gates associated with the inputs of the first set of sequential logic gates and the first set of sequential logic gates are defined as a plurality of transfer logic gates. By determining that a sequential logic gate is triggered in a time frame, it can be determined in an easy manner whether the sequential logic gate is a transmission logic gate. This can further reduce the time of fault simulation and improve the efficiency of fault simulation.
在第一方面的一种可能的实现方式中,基于逻辑仿真输出集确定逻辑电路中的各个时序逻辑门在多个时间帧中是否被相应地触发包括:基于逻辑仿真输出集中的、与各个时序逻辑门的时钟端口分别对应的时钟逻辑值,确定逻辑电路中的各个时序逻辑门在多个时间帧中是否被触发。In a possible implementation manner of the first aspect, determining whether each sequential logic gate in the logic circuit is correspondingly triggered in multiple time frames based on the logic simulation output set includes: based on the logic simulation output set, and each timing The clock logic values corresponding to the clock ports of the logic gate determine whether each sequential logic gate in the logic circuit is triggered in multiple time frames.
在第一方面的一种可能的实现方式中,至少基于所确定的多个传输逻辑门和故障输入集确定故障仿真输出集包括:确定待计算的逻辑门是否是传输逻辑门;以及响应于确定待计算的逻辑门是传输逻辑门,使用源自故障输入集的逻辑值来确定待计算的逻辑门的故障输出逻辑值,故障仿真输出集包括故障输出逻辑值。通过确定传输逻辑门并且计算相应的故障输出逻辑值,可以减少故障仿真的计算量,并且减少故障仿真的时间。In a possible implementation manner of the first aspect, determining the failure simulation output set based at least on the determined plurality of transmission logic gates and failure input sets includes: determining whether the logic gate to be calculated is a transmission logic gate; and in response to determining The logic gate to be calculated is a transfer logic gate, and the logic value derived from the fault input set is used to determine the fault output logic value of the logic gate to be computed, and the fault simulation output set includes the fault output logic value. By determining the transmission logic gate and calculating the corresponding fault output logic value, the calculation amount of fault simulation can be reduced, and the time of fault simulation can be reduced.
在第一方面的一种可能的实现方式中,至少基于逻辑仿真输出集确定逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门包括:基于逻辑仿真输出集和故障输入集,确定故障输入集中的、与逻辑电路中的故障输入端口处对应的原始故障输入是否被激发;以及响应于原始故障输入在故障输入端口被激发,基于逻辑仿真输出集,确定逻辑电路中与故障输入端口相关的逻辑门中的、在多个时间帧中可传递信号的多个传输逻辑门。通过确定是否被激发,可以回溯可被观测的传输逻辑门,从而以简易的方式确定可被观测的逻辑门以减少故障仿真的计算量并且相应地减少仿真时间。In a possible implementation manner of the first aspect, determining at least based on the logic simulation output set a plurality of transmission logic gates in the logic circuit that can transmit signals in multiple time frames includes: based on the logic simulation output set and the fault input set, determine whether the original fault input corresponding to the fault input port in the logic circuit in the fault input set is excited; A plurality of transmission logic gates that may pass signals in multiple time frames among the logic gates associated with the fault input port. By determining whether to be activated, the observable transmission logic gates can be traced back, so that the observable logic gates can be determined in a simple manner to reduce the calculation amount of fault simulation and correspondingly reduce the simulation time.
在第一方面的一种可能的实现方式中,至少基于逻辑仿真输出集,确定逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门包括:至少基于逻辑仿真输出集,以多线程的方式并行地确定逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门。由于各个逻辑门的数据在确定传输逻辑门的过程中不被修改,因此各个逻辑门的数据可以被多线程同时访问。通过使用多线程的故障方式可以进一步地减少故障仿真的时间。In a possible implementation manner of the first aspect, at least based on the logic simulation output set, determining the multiple transmission logic gates in the logic circuit that can transmit signals in multiple time frames includes: at least based on the logic simulation output set, Multiple transmit logic gates in a logic circuit that can transmit signals in multiple time frames are determined in parallel in a multi-threaded manner. Since the data of each logic gate is not modified during the process of determining the transmission logic gate, the data of each logic gate can be simultaneously accessed by multiple threads. The fault simulation time can be further reduced by using multi-threaded fault mode.
根据本公开的第二方面,提供一种计算机可读存储介质,存储多个程序。多个程序被配置为一个或多个处理器执行,多个程序包括用于执行根据第一方面的方法的指令。According to a second aspect of the present disclosure, there is provided a computer-readable storage medium storing a plurality of programs. A plurality of programs are configured to be executed by the one or more processors, the plurality of programs including instructions for performing the method according to the first aspect.
根据本公开的第三方面,提供一种计算机程序产品。计算机程序产品包括多个程序,多个程序被配置为一个或多个处理器执行,多个程序包括用于执行根据第一方面的方法的指令。According to a third aspect of the present disclosure, a computer program product is provided. The computer program product comprises a plurality of programs configured for execution by one or more processors, the plurality of programs comprising instructions for performing the method according to the first aspect.
根据本公开的第四方面,提供一种电子设备。电子设备包括一个或多个处理器;包括计算机指令的存储器,计算机指令在由电子设备的一个或多个处理器执行时使得电子设备执行根据第一方面的方法。According to a fourth aspect of the present disclosure, an electronic device is provided. The electronic device comprises one or more processors; a memory comprising computer instructions which, when executed by the one or more processors of the electronic device, cause the electronic device to perform the method according to the first aspect.
根据本公开的第五方面,提供一种电子设备。电子设备包括逻辑电路分级单元,用于对逻辑电路进行分级以确定第一层级电路和第二层级电路,第一层级电路包括多个时序逻辑门和多个原始输入,并且第二层级电路包括多个组合逻辑门;时钟逻辑值确定单元,用于基于表示多个时间帧的时间帧数据和原始时钟输入集,确定第一层级电路的多个时序逻辑门的时钟输入端口在多个时间帧中的时钟逻辑值集;以及逻辑仿真输出集确定单元,用于基于时钟逻辑值集和原始数据输入集确定逻辑仿真输出集。逻辑仿真输出集包括:第一层级电路中的多个时序逻辑门的输出端口在多个时间帧中的输出逻辑值,和第二层级电路中的多个组合逻辑门的输出端口在多个时间帧中的输出逻辑值。由于逻辑电路中的逻辑门按类型被分级,相同类型的逻辑门的数据因此很大程度上位于相邻或相近的存储区域,例如位于存储器中的相 邻或相近的区域。处理器在将某个或某些逻辑门的数据从存储器读入高速缓存时,由于高速缓存的空间局部性设计原理,因此相邻或附近的多个逻辑门的数据会被一起读入高速缓存。在相邻或相近的多个逻辑门的数据被读入高速缓存之后,当处理器在计算完当前逻辑门的逻辑值之后计算下一逻辑门的逻辑值时,由于该下一逻辑门的相关数据已被读入高速缓存,因此无需重新寻址访问存储器。这样,可以大大减少高速缓存访问存储器的次数,从而节省了大量的仿真时间。另一方面,在一些实施例中,由于时序逻辑门的触发状态已被确定,因此在以硬编码的方式按层级电路遍历各个逻辑门(包括时序逻辑门和组合逻辑门)以计算各个逻辑门的输出逻辑值时,也无需像常规硬编码逻辑仿真那样重复遍历全部逻辑门。这可以进一步显著减少逻辑电路的逻辑仿真时间。According to a fifth aspect of the present disclosure, an electronic device is provided. The electronic device includes a logic circuit classification unit for classifying the logic circuit to determine a first-level circuit and a second-level circuit, the first-level circuit includes a plurality of sequential logic gates and a plurality of original inputs, and the second-level circuit includes a plurality of a combinational logic gate; a clock logic value determining unit, configured to determine the clock input ports of the multiple sequential logic gates of the first-level circuit in multiple time frames based on the time frame data representing multiple time frames and the original clock input set The clock logic value set; and a logic simulation output set determining unit, configured to determine a logic simulation output set based on the clock logic value set and the original data input set. The logic simulation output set includes: the output logic values of the output ports of the multiple sequential logic gates in the first-level circuit in multiple time frames, and the output ports of the multiple combinational logic gates in the second-level circuit in multiple time frames Output logical value in frame. Since logic gates in a logic circuit are classified by type, the data of logic gates of the same type are thus largely located in adjacent or close storage areas, for example in adjacent or close areas in a memory. When the processor reads the data of one or some logic gates from the memory into the cache, due to the spatial locality design principle of the cache, the data of adjacent or nearby logic gates will be read into the cache together . After the data of adjacent or similar logic gates are read into the cache, when the processor calculates the logic value of the next logic gate after calculating the logic value of the current logic gate, due to the correlation of the next logic gate Data has already been read into the cache, so memory accesses do not need to be re-addressed. In this way, the number of cache memory accesses can be greatly reduced, thus saving a lot of simulation time. On the other hand, in some embodiments, since the trigger states of the sequential logic gates have been determined, each logic gate (including sequential logic gates and combinational logic gates) is traversed in a hard-coded manner to calculate each logic gate When outputting logic values of , there is no need to repeatedly traverse all logic gates as in conventional hard-coded logic simulation. This can further significantly reduce logic simulation time for logic circuits.
在第五方面的一种可能的实现方式中,逻辑电路分级单元进一步用于对逻辑电路进行分级以确定第一层级电路、第一子层级电路和第二子层级电路,第一子电路层级包括第二层级电路中的多个组合逻辑门中的、与第一层级电路直接耦合的组合逻辑门,并且第二子电路层级包括第二层级电路中的多个组合逻辑门中的、与第一子电路层级直接耦合的组合逻辑门。通过将第二层级电路按照组合逻辑门的连接关系进一步划分,可以提高逻辑仿真的准确性和效率。In a possible implementation manner of the fifth aspect, the logic circuit classification unit is further configured to classify the logic circuit to determine a first-level circuit, a first sub-level circuit, and a second sub-level circuit, and the first sub-circuit level includes The combinational logic gates of the plurality of combinational logic gates in the second level circuit that are directly coupled to the first level circuit, and the second sub-circuit level includes the combinational logic gates of the plurality of combinational logic gates in the second level circuit that are directly coupled to the first level circuit. Directly coupled combinational logic gates at the subcircuit level. The accuracy and efficiency of logic simulation can be improved by further dividing the second-level circuit according to the connection relationship of combinational logic gates.
在第五方面的一种可能的实现方式中,时钟逻辑值确定单元进一步用于将多个时间帧中的原始时钟输入端口加入事件队列;将原始时钟输入端口与多个时序逻辑门之间的组合逻辑门加入事件队列;计算组合逻辑门的输出逻辑值;以及基于组合逻辑门的输出逻辑值确定第一层级电路中的多个时序逻辑门的时钟端口在多个时间帧中的时钟逻辑值集。由于时序逻辑门在逻辑电路中通常仅占相对少的比例,因此待计算的时序逻辑门的时钟端口也相应地较少。即使以事件驱动的方式来计算,这也对于逻辑仿真的时间总体影响不大。此外,由于逻辑电路已被分级并且原始时钟输入端口和时序逻辑门之间并无其它时序逻辑门,因此可以直接确定时钟端口的逻辑值。在以事件驱动的方式计算完第一层级电路中的所有时序逻辑门的时钟端口在各个时间帧中的时钟逻辑值之后,可以获得时序逻辑门的时钟输入端口在时间帧数据指示的多个时间帧中的时钟逻辑值集。通过使用时钟逻辑值集,可以使得时序逻辑门的输出逻辑值是确定的,并因此如上所述地进一步显著减小逻辑仿真的时间。In a possible implementation of the fifth aspect, the clock logic value determination unit is further used to add the original clock input ports in multiple time frames to the event queue; The combinational logic gate is added to the event queue; the output logic value of the combinational logic gate is calculated; and the clock logic value of the clock port of the plurality of sequential logic gates in the first-level circuit in multiple time frames is determined based on the output logic value of the combinational logic gate set. Since the sequential logic gates generally only occupy a relatively small proportion in a logic circuit, the clock ports of the sequential logic gates to be calculated are correspondingly less. Even when calculated in an event-driven manner, this generally has little impact on logic simulation time. Furthermore, since the logic circuit is staged and there are no other sequential logic gates between the original clock input port and the sequential logic gate, the logic value of the clock port can be directly determined. After the clock logic values of the clock ports of all sequential logic gates in the first-level circuit in each time frame are calculated in an event-driven manner, multiple times indicated by the time frame data of the clock input ports of the sequential logic gate can be obtained Set of clock logic values in a frame. By using a set of clocked logic values, the output logic values of sequential logic gates can be made deterministic, and thus the time for logic simulation is further significantly reduced as described above.
在第五方面的一种可能的实现方式中,逻辑仿真输出集确定单元进一步用于使用时钟逻辑值集和原始数据输入集来按照层级电路的顺序依次确定第一层级电路和第二层级电路中的多个逻辑门的多个输出逻辑值,逻辑仿真输出集包括多个输出逻辑值。通过依次确定逻辑门的输出逻辑值,可以进一步降低仿真时间并且提供仿真准确率。In a possible implementation of the fifth aspect, the logic simulation output set determining unit is further used to use the clock logic value set and the original data input set to sequentially determine the first-level circuits and the second-level circuits according to the order of the level circuits. The plurality of output logic values of the plurality of logic gates, the logic simulation output set includes the plurality of output logic values. By sequentially determining the output logic values of the logic gates, the simulation time can be further reduced and the simulation accuracy can be improved.
在第五方面的一种可能的实现方式中,逻辑电路分级单元进一步用于按照逻辑电路的层级将第一层级电路的数据存储在存储器的第一区域并且将第二层级电路的数据存储在存储器的第二区域,第二区域不同于第一区域。通过将第一层级电路和第二层级电路分区存储,相邻的逻辑门基本上位于相邻的位置,这可以显著提供空间局部性的使用概率,进一步降低仿真的时间。In a possible implementation manner of the fifth aspect, the logic circuit grading unit is further configured to store the data of the first-level circuits in the first area of the memory and store the data of the second-level circuits in the memory according to the levels of the logic circuits The second area of , the second area is different from the first area. By partitioning and storing the first-level circuits and the second-level circuits, adjacent logic gates are basically located in adjacent positions, which can significantly increase the use probability of spatial locality and further reduce the simulation time.
在第五方面的一种可能的实现方式中,电子设备还包括:接收单元,用于接收针对逻辑电路的逻辑仿真输出集和故障输入集;传输逻辑门确定单元,用于至少基于逻辑仿真输出集确定逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门;以及故障仿真输出集确定单元,用于至少基于所确定的多个传输逻辑门和故障输入集确定故障仿真输出集。通过确定在各个时间帧中可以传递信号的多个传输逻辑门,可以仅计算可传递故障信号的传递路径 中的逻辑门的输出值,而不计算不可传递信号的路径中的逻辑门的输出值。这显著降低了故障仿真的计算量,大大节省了故障仿真的时间。In a possible implementation manner of the fifth aspect, the electronic device further includes: a receiving unit, configured to receive a logic simulation output set and a fault input set for a logic circuit; a transmission logic gate determination unit, configured to at least based on the logic simulation output a plurality of transmission logic gates in the set determination logic circuit capable of transmitting signals in a plurality of time frames; and a failure simulation output set determination unit for determining a failure simulation based at least on the determined plurality of transmission logic gates and failure input sets output set. By determining the number of transmitting logic gates that can pass the signal in various time frames, it is possible to calculate the output value of only the logic gates in the transmission path of the passable fault signal, but not the output value of the logic gate in the path of the non-transferable signal . This significantly reduces the calculation load of fault simulation and greatly saves the time of fault simulation.
在第五方面的一种可能的实现方式中,传输逻辑门确定单元进一步用于基于逻辑仿真输出集,按照时间帧确定逻辑电路中的时序逻辑门在多个时间帧中的至少一个时间帧中是否被相应地触发;以及响应于逻辑电路中的第一组时序逻辑门在至少一个时间帧中被触发,将与第一组时序逻辑门的输入相关的组合逻辑门和第一组时序逻辑门确定为多个传输逻辑门。通过确定时序逻辑门在时间帧中被触发,可以以简易的方式确定该时序逻辑门是否是传输逻辑门。这可以进一步降低故障仿真的时间并且提高故障仿真的效率。In a possible implementation manner of the fifth aspect, the transmission logic gate determination unit is further configured to determine, based on the logic simulation output set, the sequential logic gate in the logic circuit in at least one of the multiple time frames according to the time frame is triggered accordingly; and in response to the first set of sequential logic gates in the logic circuit being triggered in at least one time frame, combining the combinational logic gates associated with the inputs of the first set of sequential logic gates and the first set of sequential logic gates identified as multiple transfer logic gates. By determining that a sequential logic gate is triggered in a time frame, it can be determined in an easy manner whether the sequential logic gate is a transmission logic gate. This can further reduce the time of fault simulation and improve the efficiency of fault simulation.
在第五方面的一种可能的实现方式中,传输逻辑门确定单元进一步用于基于逻辑仿真输出集中的、与各个时序逻辑门的时钟端口分别对应的时钟逻辑值,确定逻辑电路中的各个时序逻辑门在多个时间帧中是否被触发。In a possible implementation of the fifth aspect, the transmission logic gate determination unit is further configured to determine each timing in the logic circuit based on the clock logic values in the logic simulation output set that correspond to the clock ports of each sequential logic gate. Whether the logic gate is triggered in multiple timeframes.
在第五方面的一种可能的实现方式中,传输逻辑门确定单元进一步用于确定待计算的逻辑门是否是传输逻辑门;以及响应于确定待计算的逻辑门是传输逻辑门,使用源自故障输入集的逻辑值来确定待计算的逻辑门的故障输出逻辑值,故障仿真输出集包括故障输出逻辑值。通过确定传输逻辑门并且计算相应的故障输出逻辑值,可以减少故障仿真的计算量,并且减少故障仿真的时间。In a possible implementation manner of the fifth aspect, the transfer logic gate determining unit is further configured to determine whether the logic gate to be calculated is a transfer logic gate; and in response to determining that the logic gate to be calculated is a transfer logic gate, using the source from The logic value of the fault input set is used to determine the fault output logic value of the logic gate to be calculated, and the fault simulation output set includes the fault output logic value. By determining the transmission logic gate and calculating the corresponding fault output logic value, the calculation amount of fault simulation can be reduced, and the time of fault simulation can be reduced.
在第五方面的一种可能的实现方式中,传输逻辑门确定单元进一步用于基于逻辑仿真输出集和故障输入集,确定故障输入集中的、与逻辑电路中的故障输入端口处对应的原始故障输入是否被激发;以及响应于原始故障输入在故障输入端口被激发,基于逻辑仿真输出集,确定逻辑电路中与故障输入端口相关的逻辑门中的、在多个时间帧中可传递信号的多个传输逻辑门。通过确定是否被激发,可以回溯可被观测的传输逻辑门,从而以简易的方式确定可被观测的逻辑门以减少故障仿真的计算量并且相应地减少仿真时间。In a possible implementation of the fifth aspect, the transfer logic gate determination unit is further configured to determine the original fault in the fault input set corresponding to the fault input port in the logic circuit based on the logic simulation output set and the fault input set whether the input is activated; and in response to the original fault input being activated at the fault input port, based on the set of logic simulation outputs, determining how many of the logic gates in the logic circuit that are associated with the fault input port can transmit signals in the plurality of time frames transmission logic gates. By determining whether to be activated, the observable transmission logic gates can be traced back, so that the observable logic gates can be determined in a simple manner to reduce the calculation amount of fault simulation and correspondingly reduce the simulation time.
在第五方面的一种可能的实现方式中,传输逻辑门确定单元进一步用于至少基于逻辑仿真输出集,以多线程的方式并行地确定逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门。由于各个逻辑门的数据在确定传输逻辑门的过程中不被修改,因此各个逻辑门的数据可以被多线程同时访问。通过使用多线程的故障方式可以进一步地减少故障仿真的时间。In a possible implementation manner of the fifth aspect, the transmission logic gate determination unit is further configured to determine in parallel in a multi-threaded manner the transferable signals in the logic circuit in multiple time frames based on at least the logic simulation output set multiple transfer logic gates. Since the data of each logic gate is not modified during the process of determining the transmission logic gate, the data of each logic gate can be simultaneously accessed by multiple threads. The fault simulation time can be further reduced by using multi-threaded fault mode.
根据本公开的第六方面,提供一种用于仿真的方法。该方法包括接收针对逻辑电路的逻辑仿真输出集和故障输入集;至少基于逻辑仿真输出集,确定逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门;以及至少基于所确定的多个传输逻辑门和故障输入集,确定故障仿真输出集。通过确定在各个时间帧中可以传递信号的多个传输逻辑门,可以仅计算可传递故障信号的传递路径中的逻辑门的输出值,而不计算不可传递信号的路径中的逻辑门的输出值。这显著降低了故障仿真的计算量,大大节省了故障仿真的时间。According to a sixth aspect of the present disclosure, a method for simulation is provided. The method includes receiving a set of logic simulation outputs and a set of fault inputs for a logic circuit; determining, based at least on the set of logic simulation outputs, a plurality of transmission logic gates in the logic circuit that can transmit signals in a plurality of time frames; and based at least on the set of logic simulation outputs; The determined plurality of transmission logic gates and fault input sets determine the fault simulation output set. By determining the number of transmitting logic gates that can pass the signal in various time frames, it is possible to calculate the output value of only the logic gates in the transmission path of the passable fault signal, but not the output value of the logic gate in the path of the non-transferable signal . This significantly reduces the calculation load of fault simulation and greatly saves the time of fault simulation.
在一种可能的实现方式中,至少基于逻辑仿真输出集确定逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门包括:基于逻辑仿真输出集,按照时间帧确定逻辑电路中的时序逻辑门在多个时间帧中的至少一个时间帧中是否被相应地触发;以及响应于逻辑电路中的第一组时序逻辑门在至少一个时间帧中被触发,将与第一组时序逻辑门的输入相关的组合逻辑门和第一组时序逻辑门确定为多个传输逻辑门。通过确定时序逻辑门在时间帧中被触发,可以以简易的方式确定该时序逻辑门是否是传输逻辑门。这可以进一步降低故障仿真的时间并且提高故障仿真的效率。In a possible implementation manner, at least based on the logic simulation output set, determining the multiple transmission logic gates in the logic circuit that can transmit signals in multiple time frames includes: based on the logic simulation output set, determining the logic circuit according to the time frame whether the sequential logic gates in the logic circuit are correspondingly triggered in at least one of the plurality of time frames; and in response to the first group of sequential logic gates in the logic circuit being triggered in at least one time frame, will The combinational logic gates associated with the inputs of the sequential logic gates and the first group of sequential logic gates are determined as a plurality of transfer logic gates. By determining that a sequential logic gate is triggered in a time frame, it can be determined in an easy manner whether the sequential logic gate is a transmission logic gate. This can further reduce the time of fault simulation and improve the efficiency of fault simulation.
在一种可能的实现方式中,基于逻辑仿真输出集确定逻辑电路中的各个时序逻辑门在多 个时间帧中是否被相应地触发包括:基于逻辑仿真输出集中的、与各个时序逻辑门的时钟端口分别对应的时钟逻辑值,确定逻辑电路中的各个时序逻辑门在多个时间帧中是否被触发。In a possible implementation manner, determining whether each sequential logic gate in the logic circuit is correspondingly triggered in multiple time frames based on the logic simulation output set includes: based on the logic simulation output set and the clock of each sequential logic gate The clock logic values corresponding to the ports respectively determine whether each sequential logic gate in the logic circuit is triggered in multiple time frames.
在一种可能的实现方式中,至少基于所确定的多个传输逻辑门和故障输入集确定故障仿真输出集包括:确定待计算的逻辑门是否是传输逻辑门;以及响应于确定待计算的逻辑门是传输逻辑门,使用源自故障输入集的逻辑值来确定待计算的逻辑门的故障输出逻辑值,故障仿真输出集包括故障输出逻辑值。通过确定传输逻辑门并且计算相应的故障输出逻辑值,可以减少故障仿真的计算量,并且减少故障仿真的时间。In a possible implementation manner, determining the fault simulation output set based at least on the determined plurality of transmission logic gates and the fault input set includes: determining whether the logic gate to be calculated is a transmission logic gate; and determining the logic gate to be calculated in response to The gates are transmission logic gates, and a fault output logic value of the logic gate to be calculated is determined using a logic value derived from a fault input set, the fault simulation output set including the fault output logic value. By determining the transmission logic gate and calculating the corresponding fault output logic value, the calculation amount of fault simulation can be reduced, and the time of fault simulation can be reduced.
在一种可能的实现方式中,至少基于逻辑仿真输出集确定逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门包括:基于逻辑仿真输出集和故障输入集,确定故障输入集中的、与逻辑电路中的故障输入端口处对应的原始故障输入是否被激发;以及响应于原始故障输入在故障输入端口被激发,基于逻辑仿真输出集,确定逻辑电路中与故障输入端口相关的逻辑门中的、在多个时间帧中可传递信号的多个传输逻辑门。通过确定是否被激发,可以回溯可被观测的传输逻辑门,从而以简易的方式确定可被观测的逻辑门以减少故障仿真的计算量并且相应地减少仿真时间。In a possible implementation manner, at least based on the logic simulation output set, determining a plurality of transmission logic gates in the logic circuit that can transmit signals in multiple time frames includes: based on the logic simulation output set and the fault input set, determining the fault Whether the original fault input corresponding to the fault input port in the logic circuit in the input set is excited; and in response to the original fault input being excited at the fault input port, based on the logic simulation output set, determine the relationship between the fault input port in the logic circuit Multiple transmission logic gates in a logic gate that can pass signals in multiple time frames. By determining whether to be activated, the observable transmission logic gates can be traced back, so that the observable logic gates can be determined in a simple manner to reduce the calculation amount of fault simulation and correspondingly reduce the simulation time.
在一种可能的实现方式中,至少基于逻辑仿真输出集,确定逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门包括:至少基于逻辑仿真输出集,以多线程的方式并行地确定逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门。由于各个逻辑门的数据在确定传输逻辑门的过程中不被修改,因此各个逻辑门的数据可以被多线程同时访问。通过使用多线程的故障方式可以进一步地减少故障仿真的时间。In a possible implementation manner, at least based on the logic simulation output set, determining a plurality of transmission logic gates in the logic circuit that can transmit signals in multiple time frames includes: at least based on the logic simulation output set, using a multi-threaded The method determines in parallel multiple transmission logic gates in a logic circuit that can transmit signals in multiple time frames. Since the data of each logic gate is not modified during the process of determining the transmission logic gate, the data of each logic gate can be simultaneously accessed by multiple threads. The fault simulation time can be further reduced by using multi-threaded fault mode.
根据本公开的第七方面,提供一种计算机可读存储介质,存储多个程序。多个程序被配置为一个或多个处理器执行,多个程序包括用于执行根据第七方面的方法的指令。According to a seventh aspect of the present disclosure, there is provided a computer-readable storage medium storing a plurality of programs. A plurality of programs are configured to be executed by the one or more processors, the plurality of programs including instructions for performing the method according to the seventh aspect.
根据本公开的第八方面,提供一种计算机程序产品。计算机程序产品包括多个程序,多个程序被配置为一个或多个处理器执行,多个程序包括用于执行根据第七方面的方法的指令。According to an eighth aspect of the present disclosure, a computer program product is provided. The computer program product comprises a plurality of programs configured for execution by one or more processors, the plurality of programs comprising instructions for performing the method according to the seventh aspect.
根据本公开的第九方面,提供一种电子设备。电子设备包括:一个或多个处理器;包括计算机指令的存储器,计算机指令在由电子设备的一个或多个处理器执行时使得电子设备执行根据第七方面的方法。According to a ninth aspect of the present disclosure, there is provided an electronic device. The electronic device comprises: one or more processors; a memory comprising computer instructions which, when executed by the one or more processors of the electronic device, cause the electronic device to perform the method according to the seventh aspect.
根据本公开的第十方面,提供一种电子设备。电子设备包括:接收单元,用于接收针对逻辑电路的逻辑仿真输出集和故障输入集;传输逻辑门确定单元,用于至少基于逻辑仿真输出集确定逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门;以及故障仿真输出集确定单元,用于至少基于所确定的多个传输逻辑门和故障输入集确定故障仿真输出集。通过确定在各个时间帧中可以传递信号的多个传输逻辑门,可以仅计算可传递故障信号的传递路径中的逻辑门的输出值,而不计算不可传递信号的路径中的逻辑门的输出值。这显著降低了故障仿真的计算量,大大节省了故障仿真的时间。According to a tenth aspect of the present disclosure, an electronic device is provided. The electronic device includes: a receiving unit, configured to receive a logic simulation output set and a fault input set for the logic circuit; a transmission logic gate determination unit, configured to determine the logic circuit in multiple time frames based on at least the logic simulation output set. a plurality of transmission logic gates transmitting signals; and a failure simulation output set determining unit for determining a failure simulation output set based at least on the determined plurality of transmission logic gates and the failure input set. By determining the number of transmitting logic gates that can pass the signal in various time frames, it is possible to calculate the output value of only the logic gates in the transmission path of the passable fault signal, but not the output value of the logic gate in the path of the non-transferable signal . This significantly reduces the calculation load of fault simulation and greatly saves the time of fault simulation.
在第十方面的一种可能的实现方式中,传输逻辑门确定单元进一步用于基于逻辑仿真输出集,按照时间帧确定逻辑电路中的时序逻辑门在多个时间帧中的至少一个时间帧中是否被相应地触发;以及响应于逻辑电路中的第一组时序逻辑门在至少一个时间帧中被触发,将与第一组时序逻辑门的输入相关的组合逻辑门和第一组时序逻辑门确定为多个传输逻辑门。通过确定时序逻辑门在时间帧中被触发,可以以简易的方式确定该时序逻辑门是否是传输逻辑门。这可以进一步降低故障仿真的时间并且提高故障仿真的效率。In a possible implementation manner of the tenth aspect, the transmission logic gate determination unit is further configured to determine, based on the logic simulation output set, the sequential logic gate in the logic circuit in at least one of the multiple time frames according to the time frame is triggered accordingly; and in response to the first set of sequential logic gates in the logic circuit being triggered in at least one time frame, combining the combinational logic gates associated with the inputs of the first set of sequential logic gates and the first set of sequential logic gates identified as multiple transfer logic gates. By determining that a sequential logic gate is triggered in a time frame, it can be determined in an easy manner whether the sequential logic gate is a transmission logic gate. This can further reduce the time of fault simulation and improve the efficiency of fault simulation.
在第十方面的一种可能的实现方式中,传输逻辑门确定单元进一步用于基于逻辑仿真输 出集中的、与各个时序逻辑门的时钟端口分别对应的时钟逻辑值,确定逻辑电路中的各个时序逻辑门在多个时间帧中是否被触发。In a possible implementation of the tenth aspect, the transmission logic gate determination unit is further configured to determine each timing in the logic circuit based on the clock logic values in the logic simulation output set corresponding to the clock ports of each sequential logic gate. Whether the logic gate is triggered in multiple timeframes.
在第十方面的一种可能的实现方式中,传输逻辑门确定单元进一步用于确定待计算的逻辑门是否是传输逻辑门;以及响应于确定待计算的逻辑门是传输逻辑门,使用源自故障输入集的逻辑值来确定待计算的逻辑门的故障输出逻辑值,故障仿真输出集包括故障输出逻辑值。通过确定传输逻辑门并且计算相应的故障输出逻辑值,可以减少故障仿真的计算量,并且减少故障仿真的时间。In a possible implementation manner of the tenth aspect, the transfer logic gate determination unit is further configured to determine whether the logic gate to be calculated is a transfer logic gate; and in response to determining that the logic gate to be calculated is a transfer logic gate, using the source from The logic value of the fault input set is used to determine the fault output logic value of the logic gate to be calculated, and the fault simulation output set includes the fault output logic value. By determining the transmission logic gate and calculating the corresponding fault output logic value, the calculation amount of fault simulation can be reduced, and the time of fault simulation can be reduced.
在第十方面的一种可能的实现方式中,传输逻辑门确定单元进一步用于基于逻辑仿真输出集和故障输入集,确定故障输入集中的、与逻辑电路中的故障输入端口处对应的原始故障输入是否被激发;以及响应于原始故障输入在故障输入端口被激发,基于逻辑仿真输出集,确定逻辑电路中与故障输入端口相关的逻辑门中的、在多个时间帧中可传递信号的多个传输逻辑门。通过确定是否被激发,可以回溯可被观测的传输逻辑门,从而以简易的方式确定可被观测的逻辑门以减少故障仿真的计算量并且相应地减少仿真时间。In a possible implementation of the tenth aspect, the transmission logic gate determination unit is further configured to determine the original fault in the fault input set corresponding to the fault input port in the logic circuit based on the logic simulation output set and the fault input set whether the input is activated; and in response to the original fault input being activated at the fault input port, based on the set of logic simulation outputs, determining how many of the logic gates in the logic circuit that are associated with the fault input port can transmit signals in the plurality of time frames transmission logic gates. By determining whether to be activated, the observable transmission logic gates can be traced back, so that the observable logic gates can be determined in a simple manner to reduce the calculation amount of fault simulation and correspondingly reduce the simulation time.
在第十方面的一种可能的实现方式中,传输逻辑门确定单元进一步用于至少基于逻辑仿真输出集,以多线程的方式并行地确定逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门。由于各个逻辑门的数据在确定传输逻辑门的过程中不被修改,因此各个逻辑门的数据可以被多线程同时访问。通过使用多线程的故障方式可以进一步地减少故障仿真的时间。In a possible implementation manner of the tenth aspect, the transmission logic gate determination unit is further configured to determine in parallel in a multi-threaded manner the transferable signals in the logic circuit in multiple time frames based on at least the logic simulation output set multiple transfer logic gates. Since the data of each logic gate is not modified during the process of determining the transmission logic gate, the data of each logic gate can be simultaneously accessed by multiple threads. The fault simulation time can be further reduced by using multi-threaded fault mode.
应当理解,发明内容部分中所描述的内容并非旨在限定本公开的实施例的关键或重要特征,亦非用于限制本公开的范围。本公开的其它特征将通过以下的描述变得容易理解。It should be understood that what is described in the Summary of the Invention is not intended to limit the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will be readily understood through the following description.
附图说明Description of drawings
结合附图并参考以下详细说明,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。在附图中,相同或相似的附图标记表示相同或相似的元素,其中:The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, identical or similar reference numerals denote identical or similar elements, wherein:
图1示出了根据本公开的一些实施例的逻辑电路的仿真系统100的示意图。FIG. 1 shows a schematic diagram of a logic circuit simulation system 100 according to some embodiments of the present disclosure.
图2示出了根据本公开的一些实施例的逻辑电路的仿真流程的示意框图。FIG. 2 shows a schematic block diagram of a simulation process of a logic circuit according to some embodiments of the present disclosure.
图3示出了根据本公开的一些实施例的示意性逻辑电路的示例电路图。FIG. 3 shows an example circuit diagram of an illustrative logic circuit according to some embodiments of the present disclosure.
图4示出了图3中的逻辑电路的分级示意图。FIG. 4 shows a hierarchical schematic diagram of the logic circuit in FIG. 3 .
图5示出了图3中的逻辑电路按时间帧展开的示意图。FIG. 5 shows a schematic diagram of the logic circuit in FIG. 3 expanded in time frames.
图6示出了根据本公开的一些实施例的仿真方法的示意流程图。Fig. 6 shows a schematic flowchart of a simulation method according to some embodiments of the present disclosure.
图7示出了根据本公开的一些实施例的仿真方法的示意流程图。Fig. 7 shows a schematic flowchart of a simulation method according to some embodiments of the present disclosure.
图8示出了根据本公开的一些实施例的具有逻辑仿真背景值的逻辑电路的示意图。FIG. 8 shows a schematic diagram of a logic circuit with logic simulation background values according to some embodiments of the present disclosure.
图9示出了根据本公开的一些实施例的具有可传输标志的逻辑电路的示意图。FIG. 9 shows a schematic diagram of a logic circuit with transferable flags according to some embodiments of the present disclosure.
图10示出了根据本公开的一些实施例的用于描述故障激发的逻辑电路的示意图。FIG. 10 shows a schematic diagram of a logic circuit for describing fault excitation according to some embodiments of the present disclosure.
图11示出了根据本公开的一些实施例的电子设备的示意框图。Fig. 11 shows a schematic block diagram of an electronic device according to some embodiments of the present disclosure.
图12示出了根据本公开的另一些实施例的电子设备的示意框图。Fig. 12 shows a schematic block diagram of an electronic device according to other embodiments of the present disclosure.
图13示出了可以用来实施本公开的一些实施例的示例设备的框图。Figure 13 shows a block diagram of an example device that may be used to implement some embodiments of the present disclosure.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的 实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present 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; A more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for exemplary purposes only, and are not intended to limit the protection scope of the present disclosure.
在本公开的实施例的描述中,术语“包括”及其类似用语应当理解为开放性包含,即“包括但不限于”。术语“基于”应当理解为“至少部分地基于”。术语“一个实施例”或“该实施例”应当理解为“至少一个实施例”。术语“第一”、“第二”等等可以指代不同的或相同的对象。术语“和/或”表示由其关联的两项的至少一项。例如“A和/或B”表示A、B、或者A和B。下文还可能包括其他明确的和隐含的定义。In the description of the embodiments of the present disclosure, the term "comprising" and its similar expressions should be interpreted as an open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be read as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same object. The term "and/or" means at least one of the two items associated with it. For example "A and/or B" means A, B, or A and B. Other definitions, both express and implied, may also be included below.
应理解,本申请实施例提供的技术方案,在以下具体实施例的介绍中,某些重复之处可能不再赘述,但应视为这些具体实施例之间已有相互引用,可以相互结合。It should be understood that for the technical solutions provided by the embodiments of the present application, in the introduction of the following specific embodiments, some repetitions may not be repeated, but it should be considered that these specific embodiments have been referred to each other and can be combined with each other.
如上所述,常规的逻辑仿真或故障仿真都消耗相当长的仿真时间。例如在常规的硬编码逻辑仿真中,硬编码从原始输入开始依次遍历计算逻辑电路中的各个逻辑门的逻辑值。然而,逻辑电路中通常包括一些时序逻辑门,时序逻辑门的逻辑值计算并不仅取决于原始输入或与时序逻辑门耦合的组合逻辑门的输出,还取决于时序逻辑门的状态,例如时序逻辑门的时钟端口的时钟输入以及时序逻辑门彼此的连接关系。因此,硬编码无法一次计算得到完整且准确的逻辑值,而是针对逻辑电路中的时序逻辑门的多个状态重复计算逻辑电路的所有逻辑门的逻辑值。这消耗了大量的计算资源和计算时间。As mentioned above, conventional logic simulation or fault simulation both consume considerable simulation time. For example, in a conventional hard-coded logic simulation, the hard-coded logical values of each logic gate in the computational logic circuit are sequentially traversed from the original input. However, some sequential logic gates are usually included in the logic circuit, and the calculation of the logical value of the sequential logic gate does not only depend on the original input or the output of the combinational logic gate coupled with the sequential logic gate, but also depends on the state of the sequential logic gate, such as the sequential logic The clock input of the clock port of the gate and the connection relationship between the sequential logic gates. Therefore, hard coding cannot obtain a complete and accurate logic value at one time, but repeatedly calculates the logic values of all the logic gates of the logic circuit for multiple states of the sequential logic gates in the logic circuit. This consumes a lot of computing resources and computing time.
在常规的事件驱动逻辑仿真中,通常从原始输入进行广度优先的逻辑仿真。由于处理器在读取描述逻辑电路的网表文件时逻辑电路的各个逻辑门数据并非按照广度优先搜索的方式被存储在存储器中,因此处理器的高速缓存需要始终频繁访问存储器的不同位置以获得各个逻辑门的数据。这消耗了大量访问时间。在本文中,“时序逻辑门”表示具有时钟控制输入的逻辑门。时序逻辑门在任意时刻的输出不仅取决于当时的输入信号,而且还取决于时钟信号和时序逻辑门原来的状态,换言之,还可以与以前的输入有关。时序逻辑门例如包括触发器、寄存器和锁存器等。相对而言,“组合逻辑门”表示不具有时钟控制输入的逻辑门。组合逻辑门在任意时刻的输出仅仅取决于该时刻的输入,而与组合逻辑门原来的状态无关。组合逻辑门例如包括与门、或门、与非门、异或门、非门和缓冲器等。在逻辑电路中,通常时序逻辑门仅占少数比例,而逻辑电路的大部分逻辑门为组合逻辑门。In conventional event-driven logic simulation, breadth-first logic simulation is usually performed from raw input. Since the data of each logic gate of the logic circuit is not stored in the memory in a breadth-first search manner when the processor reads the netlist file describing the logic circuit, the cache of the processor needs to frequently access different locations of the memory to obtain data for each logic gate. This consumes a lot of access time. As used herein, "sequential logic gate" means a logic gate with a clocked input. The output of a sequential logic gate at any moment not only depends on the input signal at that time, but also depends on the clock signal and the original state of the sequential logic gate, in other words, it can also be related to the previous input. Sequential logic gates include, for example, flip-flops, registers, and latches. In contrast, "combinational logic gate" means a logic gate that does not have a clocked input. The output of a combinational logic gate at any moment depends only on the input at that moment, and has nothing to do with the original state of the combinational logic gate. Combination logic gates include, for example, AND gates, OR gates, NAND gates, XOR gates, NOT gates, and buffers. In logic circuits, usually sequential logic gates only account for a small proportion, while most of the logic gates in logic circuits are combinational logic gates.
在本公开的一些实施例中,处理器在读取网表文件之后,将网表文件所描述的逻辑电路中的逻辑门按照逻辑门的类型分级,以将时序逻辑门、原始输入端口和原始输出端口放入第一层级电路,并且将组合逻辑门放入第二层级电路。进一步地,逻辑电路中的逻辑门的数据可以按所分级的层级被存储在存储器中。例如,各个层级电路中的逻辑门的数据可以被存储在存储器中的相邻或附近的位置。处理器可以通过寻址的方式访问存储器以获得待计算的逻辑门的数据。In some embodiments of the present disclosure, after reading the netlist file, the processor classifies the logic gates in the logic circuit described in the netlist file according to the types of logic gates, so as to classify the sequential logic gates, original input ports and original The output ports are placed into the first level of circuitry, and the combinational logic gates are placed into the second level of circuitry. Further, the data of the logic gates in the logic circuit can be stored in the memory according to the hierarchical levels. For example, data for logic gates in various levels of circuitry may be stored in adjacent or nearby locations in memory. The processor can access the memory by addressing to obtain the data of the logic gate to be calculated.
处理器使用来自自动测试向量生成(automatic test pattern generation,ATPG)设备的ATPG数据,具体而言,ATPG数据中针对各个时序逻辑门的时钟端口的原始时钟输入,来确定该时序逻辑门的时钟端口在各个时间帧中的逻辑值。通过计算时序逻辑门的时钟端口的逻辑值,可以确定各个时序逻辑门在多个时间帧中的状态,例如是否被触发。在本文中,“触发”表示时序逻辑门被打开以在时序逻辑门的输出端口输出取决于时序逻辑门的输入和时序逻辑门先前状态的逻辑输出。在时序逻辑门未被触发时,时序逻辑门维持(存储)当前逻辑输出,而与时序逻辑门的逻辑输入无关。通过确定被触发的时序逻辑门,可以正确计算时序逻辑门的逻辑输出和组合逻辑门的逻辑输出,从而实现逻辑仿真。The processor uses the ATPG data from the automatic test pattern generation (ATPG) device, specifically, the raw clock input for the clock port of each sequential logic gate in the ATPG data, to determine the clock port of the sequential logic gate Logical value in each timeframe. By calculating the logic value of the clock port of the sequential logic gate, the state of each sequential logic gate in multiple time frames can be determined, for example, whether it is triggered or not. Herein, "triggered" means that the sequential logic gate is turned on to output a logic output at the output port of the sequential logic gate depending on the input of the sequential logic gate and the previous state of the sequential logic gate. When the sequential logic gate is not triggered, the sequential logic gate maintains (stores) the current logic output regardless of the logic input of the sequential logic gate. By determining the triggered sequential logic gate, the logic output of the sequential logic gate and the logic output of the combinational logic gate can be correctly calculated, thereby realizing logic simulation.
在本公开的一些实施例中,由于逻辑电路中的逻辑门按类型被分级,相同类型的逻辑门的数据因此很大程度上位于相邻或相近的存储区域,例如位于存储器中的相邻或相近的区域。处理器在将某个或某些逻辑门的数据从存储器读入高速缓存(cache)时,由于高速缓存的空间局部性(space locality)设计原理,因此相邻或附近的多个逻辑门的数据会被一起读入高速缓存。在相邻或相近的多个逻辑门的数据被读入高速缓存之后,当处理器在计算完当前逻辑门的逻辑值之后计算下一逻辑门的逻辑值时,由于该下一逻辑门的相关数据已被读入高速缓存,因此无需重新寻址访问存储器。这样,可以大大减少高速缓存访问存储器的次数,从而节省了大量的仿真时间。另一方面,在一些实施例中,由于时序逻辑门的触发状态已被确定,因此在以硬编码的方式按层级电路遍历各个逻辑门(包括时序逻辑门和组合逻辑门)以计算各个逻辑门的输出逻辑值时,也无需像常规硬编码逻辑仿真那样重复遍历全部逻辑门。这可以进一步显著减少逻辑电路的逻辑仿真时间。In some embodiments of the present disclosure, since the logic gates in the logic circuit are classified by type, the data of the logic gates of the same type are largely located in adjacent or close storage areas, for example, in adjacent or close storage areas in the memory. nearby area. When the processor reads the data of one or some logic gates from the memory into the cache (cache), due to the space locality design principle of the cache, the data of adjacent or nearby multiple logic gates will be read into the cache together. After the data of adjacent or similar logic gates are read into the cache, when the processor calculates the logic value of the next logic gate after calculating the logic value of the current logic gate, due to the correlation of the next logic gate Data has already been read into the cache, so memory accesses do not need to be re-addressed. In this way, the number of cache memory accesses can be greatly reduced, thus saving a lot of simulation time. On the other hand, in some embodiments, since the trigger states of the sequential logic gates have been determined, each logic gate (including sequential logic gates and combinational logic gates) is traversed in a hard-coded manner to calculate each logic gate When outputting logic values of , there is no need to repeatedly traverse all logic gates as in conventional hard-coded logic simulation. This can further significantly reduce logic simulation time for logic circuits.
在本公开的一些实施例中,处理器首先使用事件驱动的方式计算时序逻辑门的时钟端口的逻辑值,并且随后使用硬编码的方式计算时序逻辑门和组合逻辑门的逻辑输出。由于时序逻辑门通常仅占逻辑电路的逻辑门的数量的一小部分,因此即使以事件驱动的方式计算时序逻辑门的时钟端口的逻辑值,这也不会造成高速缓存在逻辑仿真期间始终高频访问存储器,从而可以减少逻辑仿真的时间。此外,在处理器计算时序逻辑门和组合逻辑门的逻辑输出时,由于按分级电路的方式依次计算时序逻辑门和组合逻辑门的逻辑输出,并且时序逻辑门的状态通过之前的时钟端口的逻辑输出计算已经确定,因此也无需多次重复计算所有逻辑门的所有逻辑值。这进一步减少了逻辑仿真的时间。In some embodiments of the present disclosure, the processor first calculates the logic value of the clock port of the sequential logic gate in an event-driven manner, and then calculates the logic output of the sequential logic gate and the combinational logic gate in a hard-coded manner. Since sequential logic gates usually represent only a small fraction of the number of logic gates in a logic circuit, even computing the logic value of the clock port of a sequential logic gate in an event-driven manner does not cause the cache to be always high during logic simulation Frequent access to memory, which can reduce the time of logic simulation. In addition, when the processor calculates the logic output of the sequential logic gate and the combinational logic gate, since the logic output of the sequential logic gate and the combinational logic gate is calculated sequentially in the manner of a hierarchical circuit, and the state of the sequential logic gate passes through the logic of the previous clock port The output calculations are already determined, so there is no need to recalculate all logic values for all logic gates multiple times. This further reduces logic simulation time.
图1示出了根据本公开的一些实施例的逻辑电路的仿真系统100的示意图。在一个实施例中,仿真系统100例如包括电子设备10和ATPG设备20。在一个实施例中,电子设备10例如是计算机。电子设备10包括处理器14和存储器12,其中处理器14包括高速缓存16。备选地,在一些实施例中,高速缓存16也可以独立于处理器14,本公开的范围对此不进行限制。ATPG设备20被配置为生成针对逻辑仿真的ATPG数据,并且将ATPG数据传输至电子设备10。虽然在图1中将电子设备10和ATPG设备20独立地限制,但是在一些实施例中,ATPG设备20可以与电子设备10集成在一起,本公开对此不进行限制。电子设备10可以包括输入装置、通信装置、显示器、音频装置等在此未被示出的其它部件。电子设备10例如可以包括台式计算机、笔记本、工作站、服务器等具有计算功能的设备。用于描述逻辑电路的网表文件可以通过各种有线或无线的方式传递至电子设备10。备选地,电子设备10还可以使用存储有网表文件的存储介质来读取该网表文件。ATPG设备20可以针对不同的逻辑电路生成不同的ATPG数据。在一个实施例中,ATPG数据例如包括仿真周期数据、原始数据输入和故障仿真数据等。仿真周期数据例如包括节拍数据,即,用于表示处理器针对逻辑仿真和/或故障仿真所执行的时间帧的数据。逻辑仿真和故障仿真的时间帧可以相同或不同,本公开对此不进行限制。原始输入例如包括在逻辑仿真中针对逻辑电路中的各个原始数据输入端口的原始数据输入和用于计算时序逻辑门的时钟端口的逻辑值的、与原始时钟端口对应的原始时钟输入。由于时间帧通常为多个时间帧,因此针对单个原始数据输入端口的原始数据输入可以是针对该多个时间帧的原始数据输入集,其包括一系列比特值,例如64位比特值。可以理解,取决于时间帧,可以有更多或更少位的比特值,例如32位或128位比特值。故障仿真数据例如包括针对故障数据输入端的故障数据输入。类似地,由于故障仿真中的时间帧通常为多个时间帧,因此针对单个故障输入端的原始故障数据输入可以是故障输入集,其包括 针对该多个时间帧的一系列比特值,例如64位比特值。可以有更多或更少位的比特值。FIG. 1 shows a schematic diagram of a logic circuit simulation system 100 according to some embodiments of the present disclosure. In one embodiment, the simulation system 100 includes, for example, an electronic device 10 and an ATPG device 20 . In one embodiment, the electronic device 10 is, for example, a computer. Electronic device 10 includes processor 14 and memory 12 , wherein processor 14 includes cache memory 16 . Alternatively, in some embodiments, the cache memory 16 may also be independent of the processor 14, and the scope of the present disclosure is not limited thereto. The ATPG device 20 is configured to generate ATPG data for logic simulation and transmit the ATPG data to the electronic device 10 . Although the electronic device 10 and the ATPG device 20 are limited independently in FIG. 1 , in some embodiments, the ATPG device 20 may be integrated with the electronic device 10 , which is not limited by the present disclosure. The electronic device 10 may include input devices, communication devices, displays, audio devices and other components not shown here. The electronic device 10 may include, for example, devices with computing functions such as desktop computers, notebooks, workstations, and servers. The netlist file used to describe the logic circuit can be transmitted to the electronic device 10 in various wired or wireless ways. Alternatively, the electronic device 10 may also use a storage medium storing the netlist file to read the netlist file. The ATPG device 20 can generate different ATPG data for different logic circuits. In one embodiment, the ATPG data includes, for example, simulation cycle data, raw data input, fault simulation data, and the like. Simulation cycle data includes, for example, tick data, ie, data representing a time frame in which a processor is executed for logic simulation and/or fault simulation. The time frames of logic simulation and fault simulation may be the same or different, which is not limited in the present disclosure. The original input includes, for example, the original data input for each original data input port in the logic circuit in the logic simulation and the original clock input corresponding to the original clock port used to calculate the logic value of the clock port of the sequential logic gate. Since a time frame is usually multiple time frames, the raw data input for a single raw data input port may be a raw data input set for the multiple time frames, which includes a series of bit values, eg 64-bit bit values. It will be appreciated that, depending on the time frame, there may be more or fewer bit values, eg 32 or 128 bit values. The fault simulation data includes, for example, fault data inputs for fault data inputs. Similarly, since time frames in fault simulation are usually multiple time frames, the raw fault data input for a single fault input can be a fault input set that includes a series of bit values for the multiple time frames, e.g. 64-bit bit value. There can be more or fewer bit values.
图2示出了根据本公开的一些实施例的仿真流程200的示意图。在一个实施例中,仿真流程200由图1的电子设备10执行,因此针对电子设备10的描述内容可以适用于仿真流程200。仿真流程例如可以包括逻辑仿真210和故障仿真220。逻辑仿真210使用来自ATPG设备20的ATPG数据202和通过无线、有线或读取存储介质方式获得的网表文件204。网表文件204包括用于描述逻辑电路中的各个逻辑门(包括时序逻辑门和组合逻辑门)、原始输入、原始输出以及各个部件之间的耦合关系等数据。电子设备10可以执行逻辑仿真210以生成逻辑仿真输出集。逻辑仿真210的具体过程可以参见下文。该逻辑仿真输出集可以用于故障仿真220。故障仿真220除了使用该逻辑仿真输出集之外,还使用来自ATPG设备20的故障输入集222。故障仿真220具有故障输入集222和逻辑仿真输出集生成故障仿真输出集224。备选地,故障仿真220还可以使用独立于逻辑仿真210的逻辑仿真输出集和故障输入集222来生成故障仿真输出集224。故障仿真220还可以生成用于自动测试设备(auto test equipment,ATE)的测试向量。在生成故障仿真输出集224之后,电子设备10可以基于故障仿真输出集224和预期故障结果生成故障覆盖包括228。故障仿真220的具体过程可以参见下文。FIG. 2 shows a schematic diagram of a simulation process 200 according to some embodiments of the present disclosure. In one embodiment, the simulation process 200 is executed by the electronic device 10 in FIG. 1 , so the content described for the electronic device 10 can be applied to the simulation process 200 . The simulation process may include logic simulation 210 and fault simulation 220 , for example. The logic simulation 210 uses the ATPG data 202 from the ATPG device 20 and the netlist file 204 obtained through wireless, wired or reading storage media. The netlist file 204 includes data for describing various logic gates (including sequential logic gates and combinational logic gates), original inputs, original outputs, and coupling relationships among various components in the logic circuit. Electronic device 10 may perform logic simulation 210 to generate a set of logic simulation outputs. The specific process of the logic simulation 210 can be referred to below. This set of logic simulation outputs can be used in fault simulation 220 . Fault simulation 220 uses a set of fault inputs 222 from ATPG device 20 in addition to the set of logic simulation outputs. Fault simulation 220 has a set of fault inputs 222 and a set of logic simulation outputs to generate a set of fault simulation outputs 224 . Alternatively, fault simulation 220 may also use a set of logic simulation outputs and a set of fault inputs 222 independent of logic simulation 210 to generate set of fault simulation outputs 224 . Fault simulation 220 may also generate test vectors for automatic test equipment (ATE). After generating set of fault simulation outputs 224 , electronic device 10 may generate fault coverage include 228 based on set of fault simulation outputs 224 and expected fault outcomes. The specific process of fault simulation 220 can be referred to below.
图3示出了根据本公开的一些实施例的示意性逻辑电路30的示例电路图。逻辑电路30仅是用于说明本公开的原理,而非对本公开的范围进行限制。可以理解,还可以有其它配置的逻辑电路。逻辑电路30例如可以包括第一原始数据输入PI1、与门31、第一触发器U1、第二原始数据输入PI2、反相器32、第二触发器U2、第一缓冲器33、第二缓冲器34和原始输出PO。与门31的输入耦合至第一原始数据输入PI1和第一触发器U1的输出。第一触发器U1的时钟端口C1被配置为接收第一时钟信号,第一触发器U1的复位端耦合至第二缓冲器34的输出,并且第一触发器U1的输出耦合至原始输出PO。反相器32的输入耦合至第二原始数据输入PI2,并且反相器32的输出耦合至第二触发器U2的输入端。第二触发器U2的时钟端口C2被配置为接收第二时钟信号,并且第二触感器U2的输出耦合至第一缓冲器33的输入,并且第一缓冲器33的输出耦合至第二缓冲器34的输入。逻辑电路30包括第一类时序逻辑门和第二类组合逻辑门。第一类时序逻辑门包括第一缓冲器U1和第二缓冲器U2,而第二类组合逻辑门包括与门31、反相器32、第一缓冲器33和第二缓冲器34。FIG. 3 shows an example circuit diagram of an illustrative logic circuit 30 according to some embodiments of the present disclosure. The logic circuit 30 is only used to illustrate the principle of the present disclosure, but not to limit the scope of the present disclosure. It is understood that other configurations of logic circuits are also possible. The logic circuit 30 may include, for example, a first original data input PI1, an AND gate 31, a first flip-flop U1, a second original data input PI2, an inverter 32, a second flip-flop U2, a first buffer 33, a second buffer device 34 and the original output PO. The input of the AND gate 31 is coupled to the first raw data input PI1 and the output of the first flip-flop U1. The clock port C1 of the first flip-flop U1 is configured to receive the first clock signal, the reset terminal of the first flip-flop U1 is coupled to the output of the second buffer 34 , and the output of the first flip-flop U1 is coupled to the original output PO. The input of the inverter 32 is coupled to the second raw data input PI2, and the output of the inverter 32 is coupled to the input of the second flip-flop U2. The clock port C2 of the second flip-flop U2 is configured to receive the second clock signal, and the output of the second haptic U2 is coupled to the input of the first buffer 33, and the output of the first buffer 33 is coupled to the second buffer 34 inputs. The logic circuit 30 includes a first type of sequential logic gate and a second type of combinational logic gate. The first type of sequential logic gates includes a first buffer U1 and a second buffer U2 , and the second type of combinational logic gates includes an AND gate 31 , an inverter 32 , a first buffer 33 and a second buffer 34 .
图4示出了图3中的逻辑电路的分级示意图。在本公开的一些实施例中,处理器在逻辑仿真过程中,根据网表文件所描述的逻辑电路中各个逻辑门的耦合关系,将逻辑电路拆分为两个层级的电路,其中第一层级电路包括时序逻辑门、原始输入和原始输出,并且第二层级电路包括组合逻辑门。在另一些实施例中,还可以针对组合逻辑门与第一层级电路的关系以及组合逻辑门彼此之间的关系,进一步分级第二层级电路。例如,第二层级电路包括第一子层级电路、第二子层级电路……第N子层级电路,其中N表示大于1的整数,并且N的具体数值取决于待仿真的逻辑电路。在一个实施例中,第一子层级电路包括与第一层级电路直接耦合的组合逻辑门,第二子层级电路包括与第一子层级电路直接耦合的组合逻辑门,以此类推。FIG. 4 shows a hierarchical schematic diagram of the logic circuit in FIG. 3 . In some embodiments of the present disclosure, during the logic simulation process, the processor splits the logic circuit into two levels of circuits according to the coupling relationship of each logic gate in the logic circuit described in the netlist file, wherein the first level The circuits include sequential logic gates, primitive inputs and primitive outputs, and the second level circuits include combinational logic gates. In some other embodiments, the second-level circuits can be further classified with respect to the relationship between the combinational logic gates and the first-level circuits and the relationship between the combinational logic gates. For example, the second-level circuit includes a first sub-level circuit, a second sub-level circuit...Nth sub-level circuit, where N represents an integer greater than 1, and the specific value of N depends on the logic circuit to be simulated. In one embodiment, the first sub-level circuit includes combinational logic gates directly coupled to the first sub-level circuit, the second sub-level circuit includes combinational logic gates directly coupled to the first sub-level circuit, and so on.
在图4所示的实施例中,逻辑电路30可以被分为3个层级,其中图4中所示的0级对应于第一层级电路,1级对应于第二层级电路的第一子层级电路,并且2级对应于第二层级电路的第二子层级电路。第一层级电路包括原始输出PO、第一原始数据输入PI1、第二原始数据输入PI2、第一触发器U1和第二触发器U2。第一子层级电路包括与门31、第一缓冲器33和反相器32。第二子层级电路包括第二缓冲器34。在一些情形下,时钟信号并未被直接施加 至时序逻辑门的时钟端口,而是经由一个或多个组合逻辑门施加至第一层级电路的时序逻辑门的时钟端口。在此情形下,第二层级电路可以不包括在原始时钟输入端口到时序逻辑门的时钟端口之间的组合逻辑门。In the embodiment shown in FIG. 4, the logic circuit 30 can be divided into three levels, wherein level 0 shown in FIG. 4 corresponds to the first level circuit, and level 1 corresponds to the first sublevel of the second level circuit circuit, and level 2 corresponds to the second sub-level circuit of the second level circuit. The first level circuit includes an original output PO, a first original data input PI1, a second original data input PI2, a first flip-flop U1 and a second flip-flop U2. The first sub-level circuit includes an AND gate 31 , a first buffer 33 and an inverter 32 . The second sub-level circuit includes a second buffer 34 . In some cases, the clock signal is not directly applied to the clock port of the sequential logic gate, but is applied to the clock port of the sequential logic gate of the first level circuit via one or more combinational logic gates. In this case, the second level circuit may not include combinational logic gates between the original clock input port to the clock port of the sequential logic gate.
图5示出了图3中的逻辑电路按时间帧展开的示意图。图4示出了逻辑电路在一个时间帧中的分级示意,但是逻辑仿真通常并不针对单个时间帧,而是针对多个时间帧以仿真在不同输入下的逻辑输出。此外,对于时序逻辑门而言,通常时钟端口上的单个逻辑电平并不能反映其是否被触发,而是需要相继的多个逻辑电平来确定。例如,寄存器需要时钟端口上的从低电平(逻辑“0”)到高电平(逻辑“1”)的跳变来触发。因此,针对具有时序逻辑门的逻辑电路,需要多个时间帧来确定是否存在触发。FIG. 5 shows a schematic diagram of the logic circuit in FIG. 3 expanded in time frames. Fig. 4 shows a hierarchical diagram of a logic circuit in a time frame, but logic simulation usually does not target a single time frame, but multiple time frames to simulate logic outputs under different inputs. In addition, for sequential logic gates, usually a single logic level on the clock port does not reflect whether it is triggered, but requires multiple consecutive logic levels to determine. For example, a register requires a low (logic "0") to high (logic "1") transition on the clock port to trigger. Therefore, for logic circuits with sequential logic gates, multiple time frames are required to determine whether a trigger is present.
时钟信号通常以脉冲形式提供,并且包括例如“...10101010…”之类的一系列高低脉冲,如图5中上方所示在一个实施例中,可以采用“010”的时钟信号的片段来确定是否存在触发。例如,可以选择时钟信号为“0”(低电平)的后一半时段作为上述“010”片段的第一个“0”,使用时钟信号的相继的完整的“1”(高电平)作为上述“010”片段的“1”,并且使用时钟信号的相继的“0”的前一半时段作为上述“010”片段的第二个“0”。这样,一个时钟周期对应于用于确定触发是否存在的一个周期。该时钟周期包括三个逻辑值,因此对应于3个时间帧。备选地,也可以使用“101”的时钟信号的片段来确定是否存在触发。The clock signal is usually provided in the form of pulses and includes a series of high and low pulses such as "...10101010...", as shown in the upper part of Figure 5. In one embodiment, a segment of the clock signal of "010" can be used to Determine if a trigger exists. For example, you can select the second half of the period when the clock signal is "0" (low level) as the first "0" of the above "010" segment, and use the successive complete "1" (high level) of the clock signal as The "1" of the above "010" segment, and use the first half period of successive "0"s of the clock signal as the second "0" of the above "010" segment. Thus, one clock cycle corresponds to one cycle for determining the presence or absence of a trigger. This clock cycle consists of three logic values and thus corresponds to 3 time frames. Alternatively, a segment of the clock signal of "101" may also be used to determine whether a trigger exists.
图5中示出了逻辑电路30的对应于一个周期的3个时间帧的时间帧展开示意图。帧0对应于上述“010”片段的第一个“0”,帧1对应于上述“010”片段的“1”,并且帧2对应于上述“010”片段的第二个“0”。由于逻辑仿真通常包括多个原始输入集以确定逻辑电路在不同输入下的仿真结果,例如针对第一原始数据输入PI1的逻辑输入值例如为第一逻辑输入集,其例如可以包括64位比特值。因此,可以需要M个周期来进行仿真,其中M表示大于1的整数,例如64。对于图5的帧展开而言,需要将逻辑电路30展开为3M个时间帧。逻辑电路30在各个时间帧中的展开具有基本上相同的分级形式,因此在此不再重复描述。FIG. 5 shows a time frame expansion schematic diagram of three time frames corresponding to one cycle of the logic circuit 30 . Frame 0 corresponds to the first "0" of the aforementioned "010" segment, frame 1 corresponds to the "1" of the aforementioned "010" segment, and frame 2 corresponds to the second "0" of the aforementioned "010" segment. Since the logic simulation usually includes a plurality of original input sets to determine the simulation results of the logic circuit under different inputs, for example, the logic input value for the first original data input PI1 is, for example, the first logic input set, which may include, for example, a 64-bit bit value . Therefore, M cycles may be required for simulation, where M represents an integer greater than 1, such as 64. For the frame expansion of FIG. 5 , it is necessary to expand the logic circuit 30 into 3M time frames. The expansion of the logic circuit 30 in each time frame has basically the same hierarchical form, so the description will not be repeated here.
图6示出了根据本公开的一些实施例的仿真方法600的示意流程图。仿真方法600用于逻辑仿真,例如可以是图2中的逻辑仿真210的一种实现方式,因此上面针对图1-图5所述的各个方面可以适用于仿真方法600,在此不再赘述。处理器14例如可以通过有线、无线或读取存储介质的方式接收描述逻辑电路的网表文件。网表文件包括了用于描述各个逻辑门、原始输入和原始输出、各个部件之间的连接关系等各种数据。在602,处理器14可以基于表示逻辑电路的网表文件对逻辑电路进行分级以确定第一层级电路和第二层级电路。第一层级电路包括多个时序逻辑门和多个原始输入,并且第二层级电路包括多个组合逻辑门。在一个实施例中,第一层级电路例如是图4中的0级电路,第二层级电路例如包括图4中的1级电路和2级电路。在另一实施例中,第二层级电路例如包括第一子层级电路和第二子层级电路,其中第一子层级电路包括图4中的1级电路,并且第二子层级电路包括图4中的2级电路。在一个实施例中,与第一层级电路对应的数据被存储在存储器12中的相近或相邻的第一区域,并且与第二层级电路对应的数据被存储在存储器12中的相近或相邻的第二区域。更进一步地,与第二层级电路中的第一子层级电路对应的数据被存储在第二区域中相邻或相近的第一子区域,并且与第二层级电路中的第一子层级电路对应的数据被存储在第二区域中相邻或相近的第二子区域。当处理器14对存储器12进行寻址访问以获取某个逻辑门的数据时,由于高速缓存16的空间局部性的设计原理,因此处理器14可以将该逻辑门的数据附近的数据读入高速缓存16。当处理器14对该逻辑门的数据处理完成之后需要处理下一逻辑门的数据 时,由于下一逻辑门的数据已被读入高速缓存16,因此无需再次寻址访问存储器12,这节省了大量存取访问时间。Fig. 6 shows a schematic flowchart of a simulation method 600 according to some embodiments of the present disclosure. The simulation method 600 is used for logic simulation, for example, it can be an implementation of the logic simulation 210 in FIG. 2 , so the various aspects described above with respect to FIGS. 1-5 can be applied to the simulation method 600 , which will not be repeated here. The processor 14 may receive, for example, a netlist file describing a logic circuit via wire, wirelessly, or by reading a storage medium. The netlist file includes various data used to describe each logic gate, original input and original output, and connection relationship between various components. At 602, processor 14 may rank logic circuits based on a netlist file representing the logic circuits to determine first-level circuits and second-level circuits. The first level of circuitry includes a plurality of sequential logic gates and a plurality of primitive inputs, and the second level of circuitry includes a plurality of combinational logic gates. In one embodiment, the first level circuit is, for example, the level 0 circuit in FIG. 4 , and the second level circuit includes, for example, the level 1 circuit and the level 2 circuit in FIG. 4 . In another embodiment, the second-level circuit includes, for example, a first sub-level circuit and a second sub-level circuit, wherein the first sub-level circuit includes the level 1 circuit in FIG. 4 , and the second sub-level circuit includes the circuit in FIG. 4 2-level circuit. In one embodiment, data corresponding to a first level of circuitry is stored in an adjacent or adjacent first area of memory 12, and data corresponding to a second level of circuitry is stored in an adjacent or adjacent area of memory 12. of the second area. Furthermore, the data corresponding to the first sub-level circuit in the second level circuit is stored in the adjacent or close first sub-region in the second area, and corresponds to the first sub-level circuit in the second level circuit The data are stored in adjacent or similar second sub-areas in the second area. When the processor 14 performs addressing access to the memory 12 to obtain the data of a certain logic gate, due to the design principle of the spatial locality of the cache memory 16, the processor 14 can read the data near the data of the logic gate into the high-speed Cache16. When the processor 14 needs to process the data of the next logic gate after the data processing of the logic gate is completed, since the data of the next logic gate has been read into the cache memory 16, there is no need to address and access the memory 12 again, which saves Lots of access times.
可以理解,受限于存储器12的物理布局限制以及逻辑门的众多数量,在一些实施例中,当第一区域或第二区域无法容纳所有的对应层级电路的数据时,可以将层级电路的一部分数据存储在其它位置。这仅增加少量处理器对存储器12进行寻址访问的次数,对于逻辑仿真的总时间的影响并不显著。通过将逻辑电路分级,可以将逻辑电路中的逻辑门按照层级存储,并且在按层级电路处理逻辑门的数据时避免了处理器14频繁访问存储器12,这可以显著减少逻辑仿真的时间。It can be understood that limited by the physical layout of the memory 12 and the large number of logic gates, in some embodiments, when the first region or the second region cannot accommodate all the data of the corresponding hierarchical circuit, a part of the hierarchical circuit can be Data is stored elsewhere. This only increases the number of addressing accesses to the memory 12 by a small number of processors, and has no significant impact on the total time of logic simulation. By grading the logic circuit, the logic gates in the logic circuit can be stored according to the level, and the processor 14 is prevented from frequently accessing the memory 12 when processing the data of the logic gate according to the level circuit, which can significantly reduce the time of logic simulation.
如上所述,处理器14使用时间帧数据来按照时间帧进行逻辑仿真。在一些实施例中,处理器14基于自动测试向量生成数据中的仿真周期数据,确定时间帧数据。如上所述,由于逻辑仿真通常在原始数据输入处提供多个逻辑输入值,例如64位比特值,因此需要多个周期,例如64个周期,来进行逻辑仿真。对应地,需要比周期数更多倍的时间帧(例如64*3=192个时间帧)来计算逻辑门的逻辑仿真值。处理器14从ATPG设备20接收ATPG数据。APTG数据可以包括仿真周期数据,例如表示64个测试周期的数据。备选地,APTG数据可以直接包括多个时间帧数据,例如表示192个时间帧的数据。在此情形下,处理器14可以将该数据直接确定为时间帧数据。在本公开的一个实施例中,可以按照时间帧的顺序,依次计算在每个时间帧中的各个逻辑门(包括时序逻辑门和组合逻辑门)的逻辑值,例如时钟端口的逻辑值和输出逻辑值。在计算完该时间帧之后,再计算下一时间帧中的各个逻辑门(包括时序逻辑门和组合逻辑门)的逻辑值,例如时钟端口的逻辑值和输出逻辑值。备选地,可以计算每个层级电路在所有时间帧的逻辑值之后再计算下一层级电路在所有时间帧的逻辑值。As described above, the processor 14 uses the time frame data to perform logic simulations by time frame. In some embodiments, processor 14 determines the time frame data based on simulation cycle data in the automated test vector generation data. As mentioned above, since logic simulation typically provides multiple logic input values, such as 64-bit bit values, at the raw data input, multiple cycles, such as 64 cycles, are required to perform the logic simulation. Correspondingly, more time frames (for example, 64*3=192 time frames) than the number of cycles are needed to calculate the logic simulation value of the logic gate. Processor 14 receives ATPG data from ATPG device 20 . APTG data may include simulation cycle data, eg, data representing 64 test cycles. Alternatively, the APTG data may directly include multiple time frame data, for example, data representing 192 time frames. In this case, processor 14 may directly determine the data as time frame data. In an embodiment of the present disclosure, the logic values of each logic gate (including sequential logic gates and combinational logic gates) in each time frame can be sequentially calculated according to the order of the time frames, such as the logic value and output of the clock port logical value. After the time frame is calculated, the logic values of each logic gate (including sequential logic gates and combinational logic gates) in the next time frame are calculated, such as the logic value and output logic value of the clock port. Alternatively, after calculating the logic value of each level circuit in all time frames, the logic value of the next level circuit in all time frames may be calculated.
在604,处理器14基于ATPG数据中的原始时钟输入数据集和时间帧数据确定多个时序逻辑门的时钟输入端口在多个时间帧中的时钟逻辑值集。逻辑电路通常包括针对时序逻辑门的时钟端口的原始时钟输入端口,该原始时钟输入端口例如接收来自原始数据输入集中的原始时钟输入集。在一些实施例中,逻辑电路可以在原始时钟输入端口和时序逻辑门的时钟端口之间具有一个或多个组合逻辑门(图3中未示出)。At 604, the processor 14 determines clock logic value sets of clock input ports of the plurality of sequential logic gates in the plurality of time frames based on the original clock input data set and the time frame data in the ATPG data. A logic circuit typically includes a raw clock input port for a clock port of a sequential logic gate that receives, for example, a raw clock input set from a raw data input set. In some embodiments, the logic circuit may have one or more combinational logic gates (not shown in FIG. 3 ) between the raw clock input port and the clock port of the sequential logic gate.
在一个实施例中,可以从原始时钟输入端口以事件驱动的方式确定时序逻辑门的时钟端口在各个时间中的时钟逻辑值。例如,在一个时间帧中,处理器14将原始数据输入端口加入事件队列,并且将原始时钟输入端口与多个时序逻辑门之间的组合逻辑门加入事件队列。In one embodiment, the clock logic value of the clock port of the sequential logic gate at each time can be determined from the original clock input port in an event-driven manner. For example, in one time frame, the processor 14 adds the original data input port to the event queue, and adds the combinational logic gate between the original clock input port and multiple sequential logic gates to the event queue.
处理器14继而按照先入先出的顺序依次计算原始时钟输入端口与多个时序逻辑门之间的组合逻辑门的输出逻辑值。在此之后,处理器14基于输出逻辑值确定第一层级电路中的多个时序逻辑门的时钟端口的时钟逻辑值集。例如,处理器14判断当前待计算的逻辑门是否是时序逻辑门。如果不是时序逻辑门,则计算该逻辑门的输出逻辑值,并且将该逻辑门的后续节点的逻辑门加入事件队列。如果是时序逻辑门,则可以确定已经从原始时钟输入端口计算到时序逻辑门。可以计算下一原始时钟输入端口到下一时序逻辑门的时钟端口的各个组合逻辑门的输出逻辑值,并且继而确定下一时序逻辑门的时钟端口的时钟逻辑值。以此类推,直至计算完成所有时序逻辑门的时钟端口的时钟逻辑值。在计算完成当前时间帧之后,再重复上述过程计算下一时间帧,直至所有时间帧中的所有时钟端口的时钟逻辑值都被计算以确定时钟逻辑值集。The processor 14 then sequentially calculates the output logic values of the combinatorial logic gates between the original clock input port and the multiple sequential logic gates in a first-in-first-out order. After that, the processor 14 determines a set of clock logic values of the clock ports of the plurality of sequential logic gates in the first-level circuit based on the output logic values. For example, the processor 14 judges whether the current logic gate to be calculated is a sequential logic gate. If it is not a sequential logic gate, the output logic value of the logic gate is calculated, and the logic gate of the subsequent node of the logic gate is added to the event queue. If it is a sequential logic gate, it can be determined that it has been calculated from the original clock input port to the sequential logic gate. The output logic value of each combinatorial logic gate from the next original clock input port to the clock port of the next sequential logic gate can be calculated, and then the clock logic value of the clock port of the next sequential logic gate can be determined. By analogy, until the clock logic values of the clock ports of all sequential logic gates are calculated. After the current time frame is calculated, the above process is repeated to calculate the next time frame until the clock logic values of all clock ports in all time frames are calculated to determine the clock logic value set.
由于时序逻辑门在逻辑电路中通常仅占相对少的比例,因此待计算的时序逻辑门的时钟端口也相应地较少。即使以事件驱动的方式来计算,这也对于逻辑仿真的时间总体影响不大。 此外,由于逻辑电路已被分级并且原始时钟输入端口和时序逻辑门之间并无其它时序逻辑门,因此可以直接确定时钟端口的逻辑值。在以事件驱动的方式计算完第一层级电路中的所有时序逻辑门的时钟端口在各个时间帧中的时钟逻辑值之后,可以获得时序逻辑门的时钟输入端口在时间帧数据指示的多个时间帧中的时钟逻辑值集。Since the sequential logic gates generally only occupy a relatively small proportion in a logic circuit, the clock ports of the sequential logic gates to be calculated are correspondingly less. Even when calculated in an event-driven manner, this generally has little impact on logic simulation time. Furthermore, since the logic circuit is staged and there are no other sequential logic gates between the original clock input port and the sequential logic gate, the logic value of the clock port can be directly determined. After the clock logic values of the clock ports of all sequential logic gates in the first-level circuit in each time frame are calculated in an event-driven manner, multiple times indicated by the time frame data of the clock input ports of the sequential logic gate can be obtained Set of clock logic values in a frame.
在图3的实施例中,可以计算第一触发器U1和第二触发器U2的时钟端口在各个时间帧中的时钟逻辑值,并且据此可以判断第一触发器U1和第二触发器U2是否在此期间被触发。例如,如果第一触发器U1的时钟端口在帧0被确定为“0”,在帧1被确定为“1”,并且在帧“2”被确定为“0”,则可以确定第一触发器U1在包括帧0-帧2的时钟周期内被触发。如果第二触发器U2的时钟端口在帧0-帧2期间始终被确定为“0”,则可以确定第二触发器U2在包括帧0-帧2的时钟周期内未被触发。因此,处理器14可以进一步确定时序逻辑门在包括多个时间帧的时钟周期内是否被触发。In the embodiment of FIG. 3, the clock logic values of the clock ports of the first flip-flop U1 and the second flip-flop U2 in each time frame can be calculated, and based on this, the first flip-flop U1 and the second flip-flop U2 can be judged Whether to be triggered during this time. For example, if the clock port of the first flip-flop U1 is determined to be "0" at frame 0, "1" at frame 1, and "0" at frame "2", then the first flip-flop can be determined U1 is toggled during the clock cycle including Frame 0-Frame 2. If the clock port of the second flip-flop U2 is always determined to be "0" during frame 0-frame 2, it can be determined that the second flip-flop U2 is not triggered during the clock period including frame 0-frame 2. Accordingly, processor 14 may further determine whether a sequential logic gate is triggered within a clock cycle comprising a plurality of time frames.
在606,处理器14基于时钟逻辑值集和原始数据输入集,确定逻辑仿真输出集。逻辑仿真输出集包括第一层级电路中的多个时序逻辑门和第二层级电路中的多个组合逻辑门的输出端口在时间帧数据指示的时间帧中的输出逻辑值。在一个实施例中,当处理器14计算完所有的时序逻辑门的时钟端口的时钟逻辑值之后,可以按层级电路的顺序将逻辑门放入待计算队列。随后处理器14以硬编码的方式遍历所有逻辑门以按序依次计算队列中各个逻辑门在各个时间帧中的输出逻辑值,从而获得针对该逻辑电路的逻辑仿真输出集。At 606, processor 14 determines a set of logic simulation outputs based on the set of clocked logic values and the set of raw data inputs. The logic simulation output set includes the output logic values of the output ports of the multiple sequential logic gates in the first-level circuit and the multiple combinational logic gates in the second-level circuit in the time frame indicated by the time frame data. In one embodiment, after the processor 14 has calculated the clock logic values of the clock ports of all the sequential logic gates, the logic gates may be put into a queue to be calculated in the order of the hierarchical circuits. Then the processor 14 traverses all the logic gates in a hard-coded manner to sequentially calculate the output logic values of each logic gate in the queue in each time frame, so as to obtain a logic simulation output set for the logic circuit.
在一个实施例中,基于时钟逻辑值集和原始数据输入集确定逻辑仿真输出集包括:使用时钟逻辑值集和原始数据输入集来按照层级电路的顺序依次确定第一层级电路和第二层级电路中的多个逻辑门的多个输出逻辑值。逻辑仿真输出集包括所述多个输出逻辑值。例如,参见图4,假设帧0为时间帧数据指示的第一帧,由于第一层级电路中包括的原始输入端口的原始数据输入在此无需被计算,因此处理器14计算与原始输入端口直接连接的第二层级电路中的第一子层级电路(即,与门31、第一缓冲器33和反相器32)。由于第一子层级电路中的各个逻辑门被相邻或相近存储,因此处理器14例如在从存储器12中将与门31的数据读入高速缓存时,可以将第一缓冲器33和反相器32的数据也一起读入高速缓存。当处理器14在计算完与门31的输出逻辑值之后计算第一缓冲器33和反相器32的输出逻辑值时,由于第一缓冲器33和反相器32的数据已被读入高速缓存,因此无需再次访问存储器,这减少了仿真时间。当逻辑电路的数量显著增大时,这带来的优势更为明显。例如,当第一子层级电路包括100个逻辑门时,假设处理器14每次从存储器12读取相邻的10个逻辑门的数据,则处理器14只需访问存储器12十次。相比于常规的事件驱动,处理器14频繁访问存储器(例如,针对100个逻辑门可能最多要访问存储器100次),可能能减少90%的访问时间。In one embodiment, determining the logic simulation output set based on the clock logic value set and the original data input set includes: using the clock logic value set and the original data input set to sequentially determine the first-level circuit and the second-level circuit according to the order of the level circuits Multiple output logic values for multiple logic gates in . The logic simulation output set includes the plurality of output logic values. For example, referring to FIG. 4 , assuming that frame 0 is the first frame indicated by the time frame data, since the original data input of the original input port included in the first-level circuit need not be calculated here, the calculation of the processor 14 is directly related to the original input port. The first sub-level circuits (ie, the AND gate 31 , the first buffer 33 and the inverter 32 ) in the second level of circuits are connected. Since each logic gate in the first sub-level circuit is stored adjacently or close to each other, the processor 14 can, for example, read the data of the AND gate 31 from the memory 12 into the cache, and can invert the sum of the first buffer 33 and The data of the device 32 is also read into the cache together. When the processor 14 calculates the output logic value of the first buffer 33 and the inverter 32 after calculating the output logic value of the AND gate 31, since the data of the first buffer 33 and the inverter 32 have been read into the high-speed cache so that memory does not need to be accessed again, which reduces simulation time. This advantage becomes even more pronounced when the number of logic circuits increases significantly. For example, when the first sub-level circuit includes 100 logic gates, assuming that the processor 14 reads data of 10 adjacent logic gates from the memory 12 each time, the processor 14 only needs to access the memory 12 ten times. Compared with conventional event-driven, the processor 14 frequently accesses the memory (for example, for 100 logic gates, the memory may be accessed at most 100 times), which may reduce the access time by 90%.
在此之后,处理器14再计算帧0中的第二子层级电路中的逻辑门(即,第二缓冲器34)的输出逻辑值、帧1中的第一层级电路(即,第一触发器U1和第二触发器U2)的输出逻辑值、帧1中的第一子层级电路(即,与门31、第一缓冲器33和反相器32)的输出逻辑值……以此类推,直至所有时间帧中的所有逻辑门的输出逻辑值都被计算,以得到针对该逻辑电路的逻辑仿真输出集。After that, the processor 14 calculates the output logic value of the logic gate (that is, the second buffer 34 ) in the second sub-level circuit in frame 0, the first-level circuit in frame 1 (that is, the first trigger U1 and second flip-flop U2), the output logic value of the first sub-level circuit (ie, AND gate 31, first buffer 33 and inverter 32) in frame 1... and so on , until the output logic values of all logic gates in all time frames are calculated to obtain a logic simulation output set for the logic circuit.
综上所述,通过将逻辑电路分级并且按分级存储逻辑门的数据,并且通过首先确定时序逻辑门的时钟端口的时钟逻辑值再随后遍历所有逻辑门以计算在各个时间帧中的所有逻辑门的输出逻辑值,可以显著减少逻辑仿真的时间。To sum up, by classifying the logic circuit and storing the data of the logic gates hierarchically, and by first determining the clock logic value of the clock port of the sequential logic gate and then traversing all the logic gates to calculate all the logic gates in each time frame The output logic value can significantly reduce the time of logic simulation.
在获得逻辑仿真输出集之后,处理器14可以使用该逻辑仿真输出集进行故障仿真。备选 地,也可以使用与方法600独立的逻辑仿真输出集作为故障仿真的背景来进行故障仿真。故障仿真是以逻辑仿真的结果作为背景,判断输入的故障集中哪些故障能够被检测到的技术。After obtaining the logic simulation output set, the processor 14 can use the logic simulation output set to perform fault simulation. Alternatively, a logic simulation output set independent from method 600 may also be used as a background for fault simulation for fault simulation. Fault simulation uses the results of logic simulation as the background to determine which faults can be detected in the input fault set.
常规故障仿真包括单故障向量并行仿真技术(parallel pattern single fault propagation,PPSFP)等。PPSFP是基于事件驱动和机器字并行的算法思想。在逻辑仿真时从原始输入和时序门进行广度优先的搜索,直到网表里所有门的逻辑值计算完成。在故障仿真时,在故障的对应位置激发故障,并且以此为起点进行广度优先的搜索,搜索队列里面为空时结束。由于PPSFP在故障仿真时是使用事件驱动的方法进行仿真,因此故障在从故障输入节点向后续节点传播时,所有后续节点的输出都被计算,这消耗了大量仿真时间。研究发现,实际上从故障输入节点向后传播故障的过程中,很多逻辑门的计算实际上并不需要,因为这些逻辑门的输出逻辑值并不会被故障观测节点观测到。在本公开的一些实施例中,通过确定在各个时间帧中可以传递信号的多个传输逻辑门,可以仅计算可传递故障信号的传递路径中的逻辑门的输出值,而不计算不可传递信号的路径中的逻辑门的输出值。这显著降低了故障仿真的计算量,大大节省了故障仿真的时间。Conventional fault simulation includes single fault vector parallel simulation technology (parallel pattern single fault propagation, PPSFP) and so on. PPSFP is based on event-driven and machine word parallel algorithm ideas. During logic simulation, a breadth-first search is performed from the original input and timing gates until the calculation of the logic values of all gates in the netlist is completed. During the fault simulation, the fault is triggered at the corresponding position of the fault, and the breadth-first search is performed based on this, and the search queue ends when it is empty. Since PPSFP uses an event-driven method for fault simulation, when a fault propagates from a fault input node to subsequent nodes, the outputs of all subsequent nodes are calculated, which consumes a lot of simulation time. The study found that in the process of propagating the fault backward from the fault input node, the calculation of many logic gates is actually unnecessary, because the output logic values of these logic gates will not be observed by the fault observation node. In some embodiments of the present disclosure, by determining the number of transmission logic gates that can transmit signals in each time frame, it is possible to calculate only the output values of logic gates in the transmission path of the transmittable fault signal, and not to calculate the non-transmittable signal The output values of the logic gates in the path of . This significantly reduces the calculation load of fault simulation and greatly saves the time of fault simulation.
图7示出了根据本公开的一些实施例的用于对逻辑电路进行故障仿真的仿真方法700的示意流程图。仿真方法700例如可以是图2的故障仿真220的一种具体实现方式。因此针对图1-图5描述的各个方面可以适用于仿真方法700。在702,处理器14接收针对逻辑电路的逻辑仿真输出集和故障输入集。逻辑仿真输出集例如可以是方法600生成的逻辑仿真输出集。备选地,也可以使用其它逻辑仿真方法生成的逻辑仿真输出集,本公开对此不进行限制。图8示出了一种具体的逻辑仿真输出集的示意。故障输入集包括针对各个故障输入节点或端口提供的表示特定故障类型的逻辑输入值的集。常见的故障输入例如包括“固定为1故障”、“固定为0故障”、桥接故障等。故障仿真通过在故障输入节点或端口输入表示某个故障类型的逻辑输入,在下游的观测点检索对应的逻辑输出并且将该逻辑输出与预期输出进行比较来确定故障是否可以被检测到。FIG. 7 shows a schematic flowchart of a simulation method 700 for performing fault simulation on logic circuits according to some embodiments of the present disclosure. The simulation method 700 may be, for example, a specific implementation of the fault simulation 220 in FIG. 2 . Various aspects described with respect to FIGS. 1-5 may therefore be applicable to the simulation method 700 . At 702, processor 14 receives a set of logic simulation outputs and a set of fault inputs for a logic circuit. The logic simulation output set may be, for example, the logic simulation output set generated by the method 600 . Alternatively, a logic simulation output set generated by other logic simulation methods may also be used, which is not limited in the present disclosure. FIG. 8 shows a schematic diagram of a specific logic simulation output set. A fault input set includes a set of logical input values representing a particular fault type provided for each fault input node or port. Common fault inputs include, for example, "stuck at 1 fault", "stuck at 0 fault", bridging fault, and the like. Fault simulation determines whether a fault can be detected by entering a logical input representing a fault type at a fault input node or port, retrieving the corresponding logical output at a downstream observation point, and comparing the logical output with the expected output.
在704,至少基于逻辑仿真输出集,确定逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门。如上所述,从故障输入节点向后传播故障的过程中,很多逻辑门的计算实际上并不需要,因为这些逻辑门的输出逻辑值并不会被故障观测节点观测到并且也不会具有实际意义。因此,通过排除不被观测到的逻辑门,可以减少故障仿真的计算量和仿真时间。At 704, based at least on the set of logic simulation outputs, a plurality of transmission logic gates in the logic circuit that can transmit signals in the plurality of time frames are determined. As mentioned above, in the process of propagating the fault backward from the fault input node, the calculation of many logic gates is actually unnecessary, because the output logic value of these logic gates will not be observed by the fault observation node and will not have actual significance. Therefore, by excluding logic gates that are not observed, the calculation amount and simulation time of fault simulation can be reduced.
在一个实施例中,处理器14基于逻辑仿真输出集例如按照时间帧确定逻辑电路中的时序逻辑门在多个时间帧中的至少一个时间帧中是否被相应地触发。例如,在一个时间帧中,处理器14响应于逻辑电路中的一个或多个时序逻辑门被触发(例如,通过确定时钟端口的逻辑值,例如通过确定当前时间帧和下一时间帧是否存在从逻辑“0”到逻辑“1”的跳变),将该一个或多个时序逻辑门以及与其数据输入端口相关的一个或多个组合逻辑门确定为多个传输逻辑门。具体而言,处理器14可以向该一个或多个时序逻辑门的上游逻辑门追溯,直至在该时间帧中所有的有效的逻辑门都被标记。该有效逻辑门表示从各个时序逻辑门的数据输入端口到上游的时序逻辑门或原始输入端口之间的所有逻辑门(包括数据输入端所属的时序逻辑门)。在本文中,传输逻辑门表示在当前时间帧中可以传递信号的逻辑门,其包括被触发的时序逻辑门和具有输入的组合逻辑门,而不可传递信号的逻辑门则包括在当前时间帧中未被触发的时序逻辑门和不具有输入的组合逻辑门。In one embodiment, the processor 14 determines whether the sequential logic gates in the logic circuit are correspondingly triggered in at least one of the plurality of time frames based on the set of logic simulation outputs, eg, in time frames. For example, during a time frame, processor 14 responds to one or more sequential logic gates in the logic circuit being triggered (e.g., by determining the logic value of a clock port, e.g., by determining whether the current time frame and the next time frame exist transition from logic "0" to logic "1"), the one or more sequential logic gates and the one or more combinational logic gates associated with their data input ports are determined as a plurality of transfer logic gates. Specifically, processor 14 may backtrack to logic gates upstream of the one or more sequential logic gates until all valid logic gates are marked in the time frame. The effective logic gates represent all logic gates (including the sequential logic gates to which the data input terminals belong) from the data input port of each sequential logic gate to the upstream sequential logic gate or the original input port. In this context, transmitting logic gates represent logic gates that can pass signals in the current time frame, including sequential logic gates that are triggered and combinational logic gates that have inputs, while non-signaling logic gates are included in the current time frame Sequential logic gates that are not triggered and combinational logic gates that have no inputs.
此外,处理器14还将该时间帧中的其它时序逻辑门以及与其数据输入端口相关的组合逻辑门标记为不可传输信号的逻辑门。在处理器14确定完成该时间帧之后,可以确定下一时间 帧。通过遍历每个时间帧中的每个时序逻辑门,处理器14可以确定第一组时序逻辑门,即可以传递信号的时序逻辑门,并且可以基于第一组时序逻辑门确定可传递信号的多个传输逻辑门。在一个实施例中,处理器14可以生成传输标志集来将第一组逻辑门以及与其数据输入端口所连接的一个或多个组合逻辑门标记为传输逻辑门,并且将其它的未被触发的时序逻辑门和与其耦合的有效组合逻辑门标记为不传输信号的逻辑门。In addition, the processor 14 also marks other sequential logic gates in the time frame as well as combinational logic gates associated with their data input ports as logic gates that cannot transmit signals. After processor 14 determines that the time frame is complete, the next time frame may be determined. By traversing each sequential logic gate in each time frame, processor 14 can determine a first set of sequential logic gates, that is, sequential logic gates that can pass signals, and can determine how many sequential logic gates can pass signals based on the first set of sequential logic gates. transmission logic gates. In one embodiment, processor 14 may generate a transfer flag set to mark a first group of logic gates and one or more combinatorial logic gates connected to their data input ports as transfer logic gates, and to mark other untriggered Sequential logic gates and the active combinational logic gates coupled to them are marked as logic gates that do not transmit signals.
在处理器14确定完成当前时间帧的传输逻辑门之后,处理器14可以以上述方式类似地确定下一时间帧的传输逻辑门,直至所有的时间帧都已被确定完成。虽然在此以串行方式描述按时间帧确定各个时间帧中的传输逻辑门,但是这仅是示意而非对本公开的范围进行限制。由于各个逻辑门的数据在确定传输逻辑门的过程中不被修改,因此各个逻辑门的数据可以被多线程同时访问,由此也可以以多线程的方式并行地确定各个时间帧中相应多个传输门。这进一步地减少故障仿真的时间。备选地,也可以先确定时序逻辑门在各个时间帧中是否是传输逻辑门,并且在此之后确定其他有效逻辑门在各个时间帧中是否是传输逻辑门。在一个实施例中,处理器14可以针对逻辑电路中的各个有效逻辑门建立在各个时间帧中的对应的传输标志,以标记该逻辑门在某个时间帧中是否是传输逻辑门。After the processor 14 determines that the transmission logic gate of the current time frame is completed, the processor 14 may similarly determine the transmission logic gate of the next time frame in the above-mentioned manner until all time frames have been determined to be completed. Although the determination of the transmission logic gates in each time frame by time frame is described here in a serial manner, this is only for illustration and not to limit the scope of the present disclosure. Since the data of each logic gate is not modified during the process of determining the transmission logic gate, the data of each logic gate can be accessed by multiple threads at the same time, thus it is also possible to determine the corresponding multiple in each time frame in parallel in a multi-threaded manner. Portal. This further reduces the time for fault simulation. Alternatively, it is also possible to first determine whether the sequential logic gate is a transmission logic gate in each time frame, and then determine whether other valid logic gates are transmission logic gates in each time frame. In one embodiment, the processor 14 may establish a corresponding transfer flag in each time frame for each valid logic gate in the logic circuit, so as to mark whether the logic gate is a transfer logic gate in a certain time frame.
在706,至少基于所确定的多个传输逻辑门和故障输入集,确定故障仿真输出集。在一个实施例中,处理器14针对传输逻辑门使用故障输入集的数据以事件驱动的方式确定故障仿真输出。故障仿真输出集包括以此方式得到在多个时间帧中的多个故障的多个仿真输出。例如,针对一个时间帧中的故障输入而言,处理器14从故障输入节点开始,确定与故障输入节点相连接的逻辑门在该时间帧中是否是传输逻辑门。如果该逻辑门是传输逻辑门,则计算该逻辑门的故障逻辑输出并且确认后继的逻辑门是否是传输逻辑门,以此类推直至计算到故障观测点的故障仿真输出。在一些实施例中,故障观测点通常为某个时序逻辑门的输出。At 706, a set of fault simulation outputs is determined based at least on the determined plurality of transmission logic gates and the set of fault inputs. In one embodiment, processor 14 determines fault simulation outputs in an event-driven manner using data from fault input sets for transfer logic gates. The set of fault simulation outputs includes multiple simulation outputs for multiple faults in multiple time frames derived in this manner. For example, for a faulty input in a time frame, processor 14 determines whether the logic gate connected to the faulty input node is a transmission logic gate in the time frame, starting from the faulty input node. If the logic gate is a transmission logic gate, calculate the fault logic output of the logic gate and confirm whether the subsequent logic gate is a transmission logic gate, and so on until the fault simulation output of the fault observation point is calculated. In some embodiments, the failure observation point is usually the output of a certain sequential logic gate.
如果处理器14发现从故障输入节点开始向下游延伸的某个逻辑门不是传输逻辑门,则处理器14跳过该故障传输路径,并开始处理下一故障输入。处理器14在计算完成一个时间帧之后,可以计算下一时间帧中针对多个故障输入的观测点的故障仿真输出,直至得到所有时间帧的故障仿真输出。由于处理器14在故障仿真过程中,放弃了不能传输故障激励信号的传输路径并且不对该传输路径中的逻辑门进行逻辑计算,因此显著减少了故障仿真的计算量并且缩短了故障仿真的时间。If the processor 14 finds that a logic gate extending downstream from the faulty input node is not a transmission logic gate, the processor 14 skips the faulty transmission path and starts processing the next faulty input. After the calculation of one time frame is completed, the processor 14 may calculate the fault simulation outputs of observation points for multiple fault inputs in the next time frame until the fault simulation outputs of all time frames are obtained. Since the processor 14 gives up the transmission path that cannot transmit the fault excitation signal and does not perform logic calculations on the logic gates in the transmission path during the fault simulation process, the calculation amount of the fault simulation is significantly reduced and the time of the fault simulation is shortened.
在一些实施例中,处理器14还可以通过判断故障是否能够被激发来进一步降低故障仿真计算量和故障仿真时间。处理器14基于逻辑仿真输出集和故障输入集,确定故障输入集中的、与逻辑电路中的故障输入节点处对应的多个原始故障输入是否被激发。响应于原始故障输入在故障输入节点可被激发,则处理器14基于逻辑仿真输出集确定逻辑电路中与故障输入节点相关的逻辑门中的、在多个时间帧中可传递信号的多个传输逻辑门。如果原始故障输入在故障输入节点不被激发,则处理器14跳过针对该故障的故障仿真计算。例如,如果故障是“固定为1”(stuck at 1)故障,然而该故障输入端口的逻辑背景值表示逻辑值为“0”,则这表明“固定为1”故障在此无法被激发。因此,处理器14可以跳过该故障计算,即处理器14不对该时间帧中从该故障输入端口开始的逻辑门的逻辑输出值进行计算。这样,可以进一步节省计算资源和时间。In some embodiments, the processor 14 can further reduce the fault simulation calculation amount and fault simulation time by judging whether the fault can be triggered. The processor 14 determines whether a plurality of original fault inputs in the fault input set corresponding to fault input nodes in the logic circuit are activated based on the logic simulation output set and the fault input set. In response to the original fault input being active at the fault input node, the processor 14 determines, based on the set of logic simulation outputs, a number of transferable signals in logic gates associated with the fault input node in the logic circuit that can deliver signals in multiple time frames logic gate. If the original fault input is not activated at the fault input node, processor 14 skips fault simulation calculations for that fault. For example, if the fault is a "stuck at 1" fault, but the logical background value of the fault input port indicates a logic value of "0", this indicates that the "stuck at 1" fault cannot be fired here. Therefore, the processor 14 may skip the calculation of the failure, that is, the processor 14 does not calculate the logic output value of the logic gate starting from the failure input port in the time frame. In this way, computing resources and time can be further saved.
图8示出了根据本公开的一些实施例的具有逻辑仿真背景值的逻辑电路800的示意图。可以理解,逻辑电路800仅是用于描述根据本公开的故障仿真,而非对本公开的范围进行限制。可以具有其它电路结构的逻辑电路,并且根据本公开的实施例的故障仿真方法也适用于 其它逻辑电路。逻辑电路800包括第一触发器802、第二触发器804、或门806、反相器808、缓冲器810和与门812。第一触发器802的数据输入端口连接至或门806的输出,并且或门806的两个输入端口分别连接至缓冲器810的输出端口和与门812的输出端口。第二触发器804的数据输入端口连接至反相器808的输出端口,并且反相器808的输入端口连接至与门812的输出端口。缓冲器810的输入端口和与门812的输入端口可以连接至原始输入端口。FIG. 8 shows a schematic diagram of a logic circuit 800 with logic simulation background values according to some embodiments of the present disclosure. It can be understood that the logic circuit 800 is only used to describe the fault simulation according to the present disclosure, but not to limit the scope of the present disclosure. Logic circuits may have other circuit structures, and the fault simulation method according to the embodiments of the present disclosure is also applicable to other logic circuits. The logic circuit 800 includes a first flip-flop 802 , a second flip-flop 804 , an OR gate 806 , an inverter 808 , a buffer 810 and an AND gate 812 . The data input port of the first flip-flop 802 is connected to the output of the OR gate 806, and the two input ports of the OR gate 806 are respectively connected to the output port of the buffer 810 and the output port of the AND gate 812. The data input port of the second flip-flop 804 is connected to the output port of the inverter 808 , and the input port of the inverter 808 is connected to the output port of the AND gate 812 . The input port of the buffer 810 and the input port of the AND gate 812 may be connected to the original input port.
在图8中,在各个逻辑门的输入端口以方框内的数字显示了输入端口在两个时间帧的逻辑仿真仿真值,其中右侧方框表示前一时间帧的逻辑仿真值,左侧方框表示后一时间帧的逻辑仿真值。虽然仅示出了两个时间帧的逻辑仿真值,但是这仅是示意,而非对本公开进行限制。可以具有其它数目的时间帧,例如每个输入端口可以具有相继的32位、64位或128位的比特值作为逻辑仿真值。这些逻辑仿真值例如可以是方法600得到的逻辑仿真结果。备选地,也可以通过其它逻辑仿真方法提供。In Figure 8, the numbers in the boxes at the input ports of each logic gate show the logic simulation values of the input ports in two time frames, where the right box represents the logic simulation value of the previous time frame, and the left box Boxes represent logical simulation values for the next timeframe. Although only logic simulation values for two time frames are shown, this is for illustration only and not to limit the present disclosure. Other numbers of time frames are possible, eg each input port can have consecutive 32-bit, 64-bit or 128-bit bit values as logic emulation values. These logic simulation values may be, for example, logic simulation results obtained by the method 600 . Alternatively, it can also be provided by other logic simulation methods.
在一个实施例中,处理器14可以首先确定作为时序逻辑门的第一触发器802和第二触发器804在一个时间帧中是否被触发。由于第一触发器802的时钟端口在当前时间帧和下一时间帧均为“1”,没有从“0”到“1”的跳变,因此第一触发器802在当前时间帧中不被触发。相应地,从第一触发器802往回追溯到原始输入端口的有效逻辑门在当前时间帧中都是不可传递信号的逻辑门,其包括第一触发器802、或门806和缓冲器810。另一方面,由于第二触发器804的时钟端口在当前时间帧和下一时间帧分别为“0”和“1”,存在从“0”到“1”的跳变,因此第二触发器804在当前时间帧中被触发。相应地,从第二触发器804往回追溯到原始输入端口的有效逻辑门在当前时间帧中都是传输逻辑门,其包括第二触发器804、反相器808和与门812。In one embodiment, the processor 14 may first determine whether the first flip-flop 802 and the second flip-flop 804 , which are sequential logic gates, are triggered within a time frame. Since the clock port of the first flip-flop 802 is "1" in the current time frame and the next time frame, there is no transition from "0" to "1", so the first flip-flop 802 is not activated in the current time frame trigger. Correspondingly, the valid logic gates traced back from the first flip-flop 802 to the original input port are logic gates that cannot transmit signals in the current time frame, including the first flip-flop 802 , the OR gate 806 and the buffer 810 . On the other hand, since the clock port of the second flip-flop 804 is respectively "0" and "1" in the current time frame and the next time frame, there is a jump from "0" to "1", so the second flip-flop 804 is triggered in the current timeframe. Correspondingly, the valid logic gates traced back from the second flip-flop 804 to the original input port in the current time frame are transmission logic gates, which include the second flip-flop 804 , the inverter 808 and the AND gate 812 .
图9示出了根据本公开的一些实施例的具有可传输标志的逻辑电路的示意图。随着处理器14依次确定各个逻辑门,处理器14可以生成对应的传输标志集以表示各个逻辑门在该时间帧中是否为传输逻辑门。图9的逻辑电路900与逻辑电路800对应,但是在各个输入端口处的数字则表示该逻辑门的输入端口可以传递信号,即传递事件。如上所述,第二触发器804在第一个时间帧中是传输逻辑门,因此第二触发器804的数据输入端口和时钟端口上的传输标志以“1”示出。类似地,从第二触发器804往回追溯到原始输入端口的其它逻辑门的输入端口也相应地以传输标志“1”示出。在后一时间帧中,由于第二触发器804不被触发,因此第二触发器804往回追溯到原始输入端口的其它逻辑门的输入端口的传输标志以“0”示出。相对地,第一触发器802由于在两个时间帧中都不被触发,因此从第一触发器802回追溯到原始输入端口的其它逻辑门的输入端口的传输标志在两个时间帧中都以“0”示出。虽然以“1”和“0”示出了传输标志,但是可以理解这仅是示意,而非对本公开的范围进行限制。可以具有其它标记方式,例如“0”表示传递信号,而“1”表示不传递信号。FIG. 9 shows a schematic diagram of a logic circuit with transferable flags according to some embodiments of the present disclosure. As the processor 14 sequentially determines each logic gate, the processor 14 may generate a corresponding transfer flag set to indicate whether each logic gate is a transfer logic gate in the time frame. The logic circuit 900 in FIG. 9 corresponds to the logic circuit 800 , but the numbers at each input port indicate that the input port of the logic gate can transmit signals, that is, transmit events. As mentioned above, the second flip-flop 804 is a transfer logic gate in the first time frame, so the transfer flags on the data input port and the clock port of the second flip-flop 804 are shown with "1". Similarly, the input ports of other logic gates traced back from the second flip-flop 804 to the original input ports are correspondingly shown with transfer flags "1". In the later time frame, since the second flip-flop 804 is not triggered, the transfer flags of the input ports of other logic gates where the second flip-flop 804 traces back to the original input port are shown with "0". In contrast, since the first flip-flop 802 is not triggered in the two time frames, the transmission flags of the input ports of other logic gates traced back from the first flip-flop 802 to the original input ports are not triggered in the two time frames. Shown as "0". Although the transmission flags are shown as "1" and "0", it is understood that this is for illustration only and not limiting the scope of the present disclosure. Other markings are possible, such as "0" for passing a signal and "1" for not passing a signal.
处理器14在进行故障仿真时,可以基于传输标志来决定是否进行后续的传输路径的计算。例如,假设缓冲器810的输入端口连接至故障输入节点,并且第一触发器802的输出端口是故障观测节点。处理器14在确定缓冲器810的输入端口的传输标志是“0”时,就可以放弃该故障的后续计算,而是转向下一故障。例如假设与门812的一个输入端口连接至故障输入节点,并且第二触发器804的输出端口是故障观测节点。处理器14确定与门812在该时间帧中的两个输入端口的传输标志都是“1”,因此处理器14计算与门812的逻辑输出,并且随后转向后续逻辑门(即,反相器808)。处理器14类似地确定反相器808的输入端口的传输标志为“1”,并且执行针对反相器808的计算。以此类推,直至计算第二触发器804的逻 辑输出,并且将该逻辑输出与预定输出进行比较,以确定该故障是否被检测到。When performing fault simulation, the processor 14 may decide whether to perform subsequent calculation of the transmission path based on the transmission flag. For example, assume that the input port of the buffer 810 is connected to a fault input node, and the output port of the first flip-flop 802 is a fault observation node. When the processor 14 determines that the transfer flag of the input port of the buffer 810 is "0", it may abandon the subsequent calculation of the fault, but turn to the next fault. For example, assume that one input port of the AND gate 812 is connected to a fault input node, and the output port of the second flip-flop 804 is a fault observation node. Processor 14 determines that the transfer flags of both input ports of AND gate 812 are "1" in this time frame, so processor 14 computes the logical output of AND gate 812, and then turns to subsequent logic gates (i.e., inverter 808). Processor 14 similarly determines that the transfer flag of the input port of inverter 808 is "1" and performs the calculation for inverter 808 . By analogy, until the logic output of the second flip-flop 804 is calculated, and the logic output is compared with a predetermined output to determine whether the fault is detected.
图10示出了根据本公开的一些实施例的用于描述故障激发的逻辑电路的示意图。图10的逻辑电路1000与逻辑电路800对应,并且各个输入端口上也类似地示出了与图8相同的逻辑仿真值。因此,关于图8所述的各个方面可以适用于图10,在此不再赘述。如上所述,处理器14还可以通过判断故障是否能够被激发来进一步降低故障仿真计算量和故障仿真时间。如图10所示,故障输入节点例如位于与门812的第一输入端口,并且待输入的故障是“固定为1”故障。然而,该输入端口在两个时间帧中的逻辑值按先后顺序依次为“1”和“0”。当逻辑值为“0”时,“固定为1”故障在此无法被激发。由于该故障无法被激发,因此后续的逻辑门的逻辑值的计算也毫无疑义。在一些实施例中,处理器14因此可以基于逻辑仿真输出集和故障输入集,确定故障输入集中的、与逻辑电路中的故障输入节点处对应的多个原始故障输入是否被激发。响应于原始故障输入在故障输入节点可被激发,处理器14基于逻辑仿真输出集确定逻辑电路中与故障输入节点相关的逻辑门中的、在多个时间帧中可传递信号的多个传输逻辑门。如果无法被激发,则处理器14可以跳过从该故障输入点开始到观测点的逻辑门的逻辑值的计算以节省计算资源和故障仿真的时间。FIG. 10 shows a schematic diagram of a logic circuit for describing fault excitation according to some embodiments of the present disclosure. The logic circuit 1000 in FIG. 10 corresponds to the logic circuit 800 , and the same logic simulation values as those in FIG. 8 are similarly shown on each input port. Therefore, various aspects described in relation to FIG. 8 can be applied to FIG. 10 , and will not be repeated here. As mentioned above, the processor 14 can further reduce the fault simulation calculation amount and fault simulation time by judging whether the fault can be triggered. As shown in FIG. 10 , the fault input node is located, for example, at the first input port of the AND gate 812 , and the fault to be input is a "fixed at 1" fault. However, the logical values of the input port in the two time frames are "1" and "0" sequentially. When the logical value is "0", the "Stick at 1" fault cannot be fired here. Since this fault cannot be activated, the calculation of the logic value of the subsequent logic gate is also unambiguous. In some embodiments, processor 14 may thus determine whether a plurality of original fault inputs in the fault input set corresponding to fault input nodes in the logic circuit are activated based on the set of logic simulation outputs and the set of fault inputs. In response to the original fault input being active at the fault input node, the processor 14 determines, based on the logic simulation output set, a plurality of transmission logics in logic gates associated with the fault input node in the logic circuit that can transmit signals in multiple time frames Door. If it cannot be activated, the processor 14 may skip the calculation of the logic values of the logic gates from the fault input point to the observation point to save computing resources and fault simulation time.
图11示出了根据本公开的一些实施例的电子设备1100的示意性框图。电子设备1100可以被实现为或者被包括在图1的电子设备10中。FIG. 11 shows a schematic block diagram of an electronic device 1100 according to some embodiments of the present disclosure. The electronic device 1100 may be implemented as or included in the electronic device 10 of FIG. 1 .
电子设备1100可以包括多个模块,以用于执行如图6中所讨论的方法600中的对应步骤。如图11所示,电子设备1100包括逻辑电路分级单元1102,用于对逻辑电路进行分级以确定第一层级电路和第二层级电路。第一层级电路包括多个时序逻辑门和多个原始输入,并且第二层级电路包括多个组合逻辑门。电子设备1100还包括时钟逻辑值确定单元1104,用于基于表示多个时间帧的时间帧数据和原始时钟输入集,确定第一层级电路的多个时序逻辑门的时钟输入端口在多个时间帧中的时钟逻辑值集。电子设备1100还包括逻辑仿真输出集确定单元1106,用于基于所述时钟逻辑值集和原始数据输入集确定逻辑仿真输出集。逻辑仿真输出集包括第一层级电路中的多个时序逻辑门和第二层级电路中的多个组合逻辑门的输出端口在多个时间帧中的输出逻辑值。The electronic device 1100 may include a plurality of modules for performing corresponding steps in the method 600 as discussed in FIG. 6 . As shown in FIG. 11 , the electronic device 1100 includes a logic circuit classification unit 1102 configured to classify logic circuits to determine a first-level circuit and a second-level circuit. The first level of circuitry includes a plurality of sequential logic gates and a plurality of primitive inputs, and the second level of circuitry includes a plurality of combinational logic gates. The electronic device 1100 further includes a clock logic value determination unit 1104, configured to determine the clock input ports of the multiple sequential logic gates of the first-level circuit in the multiple time frames based on the time frame data representing the multiple time frames and the original clock input set. The set of clock logic values in . The electronic device 1100 further includes a logic simulation output set determining unit 1106, configured to determine a logic simulation output set based on the clock logic value set and the original data input set. The logic simulation output set includes the output logic values of the output ports of the multiple sequential logic gates in the first-level circuit and the multiple combinational logic gates in the second-level circuit in multiple time frames.
在一些实施例中,逻辑电路分级单元1102进一步用于对逻辑电路进行分级以确定第一层级电路、第一子层级电路和第二子层级电路,第一子电路层级包括第二层级电路中的多个组合逻辑门中的、与第一层级电路直接耦合的组合逻辑门,并且第二子电路层级包括第二层级电路中的多个组合逻辑门中的、与第一子电路层级直接耦合的组合逻辑门。In some embodiments, the logic circuit classifying unit 1102 is further used to classify the logic circuit to determine the first-level circuit, the first sub-level circuit and the second sub-level circuit, the first sub-circuit level includes the second level circuit combinational logic gates of the plurality of combinational logic gates directly coupled to the first level of circuitry, and the second subcircuit level includes those of the plurality of combinational logic gates in the second level of circuitry directly coupled to the first subcircuit level Combination logic gates.
在一些实施例中,时钟逻辑值确定单元1104进一步用于将多个时间帧中的原始时钟输入端口加入事件队列;将原始时钟输入端口与多个时序逻辑门之间的组合逻辑门加入事件队列;计算组合逻辑门的输出逻辑值;以及基于组合逻辑门的输出逻辑值确定第一层级电路中的多个时序逻辑门的时钟端口在多个时间帧中的时钟逻辑值集。In some embodiments, the clock logic value determination unit 1104 is further used to add the original clock input port in multiple time frames to the event queue; add the combinational logic gate between the original clock input port and multiple sequential logic gates to the event queue ; calculating output logic values of the combinational logic gates; and determining clock logic value sets of clock ports of the plurality of sequential logic gates in the first level circuit in a plurality of time frames based on the output logic values of the combinational logic gates.
在一些实施例中,逻辑仿真输出集确定单元1106进一步用于使用时钟逻辑值集和原始数据输入集来按照层级电路的顺序依次确定第一层级电路和第二层级电路中的多个逻辑门的多个输出逻辑值,逻辑仿真输出集包括多个输出逻辑值。In some embodiments, the logic simulation output set determination unit 1106 is further configured to use the clock logic value set and the original data input set to sequentially determine the multiple logic gates in the first-level circuit and the second-level circuit in sequence according to the order of the level circuits A plurality of output logic values, the logic simulation output set includes a plurality of output logic values.
在一些实施例中,逻辑电路分级单元1102进一步用于按照逻辑电路的层级将第一层级电路的数据存储在存储器的第一区域并且将第二层级电路的数据存储在存储器的第二区域,第二区域不同于第一区域。In some embodiments, the logic circuit grading unit 1102 is further configured to store the data of the first-level circuits in the first area of the memory and store the data of the second-level circuits in the second area of the memory according to the levels of the logic circuits. The second area is different from the first area.
图12示出了根据本公开的一些实施例的电子设备1200的示意性框图。电子设备1200可 以被实现为或者被包括在图1的电子设备10中。Fig. 12 shows a schematic block diagram of an electronic device 1200 according to some embodiments of the present disclosure. The electronic device 1200 may be implemented as or included in the electronic device 10 of FIG. 1 .
电子设备1200可以包括多个模块,以用于执行如图7中所讨论的方法700中的对应步骤。如图11所示,电子设备1200包括接收单元1202,用于接收针对逻辑电路的逻辑仿真输出集和故障输入集。电子设备1200还包括传输逻辑门确定单元1204,用于至少基于逻辑仿真输出集确定逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门。电子设备1200还包括故障仿真输出集确定单元1206,用于至少基于所确定的多个传输逻辑门和故障输入集确定故障仿真输出集。The electronic device 1200 may include a plurality of modules for performing corresponding steps in the method 700 as discussed in FIG. 7 . As shown in FIG. 11 , the electronic device 1200 includes a receiving unit 1202 configured to receive a logic simulation output set and a fault input set for a logic circuit. The electronic device 1200 further includes a transmission logic gate determination unit 1204 configured to determine a plurality of transmission logic gates in the logic circuit that can transmit signals in a plurality of time frames based at least on the logic simulation output set. The electronic device 1200 further includes a fault simulation output set determining unit 1206, configured to determine a fault simulation output set based at least on the determined plurality of transmission logic gates and the fault input set.
在一些实施例中,传输逻辑门确定单元1204进一步用于基于逻辑仿真输出集,按照时间帧确定逻辑电路中的时序逻辑门在多个时间帧中的至少一个时间帧中是否被相应地触发;以及响应于逻辑电路中的第一组时序逻辑门在至少一个时间帧中被触发,将与第一组时序逻辑门的输入相关的组合逻辑门和第一组时序逻辑门确定为多个传输逻辑门。In some embodiments, the transmission logic gate determination unit 1204 is further configured to determine whether the sequential logic gates in the logic circuit are correspondingly triggered in at least one of the multiple time frames according to the time frame based on the logic simulation output set; and in response to the first set of sequential logic gates in the logic circuit being triggered in at least one time frame, determining combinational logic gates associated with inputs to the first set of sequential logic gates and the first set of sequential logic gates as a plurality of transfer logic Door.
在一些实施例中,传输逻辑门确定单元1204进一步用于基于逻辑仿真输出集中的、与各个时序逻辑门的时钟端口分别对应的时钟逻辑值,确定逻辑电路中的各个时序逻辑门在多个时间帧中是否被触发。In some embodiments, the transfer logic gate determination unit 1204 is further configured to determine the timing of each sequential logic gate in the logic circuit at multiple times based on the clock logic values in the logic simulation output set corresponding to the clock ports of each sequential logic gate. Whether to trigger in frame.
在一些实施例中,传输逻辑门确定单元1204进一步用于确定待计算的逻辑门是否是传输逻辑门;以及响应于确定待计算的逻辑门是传输逻辑门,使用源自故障输入集的逻辑值来确定待计算的逻辑门的故障输出逻辑值,故障仿真输出集包括故障输出逻辑值。In some embodiments, the transmission logic gate determination unit 1204 is further configured to determine whether the logic gate to be calculated is a transmission logic gate; and in response to determining that the logic gate to be calculated is a transmission logic gate, using the logic value derived from the fault input set To determine the fault output logic value of the logic gate to be calculated, the fault simulation output set includes the fault output logic value.
在一些实施例中,传输逻辑门确定单元1204进一步用于基于逻辑仿真输出集和故障输入集,确定故障输入集中的、与逻辑电路中的故障输入端口处对应的原始故障输入是否被激发;以及响应于原始故障输入在故障输入端口被激发,基于逻辑仿真输出集,确定逻辑电路中与故障输入端口相关的逻辑门中的、在多个时间帧中可传递信号的多个传输逻辑门。In some embodiments, the transmission logic gate determination unit 1204 is further used to determine whether the original fault input corresponding to the fault input port in the logic circuit in the fault input set is activated based on the logic simulation output set and the fault input set; and In response to the original fault input being activated at the fault input port, based on the set of logic simulation outputs, a plurality of transmission logic gates of the logic circuit associated with the fault input port that can transmit signals in a plurality of time frames is determined.
图13示出了可以用来实施本公开的实施例的示例设备1300的示意性框图。设备1300可以用于实现电子设备10、1100或1200。如图所示,设备1300包括计算单元1301,其可以根据存储在随机存取存储器(RAM)和/或只读存储器(ROM)1302的计算机程序指令或者从存储单元1307加载到RAM和/或ROM 1302中的计算机程序指令,来执行各种适当的动作和处理。在RAM和/或ROM 1302中,还可存储设备1300操作所需的各种程序和数据。计算单元1301和RAM和/或ROM 1302通过总线1303彼此相连。输入/输出(I/O)接口1304也连接至总线1303。FIG. 13 shows a schematic block diagram of an example device 1300 that may be used to implement embodiments of the present disclosure. The device 1300 may be used to implement the electronic device 10 , 1100 or 1200 . As shown, device 1300 includes computing unit 1301, which may be loaded into RAM and/or ROM according to computer program instructions stored in random access memory (RAM) and/or read only memory (ROM) 1302 or from storage unit 1307 1302 to perform various appropriate actions and processes. In the RAM and/or ROM 1302, various programs and data necessary for the operation of the device 1300 may also be stored. The computing unit 1301 and the RAM and/or ROM 1302 are connected to each other via a bus 1303. An input/output (I/O) interface 1304 is also connected to the bus 1303 .
设备1300中的多个部件连接至I/O接口1304,包括:输入单元1305,例如键盘、鼠标等;输出单元1306,例如各种类型的显示器、扬声器等;存储单元1307,例如磁盘、光盘等;以及通信单元1308,例如网卡、调制解调器、无线通信收发机等。通信单元1308允许设备1300通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Multiple components in the device 1300 are connected to the I/O interface 1304, including: an input unit 1305, such as a keyboard, a mouse, etc.; an output unit 1306, such as various types of displays, speakers, etc.; a storage unit 1307, such as a magnetic disk, an optical disk, etc. ; and a communication unit 1308, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 1308 allows the device 1300 to exchange information/data with other devices over a computer network such as the Internet and/or various telecommunication networks.
计算单元1301可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元1301的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元1301执行上文所描述的各个方法和处理,例如方法600和/或方法700。例如,在一些实施例中,方法600和/或方法700可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元1307。在一些实施例中,计算机程序的部分或者全部可以经由RAM和/或ROM和/或通信单元1308而被载入和/或安装到设备1300上。当计算机程序加载到RAM和/或ROM并由计算单元1301执行时,可以执 行上文描述的方法600和/或方法700的一个或多个步骤。备选地,在其他实施例中,计算单元1301可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行方法600和/或方法700。The computing unit 1301 may be various general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of computing units 1301 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1301 executes various methods and processes described above, such as method 600 and/or method 700 . For example, in some embodiments, method 600 and/or method 700 may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 1307 . In some embodiments, part or all of the computer program may be loaded and/or installed onto device 1300 via RAM and/or ROM and/or communication unit 1308 . When a computer program is loaded into RAM and/or ROM and executed by computing unit 1301, one or more steps of method 600 and/or method 700 described above may be performed. Alternatively, in other embodiments, the computing unit 1301 may be configured to execute the method 600 and/or the method 700 in any other suitable manner (for example, by means of firmware).
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Program codes 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, a special purpose computer, or other programmable data processing devices, so that the program codes, when executed by the processor or controller, make the functions/functions specified in the flow diagrams and/or block diagrams Action 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 the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, 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, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
此外,虽然采用特定次序描绘了各操作,但是这应当理解为要求这样操作以所示出的特定次序或以顺序次序执行,或者要求所有图示的操作应被执行以取得期望的结果。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实现中。相反地,在单个实现的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实现中。In addition, while operations are depicted in a particular order, this should be understood to require that such operations be performed in the particular order shown, or in sequential order, or that all illustrated operations should be performed to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while the above discussion contains several specific implementation details, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。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 (28)

  1. 一种用于仿真的方法,包括:A method for simulating, comprising:
    对逻辑电路进行分级以确定第一层级电路和第二层级电路,所述第一层级电路包括多个时序逻辑门和多个原始输入,并且所述第二层级电路包括多个组合逻辑门;Hierarchizing logic circuits to determine a first level of circuitry including a plurality of sequential logic gates and a plurality of primitive inputs and a second level of circuitry comprising a plurality of combinational logic gates;
    基于表示多个时间帧的时间帧数据和原始时钟输入集,确定所述第一层级电路的多个时序逻辑门的时钟输入端口在所述多个时间帧中的时钟逻辑值集;以及determining a set of clock logic values for clock input ports of a plurality of sequential logic gates of the first level circuit in the plurality of time frames based on the time frame data representing the plurality of time frames and the original clock input set; and
    基于所述时钟逻辑值集和原始数据输入集,确定逻辑仿真输出集,所述逻辑仿真输出集包括:所述第一层级电路中的所述多个时序逻辑门的输出端口在所述多个时间帧中的输出逻辑值,和所述第二层级电路中的所述多个组合逻辑门的输出端口在所述多个时间帧中的输出逻辑值。Based on the clock logic value set and the original data input set, a logic simulation output set is determined, and the logic simulation output set includes: the output ports of the multiple sequential logic gates in the first-level circuit are in the multiple output logic values in time frames, and output logic values of output ports of the plurality of combinational logic gates in the second level circuit in the plurality of time frames.
  2. 根据权利要求1所述的方法,其中对逻辑电路进行分级以确定第一层级电路和第二层级电路包括:对所述逻辑电路进行分级以确定所述第一层级电路、第一子层级电路和第二子层级电路,所述第一子电路层级包括所述第二层级电路中的多个组合逻辑门中的、与所述第一层级电路直接耦合的组合逻辑门,并且所述第二子电路层级包括所述第二层级电路中的多个组合逻辑门中的、与所述第一子电路层级直接耦合的组合逻辑门。The method of claim 1, wherein staging logic circuits to determine first-level circuits and second-level circuits comprises: staging the logic circuits to determine the first-level circuits, first sub-level circuits, and A second sub-level circuit, the first sub-circuit level comprising a combinational logic gate of a plurality of combinational logic gates in the second level circuit that is directly coupled to the first level circuit, and the second sub-level The circuit level includes a combinational logic gate of the plurality of combinational logic gates in the second level circuit that is directly coupled to the first sub-circuit level.
  3. 根据权利要求1或2所述的方法,还包括:The method according to claim 1 or 2, further comprising:
    接收仿真周期数据;以及receiving simulation cycle data; and
    基于所述仿真周期数据确定所述时间帧数据。The time frame data is determined based on the simulation period data.
  4. 根据权利要求1-3中任一项所述的方法,其中基于表示多个时间帧的时间帧数据和原始时钟输入集确定所述第一层级电路的多个时序逻辑门的时钟输入端口在所述多个时间帧中的时钟逻辑值集包括:The method according to any one of claims 1-3, wherein it is determined based on the time frame data representing a plurality of time frames and the original clock input set that the clock input ports of the plurality of sequential logic gates of the first-level circuit are in the The set of clock logic values in the multiple time frames includes:
    将所述多个时间帧中的原始时钟输入端口加入事件队列;adding the original clock input ports in the plurality of time frames to an event queue;
    将所述原始时钟输入端口与所述多个时序逻辑门之间的组合逻辑门加入所述事件队列;adding combinational logic gates between the original clock input port and the plurality of sequential logic gates to the event queue;
    计算所述组合逻辑门的输出逻辑值;以及calculating an output logic value of the combinational logic gate; and
    基于所述组合逻辑门的输出逻辑值确定所述第一层级电路中的多个时序逻辑门的时钟端口在所述多个时间帧中的时钟逻辑值集。A set of clock logic values of clock ports of the plurality of sequential logic gates in the first level circuit in the plurality of time frames is determined based on the output logic values of the combinational logic gates.
  5. 根据权利要求1-4中任一项所述的方法,其中基于所述时钟逻辑值集和原始数据输入集确定逻辑仿真输出集包括:The method according to any one of claims 1-4, wherein determining a logic simulation output set based on the clock logic value set and the original data input set comprises:
    使用所述时钟逻辑值集和所述原始数据输入集来按照层级电路的顺序依次确定所述第一层级电路和所述第二层级电路中的多个逻辑门的多个输出逻辑值,所述逻辑仿真输出集包括所述多个输出逻辑值。using the clock logic value set and the original data input set to sequentially determine a plurality of output logic values of logic gates in the first hierarchy circuit and the second hierarchy circuit in the order of the hierarchy circuits, the The logic simulation output set includes the plurality of output logic values.
  6. 根据权利要求1-5中任一项所述的方法,其中对逻辑电路进行分级以确定第一层级电路和第二层级电路包括:The method according to any one of claims 1-5, wherein staging the logic circuits to determine the first level circuits and the second level circuits comprises:
    按照所述逻辑电路的层级将所述第一层级电路的数据存储在存储器的第一区域并且将所述第二层级电路的数据存储在所述存储器的第二区域,所述第二区域不同于所述第一区域。According to the level of the logic circuit, the data of the first level circuit is stored in a first area of the memory and the data of the second level circuit is stored in a second area of the memory, the second area is different from the first region.
  7. 一种计算机可读存储介质,存储多个程序,所述多个程序被配置为一个或多个处理器执行,所述多个程序包括用于执行权利要求1-6中任一项所述的方法的指令。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-6 method directive.
  8. 一种计算机程序产品,所述计算机程序产品包括多个程序,所述多个程序被配置为一个或多个处理器执行,所述多个程序包括用于执行权利要求1-6中任一项所述的方法的指令。A computer program product, the computer program product comprising a plurality of programs, the plurality of programs configured to be executed by one or more processors, the plurality of programs comprising a method for performing any one of claims 1-6 Instructions for the method described.
  9. 一种电子设备,包括:An electronic device comprising:
    一个或多个处理器;one or more processors;
    包括计算机指令的存储器,所述计算机指令在由所述电子设备的所述一个或多个处理器执行时使得所述电子设备执行权利要求1-6中任一项所述的方法。A memory comprising computer instructions which, 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-6.
  10. 一种电子设备,包括:An electronic device comprising:
    逻辑电路分级单元,用于对逻辑电路进行分级以确定第一层级电路和第二层级电路,所述第一层级电路包括多个时序逻辑门和多个原始输入,并且所述第二层级电路包括多个组合逻辑门;A logic circuit grading unit, configured to classify the logic circuit to determine a first-level circuit and a second-level circuit, the first-level circuit includes a plurality of sequential logic gates and a plurality of original inputs, and the second-level circuit includes Multiple combinational logic gates;
    时钟逻辑值确定单元,用于基于表示多个时间帧的时间帧数据和原始时钟输入集,确定所述第一层级电路的多个时序逻辑门的时钟输入端口在所述多个时间帧中的时钟逻辑值集;以及A clock logic value determining unit, configured to determine the clock input ports of the multiple sequential logic gates of the first-level circuit in the multiple time frames based on the time frame data representing the multiple time frames and the original clock input set set of clock logic values; and
    逻辑仿真输出集确定单元,用于基于所述时钟逻辑值集和原始数据输入集确定逻辑仿真输出集,所述逻辑仿真输出集包括:所述第一层级电路中的所述多个时序逻辑门的输出端口在所述多个时间帧中的输出逻辑值,和所述第二层级电路中的所述多个组合逻辑门的输出端口在所述多个时间帧中的输出逻辑值。A logic simulation output set determining unit, configured to determine a logic simulation output set based on the clock logic value set and the original data input set, the logic simulation output set including: the plurality of sequential logic gates in the first-level circuit The output logic values of the output ports of the plurality of time frames in the plurality of time frames, and the output logic values of the output ports of the plurality of combinational logic gates in the second level circuit in the plurality of time frames.
  11. 根据权利要求10所述电子设备,其中所述逻辑电路分级单元进一步用于对所述逻辑电路进行分级以确定所述第一层级电路、第一子层级电路和第二子层级电路,所述第一子电路层级包括所述第二层级电路中的多个组合逻辑门中的、与所述第一层级电路直接耦合的组合逻辑门,并且所述第二子电路层级包括所述第二层级电路中的多个组合逻辑门中的、与所述第一子电路层级直接耦合的组合逻辑门。The electronic device according to claim 10, wherein the logic circuit grading unit is further used to classify the logic circuit to determine the first level circuit, the first sub-level circuit and the second sub-level circuit, the second A sub-circuit level includes a combinational logic gate of the plurality of combinational logic gates in the second level circuit that is directly coupled to the first level circuit, and the second sub-circuit level includes the second level circuit A combinatorial logic gate of the plurality of combinatorial logic gates directly coupled to the first sub-circuit level.
  12. 根据权利要求10或11所述的电子设备,其中所述时钟逻辑值确定单元进一步用于将所述多个时间帧中的原始时钟输入端口加入事件队列;The electronic device according to claim 10 or 11, wherein the clock logic value determination unit is further configured to add the original clock input ports in the multiple time frames to an event queue;
    将所述原始时钟输入端口与所述多个时序逻辑门之间的组合逻辑门加入所述事件队列;adding combinational logic gates between the original clock input port and the plurality of sequential logic gates to the event queue;
    计算所述组合逻辑门的输出逻辑值;以及calculating an output logic value of the combinational logic gate; and
    基于所述组合逻辑门的输出逻辑值确定所述第一层级电路中的多个时序逻辑门的时钟端口在所述多个时间帧中的时钟逻辑值集。A set of clock logic values of clock ports of the plurality of sequential logic gates in the first level circuit in the plurality of time frames is determined based on the output logic values of the combinational logic gates.
  13. 根据权利要求10-12中任一项所述的电子设备,其中所述逻辑仿真输出集确定单元进一步用于使用所述时钟逻辑值集和所述原始数据输入集来按照层级电路的顺序依次确定所述第一层级电路和所述第二层级电路中的多个逻辑门的多个输出逻辑值,所述逻辑仿真输出集包括所述多个输出逻辑值。The electronic device according to any one of claims 10-12, wherein the logic simulation output set determining unit is further configured to use the clock logic value set and the original data input set to sequentially determine in the order of hierarchical circuits A plurality of output logic values of the plurality of logic gates in the first level circuit and the second level circuit, the logic simulation output set includes the plurality of output logic values.
  14. 根据权利要求10-13中任一项所述的电子设备,其中所述逻辑电路分级单元进一步用于按照所述逻辑电路的层级将所述第一层级电路的数据存储在存储器的第一区域并且将所述第二层级电路的数据存储在所述存储器的第二区域,所述第二区域不同于所述第一区域。The electronic device according to any one of claims 10-13, wherein the logic circuit grading unit is further configured to store the data of the first-level circuit in the first area of the memory according to the level of the logic circuit and Data for the second level of circuitry is stored in a second area of the memory, the second area being different from the first area.
  15. 一种用于仿真的方法,包括:A method for simulating, comprising:
    接收针对逻辑电路的逻辑仿真输出集和故障输入集;Receive a logic simulation output set and a fault input set for a logic circuit;
    至少基于所述逻辑仿真输出集,确定所述逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门;以及determining, based at least on the set of logic simulation outputs, a number of transmission logic gates in the logic circuit that can transmit signals in a number of time frames; and
    至少基于所确定的多个传输逻辑门和所述故障输入集,确定故障仿真输出集。A set of fault simulation outputs is determined based at least on the determined plurality of transmission logic gates and the set of fault inputs.
  16. 根据权利要求15所述的方法,其中至少基于所述逻辑仿真输出集确定所述逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门包括:The method of claim 15 , wherein determining, based at least on the set of logic simulation outputs, a plurality of transmission logic gates in the logic circuit that can transmit signals in a plurality of time frames comprises:
    基于所述逻辑仿真输出集,按照时间帧确定所述逻辑电路中的时序逻辑门在所述多个时间帧中的至少一个时间帧中是否被相应地触发;以及Based on the set of logic simulation outputs, determining whether sequential logic gates in the logic circuit are correspondingly triggered in at least one of the plurality of time frames according to time frames; and
    响应于所述逻辑电路中的第一组时序逻辑门在所述至少一个时间帧中被触发,将与所述第一组时序逻辑门的输入相关的组合逻辑门和所述第一组时序逻辑门确定为所述多个传输逻辑门。Responsive to a first set of sequential logic gates in the logic circuit being toggled in the at least one time frame, combining combinational logic gates associated with inputs to the first set of sequential logic gates with the first set of sequential logic gates A gate is determined as the plurality of transmission logic gates.
  17. 根据权利要求16所述的方法,其中基于所述逻辑仿真输出集确定所述逻辑电路中的各个时序逻辑门在所述多个时间帧中是否被相应地触发包括:The method according to claim 16, wherein determining whether each sequential logic gate in the logic circuit is correspondingly triggered in the plurality of time frames based on the set of logic simulation outputs comprises:
    基于所述逻辑仿真输出集中的、与各个时序逻辑门的时钟端口分别对应的时钟逻辑值,确定所述逻辑电路中的各个时序逻辑门在所述多个时间帧中是否被触发。Based on the clock logic values respectively corresponding to the clock ports of the respective sequential logic gates in the logic simulation output set, it is determined whether each sequential logic gate in the logic circuit is triggered in the plurality of time frames.
  18. 根据权利要求15-17中任一项所述的方法,其中至少基于所确定的多个传输逻辑门和故障输入集确定故障仿真输出集包括:The method of any one of claims 15-17, wherein determining the set of fault simulation outputs based at least on the determined plurality of transmission logic gates and the set of fault inputs comprises:
    确定待计算的逻辑门是否是传输逻辑门;以及determining whether the logic gate to be calculated is a transfer logic gate; and
    响应于确定所述待计算的逻辑门是传输逻辑门,使用源自所述故障输入集的逻辑值来确定所述待计算的逻辑门的故障输出逻辑值,所述故障仿真输出集包括所述故障输出逻辑值。In response to determining that the logic gate to be computed is a transmission logic gate, determining a fault output logic value for the logic gate to be computed using logic values derived from the set of fault inputs, the set of fault simulation outputs comprising the Fault output logic value.
  19. 根据权利要求15-18中任一项所述的方法,其中至少基于所述逻辑仿真输出集确定所述逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门包括:The method of any one of claims 15-18, wherein determining, based at least on the set of logic simulation outputs, a plurality of transmission logic gates in the logic circuit that can transmit signals in a plurality of time frames comprises:
    基于所述逻辑仿真输出集和所述故障输入集,确定所述故障输入集中的、与所述逻辑电路中的故障输入端口处对应的原始故障输入是否被激发;以及determining, based on the set of logic simulation outputs and the set of fault inputs, whether an original fault input in the set of fault inputs corresponding to a fault input port in the logic circuit is activated; and
    响应于所述原始故障输入在所述故障输入端口被激发,基于所述逻辑仿真输出集,确定所述逻辑电路中与所述故障输入端口相关的逻辑门中的、在所述多个时间帧中可传递信号的多个传输逻辑门。in response to the original fault input being activated at the fault input port, based on the set of logic simulation outputs, determining, in the logic gate associated with the fault input port in the logic circuit, during the plurality of time frames Multiple transfer logic gates in which signals can be passed.
  20. 根据权利要求15-19中任一项所述的方法,其中至少基于所述逻辑仿真输出集,确定所述逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门包括:The method of any one of claims 15-19, wherein determining, based at least on the set of logic simulation outputs, a plurality of transmission logic gates in the logic circuit that can transmit signals in a plurality of time frames comprises:
    至少基于所述逻辑仿真输出集,以多线程的方式并行地确定所述逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门。Based at least on the set of logic simulation outputs, a plurality of transmission logic gates in the logic circuit that can transmit signals in a plurality of time frames are determined in parallel in a multi-threaded manner.
  21. 一种计算机可读存储介质,存储多个程序,所述多个程序被配置为一个或多个处理器执行,所述多个程序包括用于执行权利要求15-20中任一项所述的方法的指令。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 program for executing the method described in any one of claims 15-20 method directive.
  22. 一种计算机程序产品,所述计算机程序产品包括多个程序,所述多个程序被配置为一个或多个处理器执行,所述多个程序包括用于执行权利要求15-20中任一项所述的方法的指令。A computer program product, the computer program product comprising a plurality of programs, the plurality of programs configured to be executed by one or more processors, the plurality of programs comprising a method for performing any one of claims 15-20 Instructions for the method described.
  23. 一种电子设备,包括:An electronic device comprising:
    一个或多个处理器;one or more processors;
    包括计算机指令的存储器,所述计算机指令在由所述电子设备的所述一个或多个处理器执行时使得所述电子设备执行权利要求15-20中任一项所述的方法。A memory comprising computer instructions which, 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 15-20.
  24. 一种电子设备,包括:An electronic device comprising:
    接收单元,用于接收针对逻辑电路的逻辑仿真输出集和故障输入集;a receiving unit, configured to receive a logic simulation output set and a fault input set for a logic circuit;
    传输逻辑门确定单元,用于至少基于所述逻辑仿真输出集确定所述逻辑电路中的、在多个时间帧中可传递信号的多个传输逻辑门;以及a transmission logic gate determination unit configured to determine a plurality of transmission logic gates in the logic circuit that can transmit signals in a plurality of time frames based at least on the set of logic simulation outputs; and
    故障仿真输出集确定单元,用于至少基于所确定的多个传输逻辑门和所述故障输入集确定故障仿真输出集。A fault simulation output set determining unit, configured to determine a fault simulation output set based at least on the determined plurality of transmission logic gates and the fault input set.
  25. 根据权利要求24所述的电子设备,其中所述传输逻辑门确定单元进一步用于The electronic device according to claim 24, wherein the transmission logic gate determining unit is further used for
    基于所述逻辑仿真输出集,按照时间帧确定所述逻辑电路中的时序逻辑门在所述多个时间帧中的至少一个时间帧中是否被相应地触发;以及Based on the set of logic simulation outputs, determining whether sequential logic gates in the logic circuit are correspondingly triggered in at least one of the plurality of time frames according to time frames; and
    响应于所述逻辑电路中的第一组时序逻辑门在所述至少一个时间帧中被触发,将与所述第一组时序逻辑门的输入相关的组合逻辑门和所述第一组时序逻辑门确定为所述多个传输逻辑门。In response to a first set of sequential logic gates in the logic circuit being triggered in the at least one time frame, combining combinational logic gates associated with inputs of the first set of sequential logic gates with the first set of sequential logic gates A gate is determined as the plurality of transmission logic gates.
  26. 根据权利要求25所述的电子设备,其中所述传输逻辑门确定单元进一步用于基于所述逻辑仿真输出集中的、与各个时序逻辑门的时钟端口分别对应的时钟逻辑值,确定所述逻辑电路中的各个时序逻辑门在所述多个时间帧中是否被触发。The electronic device according to claim 25, wherein the transmission logic gate determination unit is further configured to determine the logic circuit based on the clock logic values respectively corresponding to the clock ports of each sequential logic gate in the logic simulation output set Whether each sequential logic gate in is triggered in the plurality of time frames.
  27. 根据权利要求24-26中任一项所述的电子设备,其中所述传输逻辑门确定单元进一步用于The electronic device according to any one of claims 24-26, wherein the transmission logic gate determining unit is further configured to
    确定待计算的逻辑门是否是传输逻辑门;以及determining whether the logic gate to be calculated is a transfer logic gate; and
    响应于确定所述待计算的逻辑门是传输逻辑门,使用源自所述故障输入集的逻辑值来确定所述待计算的逻辑门的故障输出逻辑值,所述故障仿真输出集包括所述故障输出逻辑值。In response to determining that the logic gate to be computed is a transmission logic gate, determining a fault output logic value for the logic gate to be computed using logic values derived from the set of fault inputs, the set of fault simulation outputs comprising the Fault output logic value.
  28. 根据权利要求24-27中任一项所述的电子设备,其中所述传输逻辑门确定单元进一步用于The electronic device according to any one of claims 24-27, wherein the transmission logic gate determining unit is further configured to
    基于所述逻辑仿真输出集和所述故障输入集,确定所述故障输入集中的、与所述逻辑电路中的故障输入端口处对应的原始故障输入是否被激发;以及determining, based on the set of logic simulation outputs and the set of fault inputs, whether an original fault input in the set of fault inputs corresponding to a fault input port in the logic circuit is activated; and
    响应于所述原始故障输入在所述故障输入端口被激发,基于所述逻辑仿真输出集,确定所述逻辑电路中与所述故障输入端口相关的逻辑门中的、在所述多个时间帧中可传递信号的多个传输逻辑门。in response to the original fault input being activated at the fault input port, based on the set of logic simulation outputs, determining, in the logic gate associated with the fault input port in the logic circuit, during the plurality of time frames Multiple transfer logic gates in which signals can be passed.
PCT/CN2021/106565 2021-07-15 2021-07-15 Simulation method, apparatus, and device WO2023283891A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2021/106565 WO2023283891A1 (en) 2021-07-15 2021-07-15 Simulation method, apparatus, and device
CN202180098418.9A CN117377961A (en) 2021-07-15 2021-07-15 Method, device and equipment for simulation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/106565 WO2023283891A1 (en) 2021-07-15 2021-07-15 Simulation method, apparatus, and device

Publications (1)

Publication Number Publication Date
WO2023283891A1 true WO2023283891A1 (en) 2023-01-19

Family

ID=84918924

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/106565 WO2023283891A1 (en) 2021-07-15 2021-07-15 Simulation method, apparatus, and device

Country Status (2)

Country Link
CN (1) CN117377961A (en)
WO (1) WO2023283891A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117907812A (en) * 2024-03-20 2024-04-19 英诺达(成都)电子科技有限公司 Circuit detection method and device, electronic device, storage medium, and program product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5938785A (en) * 1997-08-19 1999-08-17 Vlsi Technology, Inc. Automatically determining test patterns for a netlist having multiple clocks and sequential circuits
CN105447213A (en) * 2014-08-29 2016-03-30 国际商业机器公司 Method and equipment for simulating circuit design
CN110119539A (en) * 2019-04-17 2019-08-13 西北核技术研究所 A kind of analysis method of combinational logic circuit Single event upset effecf propagation law
CN111079356A (en) * 2019-12-13 2020-04-28 西安电子科技大学 Single-particle reinforcement effectiveness system-level verification method
CN111931445A (en) * 2020-10-09 2020-11-13 芯华章科技股份有限公司 Method, emulator and storage medium for debugging logic system design
CN112100957A (en) * 2020-11-17 2020-12-18 芯华章科技股份有限公司 Method, emulator, storage medium for debugging a logic system design

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5938785A (en) * 1997-08-19 1999-08-17 Vlsi Technology, Inc. Automatically determining test patterns for a netlist having multiple clocks and sequential circuits
CN105447213A (en) * 2014-08-29 2016-03-30 国际商业机器公司 Method and equipment for simulating circuit design
CN110119539A (en) * 2019-04-17 2019-08-13 西北核技术研究所 A kind of analysis method of combinational logic circuit Single event upset effecf propagation law
CN111079356A (en) * 2019-12-13 2020-04-28 西安电子科技大学 Single-particle reinforcement effectiveness system-level verification method
CN111931445A (en) * 2020-10-09 2020-11-13 芯华章科技股份有限公司 Method, emulator and storage medium for debugging logic system design
CN112100957A (en) * 2020-11-17 2020-12-18 芯华章科技股份有限公司 Method, emulator, storage medium for debugging a logic system design

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117907812A (en) * 2024-03-20 2024-04-19 英诺达(成都)电子科技有限公司 Circuit detection method and device, electronic device, storage medium, and program product

Also Published As

Publication number Publication date
CN117377961A (en) 2024-01-09

Similar Documents

Publication Publication Date Title
US7331024B2 (en) Power-consumption calculation method and apparatus
US6816825B1 (en) Simulation vector generation from HDL descriptions for observability-enhanced statement coverage
CN101779179B (en) Method and apparatus for detecting clock gating opportunities in a pipelined electronic circuit design
US8244515B2 (en) Structure for detecting clock gating opportunities in a pipelined electronic circuit design
US20070074136A1 (en) Using constraints in design verification
Chappell et al. LAMP: Logic‐Circuit Simulators
Kolbi et al. Symbolic RTL simulation
WO2023283891A1 (en) Simulation method, apparatus, and device
Shazli et al. Using boolean satisfiability for computing soft error rates in early design stages
Ulrich et al. High-speed concurrent fault simulation with vectors and scalars
US10007746B1 (en) Method and system for generalized next-state-directed constrained random simulation
JP4221730B2 (en) Circuit conjunction standard form generation method, circuit conjunction standard form generation apparatus, hazard check method, and hazard check apparatus
US10747601B2 (en) Failure estimation in circuits
US20130174107A1 (en) Design tool for glitch removal
Levendel et al. Parallel fault simulation using distributed processing
US10523186B1 (en) Vulnerability determination in circuits
US11106846B1 (en) Systems and methods for emulation data array compaction
WO2023070301A1 (en) Method, apparatus and device for logic simulation
Garashchenko et al. Development of an approach to automatic test generation based on the graph model of a cache hierarchy
Xu et al. Practical application of formal verification techniques on a frame mux/demux chip from Nortel Semiconductors
Beckler et al. GPU-accelerated fault dictionary generation for the TRAX fault model
Hahanov et al. «Quantum» processor for digital systems analysis
US20230177244A1 (en) Creation of reduced formal model for scalable system-on-chip (soc) level connectivity verification
Chen et al. Automatic abstraction refinement for generalized symbolic trajectory evaluation
US11022649B2 (en) Stabilised failure estimate in circuits

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: 21949677

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202180098418.9

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE