-
Notifications
You must be signed in to change notification settings - Fork 3
/
wdog_intf.sv
52 lines (45 loc) · 1.71 KB
/
wdog_intf.sv
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
41
42
43
44
45
46
47
48
49
50
51
52
interface wdog_intf(input logic pclk, input logic wdogclk);
// Signals needed
// APB Signals
logic PRESETn;
logic [31:0] PADDR;
logic PSEL;
logic PENABLE;
logic PWRITE;
logic [31:0] PWDATA;
logic [31:0] PRDATA;
logic PREADY;
// Non-APB Signals
logic WDOGCLKEN;
logic WDOGRESn;
logic WDOGINT;
logic WDOGRES;
// ****************************************************************************
// Clocking block for APB driver and monitor
// ****************************************************************************
clocking apb_drv_cb @(posedge pclk);
output PWRITE, PWDATA, PADDR, PENABLE, PRESETn, PSEL;
input PREADY;
endclocking
clocking apb_mon_cb @(posedge pclk);
input PWRITE, PWDATA, PADDR, PENABLE, PRESETn, PSEL;
input #1 PRDATA, PREADY;
endclocking
// ****************************************************************************
// Clocking block for WDOG Driver and monitor
// ****************************************************************************
clocking wdog_drv_cb @(posedge wdogclk);
output WDOGCLKEN, WDOGRESn;
endclocking
clocking wdog_mon_cb @(posedge wdogclk);
input WDOGCLKEN, WDOGRESn;
input #1 WDOGINT, WDOGRES;
endclocking
// ****************************************************************************
// Modports
// ****************************************************************************
modport APB_DRV (clocking apb_drv_cb);
modport APB_MON (clocking apb_mon_cb);
modport WDOG_DRV (clocking wdog_drv_cb);
modport WDOG_MON (clocking wdog_mon_cb);
endinterface