Top "System-verilog" questions

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

Ones count system-verilog

I have a wire vector with 64 bits; wire [63:0] sout; I want to compute the sum of these bits or, equivalently, …

system-verilog
What's the best way to tell if a bus contains a single x in verilog?

I have a test bench that monitors a bus. Some of signals within the bus can be 1'bx. For a …

verilog system-verilog
Continuous assignment verilog

-This code is written in verilog using Modelsim 10.2d.The errors below indicate there is some problem with {cout,l3} …

variable-assignment verilog system-verilog alu
Connecting hierarchical modules: struct vs interface in SystemVerilog

In SystemVerilog hierarchical modules can be connected by simple data types, complex data types (structs, unions, etc), or interfaces. The …

system-verilog
How to define time unit and time precision

//`timescale 10ps/1fs module time_presion(); timeunit 100ps/10ps; //If We change this to 100ns/10ps it works fine parameter …

system-verilog
Incrementing Multiple Genvars in Verilog Generate Statement

I'm trying to create a multi-stage comparator in verilog and I can't figure out how to increment multiple genvars in …

hardware syntax-error verilog system-verilog hdl
How do I sign extend in SystemVerilog?

Below is the code I have for my module: module sext(input in[3:0], output out[7:0]); always_comb begin if(in[3]==1…

system-verilog
Handling parameterization in SystemVerilog packages

SystemVerilog added packages to provide namespaces for common code pieces (functions, types, constants, etc). But since packages are not instantiated, …

verilog system-verilog
What should '{default:'1} do in system verilog?

I have an array that I would like to initialize to all 1. To do this, I used the following code …

system-verilog
How do I run the verilog code on a testbench?

I wrote the code for a ripple carry adder. Testbench is also available. How do I run this test bench …

verilog system-verilog iverilog