Pass MemInitFile parameter from our ram_*p wrappers

Before we changed to vendoring in our RAM primitives from OpenTitan,
there was an SRAM_INIT_FILE define that you could stick in your core
file. That's now gone away, replaced by a parameter (MemInitFile). If
we want to plumb that in, we need to pass it properly through the
wrappers.
This commit is contained in:
Rupert Swarbrick 2020-07-03 13:10:44 +01:00 committed by Rupert Swarbrick
parent 711505a17b
commit 8e9a621f67
2 changed files with 8 additions and 4 deletions

View file

@ -9,7 +9,8 @@
`include "prim_assert.sv"
module ram_1p #(
parameter int Depth = 128
parameter int Depth = 128,
parameter MemInitFile = ""
) (
input clk_i,
input rst_ni,
@ -53,7 +54,8 @@ module ram_1p #(
prim_ram_1p #(
.Width(32),
.DataBitsPerMask(8),
.Depth(Depth)
.Depth(Depth),
.MemInitFile(MemInitFile)
) u_ram (
.clk_i (clk_i),
.req_i (req_i),

View file

@ -9,7 +9,8 @@
`include "prim_assert.sv"
module ram_2p #(
parameter int Depth = 128
parameter int Depth = 128,
parameter MemInitFile = ""
) (
input clk_i,
input rst_ni,
@ -66,7 +67,8 @@ module ram_2p #(
prim_ram_2p #(
.Width(32),
.Depth(Depth)
.Depth(Depth),
.MemInitFile(MemInitFile)
) u_ram (
.clk_a_i (clk_i),
.clk_b_i (clk_i),