apb: Add SV interface for APB

Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
Alex Forencich
2025-09-06 16:50:38 -07:00
parent 20f14ace97
commit 81a918d223
2 changed files with 59 additions and 0 deletions

View File

@@ -24,6 +24,8 @@ To facilitate the dual-license model, contributions to the project can only be a
## Components
* APB
* SV interface for APB
* AXI
* SV interface for AXI
* AXI to AXI lite adapter

View File

@@ -0,0 +1,57 @@
// SPDX-License-Identifier: MIT
/*
Copyright (c) 2025 FPGA Ninja, LLC
Authors:
- Alex Forencich
*/
interface taxi_apb_if #(
// Width of data bus in bits
parameter DATA_W = 32,
// Width of address bus in bits
parameter ADDR_W = 32,
// Width of pstrb (width of data bus in words)
parameter STRB_W = (DATA_W/8)
)
();
logic [ADDR_W-1:0] paddr;
logic [2:0] pprot;
logic psel;
logic penable;
logic pwrite;
logic [DATA_W-1:0] pwdata;
logic [STRB_W-1:0] pstrb;
logic pready;
logic [DATA_W-1:0] prdata;
logic pslverr;
modport mst (
output paddr,
output pprot,
output psel,
output penable,
output pwrite,
output pwdata,
output pstrb,
input pready,
input prdata,
input pslverr
);
modport slv (
input paddr,
input pprot,
input psel,
input penable,
input pwrite,
input pwdata,
input pstrb,
output pready,
output prdata,
output pslverr
);
endinterface