From d4c7711c21e5fef75d966a32dce96f9abc5af8b2 Mon Sep 17 00:00:00 2001 From: uvok Date: Sun, 25 Jan 2026 10:05:58 +0100 Subject: eater: Add flags_in flag --- eater_cpu/cpp/simpc_curses.cpp | 5 +++-- eater_cpu/eater_decoder.sv | 2 ++ eater_cpu/eater_types.sv | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/eater_cpu/cpp/simpc_curses.cpp b/eater_cpu/cpp/simpc_curses.cpp index b1ca064..4b4f04f 100644 --- a/eater_cpu/cpp/simpc_curses.cpp +++ b/eater_cpu/cpp/simpc_curses.cpp @@ -87,12 +87,13 @@ void simpc_ui_write(const std::unique_ptr &topp, uint64_t i) { topp->eater_computer->flags.__PVT__PC_count ? flag_on : flag_off, topp->eater_computer->flags.__PVT__PC_in ? flag_on : flag_off); PRINT_ME_W(clock_regs, flagstart + 1, 1, - "%c InsI | %c RAI | %c AO | %c BO | %c CnO", + "%c InsI | %c RAI | %c AO | %c BO | %c CnO | %c FI", topp->eater_computer->flags.__PVT__INS_in ? flag_on : flag_off, topp->eater_computer->flags.__PVT__RAM_in ? flag_on : flag_off, topp->eater_computer->flags.__PVT__A_out ? flag_on : flag_off, topp->eater_computer->flags.__PVT__B_out ? flag_on : flag_off, - topp->eater_computer->flags.__PVT__PC_out ? flag_on : flag_off); + topp->eater_computer->flags.__PVT__PC_out ? flag_on : flag_off, + topp->eater_computer->flags.__PVT__flags_in ? flag_on : flag_off); PRINT_ME_W( clock_regs, flagstart + 2, 1, "%c InsO | %c RAO | %c AlO | %c Sub | %c OI", topp->eater_computer->flags.__PVT__INS_out ? flag_on : flag_off, diff --git a/eater_cpu/eater_decoder.sv b/eater_cpu/eater_decoder.sv index e18d20d..9ddc000 100644 --- a/eater_cpu/eater_decoder.sv +++ b/eater_cpu/eater_decoder.sv @@ -139,6 +139,7 @@ always_comb begin ADD_ALU_to_A: begin internal_flags.ALU_out = 1; internal_flags.A_in = 1; + internal_flags.flags_in = 1; end SUB_INS_to_MAR: begin @@ -155,6 +156,7 @@ always_comb begin internal_flags.ALU_out = 1; internal_flags.ALU_subtract_nadd = 1; internal_flags.A_in = 1; + internal_flags.flags_in = 1; end STA_INS_to_MAR: begin diff --git a/eater_cpu/eater_types.sv b/eater_cpu/eater_types.sv index c7f0cf0..e12d15b 100644 --- a/eater_cpu/eater_types.sv +++ b/eater_cpu/eater_types.sv @@ -85,6 +85,7 @@ typedef struct packed { logic PC_out, PC_in, PC_count; logic OUT_in; logic halt; + logic flags_in; } CpuControlFlags; `else typedef struct { @@ -97,6 +98,7 @@ typedef struct { logic PC_out, PC_in, PC_count; logic OUT_in; logic halt; + logic flags_in; } CpuControlFlags; `endif -- cgit v1.2.3