Questions tagged [verilog]

For use with the Verilog hardware-description language. Also tag with the IDE or fpga used, if applicable.

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

How to skip the first line of a CSV file while reading it in SystemVerilog?

I am trying to read a CSV file in SystemVerilog and parse them and assign the values to an associative array. I want to skip the first line of the CSV file while reading it. I am using the following ...
Pratheek Motamarri's user avatar
0 votes
0 answers
23 views

How can I create an ignore_bins for a functional coverage cross to exclude any bins where a coverpoint falls within an external array list?

Say I have an unpacked array of an enumerated type: client_e read_only_clients[] = {CLIENT1, CLIENT2}; And this covergroup: covergroup cg with function sample ( client_e client, dir_e dir ); ...
Kyle Bergman's user avatar
0 votes
1 answer
73 views

How to write a signed number in verilog?

I want to write a verilog code that outputs the Sum of 2 8 bits 2's complement signed integers. Another binary output signal, called E, is raised HIGH when there is an overflow or underflow in the ...
Jason Nababan's user avatar
-1 votes
0 answers
33 views

How to select a handshake and code examples in verilog [closed]

I'm new to Verilog, and I was taking a look into the ready-valid handshake. I saw that this is the most used handshake, as it is simple to understand. However, I couldn't find the disadvantages of ...
Lane's user avatar
  • 179
-1 votes
0 answers
23 views

verilog/sv parser for instance signal connections [closed]

I wonder any suggestions for verilog/sv parser for multi-modules. My task is to analyze the signal connection relationship in top module. To understand that, you can not just parse one module but ...
David Peng's user avatar
1 vote
1 answer
39 views

What does this error mean: is not a valid l-value?

