uart: Enable buffering the FIFO.
authorTim 'mithro' Ansell <me@mith.ro>
Sat, 27 Oct 2018 23:02:53 +0000 (16:02 -0700)
committerTim 'mithro' Ansell <me@mith.ro>
Sat, 27 Oct 2018 23:04:58 +0000 (16:04 -0700)
On the iCE40 FPGA, adding buffering allows the SyncFIFO to be placed in
block RAM rather than consuming a large amount of resources.

litex/soc/cores/uart.py

index 3e88e7ae95da566d19b21a986aea6afdb2f60587..a5305e6a83438fd9a427307efe711faa57935747 100644 (file)
@@ -157,7 +157,7 @@ def _get_uart_fifo(depth, sink_cd="sys", source_cd="sys"):
         fifo = stream.AsyncFIFO([("data", 8)], depth)
         return ClockDomainsRenamer({"write": sink_cd, "read": source_cd})(fifo)
     else:
-        return stream.SyncFIFO([("data", 8)], depth)
+        return stream.SyncFIFO([("data", 8)], depth, buffered=True)
 
 
 class UART(Module, AutoCSR):