Questions tagged [system-verilog]

In the semiconductor and electronic design industry, SystemVerilog is a combined hardware description language and hardware verification language based on extensions to Verilog.

Filter by
Sorted by
Tagged with
0 votes
1 answer
70 views

My FIR filter inputs and outputs are either giving zero or xxx on Systemverilog

I am trying to design an FIR filter which reads very small 10 bit decimal fractions of 2 integer bits and 8 fractional bits as the input and coefficients. But anytime I run the testbench my ...
topeagb's user avatar
1 vote
1 answer
29 views

Dataflow operation on a variable is making it a don't care term (Verilog)

I want to implement a 4-bit parallel adder and subtractor using the same circuit while using a control input variable to switch between addition and subtraction. When my ...
Lev Yashvin's user avatar
1 vote
1 answer
68 views

Detect a 1 to 0 transition in an input in Verilog

I'm practicing Verilog using the HDLBits website, and I am trying to solve this problem where I have been given a 32-bit wide input signal and I have to detect whenever a ...
Socks's user avatar
  • 25
-1 votes
0 answers
28 views

Synthesis tool support for system verilog nested interfaces [closed]

Does any one know an EDA synthesis tool for SystemVerilog nested interfaces? A nested interface is an interface inside another interface. I am targetting both FPGA and IC synthesizers. Thank you for ...
stefaniecg's user avatar
1 vote
1 answer
49 views

Instantiating an array of modules in Verilog without using a loop

Let's say I have a module called mymodule. I need to call it 10 times in my top_module file. I have seen someone on ResearchGate ...
Socks's user avatar
  • 25
0 votes
1 answer
52 views

Questasim Unable to find VHDL package not compiled into work

I'm currently trying to simulate a VHDL module with a SV testbench. The VHDL module contains several packages that are compiled into various libraries so in order to avoid compile errors within the ...
EpicFoodCartDestroyer's user avatar
0 votes
3 answers
67 views

How to use variable wire data as an integer data for part select? [duplicate]

I am trying to control the width of data bus using part select. But, the following error occurs: r_count is not a constant. Is there a way in which I can use the ...
Rezef's user avatar
  • 93
-1 votes
1 answer
101 views

Logical AND vs Bitwise AND for single bit and multibits [duplicate]

What is the functional and physical difference in using Logical AND ( && ) and Bitwise AND (&&) over singlebit and multibit signals. Below shared cases. case 1: A[3:0] & B[3:0] = ?...
DonMano's user avatar
  • 11
0 votes
0 answers
43 views

How to use IF/ELSE conditions in xemacs verilog-mode /*AUTO_TEMPLATE();*/

When using autoverilog to instantiate modules the character @ defines the module number. How do I instantiate many instances of the same module and tie some of the ...
Nazar's user avatar
  • 3,142
2 votes
2 answers
107 views

Verilog UDPs : What basic mistake am I making?

I've been designing digital logic in Verilog (and more recently SystemVerilog) since 1998 but I have never had much use for user-defined primitives (UDPs) as they're generally non-synthesizable. Well, ...
jdb2's user avatar
  • 33
2 votes
1 answer
46 views

Verilog: Self bitwise logical operation [duplicate]

I want the output out variable to be the output of 4 input AND gates, and the input variable is input [3:0] in; Is there any ...
Aryan Gupta's user avatar
1 vote
2 answers
65 views

Why don't signals change in For loop in Verilog?

I am trying to write memory elements using for loop. The for loop runs, and I get the value of ...
Zerox's user avatar
  • 33
3 votes
2 answers
141 views

How can I get rid of warnings in Verilog code for 32-bus 8:1 mux?

...
Johonathan's user avatar
1 vote
1 answer
53 views

What's the correct way of port declaration while instantiating modules in Verilog HDL?

From what I know, if we need to instantiate module1 in module2, then I need to declare all the ...
Killjoy's user avatar
  • 111
1 vote
2 answers
63 views

How to use "question mark" in start method of UVM?

I am trying to modify the existing code using the start() method in UVM. Basic code is below: ...
Carter's user avatar
  • 581
0 votes
1 answer
45 views

Why does this Verilog testbench not undergo a race condition?

