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
1 answer

My verilog VGA driver causes the screen to flicker (Basys2)

I'm trying to recreate Adventure(1979) in Verilog and so far I have character movement, collision and map generation done. It didn't flicker that much before I separated the maps into modules now it flickers constantly. When I was looking up this…
Dilancuan
  • 13
  • 6
1
vote
1 answer

Verilog syntax errors

Near "(": syntax error, unexpected '(', expecting ')'. I have no idea why I got errors. //P[0]------------------------------------------ //Y[0], A[0], B[0] and32bit and_inst0(.Y(s0), .A(MCND), .B(32{MPLR[1]})); and32bit…
B-Y
  • 187
  • 1
  • 2
  • 12
1
vote
3 answers

How to Embed Systemverilog Interpreter using DPI-C?

Problem Description: I design in SystemVerilog and write the testbenches in the same language. I want to be able to compile my design and test different functions during simulation in the way you would using an interpreter with e. Ideally, I would…
Nyarmith
  • 35
  • 1
  • 5
1
vote
2 answers

How to pass parameters to a verilog module when performing synthesis?

I have a parameterized verilog module with a bitwidth that is variable depending on the value given in `define WIDTH. However, I would like to be able to somehow change the value of WIDTH by passing in a parameter during synthesis using design…
Veridian
  • 3,531
  • 12
  • 46
  • 80
1
vote
1 answer

QuartusII Synthesis: Enumerated type to State signals (encoding)

I am designing an FSM in SystemVerilog for synthesis through the QuartusII (14.1) tool to put on an Altera FPGA. I am using an enum declaration to make the code much more reasonable: typedef enum logic [7:0] { CMD_INIT, …
Unn
  • 4,775
  • 18
  • 30
1
vote
1 answer

Red output running testbench on 4-bit ALU

I'm trying to create a 4-bit ALU in Verilog that does multiplication, addition, BCD addition and concatenation. Here's my code so far: module alu4bit(A,B,S,Y); input [3:0] A, B; input [1:0] S; output [7:0] Y; reg [7:0] Y; wire [7:0] A0, A1, A2,…
Austin
  • 6,921
  • 12
  • 73
  • 138
1
vote
1 answer

For logic implementation in System Verilog

I'm just learning HDL and I'm interested in how a for loop is implemented in System Verilog. With the following code... always_ff(posedge clk) begin for(int i = 0; i < 32; i++) s[i] = a[i] + b[i]; end Will I end up with 32 adders in the logic…
George Waller
  • 95
  • 3
  • 4
  • 13
1
vote
2 answers

"Unique case violation" warning at time 0

I have a unique case statement inside an FSM that looks something like this: enum logic [1:0] {IDLE = 2'b01, RUN = 2'b10} state, next_state; always_comb begin next_state=state; unique case(state) IDLE: next_state = RUN; …
nguthrie
  • 2,615
  • 6
  • 26
  • 43
1
vote
1 answer

Verilog for loops - synthetization

I am pretty new to Verilog, but would like to understand it properly. Currently I am making TxRx on FPGA. I noticed that my code is consuming huge amount of logic, although it should not be like that. So I did not wrote my code properly. I know…
elem
  • 171
  • 1
  • 2
  • 12
1
vote
1 answer

Convert binary input into residue number system

I have written a code which converts our number which is in binary into residue using a look up table. First, I have made a memory having both read and write enables and stored values. During 'we' , 'a' is my input which is of 8 bit... for every bit…
user4611785
  • 31
  • 2
  • 6
1
vote
1 answer

Option & type_option in System Verilog

Coveegroup x; C: Coverpoint a {type_option.weight=0;} Endgroup I want to set coverpoint C weight to 0, for all the instances of covergroup x. So I have used type_option, as option is for instance specific settings. I have created 4 objects of…
Karan Shah
  • 1,912
  • 1
  • 29
  • 42
1
vote
2 answers

Verilog Critical Path

I have determined the following is my critical path (SHA1 algorithm) h0 <= h0 + A; h1 <= h1 + B; h2 <= h2 + C; h3 <= h3 + D; h4 <= h4 + E; When I commented this section of the code out, my Fmax would be around 300Mhz, but with it, it is around…
Sugihara
  • 1,091
  • 2
  • 20
  • 35
1
vote
1 answer

Combinational logic "IF" and "assign" statement in systemverilog

I found a very strange behaviour when design my ALU, hope someone can have a look it and tell me what is going on. Here is the code module adder ( output logic signed[31:0] y, output logic Cout, input logic signed[31:0] a, b, input logic Cin,…
Shuaiyu Jiang
  • 239
  • 1
  • 3
  • 15
1
vote
1 answer

In SystemVerilog, can events be defined in ports

In Verilog, I know we can't pass "events" between modules. Howe about in System Verilog ? I would like the event "trig" hooking the trigger source blocks "eventGen" and is consumed by the block "eventConsume" Some how I get compilation error…
Mike
  • 1,205
  • 3
  • 12
  • 21
1
vote
1 answer

Why two exactly "wire" statement in systemverilog, one can be compiled and the other on can not?

Here is the first HDL code for my program counter. timeunit 1ns; timeprecision 10ps; module PC( output logic [31:0] pc_addr, output logic [31:0] Next_addr, input logic [31:0] Branch_addr, input logic PCSrc, input logic clock, reset ); wire [31:0]…
Shuaiyu Jiang
  • 239
  • 1
  • 3
  • 15