Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / env / common / coverage / siu / siu_dmucmd_sample.vrhpal
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: siu_dmucmd_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
38#ifndef SIU_INTF_COV
39sample siu_dmucmd_sample_this (this_dmu_cmd)
40{
41 state RDD_ord ( 7'b0010_100 );
42 state WRI_pstd_ord ( 7'b0100_100 );
43 state WRM_pstd_ord ( 7'b0101_100 );
44 state PIO_RD_RET ( 7'b1010_011 );
45 state INT ( 7'b0000_010 );
46 cov_weight = 0;
47}
48
49. $j = 5;
50. $k = 2;
51. for ($i=1; $i<11; $i++)
52. {
53 sample siu_dmucmd_sample_${i}_clk_last (last_dmu_cmd)
54 {
55 state RDD_ord ( 7'b0010_100 ) if (dmu_back_to_back == ${i});
56 state WRI_pstd_ord ( 7'b0100_100 ) if (dmu_back_to_back == ${j});
57 state WRM_pstd_ord ( 7'b0101_100 ) if (dmu_back_to_back == ${j});
58 state PIO_RD_RET ( 7'b1010_011 ) if (dmu_back_to_back == ${k});
59 state INT ( 7'b0000_010 ) if (dmu_back_to_back == ${k});
60. $j++;
61. $k++;
62 cov_weight = 0;
63 }
64.}
65
66
67// bins for back to back dmu commands
68. for ($i=1; $i<11; $i++)
69. {
70 cross dmusiu_intf_inb_cmd_${i}_clk_cross (siu_dmucmd_sample_${i}_clk_last, siu_dmucmd_sample_this)
71 {
72 cov_weight = 1;
73 }
74.}
75
76// make sure all bits of the dmc tag field are toggled.
77sample dmusiu_intf_inb_dmctag_sample ( dmc_tag[15:0] )
78{
79. &toggle( 16 );
80
81 cov_weight = 1;
82}
83
84
85#else
86// FC
87sample siu_dmucmd_sample_this (this_dmu_cmd)
88{
89 state RDD_ord ( 7'b0010_100 );
90 state WRI_pstd_ord ( 7'b0100_100 );
91 state WRM_pstd_ord ( 7'b0101_100 );
92 state PIO_RD_RET ( 7'b1010_011 );
93 state INT ( 7'b0000_010 );
94 cov_weight = 1;
95}
96
97. $j = 5;
98. $k = 2;
99. for ($i=1; $i<6; $i++)
100. {
101 sample siu_dmucmd_sample_${i}_clk_last (last_dmu_cmd)
102 {
103 state RDD_ord ( 7'b0010_100 ) if (dmu_back_to_back == ${i});
104 state WRI_pstd_ord ( 7'b0100_100 ) if (dmu_back_to_back == ${j});
105 state WRM_pstd_ord ( 7'b0101_100 ) if (dmu_back_to_back == ${j});
106 state PIO_RD_RET ( 7'b1010_011 ) if (dmu_back_to_back == ${k});
107 state INT ( 7'b0000_010 ) if (dmu_back_to_back == ${k});
108. $j++;
109. $k++;
110 cov_weight = 0;
111 }
112.}
113
114
115// bins for back to back dmu commands
116. for ($i=1; $i<6; $i++)
117. {
118 cross dmusiu_intf_inb_cmd_${i}_clk_cross (siu_dmucmd_sample_${i}_clk_last, siu_dmucmd_sample_this)
119 {
120 cov_weight = 1;
121 }
122.}
123
124// make sure all bits of the dmc tag field are toggled.
125sample dmusiu_intf_inb_dmctag_sample ( dmc_tag[15:0] )
126{
127. &toggle( 16 );
128
129 cov_weight = 1;
130}
131#endif
132