diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-11-16 19:55:25 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-11-16 23:32:25 -0600 |
| commit | c64dee965fa00a4b7e3c3705da5e226ea56082ed (patch) | |
| tree | 2c7371ac62b3b3870b61e411a4a71aa5c1eb281e /tb/jtag_uart.hpp | |
| parent | 9805cd20d7106082d9a337a1104b4c857f91b514 (diff) | |
Implement JTAG-UART tx emulation
Diffstat (limited to 'tb/jtag_uart.hpp')
| -rw-r--r-- | tb/jtag_uart.hpp | 25 |
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 |
