From 3750fa9987a2ecc60c89c706d8af05665efe5795 Mon Sep 17 00:00:00 2001 From: uvok Date: Mon, 19 Jan 2026 16:23:44 +0100 Subject: eater: Add logic to switch between manual and automatic flags --- eater_cpu/eater_computer.sv | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'eater_cpu/eater_computer.sv') 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 -- cgit v1.2.3