From 9e3525fcac6ee89e95499cb46c079279d476ab7b Mon Sep 17 00:00:00 2001 From: TroubleElectrical Date: Tue, 6 Oct 2026 16:28:23 +1100 Subject: [PATCH] Added Byte addressable ROM from Slides --- modules/ByteIM.sv | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 modules/ByteIM.sv diff --git a/modules/ByteIM.sv b/modules/ByteIM.sv new file mode 100644 index 0000000..6e913a7 --- /dev/null +++ b/modules/ByteIM.sv @@ -0,0 +1,14 @@ +`include "rom.sv" + +module ByteIM #(parameter m=5,n=2) ( + input logic [m-1:0] Ad, + output logic [(2**n)*8-1:0] Dout ); + + // 2**n byte wide words + // m bit wide byte address + // 2**m bytes of memory + // 2**(m-n) memory words + // 2**(n+3) bit wide words + // Reads the whole word that contains the addressed byte + ROM #(m-n,2**(n+3)) wordrom(Ad[m-1:n],Dout) +endmodule