Top "System-verilog" questions

SystemVerilog is a unified hardware design, specification, and verification language based on extensions to Verilog.

How to create a string from a pre-processor macro

I have a preprocessor macro that represents a hierarchical path into my design. Example: `define HPATH top.chip.block I …

macros verilog system-verilog
What is the benefit of automatic variables?

I'm looking for benefits of "automatic" in Systemverilog. I have been seeing the "automatic" factorial example. But I can't get …

system-verilog
Are SystemVerilog arrays passed by value or reference?

By default, does SystemVerilog pass arrays by value or reference? For example: int array[5] = '{0,1,2,3,4}; some_function(array); // <-- …

arrays system-verilog
what is the difference between automatic and static task,why we cant pass by reference to a static task

What is the difference between the static and automatic tasks. program class_ref; int index,value; class holding_values; int …

system-verilog
How to define a parameterized multiplexer using SystemVerilog

I am trying to create a module which switches x input data packets to a single output packet according to …

verilog system-verilog
How do I get name of an instance using a method operating on it in SystemVerilog?

Is there any way a method can get name of the object it operates on in SystemVerilog ? Like implementing object1.…

object verilog system-verilog
Is there a function equivalent for $sformat?

I'm writing SystemVerilog code and I notice that $sformat is a system task, not a function. Is there a function …

verilog system-verilog
How to use clock gating in RTL?

I am clock gating some latch and logic in my design. I don't have much experience in synthesis and place &…

verilog system-verilog register-transfer-level vlsi
How do I read an environment variable in Verilog/System Verilog?

How do I read an environment variable in Verilog ? (Running on a VCS simulator) I am trying to accomplish File=$…

environment-variables verilog system-verilog
SystemVerilog foreach syntax for looping through lower dimension of multidimensional array

What is the standard way of looping through the lower dimension of a multidimensional array? With the higher dimension fixed. …

arrays multidimensional-array foreach system-verilog