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.

Width of unsized based number like 'b1, 'b0, and 'b10

Status
Not open for further replies.

alam.tauqueer

Full Member level 2
Joined
Jun 19, 2007
Messages
127
Helped
5
Reputation
10
Reaction score
2
Trophy points
1,298
Activity points
2,005
Hi,

Can anyone tell me what would be the width of LHS and RHS

out[3:0] = 'b1;
out[3:0] = 'b0;
out[3:0] = 'b10;

should we take RHS width as 1 ??

or its width will be equal to width of LHS signal out??

Regards,
Tauqueer
 

My experience with simulators and back-end tools is that RHS width is padded with leading 0 to match the LHS width.

out[3:0] = 'b1; // becomes out[3:0] = 4'b0001
out[3:0] = 'b0; // becomes out[3:0] = 4'b0000
out[3:0] = 'b10; // becomes out[3:0] = 4'b0010


- Hung
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top