diff options
| author | uvok | 2026-01-19 16:23:44 +0100 |
|---|---|---|
| committer | uvok | 2026-01-19 16:23:44 +0100 |
| commit | 3750fa9987a2ecc60c89c706d8af05665efe5795 (patch) | |
| tree | 05549c66d7686103dcb35747194a7ef07a2be9c5 /eater_cpu/eater_computer.sv | |
| parent | be049da0ea81fe3d0cfc4c2168b9e938472cb02b (diff) | |
eater: Add logic to switch between manual and automatic flags
Diffstat (limited to 'eater_cpu/eater_computer.sv')
| -rw-r--r-- | eater_cpu/eater_computer.sv | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/eater_cpu/eater_computer.sv b/eater_cpu/eater_computer.sv index b93f289..7c8eb17 100644 --- a/eater_cpu/eater_computer.sv +++ b/eater_cpu/eater_computer.sv @@ -7,6 +7,8 @@ module eater_computer( // clock input input wire clk_in, + // Whether to automatically run (vs manual control) + input wire auto_run_in, // current content of the bus output wire [7:0] debug_bus ); @@ -40,7 +42,11 @@ wire [7:0] // PC is only 4 bit. wire [3:0] PC_in, PC_out; -CpuControlFlags flags; +CpuControlFlags manual_flags; +wire CpuControlFlags automatic_flags; +wire CpuControlFlags flags; + +assign flags = auto_run_in ? automatic_flags : manual_flags; /* verilator public_off */ @@ -161,8 +167,7 @@ eater_register OUT ( eater_decoder decoder ( .clk_i(clk_in), .instruction_i(INS_out), - .enable_control_i(0), - .flags_o() + .flags_o(automatic_flags) ); endmodule |
