Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21602 Discussions

The x in front of a vector

Altera_Forum
Honored Contributor II
1,454 Views

for count<=x"0"; 

 

what does the x in front of "0" means?
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
732 Views

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

0 Kudos
Altera_Forum
Honored Contributor II
732 Views

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

0 Kudos
Altera_Forum
Honored Contributor II
732 Views

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";
0 Kudos
Reply