Added header guards to prevent errors from double-inclusions

This commit is contained in:
riley committed 2026-09-13 23:09:08 +10:00
1 parent 78efccfe1e
commit 19ba1bf473
5 files changed
+21 -3

No files matched your search

+5
View File
@@ -1,3 +1,6 @@
`ifndef ASU_H_SV
`define ASU_H_SV
module asu #(parameter width = 2)(
input logic [0:0] op,
input logic[2**width-1:0] A, input logic[2**width-1:0] B,
@@ -15,3 +18,5 @@ module asu #(parameter width = 2)(
// Cin for final bit in adder to later be xor'ed with COUT to determine if a signed overflow occured for the MIPS architecture
assign OUT_CIN = A[2**width-1] ^ operand[2**width-1] ^ OUT_1[2**width-1];
endmodule
`endif
+5 -1
View File
@@ -1,3 +1,5 @@
`ifndef INSTRUCTION_CLASSIFIER_H_SV
`define INSTRUCTION_CLASSIFIER_H_SV
// TODO: This needs to be reworked to use manual mux-ing as to ensure low gate delay
module instruction_classifier(input logic[5:0] op,
output logic[0:0] R, output logic[0:0] B1, output logic[0:0] J,
@@ -14,6 +16,7 @@ module instruction_classifier(input logic[5:0] op,
6'b00001?: OUT_1 = 7'b0000100;
6'b000001: OUT_1 = 7'b0000010;
6'b000000: OUT_1 = 7'b0000001;
default: OUT_1 = 7'bxxxxxxx;
endcase
R = OUT_1[6];
@@ -24,4 +27,5 @@ module instruction_classifier(input logic[5:0] op,
F = OUT_1[1];
M = OUT_1[0];
end
endmodule
endmodule
`endif
+4 -1
View File
@@ -1,3 +1,5 @@
`ifndef LU_H_SV
`define LU_H_SV
module lu #(parameter width = 2) (
input logic [1:0] op,
input logic [2**width-1:0] A,
@@ -13,4 +15,5 @@ module lu #(parameter width = 2) (
default: Y = '0;
endcase
end
endmodule
endmodule
`endif
+3
View File
@@ -1,3 +1,5 @@
`ifndef SEVEN_SEG_H_SV
`define SEVEN_SEG_H_SV
module seven_seg(input logic [3:0] num, input logic [0:0] rbi_inv, output logic [7:0] segments);
always_comb begin
case (num)
@@ -21,3 +23,4 @@ module seven_seg(input logic [3:0] num, input logic [0:0] rbi_inv, output logic
endcase
end
endmodule
`endif
+4 -1
View File
@@ -1,3 +1,5 @@
`ifndef SHIFTER_H_SV
`define SHIFTER_H_SV
module shifter #(width=8)(input logic [2:0] op,
input logic[width-1:0] A, input logic[width-1:0] C, input logic[$clog2(width)-1:0] B,
output logic[width-1:0] OUT_1);
@@ -13,4 +15,5 @@ module shifter #(width=8)(input logic [2:0] op,
default:;
endcase
end
endmodule
endmodule
`endif