From c64dee965fa00a4b7e3c3705da5e226ea56082ed Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Wed, 16 Nov 2022 19:55:25 -0600 Subject: Implement JTAG-UART tx emulation --- tb/jtag_uart.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tb/jtag_uart.hpp (limited to 'tb/jtag_uart.hpp') diff --git a/tb/jtag_uart.hpp b/tb/jtag_uart.hpp new file mode 100644 index 0000000..6db50f8 --- /dev/null +++ b/tb/jtag_uart.hpp @@ -0,0 +1,25 @@ +#ifndef TALLER_JTAG_UART_HPP +#define TALLER_JTAG_UART_HPP + +#include + +#include "avalon.hpp" + +namespace taller::avalon +{ + class jtag_uart : public slave + { + public: + jtag_uart(std::uint32_t base) 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; + + private: + bool ctrl_re = false; + bool ctrl_we = false; + bool ctrl_ac = true; + }; +} + +#endif -- cgit v1.2.3