diff options
Diffstat (limited to 'tb/jtag_uart.hpp')
| -rw-r--r-- | tb/jtag_uart.hpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tb/jtag_uart.hpp b/tb/jtag_uart.hpp index 6db50f8..3c378c3 100644 --- a/tb/jtag_uart.hpp +++ b/tb/jtag_uart.hpp @@ -11,14 +11,25 @@ namespace taller::avalon { public: jtag_uart(std::uint32_t base) noexcept; + ~jtag_uart() noexcept; + + void tick() noexcept; virtual bool read(std::uint32_t addr, std::uint32_t &data) noexcept final override; virtual bool write(std::uint32_t addr, std::uint32_t data, unsigned byte_enable) noexcept final override; + void takeover() noexcept; + void release() noexcept; + private: - bool ctrl_re = false; - bool ctrl_we = false; - bool ctrl_ac = true; + unsigned countdown = 0; + unsigned rx_avail = 0; + unsigned rx_next = 0; + bool ctrl_re = false; + bool ctrl_we = false; + bool ctrl_ac = true; + bool took_over = false; + std::uint8_t rx[64]; }; } |
