USPatent applicationPatented

Scheduling processes in simulation of a circuit design

Granted 23 Jul 2013 · 1 office action

Current assignee: Xilinx · originally Advanced Micro Devices, Inc

Law firm: Law firm · Log in to unlock

Attorney: Attorney · Log in to unlock

Inventors: Valeria Mihalache, Sonal Santan, Kumar Deepak, Hem C. Neema · Examiner: Suchin Parihar · AU 2825 · TC 2800

Application· this page
13/347,301
filed 10 Jan 2012
Publication
Not published
not published
Patent
US 8,495,539
granted 23 Jul 2013

Life of the application

7 dated events
⤢ drag to zoom20122014201620182020202220242026202820302032ProsecutionOwnershipTerm & fees
ProsecutionOwnershipTerm & feeshover for detail · click to open

Abstract

A method for compiling an HDL specification for simulation includes elaborating the HDL specification and determining singly-driven and multiply-driven nets of the elaborated circuit design. For each singly-driven net, a respective memory location is assigned to store a value of a corresponding driver of the net at runtime. For each multiply-driven net, a contiguous block of memory is assigned to store values of corresponding drivers of the net at runtime. For mixed language designs, this contiguous block contains values for drivers from all HDL languages involved. Simulation code that models the circuit design is generated. For each singly-driven net, the simulation code is configured to store a value of the corresponding driver of the singly-driven net in the respective memory location. For each multiply-driven net, the simulation code is configured to store the values of the corresponding drivers in the assigned block of memory. The generated simulation code is stored.

Description

8 parts
›FIELD OF THE INVENTION

One or more embodiments generally relate to the simulation of circuit designs.

›BACKGROUND · 1 of 2

Due to advancements in processing technology, complex integrated circuits (ICs) can be designed at various levels of abstraction. Using a hardware description language (HDL), circuits can be designed at the gate level, the register transfer level (RTL), and higher logical levels. When designing using an HDL, the design is often structured in a modular manner. The designer describes a module in terms of the behavior of a system, the behavior describing the generation and propagation of signals through modules of combinatorial logic from one set of registers to another set of registers. HDLs provide a rich set of constructs to describe the functionality of a module. Modules may be combined and augmented to form even higher-level modules.

Prior to implementation, an HDL-based design can be simulated to determine whether the design will function as required. Wasted manufacturing costs due to faulty design may thereby be avoided. Numerous tools are available for simulating circuit designs including, for example, high-level modeling systems (HLMS) and HDL simulators.

Simulation of an HDL-based design comprises a compilation phase and a runtime simulation phase. In the compilation phase, HDL source code is input, analyzed, and elaborated to generate executable simulation code. In the runtime simulation phase, the code generated in the compilation phase is executed by a simulation engine to simulate the design.

From a user perspective, HDL simulators work by compiling the HDL-based design once, and then executing the compiled design many times during the runtime phase. Therefore, the runtime performance of HDL simulators is of critical importance, and may be more important than compile time performance.

An HDL-based design is a hierarchy of modules, whose behavior is described by means of HDL processes. When the HDL-based design is written in the VHDL language, an HDL process corresponds to either a VHDL process, a concurrent signal assignment, or a concurrent assertion. When the HDL-based design is written in the Verilog language, an HDL process corresponds to either a Verilog always block, an initial block, an assign statement, or a gate. Procedure calls may or may not be regarded as HDL processes. From a hardware perspective, the HDL processes represent hardware that responds to changes in inputs. For example, a change to an output of one circuit may trigger responses in multiple circuits having inputs coupled to the output.

HDL simulators schedule execution of HDL statements such that global variables or signals input to the HDL statements are properly updated and race conditions between concurrent HDL statements are avoided. Simulation of HDL processes is performed over a number of simulation cycles. Each simulation cycle begins with updates to values of nets. Each net, which may be a VHDL signal or a Verilog net, represents values transmitted in a wire of a circuit design. For ease of reference, VHDL signals and Verilog nets may be referred to as either signals or nets, and such terms are used interchangably herein. Each update to a net may trigger a number of processes which model how a hardware implementation of the design would respond. Processes dependent on the updated nets are scheduled and executed in a delta cycle.

