Rules | Recent posts | topic RSS | Search | Register  | Log in

VHDL enquirey

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design
Author Message
ehsan_iut



Joined: 22 Jun 2007
Posts: 16
Location: Singapore


Post28 Aug 2008 4:52   VHDL enquirey

Hi folks,
Is it possible to access to the signals of lower level modules from the top module? I think it would be very useful in writing test benches. Or we should bring those signals to the test bench by means of ports? Tnx.
Back to top
avimit



Joined: 16 Nov 2005
Posts: 415
Helped: 68
Location: Fleet, UK


Post28 Aug 2008 9:51   Re: VHDL enquirey

VHDL does NOT provide a method by which you can access signals down in hierarchy at top level or at any other level. However there are ways to do so
1). Declare signals in a package instead of in a entity/architecture. Then compile this package, and make it visible in modules deep inside the hierarchy and in the modules you would like to access the same signal, say in test bench. Then you can access the signal at both places
2). If you are using modelsim, you can use something called 'signal spy' Which will make your signals visible at anylevel, no matter how deep in hierarchy they are.
Example:
Code:
init_signal_spy("/top/uut/inst1/sig1","/top/top_sig1",1,1);

Hope it hepls
Kr,
Avi
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap