ModelSim is unable to compile this in VHDL:
constant mem_size_bytes: integer := x"FFFFFFFF";
It says:
Bit string literal found where non-array type std.STANDARD.INTEGER was expected.
Similarly for;
if address< x"3FFFFF" then
it says
Operator "<" is ambiguous
I keep running into this problem. How in the world am I supposed to use hexadecimal numbers in VHDL with integer types like integer, natural and positive? Its just that specifying something hexadecimal is more convinient at times than having to use the calculator to determine what something is in radix-10. I had hoped that the tool will automatically know what the literal means since it is preceded by x which marks it as hexadecimal numeric quantity!!!
So, when assigning literals to constants or when using literals in comparison operator how does one qualify the literal? In other word for a literal constant value like "1010", how do explicitly tell the compiler if this is a string or std_logic_vector or unsigned or signed?
16#FFFFFFFF#
. Integers are scalar while bit strings and string literals are associated with arrays of character types (and std_ulogic is a character enumerated type). Simply put, integers don't got bits. \$\endgroup\$