Hi Weng,
If it is a C or C++, it would have never met the situations. Why? VHDL
is the worst language I have used.It is the language that lacks big
companys' supports and lacks money to introduce more versions of the
language.
You really don't want to know how much money goes around in the EDA world.
And yet another version of the language is not something everything is
waiting for.
As a language, it even doesn't support conditional compilation
statements, like #define, .... Unbelievable. Can you believe any
software language that lacks conditional compilation statements? But
VHDL lives without it and survives.
C does _not_ natively support conditional compilation, inclusion of files or
macros. C++ doesn't either. This functionality is brought to you by cpp,
the C pre-processor.
I use cpp to transform .chd files to .vhd files and then compile these. I
agree that it's a shame that nobody uses this functionality by default, but
it definitely is possible to use it.
In the above case, it is very natural it should have been introduce in
some library all binary operator fucntions, like a "+"
(std_logic_vector_constant,natural). But it lacks
std_logic_vector_constant data type. No body cares about it. Or at
least few people care about it.
Well, if the data type had been a built-in type (integer, natural, bit),
things could have been different, but std_logic and its derivatives are not
native VHDL types, and thus the compiler has to resort to waiting with
evaluating until elaboration time.
It's like creating a "+" function in C++ that adds a number of blank records
to a database. This can't evaluate to a constant either. C++ will give you
very weird results when using this operator in a case statement that will
take you some time to debug. VHDL simply does not allow this kind of stuff.
I don't like VHDL because you have to specify such a large number of data
types explicitly. I like VHDL because it is very literal and avoids side
effects.
Why is C++ so popular? Many big companies open their C++ huge library to
public and public uses them
The thing that makes C++ so popular is that developers don't get into each
others' namespace territories and _should_ not need to care about the
details of lower-level implementations.
In my opinion it's all a bit overrated.
Best regards,
Ben