diff options
Diffstat (limited to 'eater_cpu/eater_computer.sv')
| -rw-r--r-- | eater_cpu/eater_computer.sv | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/eater_cpu/eater_computer.sv b/eater_cpu/eater_computer.sv index 75a54c9..b22096a 100644 --- a/eater_cpu/eater_computer.sv +++ b/eater_cpu/eater_computer.sv @@ -41,6 +41,9 @@ wire [7:0] OUT_out ; +// ALU flags. int: direct out. out: buffered output (for decoder). +wire AluFlags ALU_flags_int, ALU_flags_out; + // PC is only 4 bit. wire [3:0] PC_in, PC_out; @@ -134,7 +137,8 @@ eater_alu alu ( .A_in(A_out), .B_in(B_out), .subtract_n_add_in(flags.ALU_subtract_nadd), - .bus_out(bus) + .bus_out(bus), + .flags_out(ALU_flags_int) ); assign PC_in = bus[3:0]; @@ -167,6 +171,15 @@ eater_register OUT_reg ( .always_out(OUT_out) ); +eater_register ALU_flags ( + .clk_in(clk_in), + .en_store_in(flags.flags_in), + .en_output_in(1'b0), + .data_in(ALU_flags_int), + .bus_out(), + .always_out(ALU_flags_out) +); + // run decoder on negated clock, // allowing stuff to be clocked in "early" wire DEC_clk_neg = ~clk_in; |
