// // Copyright 2011 Ettus Research LLC // Copyright 2018 Ettus Research, a National Instruments Company // // SPDX-License-Identifier: LGPL-3.0-or-later // // Used by ram_2port.v // Requires `RAM_MOD_NAME and `RAM_DIRECTIVE to be defined module `RAM_MOD_NAME #( parameter DWIDTH = 32, // Width of the memory block parameter AWIDTH = 9, // log2 of the depth of the memory block parameter RW_MODE = "READ-FIRST", // Read-write mode {READ-FIRST, WRITE-FIRST, NO-CHANGE} parameter OUT_REG = 0, // Instantiate an output register? (+1 cycle of read latency) parameter INIT_FILE = "" // Optionally initialize memory with this file ) ( input wire clka, input wire ena, input wire wea, input wire [AWIDTH-1:0] addra, input wire [DWIDTH-1:0] dia, output wire [DWIDTH-1:0] doa, input wire clkb, input wire enb, input wire web, input wire [AWIDTH-1:0] addrb, input wire [DWIDTH-1:0] dib, output wire [DWIDTH-1:0] dob ); `RAM_DIRECTIVE reg [DWIDTH-1:0] ram [(1<