Horia-Răzvan Enescu

How to Unpack Data Using the SystemVerilog Streaming Operators (>>, <<)

In this post I show how to use the streaming operators to unpack data into variables or data structures in SystemVerilog. This is the second part of a 3-post series on data packing/unpacking operations and the natural follow-up to the first part that focuses on packing data using streaming operators. The unpacking operation is the […]

Horia-Răzvan Enescu

How to Pack Data Using the SystemVerilog Streaming Operators (>>, <<)

The verification of digital circuits requires dealing with bits and bytes. It is not a trivial thing to pack or unpack bits, bytes, half words, words or user defined data structures. This post is the first in a series of tutorials about packing and unpacking in SystemVerilog. The article’s sections are: Introduction 1. Pack bytes […]

Stefan Birman

How To Reduce the Number of VIP Instances using Accessor Classes

In this post I demonstrate how to use parameterization and accessor classes in order to reduce a variable number of VIP instances to a single VIP instance. The implementation I describe might improve the overall performance of the verification environment by reducing the number of threads and the amount of maintenance required (e.g. fewer instances, […]

Horia-Răzvan Enescu

How to Implement Flexible Coverage Definitions (Part 3)

In the final part of this 3-post series (Part 1, Part 2), I will show a way of covering enum transitions and conditionally ignoring transitions to and from certain enum values. For example, in the case of a CPU’s instruction set, you want to make sure that all possible combinations of two consecutive instructions are […]

Horia-Răzvan Enescu

How to Implement Flexible Coverage Definitions (Part 2)

In part 1 of this 3-post series, I presented a way of defining flexible coverage definitions in SystemVerilog using the with clause. In this second post, I will show a way of achieving the same flexibility for transition coverage. As SystemVerilog’s grammar doesn’t allow us to use the with clause for defining transition bins, we […]

Horia-Răzvan Enescu

How to Implement Flexible Coverage Definitions (Part 1)

In the first part of this 3-post series, I would like to show a compact way of defining flexible coverage in SystemVerilog that adapts to a variable parameter. Let’s consider the case where you need to cover the size of a burst, which can range between 1..max, with max being configurable within 1..N. The bins […]