Add EmptyChipTop example
This commit is contained in:
@@ -17,3 +17,9 @@ class NoCoresConfig extends Config(
|
||||
new chipyard.config.WithNoDebug ++
|
||||
new chipyard.config.WithNoPLIC ++
|
||||
new chipyard.config.AbstractConfig)
|
||||
|
||||
// A config that uses a empty chiptop module with no rocket-chip soc components
|
||||
class EmptyChipTopConfig extends Config(
|
||||
new chipyard.example.WithEmptyChipTop ++
|
||||
new chipyard.config.AbstractConfig // since we aren't using rocket-chip, this doesn't do anything
|
||||
)
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package chipyard.example
|
||||
|
||||
import chisel3._
|
||||
|
||||
import org.chipsalliance.cde.config._
|
||||
import freechips.rocketchip.diplomacy._
|
||||
import freechips.rocketchip.util.{DontTouch}
|
||||
|
||||
import chipyard._
|
||||
import chipyard.harness.{BuildTop}
|
||||
|
||||
class EmptyChipTop(implicit p: Parameters) extends LazyModule {
|
||||
override lazy val module = new Impl
|
||||
class Impl extends LazyRawModuleImp(this) with DontTouch {
|
||||
// Your custom non-rocketchip-soc stuff here
|
||||
}
|
||||
}
|
||||
|
||||
class WithEmptyChipTop extends Config((site, here, up) => {
|
||||
case BuildTop => (p: Parameters) => new EmptyChipTop()(p)
|
||||
})
|
||||
@@ -99,6 +99,7 @@ trait HasHarnessInstantiators {
|
||||
if (p(DontTouchChipTopPorts)) {
|
||||
duts.map(_ match {
|
||||
case d: DontTouch => d.dontTouchPorts()
|
||||
case _ =>
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user