diff --git a/generators/chipyard/src/main/scala/config/SpikeConfigs.scala b/generators/chipyard/src/main/scala/config/SpikeConfigs.scala index 6f4c6ab7..b7b829dd 100644 --- a/generators/chipyard/src/main/scala/config/SpikeConfigs.scala +++ b/generators/chipyard/src/main/scala/config/SpikeConfigs.scala @@ -18,7 +18,8 @@ class dmiSpikeConfig extends Config( // Avoids polling on the UART registers class SpikeFastUARTConfig extends Config( new chipyard.WithNSpikeCores(1) ++ - new chipyard.config.WithUARTFIFOEntries(128, 128) ++ + new chipyard.config.WithUART(txEntries=128, rxEntries=128) ++ // Spike sim requires a larger UART FIFO buffer, + new chipyard.config.WithNoUART() ++ // so we overwrite the default one new chipyard.config.WithMemoryBusFrequency(2) ++ new chipyard.config.WithPeripheryBusFrequency(2) ++ new chipyard.config.AbstractConfig) @@ -27,7 +28,8 @@ class SpikeFastUARTConfig extends Config( class SpikeUltraFastConfig extends Config( new chipyard.WithSpikeTCM ++ new chipyard.WithNSpikeCores(1) ++ - new chipyard.config.WithUARTFIFOEntries(128, 128) ++ + new chipyard.config.WithUART(txEntries=128, rxEntries=128) ++ // Spike sim requires a larger UART FIFO buffer, + new chipyard.config.WithNoUART() ++ // so we overwrite the default one new chipyard.config.WithMemoryBusFrequency(2) ++ new chipyard.config.WithPeripheryBusFrequency(2) ++ new chipyard.config.WithBroadcastManager ++ @@ -47,7 +49,8 @@ class SpikeUltraFastDevicesConfig extends Config( new chipyard.WithSpikeTCM ++ new chipyard.WithNSpikeCores(1) ++ - new chipyard.config.WithUARTFIFOEntries(128, 128) ++ + new chipyard.config.WithUART(txEntries=128, rxEntries=128) ++ // Spike sim requires a larger UART FIFO buffer, + new chipyard.config.WithNoUART() ++ // so we overwrite the default one new chipyard.config.WithMemoryBusFrequency(2) ++ new chipyard.config.WithPeripheryBusFrequency(2) ++ new chipyard.config.WithBroadcastManager ++ diff --git a/generators/chipyard/src/main/scala/config/fragments/PeripheralFragments.scala b/generators/chipyard/src/main/scala/config/fragments/PeripheralFragments.scala index 627e4a58..265be720 100644 --- a/generators/chipyard/src/main/scala/config/fragments/PeripheralFragments.scala +++ b/generators/chipyard/src/main/scala/config/fragments/PeripheralFragments.scala @@ -66,11 +66,12 @@ class WithNoUART extends Config((site, here, up) => { * @param address the address of the UART device * @param baudrate the baudrate of the UART device */ -class WithUART(baudrate: BigInt = 115200, address: BigInt = 0x10020000) extends Config ((site, here, up) => { +class WithUART(baudrate: BigInt = 115200, address: BigInt = 0x10020000, txEntries: Int = 8, rxEntries: Int = 8) extends Config ((site, here, up) => { case PeripheryUARTKey => up(PeripheryUARTKey) ++ Seq( - UARTParams(address = address, nTxEntries = 256, nRxEntries = 256, initBaudRate = baudrate)) + UARTParams(address = address, nTxEntries = txEntries, nRxEntries = rxEntries, initBaudRate = baudrate)) }) +// @deprecated("Use WithUART instead of WithUARTFIFOEntries", "chipyard v1.10") class WithUARTFIFOEntries(txEntries: Int, rxEntries: Int) extends Config((site, here, up) => { case PeripheryUARTKey => up(PeripheryUARTKey).map(_.copy(nTxEntries = txEntries, nRxEntries = rxEntries)) }) diff --git a/generators/firechip/src/main/scala/TargetConfigs.scala b/generators/firechip/src/main/scala/TargetConfigs.scala index 6905612e..f15cffae 100644 --- a/generators/firechip/src/main/scala/TargetConfigs.scala +++ b/generators/firechip/src/main/scala/TargetConfigs.scala @@ -107,7 +107,10 @@ class WithFireSimDesignTweaks extends Config( // Optional: reduce the width of the Serial TL interface new testchipip.serdes.WithSerialTLWidth(4) ++ // Required*: Scale default baud rate with periphery bus frequency - new chipyard.config.WithUARTInitBaudRate(BigInt(3686400L)) ++ + new chipyard.config.WithUART( + baudrate=BigInt(3686400L), + txEntries=256, rxEntries=256) ++ // FireSim requires a larger UART FIFO buffer, + new chipyard.config.WithNoUART() ++ // so we overwrite the default one // Optional: Adds IO to attach tracerV bridges new chipyard.config.WithTraceIO ++ // Optional: Request 16 GiB of target-DRAM by default (can safely request up to 64 GiB on F1)