add tensor core memory interface

This commit is contained in:
Richard Yan
2024-10-07 02:56:38 -07:00
parent da54162241
commit 8bf7f39f04
5 changed files with 86 additions and 2 deletions

View File

@@ -0,0 +1,57 @@
// Copyright © 2019-2023
//
// 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.
`include "VX_define.vh"
interface VX_tc_bus_if #(
parameter DATA_SIZE = 32,
parameter ADDR_WIDTH = `MEM_ADDR_WIDTH
)();
typedef struct packed {
logic [ADDR_WIDTH-1:0] addr;
} req_data_t;
typedef struct packed {
logic [DATA_SIZE*8-1:0] data;
} rsp_data_t;
logic req_valid;
req_data_t req_data;
logic req_ready;
logic rsp_valid;
rsp_data_t rsp_data;
logic rsp_ready;
modport master (
output req_valid,
output req_data,
input req_ready,
input rsp_valid,
input rsp_data,
output rsp_ready
);
modport slave (
input req_valid,
input req_data,
output req_ready,
output rsp_valid,
output rsp_data,
input rsp_ready
);
endinterface