aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/Utils.scala
diff options
context:
space:
mode:
authorJack2016-05-09 17:31:14 -0700
committerJack Koenig2016-06-10 16:32:37 -0700
commit1eb8be78938721dd0d609f684c159bc1d1ddcfd6 (patch)
tree55e66afc08893ae8bb105340d7fc2af49122c5a5 /src/main/scala/firrtl/Utils.scala
parentcd0973b58c70f5b1e91f1d9a2abdf99a30f3f669 (diff)
API Cleanup - Width
Add simple documentation trait Width -> abstract class Width case class UnknownWidth -> case object UnknownWidth
Diffstat (limited to 'src/main/scala/firrtl/Utils.scala')
-rw-r--r--src/main/scala/firrtl/Utils.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/scala/firrtl/Utils.scala b/src/main/scala/firrtl/Utils.scala
index 9d8b9360..408359f0 100644
--- a/src/main/scala/firrtl/Utils.scala
+++ b/src/main/scala/firrtl/Utils.scala
@@ -204,8 +204,8 @@ object Utils extends LazyLogging {
def mux_type (t1:Type,t2:Type) : Type = {
if (wt(t1) == wt(t2)) {
(t1,t2) match {
- case (t1:UIntType,t2:UIntType) => UIntType(UnknownWidth())
- case (t1:SIntType,t2:SIntType) => SIntType(UnknownWidth())
+ case (t1:UIntType,t2:UIntType) => UIntType(UnknownWidth)
+ case (t1:SIntType,t2:SIntType) => SIntType(UnknownWidth)
case (t1:VectorType,t2:VectorType) => VectorType(mux_type(t1.tpe,t2.tpe),t1.size)
case (t1:BundleType,t2:BundleType) =>
BundleType((t1.fields,t2.fields).zipped.map((f1,f2) => {
@@ -781,8 +781,8 @@ object Utils extends LazyLogging {
def wipeWidth(): Type =
t match {
- case t: UIntType => UIntType(UnknownWidth())
- case t: SIntType => SIntType(UnknownWidth())
+ case t: UIntType => UIntType(UnknownWidth)
+ case t: SIntType => SIntType(UnknownWidth)
case _ => t
}
}