Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / dmu / rtl / dmu_mmu_csr_err.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: dmu_mmu_csr_err.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 dmu_mmu_csr_err
36 (
37 clk,
38 por_l,
39 err_w_ld,
40 csrbus_wr_data,
41 rw1c_alias,
42 rw1s_alias,
43 err_csrbus_read_data,
44 err_hw_set,
45 err_hw_read
46 );
47
48//====================================================================
49// Polarity declarations
50//====================================================================
51input clk; // Clock
52input por_l; // Reset signal
53input err_w_ld; // SW load bus
54input [`FIRE_CSRBUS_DATA_WIDTH-1:0] csrbus_wr_data; // SW write data
55input rw1c_alias; // SW load type: write-one-to-clear
56input rw1s_alias; // SW load type: write-one-to-set
57output [`FIRE_DLC_MMU_CSR_ERR_RW1C_ALIAS_WIDTH-1:0] err_csrbus_read_data;
58 // SW read data
59input [`FIRE_DLC_MMU_CSR_ERR_RW1C_ALIAS_WIDTH-1:0] err_hw_set; // Hardware set
60 // signal for
61 // err. When
62 // set err will
63 // be set to
64 // one.
65output [`FIRE_DLC_MMU_CSR_ERR_RW1C_ALIAS_WIDTH-1:0] err_hw_read; // This signal
66 // provides
67 // the current
68 // value of
69 // err.
70
71//====================================================================
72// Type declarations
73//====================================================================
74wire clk; // Clock
75wire por_l; // Reset signal
76wire err_w_ld; // SW load bus
77wire [`FIRE_CSRBUS_DATA_WIDTH-1:0] csrbus_wr_data; // SW write data
78wire rw1c_alias; // SW load type: write-one-to-clear
79wire rw1s_alias; // SW load type: write-one-to-set
80wire [`FIRE_DLC_MMU_CSR_ERR_RW1C_ALIAS_WIDTH-1:0] err_csrbus_read_data;
81 // SW read data
82wire [`FIRE_DLC_MMU_CSR_ERR_RW1C_ALIAS_WIDTH-1:0] err_hw_set; // Hardware set
83 // signal for
84 // err. When set
85 // err will be
86 // set to one.
87wire [`FIRE_DLC_MMU_CSR_ERR_RW1C_ALIAS_WIDTH-1:0] err_hw_read; // This signal
88 // provides the
89 // current value
90 // of err.
91
92//====================================================================
93// Logic
94//====================================================================
95
96// synopsys translate_off
97// verilint 123 off
98// verilint 498 off
99reg omni_ld;
100reg [`FIRE_DLC_MMU_CSR_ERR_RW1C_ALIAS_WIDTH-1:0] omni_data;
101reg omni_rw1c_alias;
102reg omni_rw1s_alias;
103
104// vlint flag_unsynthesizable_initial off
105initial
106 begin
107 omni_ld = 1'b0;
108 omni_data = `FIRE_DLC_MMU_CSR_ERR_RW1C_ALIAS_WIDTH'b0;
109 omni_rw1c_alias = 1'b0;
110 omni_rw1s_alias = 1'b0;
111 end// vlint flag_unsynthesizable_initial on
112
113// verilint 123 on
114// verilint 498 on
115// synopsys translate_on
116
117//----- Hardware Data Out Mux Assignments
118assign err_hw_read=
119 err_csrbus_read_data
120 [`FIRE_DLC_MMU_CSR_ERR_RW1C_ALIAS_WIDTH-1:0];
121
122//====================================================================
123// Instantiation of entries
124//====================================================================
125
126//----- Entry 0
127dmu_mmu_csr_err_entry err_0
128 (
129 // synopsys translate_off
130 .omni_ld (omni_ld),
131 .omni_data (omni_data),
132 .omni_rw1c_alias (omni_rw1c_alias),
133 .omni_rw1s_alias (omni_rw1s_alias),
134 // synopsys translate_on
135 .clk (clk),
136 .por_l (por_l),
137 .w_ld (err_w_ld),
138 .csrbus_wr_data (csrbus_wr_data),
139 .rw1c_alias (rw1c_alias),
140 .rw1s_alias (rw1s_alias),
141 .err_csrbus_read_data (err_csrbus_read_data),
142 .err_hw_set (err_hw_set)
143 );
144
145endmodule // dmu_mmu_csr_err