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.
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: