diff options
| author | Andrew Waterman | 2019-03-14 02:04:23 -0700 |
|---|---|---|
| committer | Edward Wang | 2019-03-15 11:49:17 -0700 |
| commit | 6c39009771d3c9169f66e8a65b5d8f996d5c6e1f (patch) | |
| tree | ac7ee812c7b33ee7c0494efe14ee8f9704431935 | |
| parent | 5744ce6df80ba9ec153b07744eb8da7a01876f2c (diff) | |
Add width constraint to PopCount test (which currently fails)
| -rw-r--r-- | src/test/scala/chiselTests/PopCount.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/PopCount.scala b/src/test/scala/chiselTests/PopCount.scala index 2c144382..d9b3b837 100644 --- a/src/test/scala/chiselTests/PopCount.scala +++ b/src/test/scala/chiselTests/PopCount.scala @@ -16,6 +16,8 @@ class PopCountTester(n: Int) extends BasicTester { val result = PopCount(x.asBools) val expected = x.asBools.foldLeft(0.U)(_ +& _) assert(result === expected) + + require(result.getWidth == BigInt(n).bitLength) } class PopCountSpec extends ChiselPropSpec { |
