Access to signals inside an entity

T

Thomas Fuchs

Hi,
I want to access signals of my entity under test from my testbench. Is
it possible? I need it for writing the data into a "Data.txt" file.
I don't want to change the vhdl file of my test entity.
I use modelsim for simulation and I didn't find a way to do it.
Thanks.

Thomas
 
T

Tim Hubberstey

Thomas said:
Hi,
I want to access signals of my entity under test from my testbench. Is
it possible?

No. VHDL does not support direct access to signals inside another entity.
I need it for writing the data into a "Data.txt" file.
I don't want to change the vhdl file of my test entity.
I use modelsim for simulation and I didn't find a way to do it.

ModelSim has access to all signals and variables throughout your design.
You can use the Tcl features of ModelSim to look inside other entities
and pass signals back to your testbench. There is a considerable
simulation speed penalty for doing this.

You do this by having a Tcl script (.do file) watch for a particular
condition on the signal(s) of interest (wherever they are in the design)
and then 'force' a value onto a port or signal in your testbench. I
suggest you read up on the 'when' command in the ModelSim command
reference manual.
 
P

Paul Uiterlinden

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top