Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / env / common / verilog / monitors / pcie_intx_mon.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: pcie_intx_mon.v
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 ============================================
35module pcie_intx_mon() ;
36
37reg pcie_intx_mon_on;
38
39wire int_a_status;
40wire int_b_status;
41wire int_c_status;
42wire int_d_status;
43
44assign int_a_status = tb_top.cpu.dmu.dmc.imu.iss.rds2iss_intx_int_l[0];
45assign int_b_status = tb_top.cpu.dmu.dmc.imu.iss.rds2iss_intx_int_l[1];
46assign int_c_status = tb_top.cpu.dmu.dmc.imu.iss.rds2iss_intx_int_l[2];
47assign int_d_status = tb_top.cpu.dmu.dmc.imu.iss.rds2iss_intx_int_l[3];
48
49initial
50begin
51 pcie_intx_mon_on = 1'b1; // Monitor enabled by default
52 if($test$plusargs("pcie_intx_mon_off"))
53 pcie_intx_mon_on = 1'b0;
54end
55
56//--------------------------------------------------------------------
57// Int A Assetion/De-assertion
58//--------------------------------------------------------------------
59always @(int_a_status)
60begin
61 if(pcie_intx_mon_on == 1'b1)
62 begin
63 if (int_a_status == 1'b1)
64 begin
65 `PR_NORMAL("pcie_intx_mon_on",`NORMAL,"PCIE int A deasserted");
66 end
67 else if (int_a_status == 1'b0)
68 begin
69 `PR_NORMAL("pcie_intx_mon_on",`NORMAL,"PCIE int A asserted");
70 end
71 end
72end
73
74//--------------------------------------------------------------------
75// Int B Assetion/De-assertion
76//--------------------------------------------------------------------
77always @(int_b_status)
78begin
79 if(pcie_intx_mon_on == 1'b1)
80 begin
81 if (int_b_status == 1'b1)
82 begin
83 `PR_NORMAL("pcie_intx_mon_on",`NORMAL,"PCIE int B deasserted");
84 end
85 else if (int_b_status == 1'b0)
86 begin
87 `PR_NORMAL("pcie_intx_mon_on",`NORMAL,"PCIE int B asserted");
88 end
89 end
90end
91
92
93//--------------------------------------------------------------------
94// Int C Assetion/De-assertion
95//--------------------------------------------------------------------
96always @(int_c_status)
97begin
98 if(pcie_intx_mon_on == 1'b1)
99 begin
100 if (int_c_status == 1'b1)
101 begin
102 `PR_NORMAL("pcie_intx_mon_on",`NORMAL,"PCIE int C deasserted");
103 end
104 else if (int_c_status == 1'b0)
105 begin
106 `PR_NORMAL("pcie_intx_mon_on",`NORMAL,"PCIE int C asserted");
107 end
108 end
109end
110
111
112//--------------------------------------------------------------------
113// Int D Assetion/De-assertion
114//--------------------------------------------------------------------
115always @(int_d_status)
116begin
117 if(pcie_intx_mon_on == 1'b1)
118 begin
119 if (int_d_status == 1'b1)
120 begin
121 `PR_NORMAL("pcie_intx_mon_on",`NORMAL,"PCIE int D deasserted");
122 end
123 else if (int_d_status == 1'b0)
124 begin
125 `PR_NORMAL("pcie_intx_mon_on",`NORMAL,"PCIE int D asserted");
126 end
127 end
128end
129
130endmodule