Depending on the circuit design, a net may be changed or updated by the output of multiple processes. Each process output that may affect a net is referred to as a driver. If a process has several statements assigning values to the same net, only one driver for the net is created per process. The value of the driver is computed from all the values assigned to that signals in the process, according to predefined language rules. A net that has at most one driver for each bit is said to be singly-driven. A net that has several drivers on the same set of bits is said to be multiply-driven.

When a net is driven by multiple drivers, a value of the net is determined when nets are updated at runtime using a resolution function. The value computed by the resolution function is referred to as the resolved value, and the resolved value will be assigned as the new value of the net. The process of computing the new value from the driver values of a net is called driver resolution. The resolution function can be standard, defined by the HDL language itself or, for VHDL, can be user defined.

Previous methods for simulation of HDL circuit designs compile the designs and generate simulation code on a module-by-module basis, with no regard to inter-module signal dependencies. Rather, dependancies between drivers, nets, and processes are determined dynamically at runtime. As a result, it is not determined whether a net is multiply-driven or singly-driven until runtime. Accordingly, the simulation code generated by the previous methods at compile time must be general enough to be capable of handling either singly-driven or multiply-driven nets. Large data structures of pointers are created to store the values of drivers and nets, as well as determined dependencies between the two. These data structures require a significant amount of memory to store data values and pointers between the data structures.

The data structures are either general enough to handle multiply-driven scenarios even for the singly-driven nets, or are dynamically created at runtime. Because multiply-driven nets require more complex data structures, the general data structures are computationally inefficient for singly-driven nets. Furthermore, when data structures are dynamically created, memory to store the values of drivers and signals is allocated at runtime. Due to the dynamic allocation of memory, driver values that are needed to resolve the value of a net at runtime may be stored in separate locations of memory. As a result, the resolution function may have to separately access a large number of different locations of memory to retrieve all the driver values that are needed to resolve the value of a net. Due to the large number of nets and drivers used in a typical simulation of an HDL circuit design, these separate memory accesses by the resolution function can significantly impact simulation runtime.

›BACKGROUND · 2 of 2

One or more embodiments may address one or more of the above issues.

›SUMMARY

In one embodiment, a method for compiling a hardware description language (HDL) specification for simulation is provided. The circuit design is elaborated from the HDL specification and singly-driven and multiply-driven nets of the elaborated circuit design are determined. For each singly-driven net, a respective memory location is assigned to store a value of a corresponding driver of the net at runtime. For each multiply-driven net, a contiguous block of memory is assigned to store values of corresponding drivers of the net at runtime. Simulation code that models the circuit design is generated. For each singly-driven net, the simulation code is configured to store a value of the corresponding driver of the singly-driven net in the respective memory location. For each multiply-driven net, the simulation code is configured to store the values of the corresponding drivers in the assigned block of memory. The generated simulation code is stored in a computer readable medium.

In another embodiment, a method is provided for simulating a circuit design using a compiled HDL specification of the circuit design. The compiled HDL specification indicates a respective block of memory assigned to each net of the circuit design. In each simulation cycle, a set of scheduled processes of the compiled HDL specification are executed. Net values are resolved and updated using the respective blocks of memory, which store values of drivers of the nets. In response to resolving a value of a net, processes of the compiled HDL specification that are dependent on the net for execution in the next simulation cycle are scheduled.

