Variable bit shift

D

DW

Guest
I believe that the bit shift operator requires a constant right hand side
operand. Is there a neat and simple way of performing a variable shift - I
can think of some complicated ways of doing it? The shift I need to perform
is a signed shift i.e. <<< or >>>.
DW
 
I believe I use variable shifts all the time. The variable signed shift
should work just as well. You might, of course, be working with a limited
functionality sim or synth so there isn't an absolute guarantee but you
should be able to get what you need just by coding it.

"DW" <dave_wooff@hotmail.com> wrote in message
news:cbc8t5$4oa$1$830fa7b3@news.demon.co.uk...
I believe that the bit shift operator requires a constant right hand side
operand. Is there a neat and simple way of performing a variable shift -
I
can think of some complicated ways of doing it? The shift I need to
perform
is a signed shift i.e. <<< or >>>.
DW
 
"John_H" <johnhandwork@mail.com> wrote in message
news:sIiCc.16$I25.1905@news-west.eli.net...
I believe I use variable shifts all the time. The variable signed shift
should work just as well. You might, of course, be working with a limited
functionality sim or synth so there isn't an absolute guarantee but you
should be able to get what you need just by coding it.

"DW" <dave_wooff@hotmail.com> wrote in message
news:cbc8t5$4oa$1$830fa7b3@news.demon.co.uk...
I believe that the bit shift operator requires a constant right hand
side
operand. Is there a neat and simple way of performing a variable
shift -
I
can think of some complicated ways of doing it? The shift I need to
perform
is a signed shift i.e. <<< or >>>.
DW




Well, actually, I think Quartus 2 supports it - I think the problem I have
is with Modelsim - can anyone confirm this?
Thanks, DW
 

Welcome to EDABoard.com

Sponsor

Back
Top