summaryrefslogtreecommitdiff
path: root/isa/decode.cpp
diff options
context:
space:
mode:
authorJulian Blake Kongslie2022-10-31 19:26:35 -0700
committerJulian Blake Kongslie2022-10-31 19:26:35 -0700
commit6ffe43a8ccee6f3e2d6fda5062901f16c54ddaad (patch)
tree5358c32b23130bd65ed191e3959c7ce7dd048f21 /isa/decode.cpp
parentUnify TT_INPUT_INT_ENABLE and TT_OUTPUT_INT_ENABLE (diff)
downloadbiggolf-6ffe43a8ccee6f3e2d6fda5062901f16c54ddaad.tar.xz
Level-trigger on TTO_FLAG instead of edge-trigger.
Diffstat (limited to 'isa/decode.cpp')
-rw-r--r--isa/decode.cpp6
1 files changed, 3 insertions, 3 deletions
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
185 inst.read_ctlreg = TT_BITS; 185 inst.read_ctlreg = TT_BITS;
186 inst.write_ctlreg = TT_BITS; 186 inst.write_ctlreg = TT_BITS;
187 inst.ef = [](auto &ctx) { 187 inst.ef = [](auto &ctx) {
188 ctx.ctlval.value() |= TTO_FLAG | TTO_FLAG_OLD; 188 ctx.ctlval.value() |= TTO_FLAG;
189 }; 189 };
190 break; 190 break;
191 case 1: 191 case 1:
@@ -202,7 +202,7 @@ instruction_context decode(unsigned int dfifb, unsigned int pc, unsigned int bit
202 inst.read_ctlreg = TT_BITS; 202 inst.read_ctlreg = TT_BITS;
203 inst.write_ctlreg = TT_BITS; 203 inst.write_ctlreg = TT_BITS;
204 inst.ef = [](auto &ctx) { 204 inst.ef = [](auto &ctx) {
205 ctx.ctlval.value() &= ~TTO_FLAG & ~TTO_FLAG_OLD; 205 ctx.ctlval.value() &= ~TTO_FLAG;
206 }; 206 };
207 break; 207 break;
208 case 4: 208 case 4:
@@ -235,7 +235,7 @@ instruction_context decode(unsigned int dfifb, unsigned int pc, unsigned int bit
235 inst.ef = [](auto &ctx) { 235 inst.ef = [](auto &ctx) {
236 auto &x = ctx.ctlval.value(); 236 auto &x = ctx.ctlval.value();
237 auto chr = ctx.acc.value(); 237 auto chr = ctx.acc.value();
238 x &= ~TTO_FLAG & ~TTO_FLAG_OLD & ~TTO_DATA; 238 x &= ~TTO_FLAG & ~TTO_DATA;
239 x |= (chr << TTO_DATA_SHIFT) & TTO_DATA; 239 x |= (chr << TTO_DATA_SHIFT) & TTO_DATA;
240 x |= TTO_TX; 240 x |= TTO_TX;
241 }; 241 };