bump rocket-chip and testchipip

This commit is contained in:
Howard Mao
2017-10-01 22:20:20 +00:00
parent 44899f1b01
commit 5c200ddb6e
6 changed files with 12 additions and 12 deletions

View File

@@ -7,17 +7,17 @@ import freechips.rocketchip.diplomacy.LazyModule
import testchipip._ import testchipip._
class WithExampleTop extends Config((site, here, up) => { class WithExampleTop extends Config((site, here, up) => {
case BuildTop => (p: Parameters) => case BuildTop => (clock: Clock, reset: Bool, p: Parameters) =>
Module(LazyModule(new ExampleTop()(p)).module) Module(LazyModule(new ExampleTop()(p)).module)
}) })
class WithPWM extends Config((site, here, up) => { class WithPWM extends Config((site, here, up) => {
case BuildTop => (p: Parameters) => case BuildTop => (clock: Clock, reset: Bool, p: Parameters) =>
Module(LazyModule(new ExampleTopWithPWM()(p)).module) Module(LazyModule(new ExampleTopWithPWM()(p)).module)
}) })
class WithBlockDeviceModel extends Config((site, here, up) => { class WithBlockDeviceModel extends Config((site, here, up) => {
case BuildTop => (p: Parameters) => { case BuildTop => (clock: Clock, reset: Bool, p: Parameters) => {
val top = Module(LazyModule(new ExampleTopWithBlockDevice()(p)).module) val top = Module(LazyModule(new ExampleTopWithBlockDevice()(p)).module)
top.connectBlockDeviceModel() top.connectBlockDeviceModel()
top top
@@ -25,9 +25,9 @@ class WithBlockDeviceModel extends Config((site, here, up) => {
}) })
class WithSimBlockDevice extends Config((site, here, up) => { class WithSimBlockDevice extends Config((site, here, up) => {
case BuildTop => (p: Parameters) => { case BuildTop => (clock: Clock, reset: Bool, p: Parameters) => {
val top = Module(LazyModule(new ExampleTopWithBlockDevice()(p)).module) val top = Module(LazyModule(new ExampleTopWithBlockDevice()(p)).module)
top.connectSimBlockDevice() top.connectSimBlockDevice(clock, reset)
top top
} }
}) })

View File

@@ -37,7 +37,7 @@ trait PWMTLBundle extends Bundle {
val pwmout = Output(Bool()) val pwmout = Output(Bool())
} }
trait PWMTLModule extends Module with HasRegMap { trait PWMTLModule extends HasRegMap {
val io: PWMTLBundle val io: PWMTLBundle
implicit val p: Parameters implicit val p: Parameters
def params: PWMParams def params: PWMParams
@@ -85,7 +85,7 @@ trait HasPeripheryPWM extends HasPeripheryBus {
pwm.node := pbus.toVariableWidthSlaves pwm.node := pbus.toVariableWidthSlaves
} }
trait HasPeripheryPWMModuleImp extends LazyMultiIOModuleImp { trait HasPeripheryPWMModuleImp extends LazyModuleImp {
implicit val p: Parameters implicit val p: Parameters
val outer: HasPeripheryPWM val outer: HasPeripheryPWM

View File

@@ -5,14 +5,14 @@ import freechips.rocketchip.diplomacy.LazyModule
import freechips.rocketchip.config.{Field, Parameters} import freechips.rocketchip.config.{Field, Parameters}
import testchipip.GeneratorApp import testchipip.GeneratorApp
case object BuildTop extends Field[Parameters => ExampleTopModule[ExampleTop]] case object BuildTop extends Field[(Clock, Bool, Parameters) => ExampleTopModule[ExampleTop]]
class TestHarness(implicit val p: Parameters) extends Module { class TestHarness(implicit val p: Parameters) extends Module {
val io = IO(new Bundle { val io = IO(new Bundle {
val success = Output(Bool()) val success = Output(Bool())
}) })
val dut = p(BuildTop)(p) val dut = p(BuildTop)(clock, reset.toBool, p)
dut.connectSimAXIMem() dut.connectSimAXIMem()
io.success := dut.connectSimSerial() io.success := dut.connectSimSerial()
} }

View File

@@ -9,7 +9,7 @@ import testchipip._
class ExampleTop(implicit p: Parameters) extends RocketCoreplex class ExampleTop(implicit p: Parameters) extends RocketCoreplex
with HasMasterAXI4MemPort with HasMasterAXI4MemPort
with HasPeripheryBootROM with HasPeripheryBootROM
with HasPeripheryErrorSlave with HasSystemErrorSlave
with HasNoDebug with HasNoDebug
with HasPeripherySerial { with HasPeripherySerial {
override lazy val module = new ExampleTopModule(this) override lazy val module = new ExampleTopModule(this)