aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/WIR.scala
diff options
context:
space:
mode:
authorJack2016-05-10 01:23:10 -0700
committerJack Koenig2016-06-10 16:33:08 -0700
commit58d9f1d50c07d999776c76259fadbdfd52c564fc (patch)
tree773e976333a6167cf3e378f36fdebac34268e93c /src/main/scala/firrtl/WIR.scala
parentc1504e2179e509632fa8d9ab44d87191b46cf851 (diff)
API Cleanup - PrimOp & PrimOps
Add simple documentation trait PrimOp -> abstract class PrimOp Move PrimOp case objects to object PrimOps Rename PrimOp case objects to match concrete syntax Overrwrite toString for more canonical serialization Update some PrimOps utility functions
Diffstat (limited to 'src/main/scala/firrtl/WIR.scala')
-rw-r--r--src/main/scala/firrtl/WIR.scala9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/scala/firrtl/WIR.scala b/src/main/scala/firrtl/WIR.scala
index 3bff3e1e..c2f880a3 100644
--- a/src/main/scala/firrtl/WIR.scala
+++ b/src/main/scala/firrtl/WIR.scala
@@ -60,14 +60,13 @@ case object EmptyExpression extends Expression { def tpe = UnknownType }
case class WDefInstance(info:Info,name:String,module:String,tpe:Type) extends Statement with IsDeclaration
// Resultant width is the same as the maximum input width
-case object ADDW_OP extends PrimOp
+case object Addw extends PrimOp { override def toString = "addw" }
// Resultant width is the same as the maximum input width
-case object SUBW_OP extends PrimOp
+case object Subw extends PrimOp { override def toString = "subw" }
// Resultant width is the same as input argument width
-case object DSHLW_OP extends PrimOp
+case object Dshlw extends PrimOp { override def toString = "dshlw" }
// Resultant width is the same as input argument width
-case object SHLW_OP extends PrimOp
-
+case object Shlw extends PrimOp { override def toString = "shlw" }
object WrappedExpression {
def apply (e:Expression) = new WrappedExpression(e)