Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

The x in front of a vector

for count<=x"0";

what does the x in front of "0" means?

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Why not consult a VHDL reference or text book? It means hexadecimal, in this case just 4 bits width.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Also notice an expression like 16#1F4# means hex based number, while x"0B2" is hex based 12 bit string.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    you can also use o and b to qualify octal and binary. You can also use underscore characters to help with readbility:

    count <= b"0000_1101_0001";

    count <= o"840";

    count <= x"FF_00_08_1A";