Bump testchipip
This commit is contained in:
@@ -53,15 +53,20 @@ class AbstractConfig extends Config(
|
|||||||
|
|
||||||
// By default, punch out IOs to the Harness
|
// By default, punch out IOs to the Harness
|
||||||
new chipyard.clocking.WithPassthroughClockGenerator ++
|
new chipyard.clocking.WithPassthroughClockGenerator ++
|
||||||
new chipyard.clocking.WithClockGroupsCombinedByName(("uncore", Seq("sbus", "mbus", "pbus", "fbus", "cbus", "implicit"), Seq("tile"))) ++
|
new chipyard.clocking.WithClockGroupsCombinedByName(("uncore", Seq("sbus", "mbus", "pbus", "fbus", "cbus", "obus", "implicit"), Seq("tile"))) ++
|
||||||
new chipyard.config.WithPeripheryBusFrequency(500.0) ++ // Default 500 MHz pbus
|
new chipyard.config.WithPeripheryBusFrequency(500.0) ++ // Default 500 MHz pbus
|
||||||
new chipyard.config.WithMemoryBusFrequency(500.0) ++ // Default 500 MHz mbus
|
new chipyard.config.WithMemoryBusFrequency(500.0) ++ // Default 500 MHz mbus
|
||||||
|
new chipyard.config.WithControlBusFrequency(500.0) ++ // Default 500 MHz cbus
|
||||||
|
new chipyard.config.WithSystemBusFrequency(500.0) ++ // Default 500 MHz sbus
|
||||||
|
new chipyard.config.WithFrontBusFrequency(500.0) ++ // Default 500 MHz fbus
|
||||||
|
new chipyard.config.WithOffchipBusFrequency(500.0) ++ // Default 500 MHz obus
|
||||||
|
|
||||||
new testchipip.WithCustomBootPin ++ // add a custom-boot-pin to support pin-driven boot address
|
new testchipip.WithCustomBootPin ++ // add a custom-boot-pin to support pin-driven boot address
|
||||||
new testchipip.WithBootAddrReg ++ // add a boot-addr-reg for configurable boot address
|
new testchipip.WithBootAddrReg ++ // add a boot-addr-reg for configurable boot address
|
||||||
new testchipip.WithSerialTLClientIdBits(4) ++ // support up to 1 << 4 simultaneous requests from serialTL port
|
new testchipip.WithSerialTL(Seq(testchipip.SerialTLParams( // add a serial-tilelink interface
|
||||||
new testchipip.WithSerialTLWidth(32) ++ // fatten the serialTL interface to improve testing performance
|
client = Some(testchipip.SerialTLClientParams(idBits = 4)), // serial-tilelink interface will master the FBUS, and support 4 idBits
|
||||||
new testchipip.WithDefaultSerialTL ++ // use serialized tilelink port to external serialadapter/harnessRAM
|
width = 32 // serial-tilelink interface with 32 lanes
|
||||||
|
))) ++
|
||||||
new chipyard.config.WithDebugModuleAbstractDataWords(8) ++ // increase debug module data capacity
|
new chipyard.config.WithDebugModuleAbstractDataWords(8) ++ // increase debug module data capacity
|
||||||
new chipyard.config.WithBootROM ++ // use default bootrom
|
new chipyard.config.WithBootROM ++ // use default bootrom
|
||||||
new chipyard.config.WithUART ++ // add a UART
|
new chipyard.config.WithUART ++ // add a UART
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class ChipLikeRocketConfig extends Config(
|
|||||||
// Set up I/O
|
// Set up I/O
|
||||||
//==================================
|
//==================================
|
||||||
new testchipip.WithSerialTLWidth(4) ++ // 4bit wide Serialized TL interface to minimize IO
|
new testchipip.WithSerialTLWidth(4) ++ // 4bit wide Serialized TL interface to minimize IO
|
||||||
new testchipip.WithSerialTLBackingMemory ++ // Configure the off-chip memory accessible over serial-tl as backing memory
|
new testchipip.WithSerialTLMem(size = (1 << 30) * 4L) ++ // Configure the off-chip memory accessible over serial-tl as backing memory
|
||||||
new freechips.rocketchip.subsystem.WithExtMemSize((1 << 30) * 4L) ++ // 4GB max external memory
|
new freechips.rocketchip.subsystem.WithExtMemSize((1 << 30) * 4L) ++ // 4GB max external memory
|
||||||
new freechips.rocketchip.subsystem.WithNMemoryChannels(1) ++ // 1 memory channel
|
new freechips.rocketchip.subsystem.WithNMemoryChannels(1) ++ // 1 memory channel
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,9 @@ class MMIORocketConfig extends Config(
|
|||||||
new chipyard.config.AbstractConfig)
|
new chipyard.config.AbstractConfig)
|
||||||
|
|
||||||
class LBWIFRocketConfig extends Config(
|
class LBWIFRocketConfig extends Config(
|
||||||
|
new chipyard.config.WithOffchipBusFrequency(500) ++
|
||||||
|
new testchipip.WithOffchipBusClient(MBUS) ++
|
||||||
|
new testchipip.WithOffchipBus ++
|
||||||
new testchipip.WithSerialTLMem(isMainMemory=true) ++ // set lbwif memory base to DRAM_BASE, use as main memory
|
new testchipip.WithSerialTLMem(isMainMemory=true) ++ // set lbwif memory base to DRAM_BASE, use as main memory
|
||||||
new freechips.rocketchip.subsystem.WithNoMemPort ++ // remove AXI4 backing memory
|
new freechips.rocketchip.subsystem.WithNoMemPort ++ // remove AXI4 backing memory
|
||||||
new freechips.rocketchip.subsystem.WithNBigCores(1) ++
|
new freechips.rocketchip.subsystem.WithNBigCores(1) ++
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ class MulticlockRocketConfig extends Config(
|
|||||||
new chipyard.config.WithFbusToSbusCrossingType(AsynchronousCrossing()) ++ // Add Async crossing between FBUS and SBUS
|
new chipyard.config.WithFbusToSbusCrossingType(AsynchronousCrossing()) ++ // Add Async crossing between FBUS and SBUS
|
||||||
new chipyard.config.WithCbusToPbusCrossingType(AsynchronousCrossing()) ++ // Add Async crossing between PBUS and CBUS
|
new chipyard.config.WithCbusToPbusCrossingType(AsynchronousCrossing()) ++ // Add Async crossing between PBUS and CBUS
|
||||||
new chipyard.config.WithSbusToMbusCrossingType(AsynchronousCrossing()) ++ // Add Async crossings between backside of L2 and MBUS
|
new chipyard.config.WithSbusToMbusCrossingType(AsynchronousCrossing()) ++ // Add Async crossings between backside of L2 and MBUS
|
||||||
new testchipip.WithAsynchronousSerialSlaveCrossing ++ // Add Async crossing between serial and MBUS. Its master-side is tied to the FBUS
|
|
||||||
new chipyard.config.AbstractConfig)
|
new chipyard.config.AbstractConfig)
|
||||||
|
|
||||||
class CustomIOChipTopRocketConfig extends Config(
|
class CustomIOChipTopRocketConfig extends Config(
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ import freechips.rocketchip.tilelink.{HasTLBusParams}
|
|||||||
import chipyard._
|
import chipyard._
|
||||||
import chipyard.clocking._
|
import chipyard.clocking._
|
||||||
|
|
||||||
|
import testchipip.{OffchipBusKey}
|
||||||
|
|
||||||
// The default RocketChip BaseSubsystem drives its diplomatic clock graph
|
// The default RocketChip BaseSubsystem drives its diplomatic clock graph
|
||||||
// with the implicit clocks of Subsystem. Don't do that, instead we extend
|
// with the implicit clocks of Subsystem. Don't do that, instead we extend
|
||||||
// the diplomacy graph upwards into the ChipTop, where we connect it to
|
// the diplomacy graph upwards into the ChipTop, where we connect it to
|
||||||
@@ -103,6 +105,10 @@ class WithFrontBusFrequency(freqMHz: Double) extends Config((site, here, up) =>
|
|||||||
class WithControlBusFrequency(freqMHz: Double) extends Config((site, here, up) => {
|
class WithControlBusFrequency(freqMHz: Double) extends Config((site, here, up) => {
|
||||||
case ControlBusKey => up(ControlBusKey, site).copy(dtsFrequency = Some(BigInt((freqMHz * 1e6).toLong)))
|
case ControlBusKey => up(ControlBusKey, site).copy(dtsFrequency = Some(BigInt((freqMHz * 1e6).toLong)))
|
||||||
})
|
})
|
||||||
|
class WithOffchipBusFrequency(freqMHz: Double) extends Config((site, here, up) => {
|
||||||
|
case OffchipBusKey => up(OffchipBusKey, site).copy(dtsFrequency = Some(BigInt((freqMHz * 1e6).toLong)))
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
class WithRationalMemoryBusCrossing extends WithSbusToMbusCrossingType(RationalCrossing(Symmetric))
|
class WithRationalMemoryBusCrossing extends WithSbusToMbusCrossingType(RationalCrossing(Symmetric))
|
||||||
class WithAsynchrousMemoryBusCrossing extends WithSbusToMbusCrossingType(AsynchronousCrossing())
|
class WithAsynchrousMemoryBusCrossing extends WithSbusToMbusCrossingType(AsynchronousCrossing())
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package chipyard.config
|
package chipyard.config
|
||||||
|
|
||||||
import org.chipsalliance.cde.config.{Config}
|
import org.chipsalliance.cde.config.{Config}
|
||||||
import freechips.rocketchip.subsystem.{SystemBusKey, BankedL2Key, CoherenceManagerWrapper}
|
import freechips.rocketchip.subsystem._
|
||||||
import freechips.rocketchip.diplomacy.{DTSTimebase}
|
import freechips.rocketchip.diplomacy.{DTSTimebase}
|
||||||
|
|
||||||
// Replaces the L2 with a broadcast manager for maintaining coherence
|
// Replaces the L2 with a broadcast manager for maintaining coherence
|
||||||
@@ -9,6 +9,10 @@ class WithBroadcastManager extends Config((site, here, up) => {
|
|||||||
case BankedL2Key => up(BankedL2Key, site).copy(coherenceManager = CoherenceManagerWrapper.broadcastManager)
|
case BankedL2Key => up(BankedL2Key, site).copy(coherenceManager = CoherenceManagerWrapper.broadcastManager)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
class WithBroadcastParams(params: BroadcastParams) extends Config((site, here, up) => {
|
||||||
|
case BroadcastKey => params
|
||||||
|
})
|
||||||
|
|
||||||
class WithSystemBusWidth(bitWidth: Int) extends Config((site, here, up) => {
|
class WithSystemBusWidth(bitWidth: Int) extends Config((site, here, up) => {
|
||||||
case SystemBusKey => up(SystemBusKey, site).copy(beatBytes=bitWidth/8)
|
case SystemBusKey => up(SystemBusKey, site).copy(beatBytes=bitWidth/8)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ class FlatChipTop(implicit p: Parameters) extends LazyModule {
|
|||||||
//=========================
|
//=========================
|
||||||
// Serialized TileLink
|
// Serialized TileLink
|
||||||
//=========================
|
//=========================
|
||||||
val (serial_tl_pad, serialTLIOCells) = IOCell.generateIOFromSignal(system.serial_tl.get.getWrappedValue, "serial_tl", p(IOCellKey))
|
val (serial_tl_pad, serialTLIOCells) = IOCell.generateIOFromSignal(system.serial_tls(0).getWrappedValue, "serial_tl", p(IOCellKey))
|
||||||
|
|
||||||
//=========================
|
//=========================
|
||||||
// JTAG/Debug
|
// JTAG/Debug
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ class FlatTestHarness(implicit val p: Parameters) extends Module {
|
|||||||
dut.custom_boot_pad := PlusArg("custom_boot_pin", width=1)
|
dut.custom_boot_pad := PlusArg("custom_boot_pin", width=1)
|
||||||
|
|
||||||
// Serialized TL
|
// Serialized TL
|
||||||
val sVal = p(SerialTLKey).get
|
val sVal = p(SerialTLKey)(0)
|
||||||
val serialTLManagerParams = sVal.serialTLManagerParams.get
|
val serialTLManagerParams = sVal.manager.get
|
||||||
require(serialTLManagerParams.isMemoryDevice)
|
require(serialTLManagerParams.isMemoryDevice)
|
||||||
|
|
||||||
withClockAndReset(clock, reset) {
|
withClockAndReset(clock, reset) {
|
||||||
@@ -49,10 +49,11 @@ class FlatTestHarness(implicit val p: Parameters) extends Module {
|
|||||||
dut.serial_tl_pad.clock := clock
|
dut.serial_tl_pad.clock := clock
|
||||||
}
|
}
|
||||||
val harnessRAM = TSIHarness.connectRAM(
|
val harnessRAM = TSIHarness.connectRAM(
|
||||||
lazyDut.system.serdesser.get,
|
p(SerialTLKey)(0),
|
||||||
|
lazyDut.system.serdessers(0),
|
||||||
serial_bits,
|
serial_bits,
|
||||||
reset)
|
reset)
|
||||||
io.success := SimTSI.connect(Some(harnessRAM.module.io.tsi), clock, reset)
|
io.success := SimTSI.connect(harnessRAM.module.io.tsi, clock, reset)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -215,13 +215,13 @@ class WithSimTSIOverSerialTL extends HarnessBinder({
|
|||||||
if (DataMirror.directionOf(port.io.clock) == Direction.Input) {
|
if (DataMirror.directionOf(port.io.clock) == Direction.Input) {
|
||||||
port.io.clock := th.harnessBinderClock
|
port.io.clock := th.harnessBinderClock
|
||||||
}
|
}
|
||||||
val ram = LazyModule(new SerialRAM(port.serdesser)(port.serdesser.p))
|
val ram = LazyModule(new SerialRAM(port.serdesser, port.params)(port.serdesser.p))
|
||||||
Module(ram.module)
|
Module(ram.module)
|
||||||
ram.module.io.ser <> port.io.bits
|
ram.module.io.ser <> port.io.bits
|
||||||
val tsi = Module(new SimTSI)
|
val tsi = Module(new SimTSI)
|
||||||
tsi.io.clock := th.harnessBinderClock
|
tsi.io.clock := th.harnessBinderClock
|
||||||
tsi.io.reset := th.harnessBinderReset
|
tsi.io.reset := th.harnessBinderReset
|
||||||
tsi.io.tsi <> ram.module.io.tsi
|
tsi.io.tsi <> ram.module.io.tsi.get
|
||||||
val exit = tsi.io.exit
|
val exit = tsi.io.exit
|
||||||
val success = exit === 1.U
|
val success = exit === 1.U
|
||||||
val error = exit >= 2.U
|
val error = exit >= 2.U
|
||||||
|
|||||||
@@ -342,10 +342,10 @@ class WithDebugIOCells extends OverrideLazyIOBinder({
|
|||||||
|
|
||||||
class WithSerialTLIOCells extends OverrideIOBinder({
|
class WithSerialTLIOCells extends OverrideIOBinder({
|
||||||
(system: CanHavePeripheryTLSerial) => {
|
(system: CanHavePeripheryTLSerial) => {
|
||||||
val (ports, cells) = system.serial_tl.zipWithIndex.map({ case (s, id) =>
|
val (ports, cells) = system.serial_tls.zipWithIndex.map({ case (s, id) =>
|
||||||
val sys = system.asInstanceOf[BaseSubsystem]
|
val sys = system.asInstanceOf[BaseSubsystem]
|
||||||
val (port, cells) = IOCell.generateIOFromSignal(s.getWrappedValue, "serial_tl", sys.p(IOCellKey), abstractResetAsAsync = true)
|
val (port, cells) = IOCell.generateIOFromSignal(s.getWrappedValue, s"serial_tl_$id", sys.p(IOCellKey), abstractResetAsAsync = true)
|
||||||
(SerialTLPort(port, sys.p(SerialTLKey).get, system.serdesser.get, id), cells)
|
(SerialTLPort(port, sys.p(SerialTLKey)(id), system.serdessers(id), id), cells)
|
||||||
}).unzip
|
}).unzip
|
||||||
(ports.toSeq, cells.flatten.toSeq)
|
(ports.toSeq, cells.flatten.toSeq)
|
||||||
}
|
}
|
||||||
@@ -353,11 +353,11 @@ class WithSerialTLIOCells extends OverrideIOBinder({
|
|||||||
|
|
||||||
class WithSerialTLPunchthrough extends OverrideIOBinder({
|
class WithSerialTLPunchthrough extends OverrideIOBinder({
|
||||||
(system: CanHavePeripheryTLSerial) => {
|
(system: CanHavePeripheryTLSerial) => {
|
||||||
val (ports, cells) = system.serial_tl.zipWithIndex.map({ case (s, id) =>
|
val (ports, cells) = system.serial_tls.zipWithIndex.map({ case (s, id) =>
|
||||||
val sys = system.asInstanceOf[BaseSubsystem]
|
val sys = system.asInstanceOf[BaseSubsystem]
|
||||||
val port = IO(s.getWrappedValue.cloneType)
|
val port = IO(s.getWrappedValue.cloneType)
|
||||||
port <> s.getWrappedValue
|
port <> s.getWrappedValue
|
||||||
(SerialTLPort(port, sys.p(SerialTLKey).get, system.serdesser.get, id), Nil)
|
(SerialTLPort(port, sys.p(SerialTLKey)(id), system.serdessers(id), id), Nil)
|
||||||
}).unzip
|
}).unzip
|
||||||
(ports.toSeq, cells.flatten.toSeq)
|
(ports.toSeq, cells.flatten.toSeq)
|
||||||
}
|
}
|
||||||
|
|||||||
Submodule generators/testchipip updated: 6436959d99...e1e1ee0288
Reference in New Issue
Block a user