summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAndrew Waterman2015-07-28 22:41:58 -0700
committerAndrew Waterman2015-07-28 22:41:58 -0700
commit1c0a521cd3a4d2d44955a58bffe44a01cf5a3104 (patch)
treed2e0815fc8e53a80af79866d64f5d8e03f757b36 /src/main
parent7bef6454f792be2f2a036d7bb32e541f67279a15 (diff)
Rename sumLog2Width to sumPow2Width
Diffstat (limited to 'src/main')
-rw-r--r--src/main/scala/Chisel/Core.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/scala/Chisel/Core.scala b/src/main/scala/Chisel/Core.scala
index c28f9f95..596f05fb 100644
--- a/src/main/scala/Chisel/Core.scala
+++ b/src/main/scala/Chisel/Core.scala
@@ -612,8 +612,8 @@ abstract class Bits(dirArg: Direction, width: Int, lit: Option[LitArg]) extends
override def sumWidth(amt: BigInt): Int = if (getWidth >= 0) (getWidth + amt).toInt else -1
def sumWidth(other: Bits, amt: BigInt): Int =
if (getWidth >= 0 && other.getWidth >= 0) (getWidth + other.getWidth + amt).toInt else -1
- def sumLog2Width(other: Bits): Int =
- if (getWidth >= 0 && other.getWidth >= 0) (getWidth + (1<<other.getWidth)).toInt else -1
+ def sumPow2Width(other: Bits): Int =
+ if (getWidth >= 0 && other.getWidth >= 0) (getWidth + (1 << other.getWidth)).toInt else -1
def :=(other: Bits) =
pushCommand(Connect(this.lref, other.ref))
@@ -652,7 +652,7 @@ abstract class Bits(dirArg: Direction, width: Int, lit: Option[LitArg]) extends
def % (other: Bits): Bits = binop(ModOp, other, sumWidth(0))
def << (other: BigInt): Bits = binop(ShiftLeftOp, other, sumWidth(other))
def << (other: Int): Bits = this << BigInt(other)
- def << (other: Bits): Bits = binop(DynamicShiftLeftOp, other, sumLog2Width(other))
+ def << (other: Bits): Bits = binop(DynamicShiftLeftOp, other, sumPow2Width(other))
def >> (other: BigInt): Bits = binop(ShiftRightOp, other, sumWidth(-other))
def >> (other: Int): Bits = this >> BigInt(other)
def >> (other: Bits): Bits = binop(DynamicShiftRightOp, other, sumWidth(0))
@@ -740,7 +740,7 @@ class UInt(dir: Direction, width: Int, lit: Option[LitArg] = None) extends Bits(
def % (other: UInt): UInt = binop(ModOp, other, sumWidth(0))
override def << (other: BigInt): UInt = binop(ShiftLeftOp, other, sumWidth(other))
override def << (other: Int): UInt = this << BigInt(other)
- def << (other: UInt): UInt = binop(DynamicShiftLeftOp, other, sumLog2Width(other))
+ def << (other: UInt): UInt = binop(DynamicShiftLeftOp, other, sumPow2Width(other))
override def >> (other: BigInt): UInt = binop(ShiftRightOp, other, sumWidth(-other))
override def >> (other: Int): UInt = this >> BigInt(other)
def >> (other: UInt): UInt = binop(DynamicShiftRightOp, other, sumWidth(0))
@@ -819,7 +819,7 @@ class SInt(dir: Direction, width: Int, lit: Option[LitArg] = None) extends Bits(
def % (other: SInt): SInt = binop(ModOp, other, sumWidth(0))
override def << (other: BigInt): SInt = binop(ShiftLeftOp, other, sumWidth(other))
override def << (other: Int): SInt = this << BigInt(other)
- def << (other: UInt): SInt = binop(DynamicShiftLeftOp, other, sumLog2Width(other))
+ def << (other: UInt): SInt = binop(DynamicShiftLeftOp, other, sumPow2Width(other))
override def >> (other: BigInt): SInt = binop(ShiftRightOp, other, sumWidth(-other))
override def >> (other: Int): SInt = this >> BigInt(other)
def >> (other: UInt): SInt = binop(DynamicShiftRightOp, other, sumWidth(0))