-
Notifications
You must be signed in to change notification settings - Fork 156
/
Copy pathapb_if.svh
40 lines (32 loc) · 1.02 KB
/
apb_if.svh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//------------------------------------
//APB (Advanced peripheral Bus) Interface
//
//------------------------------------
`ifndef APB_IF_SV
`define APB_IF_SV
interface apb_if(input bit pclk);
wire [31:0] paddr;
wire psel;
wire penable;
wire pwrite;
wire [31:0] prdata;
wire [31:0] pwdata;
//Master Clocking block - used for Drivers
clocking master_cb @(posedge pclk);
output paddr, psel, penable, pwrite, pwdata;
input prdata;
endclocking: master_cb
//Slave Clocking Block - used for any Slave BFMs
clocking slave_cb @(posedge pclk);
input paddr, psel, penable, pwrite, pwdata;
output prdata;
endclocking: slave_cb
//Monitor Clocking block - For sampling by monitor components
clocking monitor_cb @(posedge pclk);
input paddr, psel, penable, pwrite, prdata, pwdata;
endclocking: monitor_cb
modport master(clocking master_cb);
modport slave(clocking slave_cb);
modport passive(clocking monitor_cb);
endinterface: apb_if
`endif