Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

VHDL - Display Constant Values

yossikr

Newbie
Joined
May 30, 2023
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
24
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).
 
Solution
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.
Not sure what you’re asking for. Do you just want to find CONSTANT declarations? Any editor can do that.
Hi,

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.
 
Most probably you need the VS plugin "VHDL LS" and a .toml file file which has info as to which file exists where.
 
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).

Please let me know if you find such a tool.
 
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.
 
Last edited:
Solution
Hi,

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.
 

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top