Subject: Re: [sv-ac] 17.9: System functions: $onehot/$onehot0
From: harry@verplex.com
Date: Tue Apr 22 2003 - 13:27:34 PDT
>So, Should we change
>— $onehot0(<expression>) returns true if at most one bit of the expression
is low.
>to
>— $onehot0(<expression>) returns true if at most one bit of the expression
is high.
>
Yes--this function essentially computes:
(<expression> & (<expression> - 1)) == 0
It either returns a 1 if zero or one bit is high in the expression, or
returns a 0 if more than one bit is high.
-Harry
This archive was generated by hypermail 2b28 : Tue Apr 22 2003 - 13:27:58 PDT