In yet another embodiment, an article of manufacture is provided. The article is characterized by a non-transitory electronically readable storage medium storing instructions that, when loaded into a processor, causes the processor to receive and compile a HDL specification for simulation of a circuit design. As part of the compilation process, the processor elaborates the circuit design from the HDL specification and determines singly-driven and multiply-driven nets of the elaborated circuit design. For each singly-driven net, a respective memory location is assigned to store a value of a corresponding driver of the net at runtime. For each multiply-driven net, a contiguous block of memory is assigned to store values of corresponding drivers of the net at runtime. Simulation code is generated by the processor that models the circuit design. The simulation code is configured to store values of drivers of singly driven nets, at runtime, in the respective memory location and store values of drivers of each multiply-driven net, at runtime, in the assigned block of memory.

It will be appreciated that various other embodiments are set forth in the Detailed Description and Claims, which follow.

›BRIEF DESCRIPTION OF THE DRAWINGS

Various aspects and advantages of the disclosed embodiments will become apparent upon review of the following detailed description and upon reference to the drawings, in which:

FIG. 1 shows a flowchart of a process for compiling an HDL specification in accordance with one or more embodiments;

FIG. 2 shows a flowchart of a process for identifying singly-driven and multiply-driven nets in accordance with one or more embodiments;

FIG. 3 shows a flowchart of a process for allocating contiguous memory blocks for the nets in accordance with one or more embodiments;

FIG. 4 shows a flowchart of a process for updating nets in response to changes in value of drivers in accordance with one or more embodiments; and

FIG. 5 shows a computing architecture that may be configured to perform the compilation and simulation processes.

›DETAILED DESCRIPTION

One or more embodiments provide a method of HDL simulation that determines driver, net, and process dependencies for the entire circuit design during compilation. Singly-driven and multiply-driven nets are identified during compilation. Simulation code and data structures are generated for each net, based on whether each net is singly-driven or multiply-driven. As a result, less complex code and data structures may be generated for singly-driven nets. In this manner, computation and memory resources required at simulation runtime are reduced. The additional compilation time imposed by this approach is offset by gains in runtime performance since HDL-based designs are typically simulated many times following compilation. The envisioned embodiments are applicable to circuit designs written in VHDL, Verilog, or a combination of VHDL and Verilog.

FIG. 1 shows a flowchart of a process for compiling an HDL specification in accordance with one or more embodiments. An HDL circuit design specification is traversed at block 102 and driver information is collected for all nets of the design. If the circuit design is a mixed language design (e.g., described using a combination of VHDL and Verilog), driver information is collected for both VHDL and Verilog modules. For each net, the process determines whether the net is singly-driven or multiply-driven at block 104 . At block 106 , a data structure is created for each net and a block of memory is statically allocated for the data structure at block 106 . The allocation of the block of memory is static in that the address of the block of memory is fixed and does not change at runtime. This static assignment during compilation allows values of all drivers of a signal to be stored in a compact location and quickly accessed for resolution during runtime as discussed in more detail below.

Simulation code that models execution of the HDL specification is generated at block 108 . The simulation code is generated to handle singly-driven and multiply-driven nets. For both singly-driven and multiply-driven nets, the simulation code is configured to use the static memory locations, which were allocated at block 106 , to store values of drives of the nets at simulation runtime.

Different drivers may drive different bits of a net. For instance, Example 1 shows a VHDL code segment having two drivers D1 and D2 for a VHDL signal S:

entity e is end e; architecture a of e is

signal S: std_logic_vector(0 to 7);

begin

process begin

S(3 to 4)<=“11”; - - - driver D1 wait;

end process; process begin

S(1 to 4)<=“0011”; - - - driver D2 wait;

end process;

end a;

›EXAMPLE 1 · 1 of 2

In this example, driver D1 drives bits 3 and 4 of signal S, whereas driver D2 drives bits 1, 2, 3 and 4 of signal S. As a result, compile time driver analysis and runtime driver resolution are performed on a per-bit basis.

