summaryrefslogtreecommitdiff
path: root/eater_cpu
diff options
context:
space:
mode:
Diffstat (limited to 'eater_cpu')
-rw-r--r--eater_cpu/cpp/simpc_term.cpp3
-rw-r--r--eater_cpu/eater_computer.sv2
-rw-r--r--eater_cpu/eater_types.sv2
3 files changed, 4 insertions, 3 deletions
diff --git a/eater_cpu/cpp/simpc_term.cpp b/eater_cpu/cpp/simpc_term.cpp
index f598f6e..8ddf83d 100644
--- a/eater_cpu/cpp/simpc_term.cpp
+++ b/eater_cpu/cpp/simpc_term.cpp
@@ -60,7 +60,8 @@ void simpc_ui_write(const std::unique_ptr<Veater_computer> &topp, uint64_t i) {
topp->eater_computer->flags.__PVT__INS_out ? 'X' : ' ',
topp->eater_computer->flags.__PVT__A_in ? 'X' : ' ',
topp->eater_computer->flags.__PVT__A_out ? 'X' : ' ',
- topp->eater_computer->flags.__PVT__ALU_out ? 'X' : ' ', sub ? 'X' : ' ',
+ topp->eater_computer->flags.__PVT__ALU_out ? 'X' : ' ',
+ topp->eater_computer->flags.__PVT__ALU_subtract_nadd ? 'X' : ' ',
topp->eater_computer->flags.__PVT__B_in ? 'X' : ' ',
topp->eater_computer->flags.__PVT__B_out ? 'X' : ' ',
topp->eater_computer->flags.__PVT__OUT_in ? 'X' : ' ',
diff --git a/eater_cpu/eater_computer.sv b/eater_cpu/eater_computer.sv
index 7c8eb17..18b6833 100644
--- a/eater_cpu/eater_computer.sv
+++ b/eater_cpu/eater_computer.sv
@@ -130,7 +130,7 @@ eater_alu alu (
.en_output_in(flags.ALU_out),
.A_in(A_out),
.B_in(B_out),
- .subtract_n_add_in(1'b0),
+ .subtract_n_add_in(flags.ALU_subtract_nadd),
.bus_out(bus)
);
diff --git a/eater_cpu/eater_types.sv b/eater_cpu/eater_types.sv
index 80a5fee..6be4d9d 100644
--- a/eater_cpu/eater_types.sv
+++ b/eater_cpu/eater_types.sv
@@ -54,7 +54,7 @@ typedef struct {
logic INS_out, INS_in;
logic MAR_in;
logic RAM_out, RAM_in;
- logic ALU_out;
+ logic ALU_out, ALU_subtract_nadd;
logic PC_out, PC_in, PC_count;
logic OUT_in;
} CpuControlFlags;