merge the different ExampleTop subclasses into the example package
This commit is contained in:
@@ -1,14 +1,56 @@
|
||||
package example
|
||||
|
||||
import chisel3._
|
||||
import config.{Parameters, Config}
|
||||
import testchipip.WithSerialAdapter
|
||||
import diplomacy.LazyModule
|
||||
import coreplex.WithRoccExample
|
||||
import rocketchip.WithoutTLMonitors
|
||||
import testchipip._
|
||||
|
||||
class DefaultExampleConfig extends Config(
|
||||
class WithExampleTop extends Config((site, here, up) => {
|
||||
case BuildTop => (p: Parameters) =>
|
||||
Module(LazyModule(new ExampleTop()(p)).module)
|
||||
})
|
||||
|
||||
class WithPWM extends Config((site, here, up) => {
|
||||
case BuildTop => (p: Parameters) =>
|
||||
Module(LazyModule(new ExampleTopWithPWM()(p)).module)
|
||||
})
|
||||
|
||||
class WithBlockDeviceModel extends Config((site, here, up) => {
|
||||
case BuildTop => (p: Parameters) => {
|
||||
val top = Module(LazyModule(new ExampleTopWithBlockDevice()(p)).module)
|
||||
top.connectBlockDeviceModel()
|
||||
top
|
||||
}
|
||||
})
|
||||
|
||||
class WithSimBlockDevice extends Config((site, here, up) => {
|
||||
case BuildTop => (p: Parameters) => {
|
||||
val top = Module(LazyModule(new ExampleTopWithBlockDevice()(p)).module)
|
||||
top.connectSimBlockDevice()
|
||||
top
|
||||
}
|
||||
})
|
||||
|
||||
class BaseExampleConfig extends Config(
|
||||
new WithoutTLMonitors ++
|
||||
new WithSerialAdapter ++
|
||||
new rocketchip.DefaultConfig)
|
||||
|
||||
class DefaultExampleConfig extends Config(
|
||||
new WithExampleTop ++ new BaseExampleConfig)
|
||||
|
||||
class RoccExampleConfig extends Config(
|
||||
new WithRoccExample ++ new DefaultExampleConfig)
|
||||
|
||||
class PWMConfig extends Config(new WithPWM ++ new BaseExampleConfig)
|
||||
|
||||
class SimBlockDeviceConfig extends Config(
|
||||
new WithBlockDevice ++ new WithSimBlockDevice ++ new BaseExampleConfig)
|
||||
|
||||
class BlockDeviceModelConfig extends Config(
|
||||
new WithBlockDevice ++ new WithBlockDeviceModel ++ new BaseExampleConfig)
|
||||
|
||||
class WithTwoTrackers extends WithNBlockDeviceTrackers(2)
|
||||
class WithFourTrackers extends WithNBlockDeviceTrackers(4)
|
||||
|
||||
Reference in New Issue
Block a user