@@ -11,6 +11,8 @@ class coverage;
11
11
bit [22 : 0 ] o_mantA, o_mantB;
12
12
13
13
bit o_fpu_out;
14
+ bit [7 : 0 ] o_expO;
15
+ bit [22 : 0 ] o_mantO;
14
16
15
17
transaction transaction0;
16
18
virtual bfm vbfm0;
@@ -45,26 +47,26 @@ class coverage;
45
47
46
48
exponent_A : coverpoint o_expA{
47
49
bins exponent_A_zero= { 0 } ;
48
- bins exponent_A= { [2 : $ ]} ;
49
- bins exponent_A_one = { 1 } ;
50
+ bins exponent_A= { ['h1 : 'hfe ]} ;
51
+ bins exponent_A_ones = { 'hff } ;
50
52
}
51
53
52
54
exponent_B : coverpoint o_expB{
53
55
bins exponent_B_zero= { 0 } ;
54
- bins exponent_B= { [2 : $ ]} ;
55
- bins exponent_B_one = { 1 } ;
56
+ bins exponent_B= { ['h1 : 'hfe ]} ;
57
+ bins exponent_B_ones = { 'hff } ;
56
58
}
57
59
58
60
fraction_A : coverpoint o_mantA{
59
61
bins fraction_A_zero= { 0 } ;
60
- bins fraction_A= { [2 : $ ]} ;
61
- bins fraction_A_one = { 1 } ;
62
+ bins fraction_A= { ['h1 : 'h7ffffe ]} ;
63
+ bins fraction_A_ones = { 'h7fffff } ;
62
64
}
63
65
64
66
fraction_B : coverpoint o_mantB{
65
67
bins fraction_B_zero= { 0 } ;
66
- bins fraction_B= { [2 : $ ]} ;
67
- bins fraction_B_one = { 1 } ;
68
+ bins fraction_B= { ['h1 : 'h7ffffe ]} ;
69
+ bins fraction_B_ones = { 'hfffff } ;
68
70
}
69
71
70
72
// ignoring mantasa and exponent when the number is negative for A
@@ -87,6 +89,18 @@ class coverage;
87
89
bins negative_output = { 1 } ; // covering if output is negative
88
90
}
89
91
92
+ exponent_out : coverpoint o_expO{
93
+ bins exponent_O_zero= { 0 } ;
94
+ bins exponent_O= { ['h1 : 'hfe ]} ;
95
+ bins exponent_O_ones= { 'hff } ;
96
+ }
97
+
98
+ fraction_out : coverpoint o_mantO{
99
+ bins fraction_O_zero= { 0 } ;
100
+ bins fraction_O= { ['h1 : 'h7ffffe ]} ;
101
+ bins fraction_O_ones= { 'hfffff } ;
102
+ }
103
+
90
104
endgroup
91
105
92
106
task run ();
@@ -98,7 +112,7 @@ class coverage;
98
112
vbfm0.waittilldone ();
99
113
common :: mon2cov.get (transaction0);
100
114
out_A = transaction0.opA;
101
- out_B = transaction0.opA ;
115
+ out_B = transaction0.opB ;
102
116
out_op = transaction0.fpuOp;
103
117
out_O = transaction0.fpuOut;
104
118
@@ -110,7 +124,9 @@ class coverage;
110
124
o_expB= out_B[30 : 23 ];
111
125
o_mantB= out_B[22 : 0 ];
112
126
113
- out_O = out_O[31 ];
127
+ o_fpu_out = out_O[31 ];
128
+ o_expO = out_B[30 : 23 ];
129
+ o_mantO = out_B[22 : 0 ];
114
130
115
131
inputs.sample ();
116
132
outputs.sample ();
0 commit comments