summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruvok2026-01-06 11:58:16 +0100
committeruvok2026-01-06 11:58:16 +0100
commitfec3d3d68ebb27adaec53839c402229231b2cb38 (patch)
tree5d34ecba07737cbbe938ffcb90c348f566956d51
parentaad3b7aa0732cf127b1a44ff956e9447cbf9afef (diff)
include guards
-rw-r--r--nandgame/comb_mem.sv5
-rw-r--r--nandgame/counter.sv5
-rw-r--r--nandgame/instruction_decode.sv5
3 files changed, 15 insertions, 0 deletions
diff --git a/nandgame/comb_mem.sv b/nandgame/comb_mem.sv
index c7fda32..3a4af75 100644
--- a/nandgame/comb_mem.sv
+++ b/nandgame/comb_mem.sv
@@ -6,6 +6,9 @@
`include "../my_mem.v"
+`ifndef COMB_MEM
+`define COMB_MEM
+
module comb_mem #(
parameter DATA_WIDTH = 16
) (
@@ -61,3 +64,5 @@ always @(negedge clk_in) begin
end
endmodule
+
+`endif
diff --git a/nandgame/counter.sv b/nandgame/counter.sv
index 988d123..90afa9b 100644
--- a/nandgame/counter.sv
+++ b/nandgame/counter.sv
@@ -2,6 +2,9 @@
`timescale 1us/1us
+`ifndef NANDGAME_COUNTER
+`define NANDGAME_COUNTER
+
module counter #(
parameter DATA_WIDTH = 16
) (
@@ -49,3 +52,5 @@ end
assign counter_out = counter_int;
endmodule
+
+`endif
diff --git a/nandgame/instruction_decode.sv b/nandgame/instruction_decode.sv
index 25c3185..f81f251 100644
--- a/nandgame/instruction_decode.sv
+++ b/nandgame/instruction_decode.sv
@@ -8,6 +8,9 @@
`include "alu.sv"
`include "cond_check.sv"
+`ifndef NANDGAME_INS_DECODE
+`define NANDGAME_INS_DECODE
+
module instruction_decode #(
parameter DATA_WIDTH = 16
) (
@@ -81,3 +84,5 @@ assign result_out = is_immediate_int ?
: alu_result_int;
endmodule
+
+`endif