| // Copyright lowRISC contributors. |
| // Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| // SPDX-License-Identifier: Apache-2.0 |
| `include "prim_assert.sv" |
| module prim_generic_rom #( |
| parameter int Width = 32, |
| parameter int Depth = 2048, // 8kB default |
| parameter MemInitFile = "", // VMEM file to initialize the memory with |
| localparam int Aw = $clog2(Depth) |
| output logic [Width-1:0] dout_o, |
| logic [Width-1:0] mem [Depth]; |
| always_ff @(posedge clk_i) begin |
| always_ff @(posedge clk_i or negedge rst_ni) begin |
| `include "prim_util_memload.sv" |
| // Control Signals should never be X |
| `ASSERT(noXOnCsI, !$isunknown(cs_i), clk_i, '0) |