FIG. 2 shows a flowchart of a process for identifying singly-driven and multiply-driven nets during HDL compilation in accordance with one or more embodiments. At block 202 , for each net, bits of the net are sequentially checked at blocks 204 , 206 , and 210 to determine if a bit has more than one non-forced driver. If so, the net is identified as a multiply-driven net at block 208 , and the process returns to block 202 to commence checking the next net. If all bits have been determined to have at most one non-forced driver at decision block 210 , the net is identified as a singly-driven net at block 212 and the process is repeated for the next net at block 202 .

For a mixed language design, language boundaries are traversed and driver information is collected for the mixed signal that corresponding to this net. When a net that crosses language boundaries is marked as multiply or singly driven, the corresponding mixed language signal is marked as well.

In one or more embodiments, the memory to be used at runtime for each net is determined during compilation in order to avoid the need for dynamically allocating the memory during the runtime phase. Multiply-driven nets are assigned contiguous blocks of memory during compilation to store values of various drivers of the nets. For a mixed language design, these contiguous blocks of memory include the driver information from both the VHDL and Verilog processes. The contiguous memory improves locality of memory locations used to store driver values needed to perform driver resolution. For example, when all driver values of a bit are stored in adjacent memory locations, the values can be more efficiently loaded into the cache memory at runtime, resulting in better cache performance.

FIG. 3 shows a flowchart of a process for allocating contiguous memory blocks for nets during compilation in accordance with one or more embodiments. As discussed above, different simulation code is generated to handle singly-driven and multiply-driven nets. For each singly-driven net, a single memory location is assigned to store the value of the net at runtime at block 306 . For each multiply-driven net, a static block of memory is assigned. The static block includes a sub-block of contiguous memory locations for the drivers of each bit of the net. Block 308 controls a process loop for allocating the sub-block of memory for each bit of the multiply-driven net. At block 310 , a number of drivers (N) of the bit is determined, and a sub-block of memory having N contiguous memory locations is allocated for this bit. The process repeats until decision block 312 determines that a memory sub-block has been allocated for each bit of the net.

As described above, each simulation cycle performs updates to values of nets. Each update to a net may trigger a number of processes. Processes dependent on the updated nets are scheduled and executed in the delta cycle. Due to the analysis of drivers during compilation, runtime handling of nets is simplified. Whether a signal is singly-driven or multiply-driven, the code generated in the update function implements only two main actions: 1) update net values, and 2) schedule processes that are sensitive to changes in value of the net. For multiply-driven signals, the values of the drivers will also be computed during the execute phase of the simulation kernel, and the values of signals are updated according to these drivers' values. During the update phase, driver resolution has to take place for all the signals that need to be changed. The resolved value has to be assigned as the new value of the signal, and processes sensitive to this signal have to be scheduled for the next delta cycle.

FIG. 4 shows a flowchart of a process for updating nets in response to changes in the values of drivers in accordance with one or more embodiments. In response to detecting a change in the value of a driver of a net at block 402 , the process determines if the net is singly-driven or multiply-driven at decision block 404 . If the net is singly-driven, the memory location corresponding to the value of the net is updated with the value of the driver at block 406 . If the net is multiply-driven, block 408 commences processing for each bit driven by the driver. If the driver is the only non-forced driver of the bit (decision block 410 ), a memory location corresponding to a value of the bit is updated with the value of the driver at block 412 .

As described above, the values of bits having multiple drivers are determined by a resolution function based on the values of the drivers of the bit. If the bit is multiply-driven (i.e., has multiple non-forced drivers), a memory location corresponding to the driver is updated in a block of memory corresponding to the bit of the net at block 414 . The processing of blocks 410 , 412 , and 414 is repeated until all bits of the net driven by the driver have been updated, as determined decision block 416 .

After all driver/bit values have been updated for each bit at blocks 412 or 414 , a driver resolution function is executed at block 418 . The driver resolution function determines bit values for each of the multiply-driven bits based on the driver values updated at block 414 . Once memory values have been updated at blocks 406 , 412 , or 418 , processes sensitive to changes in the net are scheduled at block 420 .

