From 016fb874e75765ecd482fdb165841fe2632f2f6f Mon Sep 17 00:00:00 2001 From: Riley King-Saunders Date: Thu, 8 Oct 2026 14:22:00 +1100 Subject: [PATCH] Set rom to point to example program --- modules/rom.sv | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/rom.sv b/modules/rom.sv index d04f726..9f254c3 100644 --- a/modules/rom.sv +++ b/modules/rom.sv @@ -10,6 +10,10 @@ 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 - $readmemh("program.dat",mem); //$readmemb for binary + `ifdef QUARTUS_BUILD + $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 + `endif end endmodule // end ROM module