0
\$\begingroup\$

I'm trying to use one of my design's internal signals in my testbench. I already know how I would do it in Verilog:

Goertzel i1 (
// port map - connection between master ports and signals/registers 
);
.
.
.
always @ (posedge i1.en) //do something

en is the enable signal I generate in my sistem, it is a signal declared in the top module, which is created in one element of the system, and then distributed to some of the other elements via port maps.

So, in VHDL testbench, I want to do something like:

uut: Goertzel PORT MAP (
 RST => RST_s,
 CLK => CLK_s,
 X => X_s,
 Y1 => Y1_s,
 Y2 => Y2_s
 );
.
.
.
wait until "/goertzel_tb/uut/en/" = '1'; //path to variable, read in Questa

What is the correct syntax? Or is there a way to do this?

EDIT: Tried this: Declared spy_en signal within TB file, and then did:

spy_en <= << signal.goertzel_tb.Goertzel.en : std_logic >>;

Questa gives errors.

asked Dec 21, 2016 at 11:48
\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

Not exactly what I was looking for, but it does the trick as it should! How can I get internal signals to testbench in VHDL 97 and ISim?

answered Dec 21, 2016 at 12:29
\$\endgroup\$
1
\$\begingroup\$

The syntax you are referring to was added in VHDL-2008. If your simulator supports it, you can do what you want as described here. ISim probably does not have any VHDL-2008 support.

Without VHDL-2008 your only options are simulator vendor specific functionality, using global signals as in your answer, or with debug ports in your entity.

answered Jan 2, 2017 at 15:10
\$\endgroup\$
1
  • \$\begingroup\$ The link is now broken. Better to state the answer than to link. \$\endgroup\$ Commented Nov 17, 2024 at 18:03

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.