aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/scala/firrtl/Utils.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/scala/firrtl/Utils.scala b/src/main/scala/firrtl/Utils.scala
index 8a85957c..62b76944 100644
--- a/src/main/scala/firrtl/Utils.scala
+++ b/src/main/scala/firrtl/Utils.scala
@@ -677,6 +677,12 @@ object Utils {
}
implicit class TypeUtils(t: Type) {
+ def isGround: Boolean = t match {
+ case (_: UIntType | _: SIntType | _: ClockType) => true
+ case (_: BundleType | _: VectorType) => false
+ }
+ def isAggregate: Boolean = !t.isGround
+
def getType(): Type =
t match {
case v: VectorType => v.tpe