vhdl_reference_93:bit_string_literals

Bit string literals

base_specifier " [ bit_value ] "
  • B
  • O
  • X
extended_digit { [ underline ] extended_digit }
  • digit
  • letter

B means binary, O means octal and X means hexadecimal.

Bit_8: bit_vector(7 downto 0) := B"1111_1111" -- equivalent to "11111111"
 
Bit_8 : bit_vector(7 downto 0) := X"FF"   -- equivalent to B"1111_1111"
 
Bit_9 : bit_vector(8 downto 0) := O"777"    -- equivalent to B"111_111_111"
 
Bit_12: bit_vector(11 downto 0) := X"777"   -- equivalent to B"0111_0111_0111"