removed boom package and combined into example | removed example from naming | split generator file
This commit is contained in:
@@ -8,77 +8,190 @@ import freechips.rocketchip.devices.tilelink.BootROMParams
|
||||
import freechips.rocketchip.tile.XLen
|
||||
import testchipip._
|
||||
|
||||
/**
|
||||
* Class to specify where the BootRom file is (from `rebar` top)
|
||||
*/
|
||||
class WithBootROM extends Config((site, here, up) => {
|
||||
case BootROMParams => BootROMParams(
|
||||
contentFileName = s"./bootrom/bootrom.rv${site(XLen)}.img")
|
||||
})
|
||||
|
||||
/**
|
||||
* TODO: Why do we need this?
|
||||
*/
|
||||
object ConfigValName {
|
||||
implicit val valName = ValName("TestHarness")
|
||||
}
|
||||
import ConfigValName._
|
||||
|
||||
class WithExampleTop extends Config((site, here, up) => {
|
||||
case BuildTop => (clock: Clock, reset: Bool, p: Parameters) => {
|
||||
Module(LazyModule(new ExampleTop()(p)).module)
|
||||
// -------------------------------
|
||||
// Rocket Top Level System Configs
|
||||
// -------------------------------
|
||||
|
||||
/**
|
||||
* Class to specify a "plain" top level rocket-chip system
|
||||
*/
|
||||
class WithNormalRocketTop extends Config((site, here, up) => {
|
||||
case BuildRocketTop => (clock: Clock, reset: Bool, p: Parameters) => {
|
||||
Module(LazyModule(new RocketTop()(p)).module)
|
||||
}
|
||||
})
|
||||
|
||||
class WithPWM extends Config((site, here, up) => {
|
||||
case BuildTop => (clock: Clock, reset: Bool, p: Parameters) =>
|
||||
Module(LazyModule(new ExampleTopWithPWMTL()(p)).module)
|
||||
/**
|
||||
* Class to specify a top level rocket-chip system with PWM
|
||||
*/
|
||||
class WithPWMRocketTop extends Config((site, here, up) => {
|
||||
case BuildRocketTop => (clock: Clock, reset: Bool, p: Parameters) =>
|
||||
Module(LazyModule(new RocketTopWithPWMTL()(p)).module)
|
||||
})
|
||||
|
||||
class WithPWMAXI4 extends Config((site, here, up) => {
|
||||
case BuildTop => (clock: Clock, reset: Bool, p: Parameters) =>
|
||||
Module(LazyModule(new ExampleTopWithPWMAXI4()(p)).module)
|
||||
/**
|
||||
* Class to specify a top level rocket-chip system with a PWM AXI4
|
||||
*/
|
||||
class WithPWMAXI4RocketTop extends Config((site, here, up) => {
|
||||
case BuildRocketTop => (clock: Clock, reset: Bool, p: Parameters) =>
|
||||
Module(LazyModule(new RocketTopWithPWMAXI4()(p)).module)
|
||||
})
|
||||
|
||||
class WithBlockDeviceModel extends Config((site, here, up) => {
|
||||
case BuildTop => (clock: Clock, reset: Bool, p: Parameters) => {
|
||||
val top = Module(LazyModule(new ExampleTopWithBlockDevice()(p)).module)
|
||||
/**
|
||||
* Class to specify a top level rocket-chip system with a block device
|
||||
*/
|
||||
class WithBlockDeviceModelRocketTop extends Config((site, here, up) => {
|
||||
case BuildRocketTop => (clock: Clock, reset: Bool, p: Parameters) => {
|
||||
val top = Module(LazyModule(new RocketTopWithBlockDevice()(p)).module)
|
||||
top.connectBlockDeviceModel()
|
||||
top
|
||||
}
|
||||
})
|
||||
|
||||
class WithSimBlockDevice extends Config((site, here, up) => {
|
||||
case BuildTop => (clock: Clock, reset: Bool, p: Parameters) => {
|
||||
val top = Module(LazyModule(new ExampleTopWithBlockDevice()(p)).module)
|
||||
/**
|
||||
* Class to specify a top level rocket-chip system with a simulator block device
|
||||
*/
|
||||
class WithSimBlockDeviceRocketTop extends Config((site, here, up) => {
|
||||
case BuildRocketTop => (clock: Clock, reset: Bool, p: Parameters) => {
|
||||
val top = Module(LazyModule(new RocketTopWithBlockDevice()(p)).module)
|
||||
top.connectSimBlockDevice(clock, reset)
|
||||
top
|
||||
}
|
||||
})
|
||||
|
||||
class BaseExampleConfig extends Config(
|
||||
// --------------
|
||||
// Rocket Configs
|
||||
// --------------
|
||||
|
||||
class BaseRocketConfig extends Config(
|
||||
new WithBootROM ++
|
||||
new freechips.rocketchip.system.DefaultConfig)
|
||||
|
||||
class DefaultExampleConfig extends Config(
|
||||
new WithExampleTop ++ new BaseExampleConfig)
|
||||
class DefaultRocketConfig extends Config(
|
||||
new WithNormalRocketTop ++
|
||||
new BaseRocketConfig)
|
||||
|
||||
class RoccExampleConfig extends Config(
|
||||
new WithRoccExample ++ new DefaultExampleConfig)
|
||||
class RoccRocketConfig extends Config(
|
||||
new WithRoccExample ++
|
||||
new DefaultRocketConfig)
|
||||
|
||||
class PWMConfig extends Config(new WithPWM ++ new BaseExampleConfig)
|
||||
class PWMRocketConfig extends Config(
|
||||
new WithPWMRocketTop ++
|
||||
new BaseRocketConfig)
|
||||
|
||||
class PWMAXI4Config extends Config(new WithPWMAXI4 ++ new BaseExampleConfig)
|
||||
class PWMAXI4RocketConfig extends Config(
|
||||
new WithPWMAXI4RocketTop ++
|
||||
new BaseRocketConfig)
|
||||
|
||||
class SimBlockDeviceConfig extends Config(
|
||||
new WithBlockDevice ++ new WithSimBlockDevice ++ new BaseExampleConfig)
|
||||
class SimBlockDeviceRocketConfig extends Config(
|
||||
new WithBlockDevice ++
|
||||
new WithSimBlockDeviceRocketTop ++
|
||||
new BaseRocketConfig)
|
||||
|
||||
class BlockDeviceModelConfig extends Config(
|
||||
new WithBlockDevice ++ new WithBlockDeviceModel ++ new BaseExampleConfig)
|
||||
class BlockDeviceModelRocketConfig extends Config(
|
||||
new WithBlockDevice ++
|
||||
new WithBlockDeviceModelRocketTop ++
|
||||
new BaseRocketConfig)
|
||||
|
||||
class WithTwoTrackers extends WithNBlockDeviceTrackers(2)
|
||||
class WithFourTrackers extends WithNBlockDeviceTrackers(4)
|
||||
class DualCoreRocketConfig extends Config(
|
||||
new WithNBigCores(2) ++
|
||||
new DefaultRocketConfig)
|
||||
|
||||
class WithTwoMemChannels extends WithNMemoryChannels(2)
|
||||
class WithFourMemChannels extends WithNMemoryChannels(4)
|
||||
class RV32RocketConfig extends Config(
|
||||
new WithRV32 ++
|
||||
new DefaultRocketConfig)
|
||||
|
||||
class DualCoreConfig extends Config(
|
||||
// -----------------------------
|
||||
// BOOM Top Level System Configs
|
||||
// -----------------------------
|
||||
|
||||
class WithNormalBoomTop extends Config((site, here, up) => {
|
||||
case BuildBoomTop => (clock: Clock, reset: Bool, p: Parameters) => {
|
||||
Module(LazyModule(new BoomTop()(p)).module)
|
||||
}
|
||||
})
|
||||
|
||||
class WithPWMBoomTop extends Config((site, here, up) => {
|
||||
case BuildBoomTop => (clock: Clock, reset: Bool, p: Parameters) =>
|
||||
Module(LazyModule(new BoomTopWithPWMTL()(p)).module)
|
||||
})
|
||||
|
||||
class WithPWMAXI4BoomTop extends Config((site, here, up) => {
|
||||
case BuildBoomTop => (clock: Clock, reset: Bool, p: Parameters) =>
|
||||
Module(LazyModule(new BoomTopWithPWMAXI4()(p)).module)
|
||||
})
|
||||
|
||||
class WithBlockDeviceModelBoomTop extends Config((site, here, up) => {
|
||||
case BuildBoomTop => (clock: Clock, reset: Bool, p: Parameters) => {
|
||||
val top = Module(LazyModule(new BoomTopWithBlockDevice()(p)).module)
|
||||
top.connectBlockDeviceModel()
|
||||
top
|
||||
}
|
||||
})
|
||||
|
||||
class WithSimBlockDeviceBoomTop extends Config((site, here, up) => {
|
||||
case BuildBoomTop => (clock: Clock, reset: Bool, p: Parameters) => {
|
||||
val top = Module(LazyModule(new BoomTopWithBlockDevice()(p)).module)
|
||||
top.connectSimBlockDevice(clock, reset)
|
||||
top
|
||||
}
|
||||
})
|
||||
|
||||
// ------------
|
||||
// BOOM Configs
|
||||
// ------------
|
||||
|
||||
class BaseBoomConfig extends Config(
|
||||
new WithBootROM ++
|
||||
new boom.system.SmallBoomConfig)
|
||||
|
||||
class DefaultBoomConfig extends Config(
|
||||
new WithNormalBoomTop ++
|
||||
new BaseBoomConfig)
|
||||
|
||||
class RoccBoomConfig extends Config(
|
||||
new WithRoccExample ++
|
||||
new DefaultBoomConfig)
|
||||
|
||||
class PWMBoomConfig extends Config(
|
||||
new WithPWMBoomTop ++
|
||||
new BaseBoomConfig)
|
||||
|
||||
class PWMAXI4BoomConfig extends Config(
|
||||
new WithPWMAXI4BoomTop ++
|
||||
new BaseBoomConfig)
|
||||
|
||||
class SimBlockDeviceBoomConfig extends Config(
|
||||
new WithBlockDevice ++
|
||||
new WithSimBlockDeviceBoomTop ++
|
||||
new BaseBoomConfig)
|
||||
|
||||
class BlockDeviceModelBoomConfig extends Config(
|
||||
new WithBlockDevice ++
|
||||
new WithBlockDeviceModelBoomTop ++
|
||||
new BaseBoomConfig)
|
||||
|
||||
class DualCoreBoomConfig extends Config(
|
||||
// Core gets tacked onto existing list
|
||||
new WithNBigCores(2) ++ new DefaultExampleConfig)
|
||||
new boom.system.WithNBoomCores(2) ++
|
||||
new DefaultBoomConfig)
|
||||
|
||||
class RV32ExampleConfig extends Config(
|
||||
new WithRV32 ++ new DefaultExampleConfig)
|
||||
class RV32BoomConfig extends Config(
|
||||
new WithBootROM ++
|
||||
new boom.system.SmallRV32UnifiedBoomConfig)
|
||||
|
||||
Reference in New Issue
Block a user