Questions tagged [system-verilog]

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

SystemVerilog is a unified hardware description language () and verification language. Its two primary uses are to describe logical circuits targeted towards field-programmable gate arrays (FPGAs - ), programmable logic devices (PLD) and application-specific integrated circuits (ASICs - ) and to develop tests and environments to validate these circuit descriptions.

It is defined by IEEE 1800-2017 and with the exception of keywords, is a backwards-compatible superset of , IEEE 1364-2005.

3298 questions
1
vote
2 answers

How to connect SystemC model with SystemVerilog?

Say we have a SystemC model of decade counter and I want to verify SystemVerilog Counter RTL using SystemC model. How can we connect these two in SV/UVM based testbench so as to communicate between them.
MayurKubavat
  • 341
  • 4
  • 10
1
vote
2 answers

Bitwise-or all fields in Verilog struct

Let's say that I have an array of buses, each one carrying a struct like so: typedef struct packed { logic [31:0] piano_concerto_in_d_minor; logic [31:0] piano_concerto_in_c_minor; logic [7:0] nationality; }…
John M
  • 1,484
  • 1
  • 14
  • 27
1
vote
1 answer

Assign and Truncate Packed Arrays

Recently I've been coding an FFT module, and as you may think it requires a lot of wires. In order to simplify the code I'm trying to use packed arrays. But I got a problem in truncating and assigning. Suppose I have a 48-bit vector A, divided into…
João
  • 13
  • 3
1
vote
1 answer

Randomly Map Bits in Verilog

I am trying to create a simple, synthesizable module that randomly maps bits of an output to bits of the input without duplicates. For example, something like this for 8-bit in/out: module Scrambler(in, out); parameter WIDTH = 8; input…
Jim Fialho
  • 11
  • 1
1
vote
1 answer

Concurrent Assertion - UVM test dependency

I want to write concurrent assertion which starts after some register write is performed on the DUT from UVM testbench. class test extends uvm_test; bit flag; task run_phase(uvm_phase phase); //call register write task , data is chosen in a random…
sharvil111
  • 4,301
  • 1
  • 14
  • 29
1
vote
1 answer

Precedence of chained unary operators in SVA assertions

For a tool, I'm trying to correctly parse SystemVerilog assertions, and am confused about the correct precedence for certain expressions. The SystemVerilog standard has a nice table where they say that not > until > always for precedence. But I…
Jared Davis
  • 559
  • 4
  • 12
1
vote
1 answer

Using a file name string as a SystemVerilog interface parameter?

Is it possible to use a string as a SystemVerilog interface paramter. I have 4 instances of the same interface, and I was wondering if I can `include different assertion files for each instance. My interface looks like this: interface dai_if…
Robert Owen
  • 37
  • 1
  • 7
1
vote
1 answer

UVM configuration database error when binding interface assertions

I have 4 instances of a DAI interface in my testbench. I have been running some simulations with my created environment and have had no issues with errors. However, when I attempt to bind my assertions to the interface instances, I get an error…
Robert Owen
  • 37
  • 1
  • 7
1
vote
2 answers

Verilog module outputs z's

I'm trying to make a parameter and module to AND two numbers together and return a result. However, I seem to be having troubles. My code is as follows: module main; reg signed [3:0] x; reg signed [3:0] y; wire [3:0] out1; ander…
1
vote
3 answers

system verilog : Overridden members system verilog classes

class my_a; int member1 = 1; endclass class my_ea extends my_a; int member1 = 2; endclass Now when I do my_a A; my_ea EA; EA =new(); A=EA; EA = new(); has given handle to object of type my_ea to class variable EA. A=EA; passes the same handle…
jinam shah
  • 11
  • 1
  • 3
1
vote
1 answer

Wait for A Bit Change in Same Timestep in SV

Here is the code module m; bit x; initial begin fork begin wait(x == 1); wait(x == 0); end begin @(x == 1); @(x == 0); end #10 $display("Timeout"); join_any disable…
Karan Shah
  • 1,912
  • 1
  • 29
  • 42
1
vote
1 answer

Unbounded (infinite) repetitions in transitions for covergroup bins

How can I define coverage bin for transition that might have many repetitions in it? What I'm trying to do is something like this: bins st = (2=> 3[* 1:$] => 2); Of course, this doesn't work. Simulators give error messages when compiling this line.…
Convergent
  • 130
  • 9
1
vote
1 answer

Is it possible to access a derived class's method from a base class by using $cast in systemverilog?

I'm trying to grasp the concept of casting in SystemVerilog and have been tinkering with the following code: class packet; virtual function int compute_crc(); compute_crc = 12345; endfunction virtual task print; $display("This is a…
je_pat
  • 15
  • 4
1
vote
1 answer

Aldec Riviera-PRO break simulation on SystemVerilog $error or $warning

Is is possible to configure Aldec Riviera-PRO simulator to break simulation on either $error or $warning SystemVerilog calls? If it is then how?
kraigher
  • 629
  • 4
  • 9
1
vote
2 answers

disable statement not killing other block in the fork statement

This is the code module aks(); initial begin rad temp ; temp = new; temp.fork_ll(); end endmodule //This is Class Which is used in above module class rad; task fork_ll(); fork begin:MYLOOP …
Akshay Patil
  • 143
  • 2
  • 2
  • 10