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 Shift operations

Status
Not open for further replies.

soloktanjung

Full Member level 6
Joined
Nov 20, 2006
Messages
364
Helped
51
Reputation
100
Reaction score
43
Trophy points
1,308
Location
nowhere
Activity points
3,194
Hi friends,

Is this similar or not?

d=c2-[c3+(c3<<1)]>>3 and d=c2-[(c3<<3)+(c3<<1)]


I've read from a paper about the first one, but if I do as in the second one, is it still correct?

Is it the first one require less logic?

Anyone can help me?

Thanks in advances.
Hairo
 

You haven't shown what type of variables/signals those are, but the expressions don't look at all similar. Plug in some numbers and you'll see. Maybe you mistyped them?

By the way, you can't use square brackets in a Verilog expression.
 
Hi Echo47,

I've tested it with some numbers and both expression are not similar.

Thanks for the note that the square brackets can't be use in Verilog. I'll replace it with "(".

Thanks,
Hairo
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top