add SimpleNic
This commit is contained in:
@@ -33,6 +33,14 @@ class WithSimBlockDevice extends Config((site, here, up) => {
|
||||
}
|
||||
})
|
||||
|
||||
class WithSimpleNIC extends Config((site, here, up) => {
|
||||
case BuildTop => (p: Parameters) => {
|
||||
val top = Module(LazyModule(new ExampleTopWithSimpleNIC()(p)).module)
|
||||
top.connectNicLoopback()
|
||||
top
|
||||
}
|
||||
})
|
||||
|
||||
class BaseExampleConfig extends Config(
|
||||
new WithoutTLMonitors ++
|
||||
new WithSerialAdapter ++
|
||||
@@ -52,5 +60,8 @@ class SimBlockDeviceConfig extends Config(
|
||||
class BlockDeviceModelConfig extends Config(
|
||||
new WithBlockDevice ++ new WithBlockDeviceModel ++ new BaseExampleConfig)
|
||||
|
||||
class SimpleNICConfig extends Config(
|
||||
new WithSimpleNIC ++ new BaseExampleConfig)
|
||||
|
||||
class WithTwoTrackers extends WithNBlockDeviceTrackers(2)
|
||||
class WithFourTrackers extends WithNBlockDeviceTrackers(4)
|
||||
|
||||
@@ -41,3 +41,12 @@ class ExampleTopWithBlockDevice(implicit p: Parameters) extends ExampleTop
|
||||
class ExampleTopWithBlockDeviceModule(l: ExampleTopWithBlockDevice)
|
||||
extends ExampleTopModule(l)
|
||||
with HasPeripheryBlockDeviceModuleImp
|
||||
|
||||
class ExampleTopWithSimpleNIC(implicit p: Parameters) extends ExampleTop
|
||||
with HasPeripherySimpleNIC {
|
||||
override lazy val module = new ExampleTopWithSimpleNICModule(this)
|
||||
}
|
||||
|
||||
class ExampleTopWithSimpleNICModule(outer: ExampleTopWithSimpleNIC)
|
||||
extends ExampleTopModule(outer)
|
||||
with HasPeripherySimpleNICModuleImp
|
||||
|
||||
Reference in New Issue
Block a user