Category:SystemVerilog: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
No edit summary
Line 1: Line 1:
SystemVerilog is a language used for hardware design and verification. It is defined by IEEE standard 1800-2005, which extends the hardware description language Verilog (IEEE 1364-2001). SystemVerilog has strong support for concurrency, but though the execution model is based on a single thread that provides the illusion of concurrency via a simulation model known as two-list simulation: first all the "outputs" (of all processes) are calculated as functions of the current inputs; and then the inputs to all processes are updated from the outputs that drive them. So, for example:
{{stub}}{{language}}

<lang:SystemVerilog>
always @(posedge clk) begin
a <= b;
b <= a;
end
</lang>

simply swaps the two values on each rising clock edge. The result of both the the assignments are calculated on their rhs input values at the start of the simulation "delta cycle". Only after both updates are known will the assignments actually be performed. So there is a strong illusion that the two statements execute concurrently.

SystemVerilog adds many features:

Design Subset:

* packed structures and unions
* enumeration types

Verification Subset:

* classes
* (temporal) assertions
* random sequence generation, and constrained random variables

Revision as of 19:13, 2 September 2010

SystemVerilog is a language used for hardware design and verification. It is defined by IEEE standard 1800-2005, which extends the hardware description language Verilog (IEEE 1364-2001). SystemVerilog has strong support for concurrency, but though the execution model is based on a single thread that provides the illusion of concurrency via a simulation model known as two-list simulation: first all the "outputs" (of all processes) are calculated as functions of the current inputs; and then the inputs to all processes are updated from the outputs that drive them. So, for example:

<lang:SystemVerilog>

 always @(posedge clk) begin
   a <= b;
   b <= a;
 end

</lang>

simply swaps the two values on each rising clock edge. The result of both the the assignments are calculated on their rhs input values at the start of the simulation "delta cycle". Only after both updates are known will the assignments actually be performed. So there is a strong illusion that the two statements execute concurrently.

SystemVerilog adds many features:

Design Subset:

  • packed structures and unions
  • enumeration types

Verification Subset:

  • classes
  • (temporal) assertions
  • random sequence generation, and constrained random variables

Subcategories

This category has the following 3 subcategories, out of 3 total.