diff options
| author | uvok | 2026-01-19 15:49:11 +0100 |
|---|---|---|
| committer | uvok | 2026-01-19 15:49:11 +0100 |
| commit | b99a9872b2d6cb5a0abedfdb33125dc6274f1c1d (patch) | |
| tree | d21ab03c9cc60f05eb6d5129656ef0ec063827b8 /eater_cpu | |
| parent | a23c370134427a5abe49bc74d8be2a6b6baa2d7a (diff) | |
Fix eater_types for Icarus
Diffstat (limited to 'eater_cpu')
| -rw-r--r-- | eater_cpu/Makefile | 2 | ||||
| -rw-r--r-- | eater_cpu/eater_types.sv | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/eater_cpu/Makefile b/eater_cpu/Makefile index d877169..9145135 100644 --- a/eater_cpu/Makefile +++ b/eater_cpu/Makefile @@ -1,5 +1,5 @@ cpu: eater_computer_tb.sv eater_computer.sv zbuffer.sv eater_register.v eater_alu.sv ../playground/my_mem.v ../nandgame/counter.sv - iverilog -o $@ -g2012 $^ + iverilog -o $@ -g2012 -DIVERILOG $^ HARDWARE_SUFFIX := .sv TESTBENCH_SUFFIX := _tb.sv diff --git a/eater_cpu/eater_types.sv b/eater_cpu/eater_types.sv index b5abe21..d1699b0 100644 --- a/eater_cpu/eater_types.sv +++ b/eater_cpu/eater_types.sv @@ -12,6 +12,18 @@ typedef enum logic[7:0] { } CpuState; // CPU control flags +`ifdef IVERILOG +typedef struct packed { + logic A_out, A_in; + logic B_out, B_in; + logic INS_out, INS_in; + logic MAR_in; + logic RAM_out, RAM_in; + logic ALU_out; + logic PC_out, PC_in, PC_count; + logic OUT_in; +} CpuControlFlags; +`else typedef struct { logic A_out, A_in; logic B_out, B_in; @@ -22,5 +34,6 @@ typedef struct { logic PC_out, PC_in, PC_count; logic OUT_in; } CpuControlFlags; +`endif `endif |