If the simulation is a mixed language simulation, conversion between driver value formats may be handled in a number of ways. In one implementation, driver values are stored to be compatible with the HDL language used to describe the top level module that uses the corresponding net. Conversion of driver values to other HDL language may then occur when lower level modules are scheduled.

FIG. 5 shows a block diagram of an example computing arrangement that may be configured to implement the compilation and/or simulation processes described herein. It will be appreciated that various alternative computing arrangements, including one or more processors and a memory arrangement configured with program code, would be suitable for hosting the processes and data structures and implementing the algorithms of the different embodiments. The computer code, comprising the processes of one or more embodiments encoded in a processor executable format, may be stored and provided via a variety of computer-readable storage media or delivery channels such as magnetic or optical disks or tapes, electronic storage devices, or as application services over a network.

›EXAMPLE 1 · 2 of 2

Processor computing arrangement 500 includes one or more processors 502 , a clock signal generator 504 , a memory unit 506 , a storage unit 508 , and an input/output control unit 510 coupled to a host bus 512 . The arrangement 500 may be implemented with separate components on a circuit board or may be implemented internally within an integrated circuit. When implemented internally within an integrated circuit, the processor computing arrangement is otherwise known as a microcontroller.

The architecture of the computing arrangement depends on implementation requirements, as would be recognized by those skilled in the art. The processor 502 may be one or more general purpose processors, or a combination of one or more general purpose processors and suitable co-processors, or one or more specialized processors (e.g., RISC, CISC, pipelined, etc.).

The memory arrangement 506 typically includes multiple levels of cache memory, and a main memory. The storage arrangement 508 may include local and/or remote persistent storage, such as provided by magnetic disks (not shown), flash, EPROM, or other non-volatile data storage. The storage unit may be read or read/write capable. Further, the memory 506 and storage 508 may be combined in a single arrangement.

The processor arrangement 502 executes the software in storage 508 and/or memory 506 arrangements, reads data from and stores data to the storage 508 and/or memory 506 arrangements, and communicates with external devices through the input/output control arrangement 510 . These functions are synchronized by the clock signal generator 504 . The resource of the computing arrangement may be managed by either an operating system (not shown), or a hardware control unit (not shown).

The embodiments may be applicable to a variety of systems for HDL simulation. Other aspects and embodiments will be apparent from consideration of the specification. It is intended that the specification and illustrated embodiments be considered as examples only, with a true scope of the embodiments being indicated by the following claims.

Claims as granted

19 claims

Log in to read the claims of this application.

Log in to unlock

Classifications

2 codes
IPC · International Patent Classification
Section G — Physics
  • G06F17/50
USPC · US Patent Classification
716/110

Claim changes

Soon
Coming soonHow the claims changed between publication and grant

See which claims were amended, added or cancelled during examination, with every added and removed word marked.

AmendedAddedCancelledUnchanged

The published claims of this application are not paired with the granted ones in what we hold.

File wrapper

⤢ drag to zoomJan 2012Apr 2012Jul 2012Oct 2012Jan 2013Apr 2013Jul 2013USPTOApplicantNon-final rejectionResponse after non-finalNotice of allowance
USPTOApplicanthover for detail · click to open
Pendency
1.5 y
560 days filing → grant
Office actions
1
non-final + final
Responses
1
no RCE
Examiner
Suchin Parihar
art unit 2825 · TC 2800
Citations: 3 back · 0 forward

See the full prosecution history — every USPTO and applicant action on this file, in order.

Log in to unlock

Documents

Log in to open the documents of this file: the application as filed, every office action and response, the notice of allowance.

Log in to unlock

Chain of title

⤢ drag to zoom20122014201620182020202220242026202820302032Owner 1
Titlehover for detail · click to open

See the full assignment history — every owner this patent has passed through, with recordation dates and reel/frame numbers.

Log in to unlock