Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is 4’d# notation?

Tags:

embedded

In an Atmel datasheet, I see a notation I've never seen before, for example:

Register bits MAX_BE define the maximum value of the backoff exponent in the CSMA- CA algorithm. It equals macMaxBE; refer to section 7.5.1.4 of [2]. Valid values are [4’d8, 4’d7, ... , 4’d3].

How does one interpret/decode the 4’d# values?

like image 918
Travis Griggs Avatar asked Dec 10 '12 20:12

Travis Griggs


2 Answers

That looks like verilog to me (or at least it's the same format as verilog uses).

4'd# means a 4-bit field, with a decimal value of #.

So 4'd8 is binary 1000.

Other number formats can be 'h (hex representation), or 'b (binary representation)

examples:

16'd1 = 0000000000000001
8'hff = 11111111
5'b10101 = 10101 

(etc).

like image 81
Tim Avatar answered Nov 15 '22 11:11

Tim


I'm not sure what the notation is supposed to mean, but a similar datasheet for an Analog Devices chip lists the valid values as 3 to 8, so I'd guess the actual values this one wants are also 8,7,..3.

Edit I think Tim is right.

like image 44
AShelly Avatar answered Nov 15 '22 11:11

AShelly