Unify multi-node btw chipyard/firechip | unify harness clocking
This commit is contained in:
@@ -18,7 +18,7 @@ import sifive.fpgashells.shell.xilinx.{VC7074GDDRSize}
|
||||
import testchipip.{SerialTLKey}
|
||||
|
||||
import chipyard.{BuildSystem, ExtTLMem}
|
||||
import chipyard.harness.{DefaultClockFrequencyKey}
|
||||
import chipyard.harness._
|
||||
|
||||
class WithDefaultPeripherals extends Config((site, here, up) => {
|
||||
case PeripheryUARTKey => List(UARTParams(address = BigInt(0x64000000L)))
|
||||
@@ -29,7 +29,7 @@ class WithSystemModifications extends Config((site, here, up) => {
|
||||
case DTSTimebase => BigInt{(1e6).toLong}
|
||||
case BootROMLocated(x) => up(BootROMLocated(x), site).map { p =>
|
||||
// invoke makefile for sdboot
|
||||
val freqMHz = (site(DefaultClockFrequencyKey) * 1e6).toLong
|
||||
val freqMHz = (site(SystemBusKey).dtsFrequency.get / (1000 * 1000)).toLong
|
||||
val make = s"make -C fpga/src/main/resources/vc707/sdboot PBUS_CLK=${freqMHz} bin"
|
||||
require (make.! == 0, "Failed to build bootrom")
|
||||
p.copy(hang = 0x10000, contentFileName = s"./fpga/src/main/resources/vc707/sdboot/build/sdboot.bin")
|
||||
@@ -39,6 +39,15 @@ class WithSystemModifications extends Config((site, here, up) => {
|
||||
})
|
||||
|
||||
class WithVC707Tweaks extends Config (
|
||||
// clocking
|
||||
new chipyard.harness.WithAllClocksFromHarnessClockInstantiator ++
|
||||
new chipyard.clocking.WithPassthroughClockGenerator ++
|
||||
new chipyard.config.WithMemoryBusFrequency(50.0) ++
|
||||
new chipyard.config.WithSystemBusFrequency(50.0) ++
|
||||
new chipyard.config.WithPeripheryBusFrequency(50.0) ++
|
||||
|
||||
new chipyard.harness.WithHarnessBinderClockFreqMHz(50) ++
|
||||
new WithFPGAFrequency(50) ++ // default 50MHz freq
|
||||
// harness binders
|
||||
new chipyard.harness.WithAllClocksFromHarnessClockInstantiator ++
|
||||
new WithVC707UARTHarnessBinder ++
|
||||
@@ -54,8 +63,7 @@ class WithVC707Tweaks extends Config (
|
||||
new WithSystemModifications ++ // setup busses, use sdboot bootrom, setup ext. mem. size
|
||||
new chipyard.config.WithNoDebug ++ // remove debug module
|
||||
new freechips.rocketchip.subsystem.WithoutTLMonitors ++
|
||||
new freechips.rocketchip.subsystem.WithNMemoryChannels(1) ++
|
||||
new WithFPGAFrequency(50) // default 50MHz freq
|
||||
new freechips.rocketchip.subsystem.WithNMemoryChannels(1)
|
||||
)
|
||||
|
||||
class RocketVC707Config extends Config (
|
||||
|
||||
Reference in New Issue
Block a user