| 1 | // ========== Copyright Header Begin ========================================== |
| 2 | // |
| 3 | // OpenSPARC T2 Processor File: niu_txc_meta_resp_ifc.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 | /********************************************************************* |
| 36 | * |
| 37 | * niu_txc_meta_resp_ifc.v |
| 38 | * |
| 39 | * Meta Interface Logic |
| 40 | * |
| 41 | * Orignal Author(s): Rahoul Puri |
| 42 | * Modifier(s): |
| 43 | * Project(s): Neptune |
| 44 | * |
| 45 | * Copyright (c) 2005 Sun Microsystems, Inc. |
| 46 | * |
| 47 | * All Rights Reserved. |
| 48 | * |
| 49 | * This verilog model is the confidential and proprietary property of |
| 50 | * Sun Microsystems, Inc., and the possession or use of this model |
| 51 | * requires a written license from Sun Microsystems, Inc. |
| 52 | * |
| 53 | **********************************************************************/ |
| 54 | |
| 55 | `include "timescale.v" |
| 56 | |
| 57 | module niu_txc_meta_resp_ifc ( |
| 58 | SysClk, // Clock |
| 59 | Reset_L, // Reset_L |
| 60 | meta_dmc_resp_ready, |
| 61 | meta_dmc_resp_complete, |
| 62 | meta_dmc_resp_transfer_cmpl, |
| 63 | meta_dmc_data_valid, |
| 64 | meta_dmc_resp_client, |
| 65 | meta_dmc_resp_port_num, |
| 66 | meta_dmc_resp_cmd_status, |
| 67 | meta_dmc_resp_data_status, |
| 68 | meta_dmc_resp_dma_num, |
| 69 | meta_dmc_resp_transID, |
| 70 | meta_dmc_resp_cmd, |
| 71 | meta_dmc_resp_byteenable, |
| 72 | meta_dmc_resp_length, |
| 73 | meta_dmc_resp_address, |
| 74 | meta_dmc_data, |
| 75 | dmc_meta_resp_accept, |
| 76 | Port0_TXC_DMC_Resp_Accept, |
| 77 | Port1_TXC_DMC_Resp_Accept, |
| 78 | Port2_TXC_DMC_Resp_Accept, |
| 79 | Port3_TXC_DMC_Resp_Accept, |
| 80 | DMC_TXC_Resp_Rdy, |
| 81 | DMC_TXC_Resp_Complete, |
| 82 | DMC_TXC_Trans_Complete, |
| 83 | DMC_TXC_Resp_Data_Valid, |
| 84 | DMC_TXC_Resp_Client, |
| 85 | DMC_TXC_Resp_Port_Num, |
| 86 | DMC_TXC_Resp_Cmd_Status, |
| 87 | DMC_TXC_Resp_Data_Status, |
| 88 | DMC_TXC_Resp_DMA_Num, |
| 89 | DMC_TXC_Resp_TransID, |
| 90 | DMC_TXC_Resp_Cmd, |
| 91 | DMC_TXC_Resp_Data_Length, |
| 92 | DMC_TXC_Resp_ByteEnables, |
| 93 | DMC_TXC_Resp_Address, |
| 94 | DMC_TXC_Resp_Data |
| 95 | ); |
| 96 | |
| 97 | `include "txc_defines.h" |
| 98 | |
| 99 | // MAC Global Signals |
| 100 | input SysClk; |
| 101 | input Reset_L; |
| 102 | |
| 103 | // Meta Response Interface |
| 104 | input meta_dmc_resp_ready; |
| 105 | input meta_dmc_resp_complete; |
| 106 | input meta_dmc_resp_transfer_cmpl; |
| 107 | input meta_dmc_data_valid; |
| 108 | input meta_dmc_resp_client; |
| 109 | input [1:0] meta_dmc_resp_port_num; |
| 110 | input [3:0] meta_dmc_resp_cmd_status; |
| 111 | input [3:0] meta_dmc_resp_data_status; |
| 112 | input [4:0] meta_dmc_resp_dma_num; |
| 113 | input [5:0] meta_dmc_resp_transID; |
| 114 | input [7:0] meta_dmc_resp_cmd; |
| 115 | input [13:0] meta_dmc_resp_length; |
| 116 | input [15:0] meta_dmc_resp_byteenable; |
| 117 | input [63:0] meta_dmc_resp_address; |
| 118 | input [127:0] meta_dmc_data; |
| 119 | |
| 120 | output dmc_meta_resp_accept; |
| 121 | |
| 122 | reg dmc_meta_resp_accept; |
| 123 | |
| 124 | // NIU Internal Response Interface |
| 125 | input Port0_TXC_DMC_Resp_Accept; |
| 126 | input Port1_TXC_DMC_Resp_Accept; |
| 127 | input Port2_TXC_DMC_Resp_Accept; |
| 128 | input Port3_TXC_DMC_Resp_Accept; |
| 129 | |
| 130 | output DMC_TXC_Resp_Rdy; |
| 131 | output DMC_TXC_Resp_Complete; |
| 132 | output DMC_TXC_Trans_Complete; |
| 133 | output DMC_TXC_Resp_Data_Valid; |
| 134 | output DMC_TXC_Resp_Client; |
| 135 | output [1:0] DMC_TXC_Resp_Port_Num; |
| 136 | output [3:0] DMC_TXC_Resp_Cmd_Status; |
| 137 | output [3:0] DMC_TXC_Resp_Data_Status; |
| 138 | output [4:0] DMC_TXC_Resp_DMA_Num; |
| 139 | output [5:0] DMC_TXC_Resp_TransID; |
| 140 | output [7:0] DMC_TXC_Resp_Cmd; |
| 141 | output [13:0] DMC_TXC_Resp_Data_Length; |
| 142 | output [15:0] DMC_TXC_Resp_ByteEnables; |
| 143 | output [63:0] DMC_TXC_Resp_Address; |
| 144 | output [127:0] DMC_TXC_Resp_Data; |
| 145 | |
| 146 | reg DMC_TXC_Resp_Data_Valid; |
| 147 | reg [3:0] DMC_TXC_Resp_Data_Status; |
| 148 | reg [13:0] DMC_TXC_Resp_Data_Length; |
| 149 | reg [15:0] DMC_TXC_Resp_ByteEnables; |
| 150 | reg [127:0] DMC_TXC_Resp_Data; |
| 151 | |
| 152 | /*--------------------------------------------------------------*/ |
| 153 | // Reg & Wires |
| 154 | /*--------------------------------------------------------------*/ |
| 155 | |
| 156 | /*--------------------------------------------------------------*/ |
| 157 | // Assigns CMD Phase |
| 158 | /*--------------------------------------------------------------*/ |
| 159 | assign DMC_TXC_Resp_Rdy = meta_dmc_resp_ready; |
| 160 | assign DMC_TXC_Resp_Complete = meta_dmc_resp_complete; |
| 161 | assign DMC_TXC_Trans_Complete = meta_dmc_resp_transfer_cmpl; |
| 162 | assign DMC_TXC_Resp_Client = meta_dmc_resp_client; |
| 163 | assign DMC_TXC_Resp_Port_Num = meta_dmc_resp_port_num; |
| 164 | assign DMC_TXC_Resp_Cmd_Status = meta_dmc_resp_cmd_status; |
| 165 | assign DMC_TXC_Resp_DMA_Num = meta_dmc_resp_dma_num; |
| 166 | assign DMC_TXC_Resp_TransID = meta_dmc_resp_transID; |
| 167 | assign DMC_TXC_Resp_Cmd = meta_dmc_resp_cmd; |
| 168 | assign DMC_TXC_Resp_Address = meta_dmc_resp_address; |
| 169 | |
| 170 | |
| 171 | /*--------------------------------------------------------------*/ |
| 172 | // Logic Cmd Phase |
| 173 | /*--------------------------------------------------------------*/ |
| 174 | always @(posedge SysClk) |
| 175 | if (!Reset_L) |
| 176 | dmc_meta_resp_accept <= #`SD 1'b0; |
| 177 | else |
| 178 | dmc_meta_resp_accept <= #`SD (Port3_TXC_DMC_Resp_Accept |
| 179 | | |
| 180 | Port2_TXC_DMC_Resp_Accept |
| 181 | | |
| 182 | Port1_TXC_DMC_Resp_Accept |
| 183 | | |
| 184 | Port0_TXC_DMC_Resp_Accept); |
| 185 | |
| 186 | /*--------------------------------------------------------------*/ |
| 187 | // Logic Data Phase |
| 188 | /*--------------------------------------------------------------*/ |
| 189 | always @(posedge SysClk) |
| 190 | if (!Reset_L) DMC_TXC_Resp_Data_Valid <= #`SD 1'b0; |
| 191 | else DMC_TXC_Resp_Data_Valid <= #`SD meta_dmc_data_valid; |
| 192 | |
| 193 | always @(posedge SysClk) |
| 194 | if (!Reset_L) DMC_TXC_Resp_Data_Status <= #`SD 4'h0; |
| 195 | else DMC_TXC_Resp_Data_Status <= #`SD meta_dmc_resp_data_status; |
| 196 | |
| 197 | always @(posedge SysClk) |
| 198 | if (!Reset_L) DMC_TXC_Resp_Data_Length <= #`SD 14'h0; |
| 199 | else DMC_TXC_Resp_Data_Length <= #`SD meta_dmc_resp_length; |
| 200 | |
| 201 | always @(posedge SysClk) |
| 202 | if (!Reset_L) DMC_TXC_Resp_ByteEnables <= #`SD 16'h0; |
| 203 | else DMC_TXC_Resp_ByteEnables <= #`SD meta_dmc_resp_byteenable; |
| 204 | |
| 205 | always @(posedge SysClk) |
| 206 | if (!Reset_L) DMC_TXC_Resp_Data <= #`SD 128'h0; |
| 207 | else DMC_TXC_Resp_Data <= #`SD meta_dmc_data; |
| 208 | |
| 209 | endmodule |