To expand further (if you have the VHDL LRM, you can read the gory details in section 13.4.2) you can put any base (between 2 and 16 inclusive) before the first #
and an exponent after the second #
. You can also put _
s in to separate sets of numbers.
The exponent is always expressed in base 10 and cannot be negative.
Example (the VHDL highlighting leaves a little to be desired!)
entity test_numbers is
end entity test_numbers;
architecture a1 of test_numbers is
begin
process is
begin -- process
report integer'image(16#FF#); -- 255
report integer'image(10#1_000#); -- 1000
report integer'image(10#1#e3); -- 1000 another way
report integer'image(2#1#e10); -- 1024
report integer'image(4#100#); -- 16
wait;
end process;
end architecture a1;
reports:
# Loading work.test_numbers(a1)
# ** Note: 255
# Time: 0 ns Iteration: 0 Instance: /test_numbers
# ** Note: 1000
# Time: 0 ns Iteration: 0 Instance: /test_numbers
# ** Note: 1000
# Time: 0 ns Iteration: 0 Instance: /test_numbers
# ** Note: 1024
# Time: 0 ns Iteration: 0 Instance: /test_numbers
# ** Note: 16
# Time: 0 ns Iteration: 0 Instance: /test_numbers