The datasheet lists something like this:
[0x01f] EPRXREG
EPRXLock[3:0] = 4'd5;
EPRXReLock[3:0] = 4'd5
I understand that it is an 8-bit register at address 0x01f
, it contains 2 fields and each of them is 4 bits wide ([3:0]
and the 4
in 4'd5
). But what is 'd5
?
Other registers have
4'd12 1'b0 4'h4 4'hF 7'd32
Best Answer
4'd5
indicates a four-bit value, expressed in decimal as 5. It's the same as4'b101
(1012 = 510).Likewise,
4'hF
is a four-bit value indicating0xF
in hex; octal may also be seen (e.g.4'hF
can also be denoted as4'o17
)