From 7f12a07d941bd08749ef350654fe9a324b882a6b Mon Sep 17 00:00:00 2001 From: jackkoenig Date: Mon, 12 Sep 2016 21:12:35 -0700 Subject: Change bitWidth to support ClockType Match on GroundType instead of UIntType and SIntType --- src/main/scala/firrtl/passes/MemUtils.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/scala/firrtl/passes/MemUtils.scala b/src/main/scala/firrtl/passes/MemUtils.scala index b235213a..adbf23e5 100644 --- a/src/main/scala/firrtl/passes/MemUtils.scala +++ b/src/main/scala/firrtl/passes/MemUtils.scala @@ -83,8 +83,7 @@ object bitWidth { def widthOf(dt: Type): BigInt = dt match { case t: VectorType => t.size * bitWidth(t.tpe) case t: BundleType => t.fields.map(f => bitWidth(f.tpe)).foldLeft(BigInt(0))(_+_) - case UIntType(IntWidth(width)) => width - case SIntType(IntWidth(width)) => width + case GroundType(IntWidth(width)) => width case t => error("Unknown type encountered in bitWidth!") } } -- cgit v1.2.3