Re: Style question - leftshift or not?
- From: "John_H" <johnhandwork@xxxxxxxx>
- Date: Mon, 26 Sep 2005 17:53:25 GMT
They're equivalent. Sometimes it's more "effective" to communicate one
versus the other to communicate the functionality to other engineers. The
latter form is certainly preferred if the engineer (or the tool) could be
confused about what the width would be if the "sig" were an expression
rather than a wire/reg.
"Paul Marciano" <pm940@xxxxxxxxx> wrote in message
news:1127755858.878564.293980@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> Hi,
>
> In terms of style/synthesis is there any reason to prefer:
>
> reg [5:0] v;
> wire sig;
>
> v <= { v[4:0], sig };
>
> over:
>
> v <= (v << 1) | sig;
>
>
> I believe these are equivalent.
>
> Regards,
> Paul.
>
.
- References:
- Style question - leftshift or not?
- From: Paul Marciano
- Style question - leftshift or not?
- Prev by Date: Re: Style question - leftshift or not?
- Next by Date: Re: Style question - leftshift or not?
- Previous by thread: Re: Style question - leftshift or not?
- Next by thread: Re: Style question - leftshift or not?
- Index(es):
Relevant Pages
|