This is the testbench in question: ...
Killjoy's user avatar
  • 111
1 vote
1 answer
45 views

How do I figure out if my Verilog code output was generated out of race condition?

Apart from physical observation, is there a way to know if my code will undergo a race condition? For example, the following code has a race condition because both ...
Killjoy's user avatar
  • 111
0 votes
1 answer
88 views

Assign a new (default) struct to a current struct

System verilog allows defining a structure type with variable initialization. That's is when I declare a struct type, the struct's members are already initialized. I was wondering if there is a way to ...
Nazar's user avatar
  • 3,142
0 votes
3 answers
74 views

Determine which clock of a compound sensitivity list triggered always block

I am trying to implement a non-synthesizable dual-clock FIFO in Verilog (solely for testbench purposes). Since the FIFO has to operate correctly even when both clocks toggle precisely at the same ...
firegurafiku's user avatar
1 vote
1 answer
73 views

How do I create a 2D array in Verilog?

I want to use a 2D array in a Verilog testbench. I tried it this way: ...
Killjoy's user avatar
  • 111
0 votes
2 answers
106 views

How do I instantiate modules within case statements in Verilog HDL?

I am trying to make a sequence detector with 4 modes - Moore machine overlapping & non-overlapping and Mealy machine overlapping & non-overlapping. But writing my code like this gives me an ...
Killjoy's user avatar
  • 111
1 vote
1 answer
39 views

Verilog, Question about 'include'

I'm trying to learn how to use the 'include thing properly. I had this basic code that works fine to run some 7 segment displays. ...
Alex Kibbe's user avatar
2 votes
1 answer
96 views

Error while trying to bind SystemVerilog module with properties module

I have a SystemVerilog module that I want to test using assertions. For simplicity let's say the DUT is this: ...
Kyriafinis Vasilis's user avatar
1 vote
1 answer
68 views

Why do I get the a.out 1:syntax error when I run Icarus Verilog simulation?

...
TejaSantosh Koliparthi's user avatar
1 vote
3 answers
141 views

Problem overridding parametrized UVM objects

In the following UVM testbench, I needed to make the sequence item, and hence the rest of the UVM components parametrized because the DUT is parametrized. I define 2 sequences: the base sequence '...
أحمد المحمودي's user avatar
2 votes
1 answer
78 views

Enabling sampling of coverage group in SystemVerilog

I am trying to run with functional coverage on my code, but I am getting a warning stating: ...
Shivam Gupta's user avatar
1 vote
1 answer
153 views

Queue values are not being accessed

I am planning to implement a maze routing program using Lee's algorithm. After searching some online resources, it seems that it requires a queue implementation for the BFS to work. After storing the ...
Rezef's user avatar
  • 93
3 votes
1 answer
163 views

Warning about unused input pin with Verilog 2D array declaration

I want to declare a 2D array in Verilog, and based on the array's row and column, I will be able to access the values. A warning comes in the console showing one of the input pins not being used. <...
Rezef's user avatar
  • 93
3 votes
2 answers
97 views

Simple Verilog problem with $display()

Why do I get 0 in the terminal with this code? reg y = 4'b1100; initial begin $display("y: %b", y); end However, if I explicitly define the range, I ...
Bornak's user avatar
  • 85
3 votes
1 answer
95 views

32 Bit FileRegister with ALU

Creating a SystemVerilog module called fileRegister which has three 4-bit inputs, and one bit clock, and one bit writeEnable. It should be like figure1 below. I'm ...
Jekolaw's user avatar
  • 33
1 vote
1 answer
160 views

How can I fix combinatorial loop alert in Vivado?

...
P.F.'s user avatar
  • 41
3 votes
1 answer
124 views

What are the multiple drivers in this code?

Code: ...
P.F.'s user avatar
  • 41
2 votes
1 answer
115 views

How to write program counter in SystemVerilog?

I was trying to build an 8-bit program counter, and it should support branching. This is what I wrote: ...
Chenhe yuan's user avatar
2 votes
1 answer
58 views

SystemVerilog error: Can't unroll generate for; Unable to unroll loop

