Merge pull request #625 from ucb-bar/uart

Override default baud rate for FireChip
This commit is contained in:
Albert Ou
2020-07-10 10:55:50 -07:00
committed by GitHub
3 changed files with 7 additions and 6 deletions

View File

@@ -51,9 +51,9 @@ class WithGPIO extends Config((site, here, up) => {
}) })
// DOC include end: gpio config fragment // DOC include end: gpio config fragment
class WithUART extends Config((site, here, up) => { class WithUART(baudrate: BigInt = 115200) extends Config((site, here, up) => {
case PeripheryUARTKey => Seq( case PeripheryUARTKey => Seq(
UARTParams(address = 0x54000000L, nTxEntries = 256, nRxEntries = 256)) UARTParams(address = 0x54000000L, nTxEntries = 256, nRxEntries = 256, initBaudRate = baudrate))
}) })
class WithSPIFlash(size: BigInt = 0x10000000) extends Config((site, here, up) => { class WithSPIFlash(size: BigInt = 0x10000000) extends Config((site, here, up) => {

View File

@@ -69,7 +69,8 @@ class WithNVDLASmall extends nvidia.blocks.dla.WithNVDLA("small")
class WithFireSimConfigTweaks extends Config( class WithFireSimConfigTweaks extends Config(
// Required*: When using FireSim-as-top to provide a correct path to the target bootrom source // Required*: When using FireSim-as-top to provide a correct path to the target bootrom source
new WithBootROM ++ new WithBootROM ++
// Optional*: Removing this will require target-software changes to properly capture UART output // Optional*: Removing this will require adjusting the UART baud rate and
// potential target-software changes to properly capture UART output
new WithPeripheryBusFrequency(BigInt(3200000000L)) ++ new WithPeripheryBusFrequency(BigInt(3200000000L)) ++
// Required: Existing FAME-1 transform cannot handle black-box clock gates // Required: Existing FAME-1 transform cannot handle black-box clock gates
new WithoutClockGating ++ new WithoutClockGating ++
@@ -85,8 +86,8 @@ class WithFireSimConfigTweaks extends Config(
new testchipip.WithTSI ++ new testchipip.WithTSI ++
// Optional: Removing this will require using an initramfs under linux // Optional: Removing this will require using an initramfs under linux
new testchipip.WithBlockDevice ++ new testchipip.WithBlockDevice ++
// Required*: // Required*: Scale default baud rate with periphery bus frequency
new chipyard.config.WithUART new chipyard.config.WithUART(BigInt(3686400L))
) )
/******************************************************************************* /*******************************************************************************