mirror of
https://github.com/fpganinja/taxi.git
synced 2025-12-09 08:58:40 -08:00
apb: Add SV interface for APB
Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
57
src/apb/rtl/taxi_apb_if.sv
Normal file
57
src/apb/rtl/taxi_apb_if.sv
Normal 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
|
||||
Reference in New Issue
Block a user