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.

testbench for designs with generic

Status
Not open for further replies.

hithesh123

Full Member level 6
Joined
Nov 21, 2009
Messages
324
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
lax
Activity points
3,548
My vhdl entity has generic (n : natural := 8); declared in it.
The component in the test bench also has generic (n : natural := 8); declared in it.
My test bench entity also has generic (n : natural := 8); declared in it.

What is the correct way to write a test bench for vhdl entity with generic?
Does it need to be declared in all 3 places.
 

true value can be written in the top level.
 

it depends what you want to test.

if you are happy with 1 value for the generic, you can just delcare a constant.
if you need to test several values for the generic, you can either:
make a constant array of test values and instantiate them in the testbench in parrallel
or put the same generic as a generic on the testbench and use TCL to force the generic value when you run the testbench, and run the testbench multiple times in a TCL loop.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top