Hi,
I have inherited a complex VHDL design that do a massive use with constants. Is there a VHDL editor that displays a constant value from any location used in the design? (assuming the constant is define somewhere in the project).
The nature of a constant is that the value has to be set along with the declaration. The question is of course if the code is making use of calculated constants. They can be only evaluated by compiling the code.
Thanks for the reply. allow me to clarify.
let's say I'm defining a constant as a package in package.vhd and i declare this library in another design entity entity.vhd. I would like to hoover or right click over the constant name at entity.vhd and get it's numerical value as declared in package.vhd.
First of all, I don't know what you mean by "defining a constant as a package".
But assuming you have a constant declared in one file you want to see its value in another file? I don't think this is possible. The connection between the two files is only made during synthesis.
Similar functions, e.g. "go to definition" of various design objects, are available in state-of-the-art programming IDEs like Eclipse or Visual Studio. They are not yet common for VHDL tools.
An interesting candidate might be "VHDL tool" which can be used as plug-in for Visual Studio Code. https://www.vhdltool.com/features
As FvM has mentioned above, it can be done with VisualStudio with some additional plugins. It has been done by my colleagues in some other project.
I am still transiting from Np++ to VS, so cannot give you clear instructions.
My understanding that VHDL LS cannot do what yossikr wants. This plug-in will show declaration of the object when you hover over it, but it will not show the actual value of it's not in the declaration.
Imagine you have a constant that contains some matrix, that is calculated using a set of different complex functions acting on other constants. A theoretical plug-in that is able to display values of constants would need to be able to actually execute all this VHDL code to calculate and display the value.
I myself use constants extensively and face this problem. In most difficult situations, I just launch simulation to see the values if I need them for some reason (but it's rare).
The nature of a constant is that the value has to be set along with the declaration. The question is of course if the code is making use of calculated constants. They can be only evaluated by compiling the code.
Thanks for the reply. allow me to clarify.
let's say I'm defining a constant as a package in package.vhd and i declare this library in another design entity entity.vhd. I would like to hoover or right click over the constant name at entity.vhd and get it's numerical value as declared in package.vhd.
A text editing tool does not have enough information to do this, even if it is aware of VHDL syntax. You have to go through the compilation and elaborations steps to resolve the constants value. Any good VHDL simulator's debugger (like Modesim/Questa/Vivado) has this capability.