Skip to content

Commit

Permalink
changes for new rocket-chip
Browse files Browse the repository at this point in the history
  • Loading branch information
donggyukim authored and zhemao committed Jan 16, 2018
1 parent 269660b commit ed13397
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rocket-chip
10 changes: 8 additions & 2 deletions src/main/scala/example/Configs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package example
import chisel3._
import freechips.rocketchip.config.{Parameters, Config}
import freechips.rocketchip.coreplex.{WithRoccExample, WithNMemoryChannels, WithNBigCores, WithRV32}
import freechips.rocketchip.diplomacy.{LazyModule, ValName}
import freechips.rocketchip.devices.tilelink.BootROMParams
import freechips.rocketchip.diplomacy.LazyModule
import freechips.rocketchip.tile.XLen
import testchipip._

Expand All @@ -13,9 +13,15 @@ class WithBootROM extends Config((site, here, up) => {
contentFileName = s"./bootrom/bootrom.rv${site(XLen)}.img")
})

object ConfigValName {
implicit val valName = ValName("TestHarness")
}
import ConfigValName._

class WithExampleTop extends Config((site, here, up) => {
case BuildTop => (clock: Clock, reset: Bool, p: Parameters) =>
case BuildTop => (clock: Clock, reset: Bool, p: Parameters) => {
Module(LazyModule(new ExampleTop()(p)).module)
}
})

class WithPWM extends Config((site, here, up) => {
Expand Down
3 changes: 3 additions & 0 deletions src/main/scala/example/TestHarness.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ class TestHarness(implicit val p: Parameters) extends Module {
})

val dut = p(BuildTop)(clock, reset.toBool, p)
dut.debug := DontCare
dut.connectSimAXIMem()
dut.dontTouchPorts()
dut.tieOffInterrupts()
io.success := dut.connectSimSerial()
}

Expand Down
4 changes: 4 additions & 0 deletions src/main/scala/example/Top.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import chisel3._
import freechips.rocketchip.coreplex._
import freechips.rocketchip.config.Parameters
import freechips.rocketchip.devices.tilelink._
import freechips.rocketchip.util.DontTouch
import testchipip._

class ExampleTop(implicit p: Parameters) extends RocketCoreplex
with HasMasterAXI4MemPort
with HasPeripheryBootROM
with HasSystemErrorSlave
with HasSyncExtInterrupts
with HasNoDebug
with HasPeripherySerial {
override lazy val module = new ExampleTopModule(this)
Expand All @@ -19,8 +21,10 @@ class ExampleTopModule[+L <: ExampleTop](l: L) extends RocketCoreplexModule(l)
with HasRTCModuleImp
with HasMasterAXI4MemPortModuleImp
with HasPeripheryBootROMModuleImp
with HasExtInterruptsModuleImp
with HasNoDebugModuleImp
with HasPeripherySerialModuleImp
with DontTouch

class ExampleTopWithPWM(implicit p: Parameters) extends ExampleTop
with HasPeripheryPWM {
Expand Down
2 changes: 1 addition & 1 deletion testchipip

0 comments on commit ed13397

Please sign in to comment.