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.

verilog function to extend bits on left

Status
Not open for further replies.

Alka Arora

Newbie level 6
Joined
Jan 30, 2009
Messages
12
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,354
Hi,

Could you please writing a verilog function to extend the bits in left.

For example if a = 4'b1100;
b = 5

The output should be out = extend ( a,b)
should be equal to 01100;


Thanks
 

Hi,

Could you please writing a verilog function to extend the bits in left.

For example if a = 4'b1100;
b = 5

The output should be out = extend ( a,b)
should be equal to 01100;


Thanks

assign out = {b-width_a{1'b0},a}
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top