Repaired last few errors in modules and ensured compilation with QUARTUS_BUILD global flag in Quartus build settings and compiled fully (no errors other than pin assignments)

This commit is contained in:
TroubleElectrical committed 2026-10-13 13:24:44 +11:00
1 parent f91fe0681a
commit 19b07b649d
143 files changed
+6502 -109

No files matched your search

+4 -1
View File
@@ -65,6 +65,9 @@ module assignment2 #(width=5, ramsz=9, romsz=10) (input logic [0:0] clk);
logic [2**width-1:0] rd_shifter;
shifter #(width) SHIFTER (instruction[2:0], rt, rs[4:0], instruction[10:6], rd_shifter);
rd = en_alu ? rd_alu : (en_shifter ? : rd_shifter : ({(2**width){1'b0}}));
assign rd = en_alu
? rd_alu
: (en_shifter ? rd_shifter : {2**width{1'b0}});
endmodule
`endif
+4 -4
View File
@@ -1,12 +1,12 @@
`ifndef INSTRUCTION_CLASSIFIER_H_SV
`define INSTRUCTION_CLASSIFIER_H_SV
`ifndef INSTRUCTION_MODULE_CLASSIFIER_H_SV
`define INSTRUCTION_MODULE_CLASSIFIER_H_SV
module instruction_module_classifier(
input logic [2:0] op,
output logic en_shifter,
output logic en_jmp,
output logic en_mul,
output logic en_alu,
output logic en_alu
);
always_comb begin
en_shifter = (op & 3'b111) == 3'b000;
@@ -15,4 +15,4 @@ module instruction_module_classifier(
en_alu = (op & 3'b100) == 3'b100;
end
endmodule
`endif
`endif
+1 -1
View File
@@ -12,7 +12,7 @@ module rom #(parameter m=7,p=4) (
//Load the program in memory
// The machine code stored in text file program.dat written in Hex format
initial begin
`ifdef QUARTUS_BUILD
`ifdef QUARTUS_SYNTH
$readmemh("../../asm/bin/ELEC4720-2026s2-Ass-02-Demo.txt",mem); //$readmemb for binary
`else
$readmemh("./asm/bin/ELEC4720-2026s2-Ass-02-Demo.txt",mem); //$readmemb for binary