Skip to content

Commit

Permalink
Fix Reset bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryz123 committed Aug 8, 2020
1 parent 9e44313 commit abc75e9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
25 changes: 23 additions & 2 deletions generators/chipyard/src/main/scala/Subsystem.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import chisel3.internal.sourceinfo.{SourceInfo}
import freechips.rocketchip.prci._
import freechips.rocketchip.config.{Field, Parameters}
import freechips.rocketchip.devices.tilelink._
import freechips.rocketchip.devices.debug.{HasPeripheryDebug, HasPeripheryDebugModuleImp}
import freechips.rocketchip.devices.debug.{HasPeripheryDebug, HasPeripheryDebugModuleImp, ExportDebug}
import freechips.rocketchip.diplomacy._
import freechips.rocketchip.diplomaticobjectmodel.model.{OMInterrupt}
import freechips.rocketchip.diplomaticobjectmodel.logicaltree.{RocketTileLogicalTreeNode, LogicalModuleTree}
Expand All @@ -25,10 +25,31 @@ import freechips.rocketchip.amba.axi4._
import boom.common.{BoomTile}


import testchipip.{DromajoHelper}
import testchipip.{DromajoHelper, CanHavePeripherySerial, SerialKey}

trait CanHaveHTIF { this: BaseSubsystem =>
// Advertise HTIF if system can communicate with fesvr
if (this match {
case _: CanHavePeripherySerial if p(SerialKey) => true
case _: HasPeripheryDebug if p(ExportDebug).protocols.nonEmpty => true
case _ => false
}) {
ResourceBinding {
val htif = new Device {
def describe(resources: ResourceBindings): Description = {
val compat = resources("compat").map(_.value)
Description("htif", Map(
"compatible" -> compat))
}
}
Resource(htif, "compat").bind(ResourceString("ucb,htif0"))
}
}
}

class ChipyardSubsystem(implicit p: Parameters) extends BaseSubsystem
with HasTiles
with CanHaveHTIF
{
def coreMonitorBundles = tiles.map {
case r: RocketTile => r.module.core.rocketImpl.coreMonitorBundle
Expand Down
2 changes: 1 addition & 1 deletion generators/firechip/src/main/scala/FireSim.scala
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class WithFireSimRationalTileDomain(multiplier: Int, divisor: Int) extends Confi
data.reset := ResetCatchAndSync(tile_clock, reset.asBool)
} else {
data.clock := uncore_clock
data.clock := reset
data.reset := reset
}
}
}}
Expand Down
2 changes: 1 addition & 1 deletion generators/tracegen/src/main/scala/Tile.scala
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class BoomTraceGenTile private(

val boom_params = p.alterMap(Map(TileKey -> BoomTileParams(
dcache=params.dcache,
core=BoomCoreParams(nPMPs=0, numLdqEntries=32, numStqEntries=32, useVM=false))))
core=BoomCoreParams(nPMPs=0, numLdqEntries=16, numStqEntries=16, useVM=false))))
val dcache = LazyModule(new BoomNonBlockingDCache(staticIdForMetadataUseOnly)(boom_params))


Expand Down

0 comments on commit abc75e9

Please sign in to comment.