Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Writing big sized test-cases in VHDL

Status
Not open for further replies.

garvind25

Full Member level 3
Joined
Oct 28, 2012
Messages
176
Helped
0
Reputation
0
Reaction score
1
Trophy points
1,298
Activity points
3,066
Hi,



I was writing test benches of VHDL codes (in VHDL) and came across a problem. I hope someone can help me.

While writing test benches for small number of inputs (say two or three one-bit inputs) I am able to cover all the case (four or eight cases). But when I have big sized inputs (or a large number of them), I am having difficulty. For eg. for testing a 8 bit adder which adds two 8-bit numbers, I will have to manually enter 2^8 * 2^8 input combinations (and off course the correct answer accompanying each test input pair).

Is there any other way to do so? Is there any way to automatically generate the 2^16 inputs? Also how to go about mentioning the corresponding outputs in the test bench?



Looking forward to your responses.



Thanks in advance,

Arvind Gupta.
 

You could generate the inputs and expected results, and put them in text files and use TEXTIO functions to read them. Or, you could use GENERATE statements to create the values.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top