| // Copyright lowRISC contributors. |
| // Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| // SPDX-License-Identifier: Apache-2.0 |
| // TODO: This module is a hard-coded stopgap to select an implementation of an |
| // "abstract module". This module is to be replaced by generated code. |
| `ifndef PRIM_DEFAULT_IMPL |
| `define PRIM_DEFAULT_IMPL integer'(prim_pkg::ImplGeneric) |
| parameter integer Impl = `PRIM_DEFAULT_IMPL, |
| parameter int Width = 32, // bit |
| parameter int Depth = 128, |
| parameter int Aw = $clog2(Depth) // derived parameter |
| input [Width-1:0] a_wdata_i, |
| output logic [Width-1:0] a_rdata_o, |
| input [Width-1:0] b_wdata_i, |
| output logic [Width-1:0] b_rdata_o |
| `ASSERT_INIT(paramCheckAw, Aw == $clog2(Depth)) |
| if (impl_e'(Impl) == ImplGeneric) begin : gen_mem_generic |
| end else if (impl_e'(Impl) == ImplXilinx) begin : gen_mem_xilinx |
| end else begin : gen_failure |
| // TODO: Find code that works across tools and causes a compile failure |