the meaning of this verilog code

Status
Not open for further replies.

lgeorge123

Full Member level 2
Joined
Jun 13, 2004
Messages
130
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Location
Hong Kong
Activity points
1,403
Can someone teach me the meaning of this verilog code:
.iREAD_DATA1({1'b0, fifo_rddata[15:11], fifo_rddata[7:0], 2'b00}) ??

I wonder to know why to use 1'b0 and 2'b00 , thanks !!
 

As far as I remember Verilog, {} are used for composing a single vector from specified parts. So, 1'b0 means heading 0 in a vector, and 2'b00 means two trailing zeros.
 

In verilog 1'b0 means '0'. 1 is the number of bits, 'b' indicates it is a binary value , and '0' shows the value.
similarly 2'b00 means "00"

Decimal value 3 can be displayed in verilog like this: 2'b11
 

hi,
"{}" this is a concatenating operator in verilog.
hear {1'b0, fifo_rddata[15:11], fifo_rddata[7:0], 2'b00} means we are forming a 16 bit register with 1 bit by 1'b0,
5 bits by fifo_rddata[15:11],
8 bits by fifo_rddata[7:0],
and 2 bits by 2'b00.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…