This is the Verilog code, and I have this error (o is not a valid l-value). Could someone help me? module ts ; reg[3:0] in1,in2; wire[3:0] o; integer i,j; Sommatore4Bit s(.in1(in1), ....
mattiadanese's user avatar
0 votes
1 answer
35 views

Whether the execution order is guaranteed when the statements in fork join_any and the statements following them are executed at the same time

module test(); reg a,b,c,d; initial begin fork #5 $display("Fork Time is %0t",$time); #10 $display("Fork Time is %0t",$time); #15 $display("Fork ...
chen zhang's user avatar
-5 votes
0 answers
51 views

verilog HDL time clock [closed]

Design a timer circuit with minutes and seconds displayed HEX3, HEX2, HEX1, HEX0 and are controlled by the KEYS on the DE10 FPGA board, uses the Verilog HDL language. In there: KEY0 is used to reset ...
đạt nguyễn's user avatar
0 votes
1 answer
25 views

modelsim wave is empty and msg displays "xxx"

I am running a verilog file on Modelsim, however the wave area is empty and displays a "xxxxxx" message. I am very new to Verilog/Modelsim/Quartus in general, any help would be greatly ...
Kenneth Lin's user avatar
0 votes
1 answer
66 views

How to make an unsigned to signed number, and reverse in verilog

I have an school assignment at my university in verilog where i need to create an ALU for a RISC-V processor. In the ALU, i need to perform the operations AND, OR, XOR, sub, add, bitwise left and ...
Dimitris Vagenas's user avatar
1 vote
1 answer
47 views

4-bit counter on EPWave

I did a 4-bit counter module in Verilog, and I need to represent on EPWave the following steps: the clock is toggled every 1 second the counter works for 5 seconds, then the reset is on, then the ...
Arthur Araújo Rabelo's user avatar
0 votes
1 answer
42 views

Why does Verilog invert the first bit of a 4 bit variable? [duplicate]

I'm trying to code something in verilog but for some reason the value I enter changes when I print it out This is my code module test; reg [3:0] A; reg [3:0] B; initial begin $monitor(&...
user17197333's user avatar
1 vote
1 answer
29 views

Assignment error: "Cannot assign to array"

I'm fairly new to Verilog and I'm trying to familiarize with it. I'm building an ALU in Verilog, and when I try to assign the value from an operation to the ALU_result reg, I get the error listed ...
Dimitris Papadimitriou's user avatar
-1 votes
0 answers
30 views

Error [Synth-8 1725] - Verilog (using Vivado 2014.2) [duplicate]

reg temp_diff[4:0]; always @(posedge clk) if (temp > set_temp) assign temp_diff = temp - set_temp; else if (temp < set_temp) assign temp_diff = set_temp - temp; else temp_diff = 0; In this ...
Rayan Malik's user avatar
1 vote
1 answer
66 views

How to output a 5 bit number from a ripple-carry adder/subtractor into a 5 bit decoder to account for overflow in Verilog?

I am working on a project that will take two 4-bit numbers between 0-9 and add/subtract them to be displayed in a seven segment display. Here is a big picture idea of what I am trying to create My ...
Andrew Desen's user avatar
1 vote
1 answer
41 views

'case item is unreachable' in Vivado synthesis process

`timescale 1ns/1ps module lcd_control ( input clk, input reset, input prod1, input prod2, input prod3, input prod4, input disp_up, input disp_down, input confirm, ...
tenet tenet's user avatar
-2 votes
0 answers
81 views

Verilog Peak detection, variable peak_det does not assert

What is the problem with this code for peak detection? I want to have a trigger for every peak. the input of this block is an enveloped form signal. module Peak( input clk, input ...
Parsa's user avatar
  • 7
-4 votes
0 answers
36 views

Require Vhdl or verilog Code For Temperture Sensing And Display Using Cyclone ii EP2C5T144I8N [closed]

Hey there i am creating a project for displaying temperature using fpga board and i am new to vhdl or verilog coding and does not have much knowledge. Can you please provide vhdl or verilog code for ...
Kavish Nishad's user avatar
-1 votes
0 answers
52 views

Variable '/tailLight_tb/i_intf/li', driven via a port connection, is multiply driven. See testbench.sv(33)

For the given design and its layered testbench in SystemVerilog, I am getting the following errors. This is the entire program for reference. https://edaplayground.com/x/uUhq # ** Error (suppressible):...
Anurag's user avatar
  • 1
1 vote
1 answer
46 views

Error: cannot be driven by primitives or continuous assignment

I am trying to create a state machine in Verilog, and I am getting these errors: error: reg state; cannot be driven by primitives or continuous assignment. error: Port 6 (state) of mealy_machine is ...
BladeCJ's user avatar
  • 21
0 votes
1 answer
108 views

Vivado error Using Verilog. Implementation Error - IO placement is infeasible

Implementation Error - [Place 30-58] IO placement is infeasible. Hi I have been struggling with completing this assignment I have been working since I don't know how to get past this implementation ...
job's user avatar
  • 1
1 vote
1 answer
80 views

Dynamic delay in Verilog/SystemVerilog

I need to make a delay statement that the quantity of the delay varies with time, it could possibly increase or decrease. I need a statement to occur when the simulation time is equal to some variable ...
Mohamed Osama's user avatar
2 votes
2 answers
58 views

Check all bits set/unset

I'm new to Verilog, and I'm taking my first steps with FPGA "programming". I have a parametrized module definition similar to that: module foobar #( parameter BITS = 4 ) (...); reg[...
Thomas S.'s user avatar
  • 5,972
1 vote
1 answer
49 views

Trouble instantiating and assigning in generate block

I am having trouble understanding how modules inside generate blocks are instantiated. I am trying to implement a sequence detector that detects 1010. For this, I am trying to use 2 D flip flops. ...
Ishaan's user avatar
  • 13
-1 votes
0 answers
26 views

Can this matrix keypad Verilog code be rewriten so that it works with switches instead?

I'm trying to make sense of an Verilog FPGA project I'm interested in and want to understand. Except the inputs are taken from a matrix keypad, the code for which is below. Is there any way to rewrite ...
01101110's user avatar
-1 votes
0 answers
53 views

timing problem in implementing mips jump instructions in verilog

i'm trying to implement "mips" jump instruction in verilog, a problem faced me my processor kind of similar for this (not exactly) : here is some details : the pc module : increments the ...
Abdalrahman Alshannaq's user avatar
1 vote
1 answer
41 views

Explain why fork-join behaves differently when #10 begin A = 1'b0; B = 1'b1;end, and to #10; begin A = 1'b0; B = 1'b1; end [duplicate]

Please notice the semicolon after #10 delay in the second case. I thought I understood fork-join, but after these outputs, I don't think I do. Can someone please explain why the semicolon is causing ...
Leharika Naidu's user avatar
0 votes
1 answer
91 views

Absolute value with axi interface

I have an interferometer wave and want to rectify it. The code is not performing absolute value correctly. What is the problem with this code? `timescale 1ns / 1ps module abs( input clk, output [...
Parsa's user avatar
  • 7
0 votes
1 answer
46 views

What is "->" in a Verilog behavioral model?

I'm coding a i2c master module, and I had a Verilog model of AT24C02D provided by Microchip to use in testbench. I see some "->" in the codes; what does that mean? Reference: https://ww1....
Luxien Zhang's user avatar
-1 votes
0 answers
36 views

why my output clk signal coming from input differntial buffer not toggling or it showing x?

I am trying to implement a design where i am using IBUFDS and BUFG as clock buffer from language templates of vivado tool. my top module port contains two input clocking resources clk_n,clk_p now when ...
superb ranjeet's user avatar
-1 votes
0 answers
108 views

Unable to generate multiple pulse outputs using verilog?

I am trying to make a circuit that generates the ouput of the different pulses. The ouput pulse should have high for given value time in the given period. The signal need to be repeat itself for given ...
Deekshith Ranga Babu Tirumala's user avatar
0 votes
1 answer
56 views

Error in the code I am unable to solve it and i am unable to prevent the error

I am getting mixed port connection problem can anybody help me I was trying to instantiate the previous module into the new module .data_out(level1_1_out), .data_in(data_in1), .Cx(Cx1), .clk(clk) ...
SPY ツHemanth's user avatar
0 votes
1 answer
56 views

How to interrupt an uncompleted delay in SystemVerilog

I want to apply a different rising and falling delay to a signal using the following code: timeunit 1ns; timeprecision 1ps; parameter real delay_en_rising_us = 100.0; //...
Du mmyTransistor's user avatar
-1 votes
0 answers
31 views

i want wave mux21 if else But this error appeared to me [duplicate]

module testbench; reg a, b, sel; wire y; mux2_1 uut(a, b, sel, y); initial begin $monitor("a=%b, b=%b, sel=%b, y=%b", a, b, sel, y); a = 0; b = 0; sel = 0; #10 a = 0; b = 1; ...
Mohammed Farrajeen's user avatar
1 vote
2 answers
72 views

Index-based Array Right Shifter using concatenation; Error: range is not allowed in prefix

I am trying to implement an array Right Shifter. It accepts an array of integers, then right shifts everything to the right-side of specified index position, and inserts a specified integer value at ...
AGoodStudent's user avatar
0 votes
1 answer
50 views

Suitable assertion in (System)Verilog default of case statement that should never occur [closed]

What kind of assertion is suitable for dealing with the default case of a SystemVerilog case statement? Here are a few approaches that come to mind: default: $display("this should never occur&...
P2000's user avatar
  • 1,052
-1 votes
0 answers
69 views

For the ICE40 FPGA block ram read modes 2 and 3 seem to ignore the highest address wires unique to them

module TinyFPGA_B ( input CLK, output LED ); SB_RAM40_4K ram40_4kinst_physical ( .RDATA(LED), // Makes no difference whether this line or the line below is ...
Andreas Stocker's user avatar
-2 votes
2 answers
42 views

How do I fix this foreach loop variable syntax error?

I am trying to use foreach in SystemVerilog. What I am doing wrong here? `define size 3:0 //variable module tb; reg [7:0] temp; initial begin temp=8'd25; $display("%d",temp[`...
Ankit Kaushik's user avatar
-2 votes
0 answers
45 views

Not able to see the state diagram in the state machine view

I am trying to code a state machine for the diagram given : I am not able to view the state diagram in the state machine view in Quartus Prime Lite. What should i do so that i can see the diagram? I ...
Ervin Ranjan's user avatar
1 vote
1 answer
43 views

Getting unexpected output for state machine code

module mealy(input x_in,rst_n,clk, output reg y_out); parameter s0 = 2'b00, s1 = 2'b01 , s2 = 2'b10; reg [1:0] p_state,n_state; always@(posedge clk,negedge rst_n) begin if(!rst_n) p_state <= ...
Ervin Ranjan's user avatar
0 votes
1 answer
58 views

Getting wrong output for 4x4 multiplier

module fa( input a,b,cin, output reg s,cout ); always@(*) begin s = a^b^cin; cout = (a & b) | (b & cin) | (cin & a); end endmodule module multiplier( input [3:0] a,b, output [7:...
Ervin Ranjan's user avatar
1 vote
1 answer
60 views

Trying to design a shift adder using Verilog, and I'm not able to fix this error

I was implementing a 4-bit shift adder using Verilog, and I was facing an issue with the following code: //shift register to store the two inputs a and b to be added module shift(y, d, clk); input [...
Anish Kasegaonkar's user avatar
1 vote
1 answer
38 views

4-bit register always shows output 0

module register(input [7:0] inp, input load,clk,clr, output reg [7:0] out); always@(posedge clk or posedge clr) begin if(clr) out <= 8'b00000000; else if(load) out<= inp;...
Ervin Ranjan's user avatar
0 votes
1 answer
78 views

$fscanf function not working properly with CSV string input

I am trying to use the $fscanf function to read a CSV file in SystemVerilog. This is the format of the CSV file: REG_1,0xab4556 REG_2,0x124d and so on... I have to scan these values and assign them ...
Pratheek Motamarri's user avatar
-1 votes
0 answers
41 views

I'm building a RISC-V processor and the 'always' block gives me a "build" error, what can I do? [duplicate]

I'm working on a RISC-V processor that has a UART included, and will be impacted in to a FPGA. Everything works fine on testbench. My problem comes when I do apio build before uploading to the FPGA. ...
Segundo Saccani's user avatar
0 votes
1 answer
93 views

SystemVerilog Delay Interruption

I have a question, hopefully somebody can help me. In systemVerilog I have an input "en" and an output signal "en_delayed". The signals are not necessarily ports, they can be ...
Du mmyTransistor's user avatar
-1 votes
0 answers
30 views

Vivado failed to find vcs_mx simulator executable

I am trying to run simulations in vivado using the vcs simulator. whilst trying to Compile simulation Libraries, I have been prompted that language specific compilation is not supported, so though my ...
miner_kai's user avatar
0 votes
1 answer
61 views

Why does this simulate continuous assignment with delay of 2 as if had delay of 3

I have this system verilog code, that does continuous assignment for some simple operations with delays and a simple testbench with clocks. `timescale 1ns/1ps module delays(input logic a, b); ...
0dminnimda's user avatar
  • 1,294
1 vote
1 answer
44 views

Generating random value for 255 wire bus

I wanted to verify connectivity (using SystemVerilog) of a 255-wire bus from source to destination. To this effect, I wanted to drive random values on the source bus and ensure the corresponding ...
user10367180's user avatar
0 votes
2 answers
43 views

Synthesis error in Vivado: [Synth 8-3380] loop condition does not converge after 2000 iterations

module Delay_Module ( input wire clk, input wire [3:0] data_in, input wire [7:0] delay_cycles, output reg [3:0] output_data ); reg [4:0] counter = 0; reg [3:0] memory [0:47]; integer i; ...
Kamran Khan's user avatar

1
2 3 4 5
123