-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinterface.sv
More file actions
27 lines (21 loc) · 975 Bytes
/
interface.sv
File metadata and controls
27 lines (21 loc) · 975 Bytes
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
interface intf(input bit clk);
// ------------------- port declaration-------------------------------------
logic rst;
logic [7:0] out;
//--------------------------------------------------------------------------
//------------- clocking & modport declaration -----------------------------
clocking cb @(posedge clk);
default input #2 output #1step;
output rst; //input of DUT
input out; //output of DUT
endclocking
//--------------------------------------------------------------------------
//-------------------------- ASSERTION ------------------------------------
property check;
disable iff(rst==1)
@(posedge clk) $onehot(out)==1;
endproperty
CHECK:assert property(check) $display("\t\t ASSERTION PASS");
else $display("\t\t ASSERTION FAIL");
//--------------------------------------------------------------------------
endinterface