// SPDX-License-Identifier: Apache-2.0 // Copyright 2019 Western Digital Corporation or its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // module axi_slv #( TAGW = 1 ) ( input aclk, input rst_l, input arvalid, output reg arready, input [ 31:0] araddr, input [TAGW-1:0] arid, input [ 7:0] arlen, input [ 1:0] arburst, input [ 2:0] arsize, output reg rvalid, input rready, output reg [ 63:0] rdata, output reg [ 1:0] rresp, output reg [TAGW-1:0] rid, output rlast, input awvalid, output awready, input [ 31:0] awaddr, input [TAGW-1:0] awid, input [ 7:0] awlen, input [ 1:0] awburst, input [ 2:0] awsize, input [63:0] wdata, input [ 7:0] wstrb, input wvalid, output wready, output reg bvalid, input bready, output reg [ 1:0] bresp, output reg [TAGW-1:0] bid ); parameter MEM_DEPTH = 15; // memory size = 0x8000 = 32k WIDTH=15 parameter MEM_DEPTH_EACH = MEM_DEPTH - 3; // memory size = 0x8000 = 32k WIDTH=15 bit [7:0] mem0[(1<