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 synthesizeable operators

Status
Not open for further replies.

naizath12

Junior Member level 1
Joined
May 28, 2009
Messages
18
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Location
India
Activity points
1,404
is <<(left shift) and >>(right shift) bitwise operators synthesizeable???
 

it is synthesizeable.
a << 3 works well.
a << b is not recommended and will use too much resource.

and you could use this : {a[5:0],3'b0}
it equals to a<<3
 
Yes it's synthesizable but not good for timing. Use the method the previous poster suggested. You probably need to use a big case statement to include all the possible shifting values though.

- Hung
 

Yes it's synthesizable but not good for timing.
Why? If you are using a variable shift factor, it should be clearly range restricted. But then, a modern design
compiler should be able to minimize the logic. I wouldn't expect different resource requirements for the high level
a << n statement versus a fully decoded case construct.
 

FvM said:
Yes it's synthesizable but not good for timing.
Why? If you are using a variable shift factor, it should be clearly range restricted. But then, a modern design
compiler should be able to minimize the logic. I wouldn't expect different resource requirements for the high level
a << n statement versus a fully decoded case construct.

c[31:0] = a[31:0] << b[4:0] means
Code:
case(b)
    5'h0 : c = a;
    5'h1 : c = {a[30:0],1'b0};
    5'h2 : c = {a[29:0],2'b0};
    .
    .
    .
    5'h1f : c = {a[31],31'b0};
endcase
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top