From b2f4d4aaa7ca3757752e01663215a368f33841ba Mon Sep 17 00:00:00 2001 From: Ross Thompson Date: Tue, 20 Sep 2022 10:49:14 -0500 Subject: [PATCH] Added chip enables to sram. --- pipelined/src/generic/mem/bram1p1rw.sv | 17 ++++++++++------- pipelined/src/generic/mem/brom1p1r.sv | 3 ++- pipelined/src/ifu/ifu.sv | 4 ++-- pipelined/src/ifu/irom.sv | 4 ++-- pipelined/src/lsu/dtim.sv | 4 ++-- pipelined/src/lsu/lsu.sv | 4 ++-- pipelined/src/uncore/ram_ahb.sv | 2 +- pipelined/src/uncore/rom_ahb.sv | 2 +- 8 files changed, 22 insertions(+), 18 deletions(-) diff --git a/pipelined/src/generic/mem/bram1p1rw.sv b/pipelined/src/generic/mem/bram1p1rw.sv index bdf52d69..d4759b0b 100644 --- a/pipelined/src/generic/mem/bram1p1rw.sv +++ b/pipelined/src/generic/mem/bram1p1rw.sv @@ -45,6 +45,7 @@ module bram1p1rw //---------------------------------------------------------------------- ) ( input logic clk, + input logic ce, input logic we, input logic [NUM_COL-1:0] bwe, input logic [ADDR_WIDTH-1:0] addr, @@ -105,13 +106,15 @@ end always @ (posedge clk) begin - dout <= RAM[addr]; - if(we) begin - for(i=0;i 0) begin diff --git a/pipelined/src/uncore/rom_ahb.sv b/pipelined/src/uncore/rom_ahb.sv index bbcc5888..9128efb8 100644 --- a/pipelined/src/uncore/rom_ahb.sv +++ b/pipelined/src/uncore/rom_ahb.sv @@ -49,6 +49,6 @@ module rom_ahb #(parameter BASE=0, RANGE = 65535) ( // single-ported ROM brom1p1r #(ADDR_WIDTH, `XLEN, `FPGA) - memory(.clk(HCLK), .addr(HADDR[ADDR_WIDTH+OFFSET-1:OFFSET]), .dout(HREADRom)); + memory(.clk(HCLK), .ce(1'b1), .addr(HADDR[ADDR_WIDTH+OFFSET-1:OFFSET]), .dout(HREADRom)); endmodule