summaryrefslogtreecommitdiff
path: root/tb/jtag_uart.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'tb/jtag_uart.hpp')
-rw-r--r--tb/jtag_uart.hpp25
1 files changed, 25 insertions, 0 deletions
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 <cstdint>
+
+#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