Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

the meaning of this verilog code

Status
Not open for further replies.

lgeorge123

Full Member level 2
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top