How to improve VHDL
Why OSVVM™? › Forums › VHDL › How to improve VHDL
Tagged: Issue, Language, Suggestion
- This topic has 5 replies, 5 voices, and was last updated 6 months, 3 weeks ago by Hassan.
-
AuthorPosts
-
March 28, 2012 at 20:27 #49Ian GibbinsKeymaster
Don’t like something in VHDL? Have new feature that you think should be added to VHDL?
Let us know: just reply to this post below or create new topic…March 20, 2014 at 22:48 #772Amos ZaslavskyMember*Many people have been using for years the following three
Packages in almost any code they write:
— classic package of Synopsys in old VHDL
library ieee ;
use ieee.std_logic_1164.all ;
use ieee.std_logic_unsigned.all ;
They make it possible to execute unsigned math operations on vectors
in a convenient way with out all the clumsy casting operations
or conversions needed when you use other vector-math packages.
In VHDL-200 finally the previous 3 packages have been replaced with
the new standard packages, and the last package is more powerful
(for example enable division operations and more…).
— same trio declarations with new package of IEEE in VHDL-2008
library ieee ;
use ieee.std_logic_1164.all ;
use ieee.numeric_std_unsigned.all ; — a new package !
This is very nice, but I can not find a replacement for the
Following useful trio:
— the signed trio
library ieee ;
use ieee.std_logic_1164.all ;
use ieee.std_logic_signed.all ;
Which enable signed math (for example when you want to
make a compare operation and may other applications).
March 20, 2014 at 22:56 #773Amos ZaslavskyMemberAnother request or wish would be to make this coding possible
y <= a or b and c ;
— with the and operation done preceding the or operation and with no need for the flowing clumsy style y <= a or (b and c) ;
This is actually the case when you write math operations
m <= p + q * r ;
March 27, 2014 at 18:29 #783Andy JonesMemberAmos,
1st issue: I have seen very few designs that use a signed numeric interpretation of every std_logic_vector in the design. Most designs that use signed interpretation also use unsigned interpretations, which would not be possible if such a package were used. If you need signed interpretations, it is best to use either integer subtypes or explicit signed data types to clearly define where signed interpretations and arithmetic are desired.
2nd issue: Unlike the mathematical operators that have a widely accepted operator precedence, boolean operators do not. Therefore explicitly defining the desired precedence of boolean operators using parentheses provides an unambiguous description of the desired result. When you wrote “a or b and c” I had no idea whether you meant “(a or b) and c” or “a or (b and c)”.
Think less about how little you can type, and more about how clearly you can express the desired behavior. Those who will have to review, reuse or maintain your design will thank you for it.
Andy
December 11, 2022 at 02:47 #2117fpgaphreakMemberI still do not like the ambigious way, vectors are treated agains signals, and that there is conversion required in between a(0 downto 0) = “1” instead of using “a(0) = ‘1’). See the bram addressing regarding their write enable. This is one signal only, however one uses 0…0 instead of a signal. So VHDL could be made more tolerant for that.
May 31, 2024 at 22:31 #2441HassanMemberWhat is the primary benefit of this thread since the synthesis tool vendors will take maybe a decador or more to add simple new features for the language.
We need an effort to upgrade the flow that is used with VHDL. We need something like LLVM for VHDL. The netlist fitter can be handled by the tools. But tool for synthesis and compilation for simulation must be created through cooperation among all stakeholders.
Besides this, it must become easier to integrate high level from C/C++ or Python into VHDL testbench. This will alleviate a lot of problems since if something is not possible with VHDL then just use another language while having the peace of mind that it will integrate well.
Even if its impossible to improve VHDL practically, if it becomes possible to bind Python and C/C++, that will still be great.
What else can I say? hmmm. Ability to read ROM data from file into an RTL module. I believe this is possible for Verilog but last time I checked, it failed in Quartus with VHDL.
Hardware domain is atleast 20 years behind the software domain in the quality of tools. Many tools e.g waveform viewer of ModelSim has remained almost unchanged for maybe 20 years. I am not sure if they use GPU Hardware acceleration in their program. The GUI itself feels like it has frozen in time.
-
AuthorPosts
- You must be logged in to reply to this topic.