UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer audriusa
Observer
897 Views
Registered: ‎01-25-2018

How to test the truth table of my module

Jump to solution

I have the module that only contains wires, something along the lines

 

 

module trivial (
  input switch,
  output led
);

  assign led = ~switch;
endmodule

 

 

(well, the actual code I have it is much more complex with lots of inputs and outputs, but all written in this spirit). I have a truth table (as a text file) which the module must comply. Is it possible to test with Vivado if the module is operating correctly?

 

I tried to click on "Run behavioral simulation" and others in Simulation item inside the Flow navigator, but it gives to me only the time line which I currently do not need. The table there shows (for the simplified example) that the switch is at "Z" and the led is at "X" - fine, but not actually helpful. I found I can "force value" of the switch, but even after I force the switch to 1, the led remains X. 

 

How to test the truth table of the module that contains wires only? Or is the task so trivial just not supported?

0 Kudos
1 Solution

Accepted Solutions
Observer ryanbales
Observer
1,272 Views
Registered: ‎12-01-2017

Re: How to test the truth table of my module

Jump to solution

A simulation is exactly how you would test if it's working correctly.  Have you written a testbench to drive the inputs to specific values?  The simulator won't automatically set your inputs to every combination of values you want to test.  From your description, it sounds like the signals are undriven.  Search for Vivado Verilog testbench if you'd like help getting started.

Tags (1)
0 Kudos
2 Replies
Observer ryanbales
Observer
1,273 Views
Registered: ‎12-01-2017

Re: How to test the truth table of my module

Jump to solution

A simulation is exactly how you would test if it's working correctly.  Have you written a testbench to drive the inputs to specific values?  The simulator won't automatically set your inputs to every combination of values you want to test.  From your description, it sounds like the signals are undriven.  Search for Vivado Verilog testbench if you'd like help getting started.

Tags (1)
0 Kudos
Observer audriusa
Observer
821 Views
Registered: ‎01-25-2018

Re: How to test the truth table of my module

Jump to solution

Understand, a simulator testbench must be written. 

0 Kudos