mirror of
https://github.com/pConst/basic_verilog.git
synced 2025-01-14 06:42:54 +08:00
Added Wishbone interface
This commit is contained in:
parent
4f10b2ad3d
commit
46e79a0d34
@ -77,7 +77,7 @@ interface axi4_if #( parameter
|
||||
logic wvalid;
|
||||
|
||||
|
||||
modport master(
|
||||
modport master_mp(
|
||||
|
||||
input arready,
|
||||
input awready,
|
||||
@ -128,7 +128,7 @@ interface axi4_if #( parameter
|
||||
);
|
||||
|
||||
|
||||
modport slave(
|
||||
modport slave_mp(
|
||||
|
||||
input araddr,
|
||||
input arburst,
|
||||
|
@ -17,17 +17,19 @@ interface axis_if #( parameter
|
||||
);
|
||||
|
||||
|
||||
logic [ DATA_W-1:0 ] tdata;
|
||||
logic [ ID_W-1:0 ] tdest;
|
||||
logic [ ID_W-1:0 ] tid;
|
||||
logic [ DATA_W/8-1:0 ] tkeep;
|
||||
logic tlast;
|
||||
logic tready;
|
||||
logic [ USER_W-1:0 ] tuser;
|
||||
logic tvalid;
|
||||
localparam KEEP_W = DATA_W/8;
|
||||
|
||||
logic [DATA_W-1:0] tdata;
|
||||
logic [ ID_W-1:0] tdest;
|
||||
logic [ ID_W-1:0] tid;
|
||||
logic [KEEP_W-1:0] tkeep;
|
||||
logic tlast;
|
||||
logic tready;
|
||||
logic [USER_W-1:0] tuser;
|
||||
logic tvalid;
|
||||
|
||||
|
||||
modport master(
|
||||
modport master_mp(
|
||||
|
||||
input tready,
|
||||
|
||||
@ -41,7 +43,7 @@ interface axis_if #( parameter
|
||||
);
|
||||
|
||||
|
||||
modport slave(
|
||||
modport slave_mp(
|
||||
|
||||
input tdata,
|
||||
input tdest,
|
||||
|
69
interfaces/wb_if.sv
Normal file
69
interfaces/wb_if.sv
Normal file
@ -0,0 +1,69 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// wb_if.sv
|
||||
// published as part of https://github.com/pConst/basic_verilog
|
||||
// Konstantin Pavlov, pavlovconst@gmail.com
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// INFO ------------------------------------------------------------------------
|
||||
// Wishbone instantiation
|
||||
//
|
||||
|
||||
|
||||
interface wb_if #( parameter
|
||||
ADDR_W = 32,
|
||||
DATA_W = 32,
|
||||
SEL_W = 4
|
||||
//TAG_W = 4
|
||||
);
|
||||
|
||||
|
||||
logic ack;
|
||||
logic [ADDR_W-1:0] adr;
|
||||
logic cyc;
|
||||
logic [DATA_W-1:0] dat;
|
||||
logic [DATA_W-1:0] dat;
|
||||
logic err;
|
||||
logic rty;
|
||||
logic [ SEL_W-1:0] sel;
|
||||
logic stb;
|
||||
//logic [ TAG_W-1:0] tgd; // user-defined TAG signals
|
||||
logic we;
|
||||
|
||||
|
||||
modport master_mp(
|
||||
|
||||
input ack,
|
||||
input dat,
|
||||
input err,
|
||||
input rty,
|
||||
|
||||
output adr,
|
||||
output cyc,
|
||||
output dat,
|
||||
output sel,
|
||||
output stb,
|
||||
//output tgd,
|
||||
output we
|
||||
);
|
||||
|
||||
|
||||
modport slave_mp(
|
||||
|
||||
input adr,
|
||||
input cyc,
|
||||
input dat,
|
||||
input sel,
|
||||
input stb,
|
||||
//input tgd,
|
||||
input we,
|
||||
|
||||
output ack,
|
||||
output dat,
|
||||
output err,
|
||||
output rty
|
||||
);
|
||||
|
||||
|
||||
endinterface
|
||||
|
Loading…
x
Reference in New Issue
Block a user