Commit | Line | Data |
---|---|---|
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 ============================================ | |
35 | module pcie_intx_mon() ; | |
36 | ||
37 | reg pcie_intx_mon_on; | |
38 | ||
39 | wire int_a_status; | |
40 | wire int_b_status; | |
41 | wire int_c_status; | |
42 | wire int_d_status; | |
43 | ||
44 | assign int_a_status = tb_top.cpu.dmu.dmc.imu.iss.rds2iss_intx_int_l[0]; | |
45 | assign int_b_status = tb_top.cpu.dmu.dmc.imu.iss.rds2iss_intx_int_l[1]; | |
46 | assign int_c_status = tb_top.cpu.dmu.dmc.imu.iss.rds2iss_intx_int_l[2]; | |
47 | assign int_d_status = tb_top.cpu.dmu.dmc.imu.iss.rds2iss_intx_int_l[3]; | |
48 | ||
49 | initial | |
50 | begin | |
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; | |
54 | end | |
55 | ||
56 | //-------------------------------------------------------------------- | |
57 | // Int A Assetion/De-assertion | |
58 | //-------------------------------------------------------------------- | |
59 | always @(int_a_status) | |
60 | begin | |
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 | |
72 | end | |
73 | ||
74 | //-------------------------------------------------------------------- | |
75 | // Int B Assetion/De-assertion | |
76 | //-------------------------------------------------------------------- | |
77 | always @(int_b_status) | |
78 | begin | |
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 | |
90 | end | |
91 | ||
92 | ||
93 | //-------------------------------------------------------------------- | |
94 | // Int C Assetion/De-assertion | |
95 | //-------------------------------------------------------------------- | |
96 | always @(int_c_status) | |
97 | begin | |
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 | |
109 | end | |
110 | ||
111 | ||
112 | //-------------------------------------------------------------------- | |
113 | // Int D Assetion/De-assertion | |
114 | //-------------------------------------------------------------------- | |
115 | always @(int_d_status) | |
116 | begin | |
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 | |
128 | end | |
129 | ||
130 | endmodule |