I am trying to write a code that converts binary to thermometer code. Thermometer (a.k.a. unary) coding is frequently used in digital systems applications to represent a natural number. In a ...
TyzonKidd's user avatar
1 vote
1 answer
59 views

Why does this show as a syntax error on Verilog?

I'm a newbie to Verilog, and I'm trying to follow the few youtube videos I've seen that use vscode as text editor for Verilog. However, I get an error in the Verilog file itself. Here's my code: ...
Priyansh Mehta's user avatar
2 votes
1 answer
138 views

How do you implement two T flip-flops in Verilog with the input and output equations?

I have written this example to try to answer the question. There is one input, x, the clock, and three outputs. The clock pulses on and off, and x becomes 1 at random times for the positive edge of ...
Jackson Harvey's user avatar
-2 votes
2 answers
329 views

can we use the value of an input to define the width of other inputs or local variables in verilog?

Suppose we have an external processor gives our design the data width that we are allowed to work with. for example the the data_width is the processor_data_bus[15:0] (processor_data_bus in 64 bits). ...
temp1445's user avatar
1 vote
1 answer
108 views

What value will be assigned to x, is it a or ~x?

I have some Verilog code for which I am unsure of the outcome of the non-blocking assignment of x as shown below : ...
davos's user avatar
  • 13
1 vote
1 answer
96 views

Matrix multiplier is not working

I am trying to design a matrix multiplier in Verilog using systolic array architecture. If I test the Processing Elements they work but when trying to connect them to build the array they get the ...
engineer1155's user avatar
1 vote
1 answer
55 views

Intuition or rather just knowing when to use flip flops vs combinatorial vs latch always blocks

I understand the differences between these types of circuits, but when it comes to implementation I find myself wondering which I should use. I don't have an intuition for this yet and would like to. ...
igrok's user avatar
  • 45
1 vote
1 answer
230 views

Expecting datatype compatibility error packed vs unpacked array

I am trying to design a matrix multiplier using systolic arrays architecture. The inputs are 1D arrays with 2's complement 16bits elements. Here is my code: ...
engineer1155's user avatar
1 vote
1 answer
257 views

Passing register value in Verilog module as input to another module

I use the XADC IP, for which a module na7_chseq_xadc is used to write the digital data from the ADC in registers adc2_out, ...
Suhanya's user avatar
  • 11
0 votes
1 answer
84 views

How can a systemverilog process suspend itself?

LRM indicates process::suspend() can suspend either its own execution or that of another. So I tried following code: ...
TSyi's user avatar
  • 1
1 vote
1 answer
36 views

How to sample the read data from blocking logic safely by using the interface of SystemVerilog?

I'm trying to read data from combinational logic. module my_reg(; ... output reg [31:0] rdata; ) .... always @(data) rdata = 32'h18; and this dut's value ...
Carter's user avatar
  • 581
0 votes
1 answer
168 views

How can I use clk as an input port in Verilog?

I am working on a simple FSM that counts to 3 and will either output 1 or 0 based on if the number of times a 1 is counted on is mod3 = 0. FSM.sv ...
MFerguson's user avatar
  • 207
2 votes
1 answer
95 views

Verilog netlist synthesis using assign vs always [duplicate]

If you have some sort of Verilog implementation like: ...
MFerguson's user avatar
  • 207
1 vote
1 answer
462 views

Verification of asynchronous FIFO

I am completely new to the SystemVerilog world, and I am trying to verify the asynchronous FIFO made by Cummings. The goal is to verify this design by using the Tb components, so no UVM at all. I ...
Giuseppe Trematerra's user avatar
1 vote
2 answers
467 views

Verilog code if else with localparam

What does the Verilog localparam X code below mean? From my understanding it is as follows: ...
user367640's user avatar
1 vote
1 answer
64 views

Asynchronous FIFO: Should I focus only on the top_level or maybe focus on the modules within the top_level design?

For the first time, I am approaching the world of Verification by using SystemVerilog, and I have learnt about the TB components only recently (Generator, Driver, Monitor etc.). My actual task right ...
Giuseppe Trematerra's user avatar
-2 votes
1 answer
592 views

Sign Extension in Verilog [closed]

what is the difference between the following 3 sign extensions ...
Aren dg's user avatar
  • 99

1
2 3 4 5
9