diff options
| author | uvok | 2026-01-19 19:20:45 +0100 |
|---|---|---|
| committer | uvok | 2026-01-19 19:20:45 +0100 |
| commit | f127505b779dcb134fa48bcf2bf59810b60348c5 (patch) | |
| tree | daefefd52ae7e388ddd3faaabd7b1c14939bdd00 /eater_cpu | |
| parent | 78d771dc71ca266b640d2b791cd1d06b7895b5f2 (diff) | |
eater: Add subtract flag
Diffstat (limited to 'eater_cpu')
| -rw-r--r-- | eater_cpu/cpp/simpc_term.cpp | 3 | ||||
| -rw-r--r-- | eater_cpu/eater_computer.sv | 2 | ||||
| -rw-r--r-- | eater_cpu/eater_types.sv | 2 |
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; |
