Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / env / common / coverage / siu / siu_niucmd_sample.vrhpal
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: siu_niucmd_sample.vrhpal
4// Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
5// 4150 Network Circle, Santa Clara, California 95054, U.S.A.
6//
7// * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8//
9// This program is free software; you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation; version 2 of the License.
12//
13// This program is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU General Public License
19// along with this program; if not, write to the Free Software
20// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21//
22// For the avoidance of doubt, and except that if any non-GPL license
23// choice is available it will apply instead, Sun elects to use only
24// the General Public License version 2 (GPLv2) at this time for any
25// software where a choice of GPL license versions is made
26// available with the language indicating that GPLv2 or any later version
27// may be used, or where a choice of which version of the GPL is applied is
28// otherwise unspecified.
29//
30// Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
31// CA 95054 USA or visit www.sun.com if you need additional information or
32// have any questions.
33//
34// ========== Copyright Header End ============================================
35#inc "siu_cov_inc.pal";
36
37#ifndef SIU_INTF_COV
38sample siu_niucmd_sample_this (this_niu_cmd)
39{
40 state RDD_ord ( 7'b0010_100 );
41 state RDD_byp ( 7'b0010_101 );
42 state WRI_npt_ord ( 7'b0000_100 );
43 state WRI_npt_byp ( 7'b0000_101 );
44 state WRI_pst_ord ( 7'b0100_100 );
45 state WRI_pst_byp ( 7'b0100_101 );
46
47 cov_weight = 0;
48}
49
50. $j = 5;
51. for ($i=1; $i<11; $i++)
52. {
53 sample siu_niucmd_sample_${i}_clk_last (last_niu_cmd)
54 {
55 state RDD_ord_last_${i}_clk ( 7'b0010_100 ) if (niu_back_to_back == ${i});
56 state RDD_byp_last_${i}_clk ( 7'b0010_101 ) if (niu_back_to_back == ${i});
57 state WRI_npt_ord_last_${i}_clk ( 7'b0000_100 ) if (niu_back_to_back == ${j});
58 state WRI_npt_byp_last_${i}_clk ( 7'b0000_101 ) if (niu_back_to_back == ${j});
59 state WRI_pst_ord_last_${i}_clk ( 7'b0100_100 ) if (niu_back_to_back == ${j});
60 state WRI_pst_byp_last_${i}_clk ( 7'b0100_101 ) if (niu_back_to_back == ${j});
61. $j++;
62 cov_weight = 0;
63 }
64.}
65
66. for ($i=1; $i<11; $i++)
67. {
68 cross niusiu_intf_inb_cmd_${i}_clk_cross (siu_niucmd_sample_${i}_clk_last, siu_niucmd_sample_this)
69 {
70 cov_weight = 1;
71 }
72.}
73
74
75// make sure all bits of the dmc tag field are toggled.
76sample niusiu_intf_inb_id_sample ( niu_id[15:0] )
77{
78. &toggle( 16 );
79
80 cov_weight = 1;
81}
82#else
83// FC
84sample siu_niucmd_sample_this (this_niu_cmd)
85{
86 state RDD_byp ( 7'b0010_101 );
87 state WRI_npt_ord ( 7'b0000_100 );
88 state WRI_pst_byp ( 7'b0100_101 );
89
90 cov_weight = 1;
91}
92
93. $j = 5;
94. for ($i=1; $i<6; $i++)
95. {
96 sample siu_niucmd_sample_${i}_clk_last (last_niu_cmd)
97 {
98 state RDD_byp_last_${i}_clk ( 7'b0010_101 ) if (niu_back_to_back == ${i});
99 state WRI_npt_ord_last_${i}_clk ( 7'b0000_100 ) if (niu_back_to_back == ${j});
100 state WRI_pst_byp_last_${i}_clk ( 7'b0100_101 ) if (niu_back_to_back == ${j});
101. $j++;
102 cov_weight = 0;
103 }
104.}
105
106. for ($i=1; $i<6; $i++)
107. {
108 cross niusiu_intf_inb_cmd_${i}_clk_cross (siu_niucmd_sample_${i}_clk_last, siu_niucmd_sample_this)
109 {
110 cov_weight = 1;
111 }
112.}
113
114// make sure all bits of the dmc tag field are toggled.
115sample niusiu_intf_inb_id_sample ( niu_id[15:0] )
116{
117. &toggle( 16 );
118
119 cov_weight = 1;
120}
121
122#endif