Forum Discussion
Altera_Forum
Honored Contributor
10 years agoAh, yes. It's falling into place a little now. I've done a little googling off the back of your last post...
So "unsigned", "signed" and friends are not built-in, but provided by package ieee.numeric_std. That probably explain why the textbook doesn't list them as standard types. And the definition subtype uint32 is unsigned(31 downto 0); is an array definition, 32 bits of std_logic wide (not a number between 0 and 31!). And, if I have it right, the "signed", "unsigned" etc numeric types can be used as numbers because they overload the numerical operators like "+", "-", "=" etc. The plain "std_logic_vector" is not a number because it only defines logical operators. This makes a little more sense - it seems natural that in a "hardware definition language" one would be very interested in defining the range of a value in terms of its number of bits and specifying how they should be interpreted (signed, unsigned etc), and that individual bits should be easily accessible.