-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tile: use BundleBridgeBlockDuringReset for tile trace interfaces
- Loading branch information
Showing
4 changed files
with
69 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// See LICENSE.SiFive for license details. | ||
|
||
package freechips.rocketchip.prci | ||
|
||
import chisel3._ | ||
import freechips.rocketchip.config.{Parameters} | ||
import freechips.rocketchip.diplomacy._ | ||
import freechips.rocketchip.diplomacy.BundleBridgeNexus.fillN | ||
import freechips.rocketchip.util.{BlockDuringReset, Blockable} | ||
|
||
object BundleBridgeBlockDuringReset { | ||
def apply[T <: Data : Blockable]( | ||
resetCrossingType: ResetCrossingType, | ||
name: Option[String] = None, | ||
registered: Boolean = false, | ||
default: Option[() => T] = None, | ||
inputRequiresOutput: Boolean = false, | ||
shouldBeInlined: Boolean = true | ||
)(implicit p: Parameters): BundleBridgeNexusNode[T] = { | ||
val nexus = LazyModule(new BundleBridgeNexus[T]( | ||
inputFn = (s: Seq[T]) => { | ||
val data = BundleBridgeNexus.requireOne[T](registered)(s) | ||
resetCrossingType match { | ||
case _: NoResetCrossing => data | ||
case s: StretchedResetCrossing => BlockDuringReset(data, s.cycles) | ||
} | ||
}, | ||
outputFn = fillN[T](registered) _, | ||
default = default, | ||
inputRequiresOutput = inputRequiresOutput, | ||
shouldBeInlined = shouldBeInlined | ||
)) | ||
name.foreach(nexus.suggestName(_)) | ||
nexus.node | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters