1
0
Fork 0

jtag: Get rid of chisel deprecation warnings

This commit is contained in:
Megan Wachs 2017-04-07 11:48:54 -07:00 committed by Andrew Waterman
parent 22c6f728c3
commit 9ae4838708
2 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ object JtagState {
Exit2IR,
UpdateIR
)
val width = log2Up(all.size)
val width = log2Ceil(all.size)
def chiselType() = UInt(width.W)
}

View File

@ -48,14 +48,14 @@ class ClockedCounter(modClock: Clock, counts: BigInt, init: Option[BigInt])
extends Module(override_clock=Some(modClock)) {
require(counts > 0, "really?")
val width = log2Up(counts)
val width = log2Ceil(counts)
class CountIO extends Bundle {
val count = Output(UInt(width.W))
}
val io = IO(new CountIO)
val count = init match {
case Some(init) => Reg(UInt(width.W), init=init.U)
case Some(init) => RegInit(init.U(width.W))
case None => Reg(UInt(width.W))
}