Questions tagged [testbench]
The testbench tag has no usage guidance.
59
questions
-2
votes
1answer
40 views
Why do we declare the inputs of our design as reg in testbench and outputs as wire?
Why do we declare the inputs of our design as reg in testbench and outputs as wire?
1
vote
2answers
41 views
Testbench using Task operation
I have to write a testbench using "tasks" to verify the functionality of an 8-bit ALU. My tasks are not getting simulated properly in EDA playground. Can anyone please tell me where my ...
0
votes
2answers
48 views
2
votes
2answers
75 views
Creating a three phase current system with e.g. 70Hz instead of 50Hz
I am doing magnetic field measurements on a 3-phase cable dummy, in order to develope a distance measurement system for power cables. This is a uni research project.
For a test setup I want to create ...
0
votes
0answers
14 views
Initiating DDR Reads From Zynq PL With DMA
I am trying to initiate reads from the Zynq PL over Xilinx AXI DMA IP, but I haven't been able to find an example to make things fully clear for me.
If I am using the DMA in Direct Register Mode, what'...
0
votes
0answers
40 views
Value XX In the testbench
Thanks for considering and spending your time.
I'm trying to simulate UART VHDL code that I have written
(which is not complete yet), but in the testbench I see XX value for the signal rx_data_out.
I ...
1
vote
0answers
59 views
TTL in an RF switch
I am hoping to find help on how to properly connect supply voltage to my switch assembly in order to actuate. My switch has input requirement of +15, -15, GND, and +5V. Also, the 5v logic inputs. ...
0
votes
0answers
31 views
I have a Potentiometer - 5 k ohm 2W from a Mosa DC Welder; With Strange Test Readings
The pot is a Digikey part.
The readings for the 5 kΩ pot start at .025 Ω to a high of 1.91 kΩ ... but it occurs 75% of the way into the rotation of the single turn pot, and then it drops to 1.39 kΩ at ...
2
votes
1answer
108 views
VHDL Clock Divider Problem
I have a 100 Mhz clock and I need a 0.5 Khz clock. So I wrote this code:
...
0
votes
0answers
18 views
Testbench for RTL and GLS simulation
I want to do the GLS simulation after the RTL simulation. I was asked to add
uut : entity work.eq3(structure)
instead of the one specified below used for RTL
<...
1
vote
2answers
71 views
How can I improve my testbench for testing a 1024x4 RAM memory in Verilog
This is a question following on from my previous one "How can I improve my testbench for testing a 1024x4 RAM memory in Verilog".
Basically, I have modified the previous solution in an ...
0
votes
0answers
52 views
ModelSim does not run until “$stop” command after editing my testbench
I keep running into this issue where my code stops running before the "@stop" command. This only occurs whenever I add code in Libero and then go back to ModelSim. When I go to simulate in ...
1
vote
1answer
84 views
What can I do to improve my test bench for testing a 64x4 RAM memory in Verilog
What can I do to improve my test bench for testing a 64x4 RAM memory in Verilog to obtain the desired result?
I have written a test bench to test a simple 64x4 RAM memory in Verilog and it seems to &...
-2
votes
1answer
50 views
Not getting correct results displayed from register
I am trying to input the numbers 1,0,3,2,32'hFFFFFFFF,32'h00000001 into the registers 0,1,2,3,6, and 7 respectively. I am doing this through always @(posedge clk) ...
0
votes
2answers
149 views
Can I feed my level shifter with a voltage divider?
I need to level shift 3V3 to 2V8. I have a 2V8 source but that'll require some patching wires on testpads and as such I would like to avoid it.
I'm wondering: would it be safe to feed the SN74LVC245AN ...
0
votes
0answers
50 views
VHDL testbench for shift register 7495
I`m new to VHDL and i don't know how to write the testbench code for a 7495 register. I need to do this for a college project. Any help is greatly appreciated.
This is the Design Source code i`ve ...
0
votes
1answer
107 views
Syntax error near “else” in Verilog, in an initial block, next to assert
I'm trying to make a self-checking testbench for an ALU I'm designing for an extra credit assignment. Here's what I have:
...
-1
votes
2answers
36 views
Test Verilog FSM for state with no reset
My professor gave us several Verilog test files to write Verilog test benches for. In the test bench, we're supposed to initialize the state to 0, apply random inputs, and check to see if we have ...
1
vote
1answer
70 views
How do I implement the clock into this testbench?
I am trying to write a testbench for an adder/subtractor but when it compiles the clock does not shift.
Here is the verilog for the adder/subtractor:
...
0
votes
1answer
83 views
VHDL test bench for input port assignment
I am trying to depict port 3 of microcontroller which acts a I/O and as special functions like timers interrupts in VHDL.
The code is as follows:
...
1
vote
2answers
70 views
How to efficiently mux many signals to/from a climate chamber?
I am building a setup to measure various parameters across a temperature range from -55°C to +125°C. The devices under test will be placed in a climate chamber. There are around 10 signals from each ...
1
vote
0answers
126 views
Using an internal signal in a testbench
I am using HDL Designer and have a pretty large design I need to test. I have created a test bench by using HDL Designer itself and did not do it standalone.
Like the title states, I want to know how ...
0
votes
1answer
59 views
Two questions about testing with HDL designer
I hope it's okay to ask about specific programs here.
I have successfully created a test bench with HDL designer, and I use Modelsim to simulate. By pressing the Modelsim icon and selecting "through ...
0
votes
1answer
1k views
Verilog Testbench - wait for specific number of clock cycle edges
In my testbench, I want to wait for two events in sequence: one after 60000 clock cycles and next after additional 5000 clock cycles
I know I can wait for clock edges using statement @(posedge clk), ...
0
votes
2answers
101 views
Ultracapacitor initial voltage drop during discharging
I've been building a test stand for ultracapacitors, with very simple schematic looking like this:
simulate this circuit – Schematic created using CircuitLab
The resistor on the bottom is to ...
7
votes
3answers
2k views
VHDL: What is correct way to model open collector output for FPGA?
I2C uses open collector outputs. FPGAs do not have such outputs. They do have tri state buffers though.
How should open collector output be defined in a VHDL for an FPGA?
How should open collector ...
1
vote
0answers
265 views
VHDL - rand*real(2**32-1) : can this cause an overflow issue?
I'm studying VHDL implementations of multipliers: I found this one and i'm trying to modify it. Default word size is 8 bit and the design is working (both simulation and synthesis) for any size up to ...
0
votes
1answer
618 views
Variable frequency for sine wave in Verilog [duplicate]
I am trying to implement 4 different frequencies at which sine wave is going to be simulated in testbench. I am using a counter to do so. However, it can not toggle clk_out in simulation window. Not ...
2
votes
2answers
159 views
Xilinx's ISE (GSR): The initial block adds a delay of 100 time units to simulation
I'm working on a lab assignment in which I'm supposed to simulate a sequential logic circuit (A ROM device). I'm using xilinx's ISE as IDE.
My implementation works fine and the logic and the data is ...
0
votes
1answer
523 views
Unable to diagnose StX fault in Modelsim
I'm unable to figure out why Modelsim is giving me a StX fault for this testbench.
I'm just creating a counter and simulating a device that returns the MSB of the counter. Any help in figuring out ...
0
votes
1answer
2k views
VHDL: reading integers from a text file, storing them in array, and writing in text format again
In a certain simulation testbench using questasim, I am trying to read the files with integers numbers which looks like,
...
0
votes
0answers
64 views
What is the procedure to use ISCAS-85 benchmark Circuits for testing? [duplicate]
Could you please explain the detailed procedure about using ISCAS-85 benchmark Circuits for testing available at the below link http://web.eecs.umich.edu/~jhayes/iscas.restore/
How do we start, could ...
-1
votes
1answer
573 views
Understanding Testbench Waveform for UART module
I have taken the following code for testing a UART module from https://www.nandland.com/vhdl/modules/module-uart-serial-port-rs232.html
Can anyone explain what is happening in the ...
0
votes
1answer
116 views
VHDL Output is Unitiliazed or Zero when simulated
I am new to VHDL and implementing a test bench. I am trying to write code for a simple 2:1 MUX where the output of the MUX enters an active high synchronous LOAD register. Inputs and outputs are 8 ...
-1
votes
1answer
2k views
How do I override generic values in a VHDL testbench?
I am new to VHDL, and I'm working with an off-the-shelf UART block. I'm trying to create a test bench and override the data width, but I get errors saying that my signals are undeclared:
ERROR - C:/...
0
votes
1answer
74 views
Electrical gremlins under high Amp draws
I'm new here so I hope all goes well!
I have used an ATX PSU to create a power bench tester for testing automotive headlights. HID in particular which draw around 8-10amps on startup. I have noticed ...
0
votes
1answer
1k views
Modelsim simulation doesn't work Pleas help
I can't for the life of me figure out why I don't get an output from this testbench and entity that i've created. I've tried it several different ways with the OUTPUT y never making it out. I know ...
0
votes
1answer
80 views
If constraints in SystemVerilog
I have a class of sequence item with rand variables:
class my_seq_item extends uvm_sequence_item;
rand bit a, b, c, d;
I want to generate a random bit for 'd' ...
-1
votes
1answer
652 views
getting outputs in simulation as all high impedance. topic: restoring algorithm for binary division
I am getting outputs of my hardware as all high impedance (ZZZZZ). i tried synthesizing the code and got these warnings. I think there might be a problem in the test bench i am trying to run.
...
0
votes
1answer
825 views
This model of a D-Flip flop with Enable not working as expected
This is a Verilog model of an array of D flip-flops with enable line along with a test bench used in ModelSim Altera:
...
0
votes
0answers
104 views
Adding of frequency divider causes no output VHDL
I'm trying to get the output from this code. The output is not showing after adding the frequency divider. Before the frequency divider, the code worked well and display the output.
This is my code
<...
-1
votes
1answer
536 views
Error: illegal Verilog output port specification
I am having problems with my verilog test bench. Every time I try to run it, I get the error in the title above for my four switch registers. I have searched this question numerous times but I cannot ...
1
vote
1answer
184 views
2
votes
4answers
1k views
Usage of “initial” in Verilog module description
I'm writting a code and I have 2 dumb questions:
1- Is it a bad practice to use "initial" in the module description?
I'm asking this because I have a frequency divider with 2 signals (clk_in and ...
-1
votes
1answer
367 views
Output internal reg to a .txt in Verilog
I would like to write an internal reg to a txt file.
I have tried something like:
...
2
votes
1answer
408 views
What options exist to verify Avalon-MM slave component?
I am writing an Avalon-MM slave. It shall connect to Nios II as master device. What options exist to write testbench for it? I must be sure that an Avalon-MM master can correctly read/write it.
I ...
0
votes
1answer
398 views
problem with verilog testbench
I have problem with clock signal in Verilog test bench.
I've tried almost every possible ways to create clock, but in the waveform it's U meaning "Unknown".
Here is my code for clock (...
11
votes
3answers
2k views
How do I protect myself when testing a PCB that involves an AC line?
I have to test prototype PCBs that convert household AC into several DC voltage levels.
I concern about my safety when working with AC and would like to know how to properly setup a testbench that, ...
0
votes
2answers
351 views
Load image into VHDL testbench
Is there a standard way to load an image into VHDL testbench so image processing logic output can be tested? Obviously there will be an output from the testbench, also an image that must be possible ...
0
votes
1answer
118 views
designing image debayer block, how should the testbench be written
A debayer block inputs image from a CCD Bayer filter and then estimates the missing color information for each pixel. The data comes from a camera. How should one go about writing a testbench for ...