Pretty much just the title. What does that underscore mean? How is this different from:
parameter FOO = 20'h00020;
I don't know what to look for to find an answer to this question as I don't know what this type of syntax is called.
The underscore character (_) shall be legal anywhere in a number except as the first character. The underscore character is ignored. This feature can be used to break up long numbers for readability purposes. So, 20'h00020 is the same as 20'h0002_0 .
The hexadecimal number system is a type of number system, that has a base value equal to 16. It is also pronounced sometimes as 'hex'. Hexadecimal numbers are represented by only 16 symbols. These symbols or values are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F.
From the IEEE Std (1800-2009), section "5.7.1 Integer literal constants":
The underscore character (_) shall be legal anywhere in a number except as the first character. The underscore character is ignored. This feature can be used to break up long numbers for readability purposes.
So, 20'h00020
is the same as 20'h0002_0
.
I found this by searching in the above spec for "underscore".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With