Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / env / ilu_peu / vera / N2fc / N2fcIntxStr.vr
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: N2fcIntxStr.vr
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 ============================================
35class N2fcIntxStr extends DmaMsgPEUStr {
36
37 // ******************************************************************
38 // Constructor
39 // ******************************************************************
40 public task new (PEUTestEnv a_env,
41 string a_cmd,
42 string a_option
43 );
44}
45
46//--------------------------------------------------------------------
47// Method Name: new()
48// Description: drive an INTx or other msg based on user event options
49//--------------------------------------------------------------------
50task N2fcIntxStr::new(PEUTestEnv a_env,
51 string a_cmd,
52 string a_option
53 )
54{
55 bit [2:0] type_msg = 3'b100;
56 super.new(a_env);
57
58 case( a_cmd ) {
59 "INTA" :
60 case ( a_option ) {
61 "ASSERT" : this.SetMsgCode(PEC_PCI__MSG_CODE_ASSERT_INTA);
62 "DEASSERT": this.SetMsgCode(PEC_PCI__MSG_CODE_DEASSERT_INTA);
63 default : error("N2fcIntxStr::new INTA invalid option: %s\n", a_option);
64 }
65 "INTB" :
66 case ( a_option ) {
67 "ASSERT" : this.SetMsgCode(PEC_PCI__MSG_CODE_ASSERT_INTB);
68 "DEASSERT": this.SetMsgCode(PEC_PCI__MSG_CODE_DEASSERT_INTB);
69 default : error("N2fcIntxStr::new INTB invalid option: %s\n", a_option);
70 }
71 "INTC" :
72 case ( a_option ) {
73 "ASSERT" : this.SetMsgCode(PEC_PCI__MSG_CODE_ASSERT_INTC);
74 "DEASSERT": this.SetMsgCode(PEC_PCI__MSG_CODE_DEASSERT_INTC);
75 default : error("N2fcIntxStr::new INTC invalid option: %s\n", a_option);
76 }
77 "INTD" :
78 case ( a_option ) {
79 "ASSERT" : this.SetMsgCode(PEC_PCI__MSG_CODE_ASSERT_INTD);
80 "DEASSERT": this.SetMsgCode(PEC_PCI__MSG_CODE_DEASSERT_INTD);
81 default : error("N2fcIntxStr::new INTD invalid option: %s\n", a_option);
82 }
83 "PM_PME" : {
84 this.SetMsgCode(PEC_PCI__MSG_CODE_PM_PME);
85 type_msg = 3'b000;
86 }
87 "PM_TO_ACK" : {
88 this.SetMsgCode(PEC_PCI__MSG_CODE_PM_TO_ACK);
89 type_msg = 3'b101;
90 }
91 "ERR_COR" : {
92 this.SetMsgCode(PEC_PCI__MSG_CODE_ERR_COR);
93 type_msg = 3'b000;
94 }
95 "ERR_NONFATAL" : {
96 this.SetMsgCode(PEC_PCI__MSG_CODE_ERR_NONFATAL);
97 type_msg = 3'b000;
98 }
99 "ERR_FATAL" : {
100 this.SetMsgCode(PEC_PCI__MSG_CODE_ERR_FATAL);
101 type_msg = 3'b000;
102 }
103 "ATTN" : {
104 this.SetMsgCode(PEC_PCI__MSG_CODE_ATTN);
105 type_msg = 3'b100;
106 }
107 "VENDOR_TYPE_0" : {
108 this.SetMsgCode(PEC_PCI__MSG_CODE_VENDOR_TYPE_0);
109 type_msg = a_option.atohex();
110 }
111 "VENDOR_TYPE_1" : {
112 this.SetMsgCode(PEC_PCI__MSG_CODE_VENDOR_TYPE_1);
113 type_msg = a_option.atohex();
114 }
115 } // case(a_cmd)
116
117 this.SetRoutingCode(PEC_PCI__TYPE_MSG + type_msg);
118
119 this.Execute ();
120}