A test bench or testing workbench is an (often virtual) environment used to verify the correctness or soundness of a design or model, for example, that of a software product.
Questions tagged [test-bench]
292 questions
-2
votes
1 answer
output is high before the expected clock edge in the sequence detector in verilog code
Sir,
I wrote a verilog code for "1011" sequence detector. But in simulation output is high when it receives "101". ie. it is high one clock cycle before the actual clock edge. Please help me to solve this issue
// verilog code
module main(
input…

Varun
- 11
- 1
- 6
-2
votes
1 answer
how to write test bench for slave module in which it assign input values from master module?
I have written two Verilog modules so called master.v and slave.v in which master.v module provides output values and slave module is going to use these master's output values. Can you please advise me on how to write testbench for assigning…
-2
votes
1 answer
im unable to write output to text file in verilog .Please check what it is wrong
module fir_tb;
// Inputs
reg clk;
reg reset;
reg [7:0] inp;
reg [15:0]rom[1:8001];
reg [15:0]addr=0;
// Outputs
wire [7:0] outp;
// Instantiate the Unit Under Test (UUT)
fir uut (
.clk(clk),
…

Suguresh Kumar Arali
- 47
- 2
- 7
-3
votes
1 answer
Are these lines legal in Verilog?
I am working on RTL coding of rs232 protocol in verilog I wrote the Tx/Rx codes in two different files.
I wanted to know whether these lines[as shown below] are legal in verilog. By legal I mean do they produce synthesizable output? I have…

SWETHA CHILVERI
- 53
- 6
-3
votes
1 answer
How do I add an input called Unsigned / Signed for Verilog comparator testbench code?
I'm new to coding verilog.
This is code for a 3-bit Comparator. I need help adding a signal called 'US' (unsigned/signed) to my testbench code. When the signal is High(unsigned mode), the Comparator interprets the numbers as Unsigned numbers. When…

redbulln
- 1
- 1
-4
votes
1 answer
Can someone explain me ,how this code works, shifting led, chaser?
I have code like this, describing shifting led like chaser, i can't find information in books or google to understand , how that code works,
> led <= (led == 7'b1000000) ? 7'b0000001 :
(led <= 7'b0000001) ? 7'b0000010 :
…

Russell
- 1
- 4