From 1ca7ce551904baaca96978f2d1557c3e162b780b Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 21 Jan 2022 13:28:48 +0000 Subject: [PATCH] code-comments on uart in microwatt_verilator --- verilator/microwatt-verilator.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/verilator/microwatt-verilator.cpp b/verilator/microwatt-verilator.cpp index dea7c07..0dbbf29 100644 --- a/verilator/microwatt-verilator.cpp +++ b/verilator/microwatt-verilator.cpp @@ -49,9 +49,14 @@ void tick(Vmicrowatt *top, bool dump) main_time++; } +// simulated uart tx/rx, assumes a baud rate of 115200 based on CLK_FREQUENCY void uart_tx(unsigned char tx); unsigned char uart_rx(void); +// true if the uart tx and rx are both idle +// (saves having to save/restore/sync the uart state) +bool uart_idle(void); + // pretty-print dumped data in ASCII (to help identify strings) static void ascii_dump(unsigned char *data, int len, FILE *dump) { -- 2.30.2