add ExampleTopWithBlockDevice and tests
This commit is contained in:
9
src/main/scala/blkdev/Configs.scala
Normal file
9
src/main/scala/blkdev/Configs.scala
Normal file
@@ -0,0 +1,9 @@
|
||||
package blkdev
|
||||
|
||||
import config.{Parameters, Config}
|
||||
import example.DefaultExampleConfig
|
||||
import testchipip.{WithBlockDevice, WithNBlockDeviceTrackers}
|
||||
|
||||
class BlockDeviceConfig extends Config(
|
||||
new WithBlockDevice ++
|
||||
new DefaultExampleConfig)
|
||||
22
src/main/scala/blkdev/TestHarness.scala
Normal file
22
src/main/scala/blkdev/TestHarness.scala
Normal file
@@ -0,0 +1,22 @@
|
||||
package blkdev
|
||||
|
||||
import diplomacy.LazyModule
|
||||
import chisel3._
|
||||
import config.Parameters
|
||||
import testchipip.GeneratorApp
|
||||
import example._
|
||||
|
||||
class TestHarness(implicit p: Parameters) extends Module {
|
||||
val io = IO(new Bundle {
|
||||
val success = Output(Bool())
|
||||
})
|
||||
|
||||
val dut = Module(LazyModule(new ExampleTopWithBlockDevice).module)
|
||||
dut.connectSimAXIMem()
|
||||
dut.connectSimBlockDevice()
|
||||
io.success := dut.connectSimSerial()
|
||||
}
|
||||
|
||||
object Generator extends GeneratorApp {
|
||||
generateFirrtl
|
||||
}
|
||||
15
src/main/scala/blkdev/Top.scala
Normal file
15
src/main/scala/blkdev/Top.scala
Normal file
@@ -0,0 +1,15 @@
|
||||
package blkdev
|
||||
|
||||
import chisel3._
|
||||
import config.Parameters
|
||||
import testchipip._
|
||||
import example._
|
||||
|
||||
class ExampleTopWithBlockDevice(implicit p: Parameters) extends ExampleTop
|
||||
with HasPeripheryBlockDevice {
|
||||
override lazy val module = new ExampleTopWithBlockDeviceModule(this)
|
||||
}
|
||||
|
||||
class ExampleTopWithBlockDeviceModule(l: ExampleTopWithBlockDevice)
|
||||
extends ExampleTopModule(l)
|
||||
with HasPeripheryBlockDeviceModuleImp
|
||||
Reference in New Issue
Block a user