From ae6bd057b6d77bd1aae0fd855370902d73d1914b Mon Sep 17 00:00:00 2001 From: "-T.K.-" Date: Mon, 4 Dec 2023 02:32:31 -0800 Subject: [PATCH] FIX: change default UART fifo depth --- .../main/scala/config/fragments/PeripheralFragments.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generators/chipyard/src/main/scala/config/fragments/PeripheralFragments.scala b/generators/chipyard/src/main/scala/config/fragments/PeripheralFragments.scala index 51d31094..a5e7eddf 100644 --- a/generators/chipyard/src/main/scala/config/fragments/PeripheralFragments.scala +++ b/generators/chipyard/src/main/scala/config/fragments/PeripheralFragments.scala @@ -65,11 +65,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)) })