summaryrefslogtreecommitdiff
path: root/eater_cpu/eater_computer.sv
diff options
context:
space:
mode:
Diffstat (limited to 'eater_cpu/eater_computer.sv')
-rw-r--r--eater_cpu/eater_computer.sv11
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