summaryrefslogtreecommitdiff
path: root/eater_cpu
diff options
context:
space:
mode:
authoruvok2026-01-25 10:05:58 +0100
committeruvok2026-01-25 10:05:58 +0100
commitd4c7711c21e5fef75d966a32dce96f9abc5af8b2 (patch)
tree8fb04d357fa6021e46e24a7bce5abba27418c165 /eater_cpu
parenta1e84706756fd688567f588b4c58cba714bfec65 (diff)
eater: Add flags_in flag
Diffstat (limited to 'eater_cpu')
-rw-r--r--eater_cpu/cpp/simpc_curses.cpp5
-rw-r--r--eater_cpu/eater_decoder.sv2
-rw-r--r--eater_cpu/eater_types.sv2
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<Veater_computer> &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