From 6ffe43a8ccee6f3e2d6fda5062901f16c54ddaad Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Mon, 31 Oct 2022 19:26:35 -0700 Subject: Level-trigger on TTO_FLAG instead of edge-trigger. --- isa/decode.cpp | 6 +++--- isa/isa.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'isa') diff --git a/isa/decode.cpp b/isa/decode.cpp index c11679c..1496364 100644 --- a/isa/decode.cpp +++ b/isa/decode.cpp @@ -185,7 +185,7 @@ instruction_context decode(unsigned int dfifb, unsigned int pc, unsigned int bit inst.read_ctlreg = TT_BITS; inst.write_ctlreg = TT_BITS; inst.ef = [](auto &ctx) { - ctx.ctlval.value() |= TTO_FLAG | TTO_FLAG_OLD; + ctx.ctlval.value() |= TTO_FLAG; }; break; case 1: @@ -202,7 +202,7 @@ instruction_context decode(unsigned int dfifb, unsigned int pc, unsigned int bit inst.read_ctlreg = TT_BITS; inst.write_ctlreg = TT_BITS; inst.ef = [](auto &ctx) { - ctx.ctlval.value() &= ~TTO_FLAG & ~TTO_FLAG_OLD; + ctx.ctlval.value() &= ~TTO_FLAG; }; break; case 4: @@ -235,7 +235,7 @@ instruction_context decode(unsigned int dfifb, unsigned int pc, unsigned int bit inst.ef = [](auto &ctx) { auto &x = ctx.ctlval.value(); auto chr = ctx.acc.value(); - x &= ~TTO_FLAG & ~TTO_FLAG_OLD & ~TTO_DATA; + x &= ~TTO_FLAG & ~TTO_DATA; x |= (chr << TTO_DATA_SHIFT) & TTO_DATA; x |= TTO_TX; }; diff --git a/isa/isa.h b/isa/isa.h index 6484cd8..69f8b2a 100644 --- a/isa/isa.h +++ b/isa/isa.h @@ -30,7 +30,6 @@ const std::map ctlreg_map = { static constexpr std::uint_fast32_t TTI_FLAG = 1 << 0; static constexpr std::uint_fast32_t TTO_TX = 1 << 1; static constexpr std::uint_fast32_t TTO_FLAG = 1 << 2; -static constexpr std::uint_fast32_t TTO_FLAG_OLD = 1 << 3; static constexpr unsigned int TTI_DATA_SHIFT = 8; static constexpr unsigned int TTO_DATA_SHIFT = 16; static constexpr std::uint_fast32_t TTI_DATA = 0xff << TTI_DATA_SHIFT; -- cgit v1.2.3