I am new to vera and trying to understand the syntax. What does 4b’ and 32′ represent ? Is this like 4 bit and 32 bit?
I am so confused and have to work on something related to this.
Another question is what does bit [31:0] mean ? does that mean anything from bit 31 and 0 ?
Thnks
The number number format is:
[width]'[base][value]So 4’b1001 is a 4-bit, binary value 1001 (9)
32’h0 is a 32-bit, hex value 0.
Sometimes you’ll see ‘d as well which is decimal.
Appended to the end of a bus,
[n:m]is a part select, which means, select the bits fromntomof this bus. So [31:0] selects the lower 32 bits of a bus (or all of the bus if it’s 32-bit wide).