diff options
| author | Jack | 2016-05-09 23:33:36 -0700 |
|---|---|---|
| committer | Jack Koenig | 2016-06-10 16:32:50 -0700 |
| commit | 26e33c343332c2f65bb45bc17b40a9cb7d22e2fd (patch) | |
| tree | a02cead24db710db2f1832d0e3389ad256085600 /src/main/scala/firrtl/passes/ConstProp.scala | |
| parent | 1eb8be78938721dd0d609f684c159bc1d1ddcfd6 (diff) | |
API Cleanup - Statement
trait Stmt -> abstract class Statement (to match Expression)
abbrev. exp -> expr
BulkConnect -> PartialConnect
camelCase things that were snake_case
case class Empty() -> case object EmptyStmt
Change >120 character Statements to multiline
Diffstat (limited to 'src/main/scala/firrtl/passes/ConstProp.scala')
| -rw-r--r-- | src/main/scala/firrtl/passes/ConstProp.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/scala/firrtl/passes/ConstProp.scala b/src/main/scala/firrtl/passes/ConstProp.scala index 7c78e283..11c14e56 100644 --- a/src/main/scala/firrtl/passes/ConstProp.scala +++ b/src/main/scala/firrtl/passes/ConstProp.scala @@ -132,8 +132,8 @@ object ConstProp extends Pass { case _ => false } def isZero(e: Expression) = e match { - case UIntValue(value,_) => value == BigInt(0) - case SIntValue(value,_) => value == BigInt(0) + case UIntLiteral(value, _) => value == BigInt(0) + case SIntLiteral(value, _) => value == BigInt(0) case _ => false } x match { @@ -159,8 +159,8 @@ object ConstProp extends Pass { def <= (that: Range) = this.max <= that.min } def range(e: Expression): Range = e match { - case UIntValue(value, _) => Range(value, value) - case SIntValue(value, _) => Range(value, value) + case UIntLiteral(value, _) => Range(value, value) + case SIntLiteral(value, _) => Range(value, value) case _ => tpe(e) match { case SIntType(IntWidth(width)) => Range( min = BigInt(0) - BigInt(2).pow(width.toInt - 1), @@ -273,7 +273,7 @@ object ConstProp extends Pass { propagated } - def constPropStmt(s: Stmt): Stmt = { + def constPropStmt(s: Statement): Statement = { s match { case x: DefNode => nodeMap(x.name) = x.value case _ => |
