Skip to content

Commit

Permalink
Move ResetStretcher to testchipip
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryz123 committed Jun 8, 2023
1 parent 56e5421 commit 4d22af1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
17 changes: 0 additions & 17 deletions generators/chipyard/src/main/scala/clocking/TLClockSelector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,6 @@ import freechips.rocketchip.util.ElaborationArtefacts

import testchipip._

object ResetStretcher {
def apply(clock: Clock, reset: Reset, cycles: Int): Reset = {
withClockAndReset(clock, reset) {
val n = log2Ceil(cycles)
val count = Module(new AsyncResetRegVec(w=n, init=0))
val resetout = Module(new AsyncResetRegVec(w=1, init=1))
count.io.en := resetout.io.q
count.io.d := count.io.q + 1.U
resetout.io.en := resetout.io.q
resetout.io.d := count.io.q < (cycles-1).U

resetout.io.q.asBool
}
}
}


case class ClockSelNode()(implicit valName: ValName)
extends MixedNexusNode(ClockImp, ClockGroupImp)(
dFn = { d => ClockGroupSourceParameters() },
Expand Down
2 changes: 1 addition & 1 deletion generators/testchipip

0 comments on commit 4d22af1

Please sign in to comment.