* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: txc_defines.h
* Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
* 4150 Network Circle, Santa Clara, California 95054, U.S.A.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* For the avoidance of doubt, and except that if any non-GPL license
* choice is available it will apply instead, Sun elects to use only
* the General Public License version 2 (GPLv2) at this time for any
* software where a choice of GPL license versions is made
* available with the language indicating that GPLv2 or any later version
* may be used, or where a choice of which version of the GPL is applied is
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* ========== Copyright Header End ============================================
/********************************************************************* *
* Txc Defines Header Include File
* Orignal Author(s) Rahoul Puri
* Copyright (c) 2004 Sun Microsystems, Inc.
* This verilog model is the confidential and proprietary property of
* Sun Microsystems, Inc., and the possession or use of this model
* requires a written license from Sun Microsystems, Inc.
**********************************************************************/
/*--------------------------------------------------------------*/
// SD - Synchronous Delay
// AD - Asynchronous Delay
/*--------------------------------------------------------------*/
/*--------------------------------------------------------------*/
/*--------------------------------------------------------------*/
`define FIFO_SIZE_1024
11'd1024
`define FIFO_SIZE_1024_MINUS_1
11'd1023
`define FIFO_SIZE_640
11'd640
`define FIFO_SIZE_640_MINUS_1
11'd639
/*--------------------------------------------------------------*/
/*--------------------------------------------------------------*/
/*--------------------------------------------------------------*/
// TX Control Header defines
/*--------------------------------------------------------------*/
`define CKSUM_EN_PKT_TYPE
63:62
`define LLC_SNAP_PACKET
57
`define TOT_XFER_LENGTH
29:16
`define ETHERNET_PKT
2'b00
`define LLC_SNAP_ONLY
2'b10
`define LLC_SNAP_PLUS_VLAN
2'b11
//`define IPV4_HEADER_CHECKSUM 60
//`define LAYER4_PROTOCOL 59:58
//`define LAYER4_CRC_32C 57
/*--------------------------------------------------------------*/
/*--------------------------------------------------------------*/
`define OFFSET_THREE
3'h3
`define OFFSET_SEVEN
3'h7
/*--------------------------------------------------------------*/
/*--------------------------------------------------------------*/
`define SHIFT_ZERO_BYTE
16'bxxxx_xxxx_xxxx_xxx1
`define SHIFT_ONE_BYTE
16'bxxxx_xxxx_xxxx_xx10
`define SHIFT_TWO_BYTES
16'bxxxx_xxxx_xxxx_x100
`define SHIFT_THREE_BYTES
16'bxxxx_xxxx_xxxx_1000
`define SHIFT_FOUR_BYTES
16'bxxxx_xxxx_xxx1_0000
`define SHIFT_FIVE_BYTES
16'bxxxx_xxxx_xx10_0000
`define SHIFT_SIX_BYTES
16'bxxxx_xxxx_x100_0000
`define SHIFT_SEVEN_BYTES
16'bxxxx_xxxx_1000_0000
`define SHIFT_EIGHT_BYTES
16'bxxxx_xxx1_0000_0000
`define SHIFT_NINE_BYTES
16'bxxxx_xx10_0000_0000
`define SHIFT_TEN_BYTES
16'bxxxx_x100_0000_0000
`define SHIFT_ELEVEN_BYTES
16'bxxxx_1000_0000_0000
`define SHIFT_TWELVE_BYTES
16'bxxx1_0000_0000_0000
`define SHIFT_THIRTEEN_BYTES
16'bxx10_0000_0000_0000
`define SHIFT_FOURTEEN_BYTES
16'bx100_0000_0000_0000
`define SHIFT_FIFTEEN_BYTES
16'b1000_0000_0000_0000
/*--------------------------------------------------------------*/
/*--------------------------------------------------------------*/
`define RESPONSE_WITH_DATA
8'h05
`define RESPONSE_NO_DATA
8'h06
`define RESPONSE_TIMEOUT
4'hF
`define RESPONSE_GOOD
4'h0
/*--------------------------------------------------------------*/
/*--------------------------------------------------------------*/
`define TXC_MEM_READ_ORDERED_64
8'b0001_1000
`define TXC_MEM_READ_ORDERED_32
8'b0001_0000
`define TXC_MEM_READ_BYPASS_64
8'b0000_1000
`define TXC_MEM_READ_BYPASS_32
8'b0000_0000
`define TXC_MEM_WRITE_POSTED
8'b0010_0001
`define TXC_MEM_WRITE_ORDERED
8'b0001_0001
`define TXC_MEM_WRITE_BYPASS
8'b0000_1001
`define TXC_COMP_READ
8'b0000_0100
`define TXC_COMP_WRITE_POSTED
8'b0010_0101
`define TXC_COMP_WRITE_ORDERED
8'b0001_0101
`define TXC_COMP_WRITE_BYPASS
8'b0000_1101
/*--------------------------------------------------------------*/
/*--------------------------------------------------------------*/
`define DMA_CHANNEL_ZERO
5'd0
`define DMA_CHANNEL_ONE
5'd1
`define DMA_CHANNEL_TWO
5'd2
`define DMA_CHANNEL_THREE
5'd3
`define DMA_CHANNEL_FOUR
5'd4
`define DMA_CHANNEL_FIVE
5'd5
`define DMA_CHANNEL_SIX
5'd6
`define DMA_CHANNEL_SEVEN
5'd7
`define DMA_CHANNEL_EIGHT
5'd8
`define DMA_CHANNEL_NINE
5'd9
`define DMA_CHANNEL_TEN
5'd10
`define DMA_CHANNEL_ELEVEN
5'd11
`define DMA_CHANNEL_TWELVE
5'd12
`define DMA_CHANNEL_THIRTEEN
5'd13
`define DMA_CHANNEL_FOURTEEN
5'd14
`define DMA_CHANNEL_FIFTEEN
5'd15
`define DMA_CHANNEL_SIXTEEN
5'd16
`define DMA_CHANNEL_SEVENTEEN
5'd17
`define DMA_CHANNEL_EIGHTEEN
5'd18
`define DMA_CHANNEL_NINETEEN
5'd19
`define DMA_CHANNEL_TWENTY
5'd20
`define DMA_CHANNEL_TWENTYONE
5'd21
`define DMA_CHANNEL_TWENTYTWO
5'd22
`define DMA_CHANNEL_TWENTYTHREE
5'd23
`define DMA_CHANNEL_TWENTYFOUR
5'd24
`define DMA_CHANNEL_TWENTYFIVE
5'd25
`define DMA_CHANNEL_TWENTYSIX
5'd26
`define DMA_CHANNEL_TWENTYSEVEN
5'd27
`define DMA_CHANNEL_TWENTYEIGHT
5'd28
`define DMA_CHANNEL_TWENTYNINE
5'd29
`define DMA_CHANNEL_THIRTY
5'd30
`define DMA_CHANNEL_THIRTYONE
5'd31
/*--------------------------------------------------------------*/
/*--------------------------------------------------------------*/
`define TID_THIRTEEN
5'd13
`define TID_FOURTEEN
5'd14
`define TID_FIFTEEN
5'd15
`define TID_SIXTEEN
5'd16
`define TID_SEVENTEEN
5'd17
`define TID_EIGHTEEN
5'd18
`define TID_NINETEEN
5'd19
`define TID_TWENTYONE
5'd21
`define TID_TWENTYTWO
5'd22
`define TID_TWENTYTHREE
5'd23
`define TID_TWENTYFOUR
5'd24
`define TID_TWENTYFIVE
5'd25
`define TID_TWENTYSIX
5'd26
`define TID_TWENTYSEVEN
5'd27
`define TID_TWENTYEIGHT
5'd28
`define TID_TWENTYNINE
5'd29
`define TID_THIRTYONE
5'd31
/*--------------------------------------------------------------*/
// Reorder ff Data Out Field
/*--------------------------------------------------------------*/
`define ROFF_PKTDATA_ECC
151:136
`define ROFF_RESERVED
153
`define ROFF_BYTEOFFSET
134:130
`define ROFF_PKTDATA
127:0
`define CTRLHDR_STARTPKT_PAD
2:0
/*--------------------------------------------------------------*/
// Little Endian byte reference
/*--------------------------------------------------------------*/
`define TXC_B15_B2
127:16
`define TXC_B15_B3
127:24
`define TXC_B15_B4
127:32
`define TXC_B15_B5
127:40
`define TXC_B15_B6
127:48
`define TXC_B15_B7
127:56
`define TXC_B15_B8
127:64
`define TXC_B15_B9
127:72
`define TXC_B15_B10
127:80
`define TXC_B15_B11
127:88
`define TXC_B15_B12
127:96
`define TXC_B15_B13
127:104
`define TXC_B15_B14
127:112
/*--------------------------------------------------------------*/
// Debug Port Select Defines
/*--------------------------------------------------------------*/
`define DATA_FETCH_ENGINE
6'h00
`define PORT0_ENGINE
6'h01
`define PORT0_CKSUM
6'h02
`define PORT1_ENGINE
6'h04
`define PORT1_CKSUM
6'h05
`define PORT2_ENGINE
6'h07
`define PORT2_CKSUM
6'h08
`define PORT3_ENGINE
6'h0A
`define PORT3_CKSUM
6'h0B
`define TRAINING_SET
6'h3E
`define TRAINING_LOAD
6'h3F