Only use powers of two masks, for now
This commit is contained in:
@@ -93,4 +93,7 @@ object Utils {
|
||||
case Some(ActiveLow) | Some(NegativeEdge) => not(exp)
|
||||
case _ => exp
|
||||
}
|
||||
|
||||
// Check if a number is a power of two
|
||||
def isPowerOfTwo(x: Int): Boolean = (x & (x - 1)) == 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user