From b99a9872b2d6cb5a0abedfdb33125dc6274f1c1d Mon Sep 17 00:00:00 2001 From: uvok Date: Mon, 19 Jan 2026 15:49:11 +0100 Subject: Fix eater_types for Icarus --- eater_cpu/Makefile | 2 +- eater_cpu/eater_types.sv | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'eater_cpu') 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 -- cgit v1.2.3