* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: niu_zcp.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 ============================================
/*****************************************************************
* Copyright (c) 2020, Sun Microsystems, Inc.
* Sun Proprietary and Confidential
****************************************************************/
`define RSP_DAT_ERR
2'b11
`define CML_WO_DATA
3'b110
/* ----- start copy from xmac.h ----- */
`define DBUG_W_SUB1 `DBUG_W
- 1
`define DBUG_R `DBUG_W_SUB1
:0
/* ----- start copy from xmac.h ----- */
/* ----- end copy from xmac.h ----- */
/**********************************
********* Zero copy stuff ********
**********************************/
`define TCP_SEQ_SPACE
31:0
`define XPAN_TCP_SEQ_SPACE
32:0
// ----- zcp ififo -----------------------------------------
`define IFIFO_W_SUB1 `IFIFO_W
- 1
`define IFIFO_W_R `IFIFO_W_SUB1
:0
`define IFIFO_A_SUB1 `IFIFO_A
- 1
`define IFIFO_A_R `IFIFO_A_SUB1
:0
`define IFIFO_PTR `IFIFO_A
:0
`define IFIFO_A_ADD1 `IFIFO_A
+1
`define IFIFO_D_SUB1 `IFIFO_D
-1
`define IFIFO_D_R `IFIFO_D_SUB1
:0
// ----- start of REQ RSP FIFO area -------------------------
// --reqfifo address and depth--
`define REQFIFO_W_SUB1 `REQFIFO_W
- 1
`define REQFIFO_W_R `REQFIFO_W_SUB1
:0
`define REQFIFO_W_ECC `REQFIFO_W
+8
`define REQFIFO_W_ECC_SUB1 `REQFIFO_W_ECC
- 1
`define REQFIFO_W_ECC_R `REQFIFO_W_ECC_SUB1
:0
// --rrfifo address and depth--
`define RRFIFO_W_SUB1 `RRFIFO_W
- 1
`define RRFIFO_W_R `RRFIFO_W_SUB1
:0
`define RRFIFO_W_ECC `RRFIFO_W
+ 7
`define RRFIFO_W_ECC_SUB1 `RRFIFO_W_ECC
- 1
`define RRFIFO_W_ECC_R `RRFIFO_W_ECC_SUB1
:0
// --rspfifo address and depth--
`define RSPFIFO_W_SUB1 `RSPFIFO_W
- 1
`define RSPFIFO_W_R `RSPFIFO_W_SUB1
:0
`define RSPFIFO_W_ECC
1152
`define RSPFIFO_W_ECC_SUB1 `RSPFIFO_W_ECC
- 1
`define RSPFIFO_W_ECC_R `RSPFIFO_W_ECC_SUB1
:0
// --sftfifo address and depth--
`define SFTFIFO_W_SUB1 `SFTFIFO_W
- 1
`define SFTFIFO_W_R `SFTFIFO_W_SUB1
:0
`define SFTFIFO_W_ECC `SFTFIFO_W
+ 8
`define SFTFIFO_W_ECC_SUB1 `SFTFIFO_W_ECC
- 1
`define SFTFIFO_W_ECC_R `SFTFIFO_W_ECC_SUB1
:0
// --va common section for all req and response fifo --
`define VAFIFO_A_SUB1 `VAFIFO_A
- 1
`define VAFIFO_A_R `VAFIFO_A_SUB1
:0
`define VAFIFO_A_PTR `VAFIFO_A
:0
`define VAFIFO_A_ADD1 `VAFIFO_A
+1
`define VAFIFO_D_SUB1 `VAFIFO_D
-1
`define VAFIFO_D_R `VAFIFO_D_SUB1
:0
// ----- end of REQ RSP FIFO area -------------------------
// ----- cfifo ---------------------------------------------
`define CFIFO_W_SUB1 `CFIFO_W
- 1
`define CFIFO_W_SUB2 `CFIFO_W
- 2
`define CFIFO_W_R `CFIFO_W_SUB1
:0
// --cfifo with ECC width--
`define CFIFO_W_ECC `CFIFO_W
+ 16
`define CFIFO_W_ECC_SUB1 `CFIFO_W_ECC
- 1
`define CFIFO_W_ECC_SUB2 `CFIFO_W_ECC
- 2
`define CFIFO_W_ECC_R `CFIFO_W_ECC_SUB1
:0
// --cfifo address and depth--
`define CFIFO_D2K
12'd1664
`define CFIFO_D2K_SUB1 `CFIFO_D2K
- 12'd01
`define CFIFO_A11_PTR `CFIFO_A11
:0
`define CFIFO_A11_ADD1 `CFIFO_A11
+1
`define CFIFO_D1K
11'd832
`define CFIFO_D1K_SUB1 `CFIFO_D1K
- 11'd01
`define CFIFO_A10_PTR `CFIFO_A10
:0
`define CFIFO_A10_ADD1 `CFIFO_A10
+1
`define THRESHOLD_A10
10'd1000
`define CFIFO_D512
10'd512
`define CFIFO_A9_PTR `CFIFO_A9
:0
`define CFIFO_A9_ADD1 `CFIFO_A9
+1
// ----- tt word ---------------------------------------------
// ----- va_ram ---------------------------------------------
`define VA_W_SUB1 `VA_W
-1
`define VA_R `VA_W_SUB1
:0
`define VA_PW_SUB1 `VA_PW
-1
`define VA_PR `VA_PW_SUB1
:0
// ----- dn_ram ---------------------------------------------
`define DN_W_SUB1 `DN_W
-1
`define DN_R `DN_W_SUB1
:0
`define DN_PW_SUB1 `DN_PW
-1
`define DN_PR `DN_PW_SUB1
:0
// ----- st_ram ---------------------------------------------
`define ST_W_SUB1 `ST_W
-1
`define ST_R `ST_W_SUB1
:0
`define ST_PW_SUB1 `ST_PW
-1
`define ST_PR `ST_PW_SUB1
:0
// ----- dmaw -----------------------------------------------
`define DMA_W_SUB1 `DMA_W
-1
`define DMA_R `DMA_W_SUB1
:0
// ----- header field definition ---------------------------
// ----- Big Endian, byte definition -----------------
`define BMSB11 `BMSB10
-8
`define BMSB12 `BMSB11
-8
`define BMSB13 `BMSB12
-8
`define BMSB14 `BMSB13
-8
`define BMSB15 `BMSB14
-8
`define BMSB16 `BMSB15
-8
`define BMSB17 `BMSB16
-8
`define BMSB18 `BMSB17
-8
`define BMSB19 `BMSB18
-8
`define BMSB20 `BMSB19
-8
`define BMSB21 `BMSB20
-8
`define BMSB22 `BMSB21
-8
`define BMSB23 `BMSB22
-8
`define BMSB24 `BMSB23
-8
`define BMSB25 `BMSB24
-8
`define BMSB26 `BMSB25
-8
`define BMSB27 `BMSB26
-8
`define BMSB28 `BMSB27
-8
`define BMSB29 `BMSB28
-8
`define BMSB30 `BMSB29
-8
`define BMSB31 `BMSB30
-8
`define BMSB32 `BMSB31
-8
`define BMSB33 `BMSB32
-8
`define BMSB34 `BMSB33
-8
`define BMSB35 `BMSB34
-8
`define BMSB36 `BMSB35
-8
`define BMSB37 `BMSB36
-8
`define BMSB38 `BMSB37
-8
`define BMSB39 `BMSB38
-8
`define BMSB40 `BMSB39
-8
`define BMSB41 `BMSB40
-8
`define BMSB42 `BMSB41
-8
`define BMSB43 `BMSB42
-8
`define BMSB44 `BMSB43
-8
`define BMSB45 `BMSB44
-8
`define BMSB46 `BMSB45
-8
`define BMSB47 `BMSB46
-8
`define BMSB48 `BMSB47
-8
`define BMSB49 `BMSB48
-8
`define BMSB50 `BMSB49
-8
`define BMSB51 `BMSB50
-8
`define BMSB52 `BMSB51
-8
`define BMSB53 `BMSB52
-8
`define BMSB54 `BMSB53
-8
`define BMSB55 `BMSB54
-8
`define BMSB56 `BMSB55
-8
`define BMSB57 `BMSB56
-8
`define BMSB58 `BMSB57
-8
`define BMSB59 `BMSB58
-8
`define BMSB60 `BMSB59
-8
`define BMSB61 `BMSB60
-8
`define BMSB62 `BMSB61
-8
`define BMSB63 `BMSB62
-8
`define BLSB10 `BMSB10
-7
`define BLSB11 `BMSB11
-7
`define BLSB12 `BMSB12
-7
`define BLSB13 `BMSB13
-7
`define BLSB14 `BMSB14
-7
`define BLSB15 `BMSB15
-7
`define BLSB16 `BMSB16
-7
`define BLSB17 `BMSB17
-7
`define BLSB18 `BMSB18
-7
`define BLSB19 `BMSB19
-7
`define BLSB20 `BMSB20
-7
`define BLSB21 `BMSB21
-7
`define BLSB22 `BMSB22
-7
`define BLSB23 `BMSB23
-7
`define BLSB24 `BMSB24
-7
`define BLSB25 `BMSB25
-7
`define BLSB26 `BMSB26
-7
`define BLSB27 `BMSB27
-7
`define BLSB28 `BMSB28
-7
`define BLSB29 `BMSB29
-7
`define BLSB30 `BMSB30
-7
`define BLSB31 `BMSB31
-7
`define BLSB32 `BMSB32
-7
`define BLSB33 `BMSB33
-7
`define BLSB34 `BMSB34
-7
`define BLSB35 `BMSB35
-7
`define BLSB36 `BMSB36
-7
`define BLSB37 `BMSB37
-7
`define BLSB38 `BMSB38
-7
`define BLSB39 `BMSB39
-7
`define BLSB40 `BMSB40
-7
`define BLSB41 `BMSB41
-7
`define BLSB42 `BMSB42
-7
`define BLSB43 `BMSB43
-7
`define BLSB44 `BMSB44
-7
`define BLSB45 `BMSB45
-7
`define BLSB46 `BMSB46
-7
`define BLSB47 `BMSB47
-7
`define BLSB48 `BMSB48
-7
`define BLSB49 `BMSB49
-7
`define BLSB50 `BMSB50
-7
`define BLSB51 `BMSB51
-7
`define BLSB52 `BMSB52
-7
`define BLSB53 `BMSB53
-7
`define BLSB54 `BMSB54
-7
`define BLSB55 `BMSB55
-7
`define BLSB56 `BMSB56
-7
`define BLSB57 `BMSB57
-7
`define BLSB58 `BMSB58
-7
`define BLSB59 `BMSB59
-7
`define BLSB60 `BMSB60
-7
`define BLSB61 `BMSB61
-7
`define BLSB62 `BMSB62
-7
`define BLSB63 `BMSB63
-7
`define BBYTE0 `BMSB0
: `BLSB0
`define BBYTE1 `BMSB1
: `BLSB1
`define BBYTE2 `BMSB2
: `BLSB2
`define BBYTE3 `BMSB3
: `BLSB3
`define BBYTE4 `BMSB4
: `BLSB4
`define BBYTE5 `BMSB5
: `BLSB5
`define BBYTE6 `BMSB6
: `BLSB6
`define BBYTE7 `BMSB7
: `BLSB7
`define BBYTE8 `BMSB8
: `BLSB8
`define BBYTE9 `BMSB9
: `BLSB9
`define BBYTE10 `BMSB10
: `BLSB10
`define BBYTE11 `BMSB11
: `BLSB11
`define BBYTE12 `BMSB12
: `BLSB12
`define BBYTE13 `BMSB13
: `BLSB13
`define BBYTE14 `BMSB14
: `BLSB14
`define BBYTE15 `BMSB15
: `BLSB15
`define BBYTE16 `BMSB16
: `BLSB16
`define BBYTE17 `BMSB17
: `BLSB17
`define BBYTE18 `BMSB18
: `BLSB18
`define BBYTE19 `BMSB19
: `BLSB19
`define BBYTE20 `BMSB20
: `BLSB20
`define BBYTE21 `BMSB21
: `BLSB21
`define BBYTE22 `BMSB22
: `BLSB22
`define BBYTE23 `BMSB23
: `BLSB23
`define BBYTE24 `BMSB24
: `BLSB24
`define BBYTE25 `BMSB25
: `BLSB25
`define BBYTE26 `BMSB26
: `BLSB26
`define BBYTE27 `BMSB27
: `BLSB27
`define BBYTE28 `BMSB28
: `BLSB28
`define BBYTE29 `BMSB29
: `BLSB29
`define BBYTE30 `BMSB30
: `BLSB30
`define BBYTE31 `BMSB31
: `BLSB31
//////////////////////////////////////////////////////
// ----- page handle definition -- its a 20 bit bus --
// ----- little endian -------------------------------
// ----- Winfifo calculation definition --------------------
`define WIN2_PTR `WIN2_MSB
: 0
`define WIN2_MSB_SUB_1 `WIN2_MSB
- 1
`define WIN2_A `WIN2_MSB_SUB_1
: 0
`define WIN3_PTR `WIN3_MSB
: 0
`define WIN3_MSB_SUB_1 `WIN3_MSB
- 1
`define WIN3_A `WIN3_MSB_SUB_1
: 0
`define WIN4_PTR `WIN4_MSB
: 0
`define WIN4_MSB_SUB_1 `WIN4_MSB
- 1
`define WIN4_A `WIN4_MSB_SUB_1
: 0
`define WIN5_PTR `WIN5_MSB
: 0
`define WIN5_MSB_SUB_1 `WIN5_MSB
- 1
`define WIN5_A `WIN5_MSB_SUB_1
: 0
// ----- HoQ calculation definition ------------------------
`define HOQ3_PTR `HOQ3_MSB
: 0
`define HOQ3_MSB_SUB_1 `HOQ3_MSB
- 1
`define HOQ3_A `HOQ3_MSB_SUB_1
: 0
`define HOQ3_MSB_ADD_1 `HOQ3_MSB
+ 1
`define HOQ4_PTR `HOQ4_MSB
: 0
`define HOQ4_MSB_SUB_1 `HOQ4_MSB
- 1
`define HOQ4_A `HOQ4_MSB_SUB_1
: 0
`define HOQ4_MSB_ADD_1 `HOQ4_MSB
+ 1
`define HOQ5_PTR `HOQ5_MSB
: 0
`define HOQ5_MSB_SUB_1 `HOQ5_MSB
- 1
`define HOQ5_A `HOQ5_MSB_SUB_1
: 0
`define HOQ5_MSB_ADD_1 `HOQ5_MSB
+ 1
`define HOQ6_PTR `HOQ6_MSB
: 0
`define HOQ6_MSB_SUB_1 `HOQ6_MSB
- 1
`define HOQ6_A `HOQ6_MSB_SUB_1
: 0
`define HOQ6_MSB_ADD_1 `HOQ6_MSB
+ 1
`define HOQ7_PTR `HOQ7_MSB
: 0
`define HOQ7_MSB_SUB_1 `HOQ7_MSB
- 1
`define HOQ7_A `HOQ7_MSB_SUB_1
: 0
`define HOQ7_MSB_ADD_1 `HOQ7_MSB
+ 1
`define HOQ8_PTR `HOQ8_MSB
: 0
`define HOQ8_MSB_SUB_1 `HOQ8_MSB
- 1
`define HOQ8_A `HOQ8_MSB_SUB_1
: 0
`define HOQ8_MSB_ADD_1 `HOQ8_MSB
+ 1
`define HOQ9_PTR `HOQ9_MSB
: 0
`define HOQ9_MSB_SUB_1 `HOQ9_MSB
- 1
`define HOQ9_A `HOQ9_MSB_SUB_1
: 0
`define HOQ9_MSB_ADD_1 `HOQ9_MSB
+ 1
`define HOQ10_PTR `HOQ10_MSB
: 0
`define HOQ10_MSB_SUB_1 `HOQ10_MSB
- 1
`define HOQ10_A `HOQ10_MSB_SUB_1
: 0
`define HOQ10_MSB_ADD_1 `HOQ10_MSB
+ 1
`define HOQ10_DD
16'd1024
// ---------- crossing 4KB start from here ----------
`define HoQ_4KB_FLAG_BIT
10
`define HoQ_4KB_FLAG_BIT_ADD_1 `HoQ_4KB_FLAG_BIT
+ 1
`define HoQ_4KB_FLAG_BIT_SUB_1 `HoQ_4KB_FLAG_BIT
- 1
`define HoQ_4KB_A `HoQ_4KB_FLAG_BIT_SUB_1
:0
`define HOQ11_PTR `HOQ11_MSB
: 0
`define HOQ11_MSB_SUB_1 `HOQ11_MSB
- 1
`define HOQ11_A `HOQ11_MSB_SUB_1
: 0
`define HOQ11_MSB_ADD_1 `HOQ11_MSB
+ 1
`define HOQ11_DD
16'd2048
//`define HOQ11_BIT11_UP_A `HOQ11_MSB_SUB_1 : `HoQ_4KB_FLAG_BIT_ADD_1
`define HOQ12_PTR `HOQ12_MSB
: 0
`define HOQ12_MSB_SUB_1 `HOQ12_MSB
- 1
`define HOQ12_A `HOQ12_MSB_SUB_1
: 0
`define HOQ12_MSB_ADD_1 `HOQ12_MSB
+ 1
`define HOQ12_DD
16'd4096
`define HOQ12_BIT11_UP_A `HOQ12_MSB_SUB_1
: `HoQ_4KB_FLAG_BIT_ADD_1
`define HOQ13_PTR `HOQ13_MSB
: 0
`define HOQ13_MSB_SUB_1 `HOQ13_MSB
- 1
`define HOQ13_A `HOQ13_MSB_SUB_1
: 0
`define HOQ13_MSB_ADD_1 `HOQ13_MSB
+ 1
`define HOQ13_DD
16'd8192
`define HOQ13_BIT11_UP_A `HOQ13_MSB_SUB_1
: `HoQ_4KB_FLAG_BIT_ADD_1
`define HOQ14_PTR `HOQ14_MSB
: 0
`define HOQ14_MSB_SUB_1 `HOQ14_MSB
- 1
`define HOQ14_A `HOQ14_MSB_SUB_1
: 0
`define HOQ14_MSB_ADD_1 `HOQ14_MSB
+ 1
`define HOQ14_D
15'd16384
`define HOQ14_DD
16'd16384
`define HOQ14_BIT11_UP_A `HOQ14_MSB_SUB_1
: `HoQ_4KB_FLAG_BIT_ADD_1
`define HOQ15_PTR `HOQ15_MSB
: 0
`define HOQ15_MSB_SUB_1 `HOQ15_MSB
- 1
`define HOQ15_A `HOQ15_MSB_SUB_1
: 0
`define HOQ15_MSB_ADD_1 `HOQ15_MSB
+ 1
`define HOQ15_D
16'd32768
`define HOQ15_DD
16'd32768
`define HOQ15_BIT11_UP_A `HOQ15_MSB_SUB_1
: `HoQ_4KB_FLAG_BIT_ADD_1
// ----- Ring Base calculation definition --------------------
// ----- buffer order definition -----------------------------
// ----- Little Endian -- 32 bit word definition -------
`define VMSW10 `VMSW9
+32
`define VMSW11 `VMSW10
+32
`define VMSW12 `VMSW11
+32
`define VMSW13 `VMSW12
+32
`define VMSW14 `VMSW13
+32
`define VMSW15 `VMSW14
+32
`define VMSW16 `VMSW15
+32
`define VMSW17 `VMSW16
+32
`define VMSW18 `VMSW17
+32
`define VMSW19 `VMSW18
+32
`define VMSW20 `VMSW19
+32
`define VMSW21 `VMSW20
+32
`define VMSW22 `VMSW21
+32
`define VMSW23 `VMSW22
+32
`define VMSW24 `VMSW23
+32
`define VMSW25 `VMSW24
+32
`define VMSW26 `VMSW25
+32
`define VMSW27 `VMSW26
+32
`define VMSW28 `VMSW27
+32
`define VMSW29 `VMSW28
+32
`define VMSW30 `VMSW29
+32
`define VMSW31 `VMSW30
+32
`define VLSW10 `VMSW10
-31
`define VLSW11 `VMSW11
-31
`define VLSW12 `VMSW12
-31
`define VLSW13 `VMSW13
-31
`define VLSW14 `VMSW14
-31
`define VLSW15 `VMSW15
-31
`define VLSW16 `VMSW16
-31
`define VLSW17 `VMSW17
-31
`define VLSW18 `VMSW18
-31
`define VLSW19 `VMSW19
-31
`define VLSW20 `VMSW20
-31
`define VLSW21 `VMSW21
-31
`define VLSW22 `VMSW22
-31
`define VLSW23 `VMSW23
-31
`define VLSW24 `VMSW24
-31
`define VLSW25 `VMSW25
-31
`define VLSW26 `VMSW26
-31
`define VLSW27 `VMSW27
-31
`define VLSW28 `VMSW28
-31
`define VLSW29 `VMSW29
-31
`define VLSW30 `VMSW30
-31
`define VLSW31 `VMSW31
-31
`define BUFF0 `VMSW0
: `VLSW0
`define BUFF1 `VMSW1
: `VLSW1
`define BUFF2 `VMSW2
: `VLSW2
`define BUFF3 `VMSW3
: `VLSW3
`define BUFF4 `VMSW4
: `VLSW4
`define BUFF5 `VMSW5
: `VLSW5
`define BUFF6 `VMSW6
: `VLSW6
`define BUFF7 `VMSW7
: `VLSW7
`define BUFF8 `VMSW8
: `VLSW8
`define BUFF9 `VMSW9
: `VLSW9
`define BUFF10 `VMSW10
: `VLSW10
`define BUFF11 `VMSW11
: `VLSW11
`define BUFF12 `VMSW12
: `VLSW12
`define BUFF13 `VMSW13
: `VLSW13
`define BUFF14 `VMSW14
: `VLSW14
`define BUFF15 `VMSW15
: `VLSW15
`define BUFF16 `VMSW16
: `VLSW16
`define BUFF17 `VMSW17
: `VLSW17
`define BUFF18 `VMSW18
: `VLSW18
`define BUFF19 `VMSW19
: `VLSW19
`define BUFF20 `VMSW20
: `VLSW20
`define BUFF21 `VMSW21
: `VLSW21
`define BUFF22 `VMSW22
: `VLSW22
`define BUFF23 `VMSW23
: `VLSW23
`define BUFF24 `VMSW24
: `VLSW24
`define BUFF25 `VMSW25
: `VLSW25
`define BUFF26 `VMSW26
: `VLSW26
`define BUFF27 `VMSW27
: `VLSW27
`define BUFF28 `VMSW28
: `VLSW28
`define BUFF29 `VMSW29
: `VLSW29
`define BUFF30 `VMSW30
: `VLSW30
`define BUFF31 `VMSW31
: `VLSW31
// ----- Little Endian ---------
// Ram w/o ECC Msb Lsb, Word 0~15
`define RMSW10 `RMSW9
+64
`define RMSW11 `RMSW10
+64
`define RMSW12 `RMSW11
+64
`define RMSW13 `RMSW12
+64
`define RMSW14 `RMSW13
+64
`define RMSW15 `RMSW14
+64
`define RLSW10 `RMSW10
-63
`define RLSW11 `RMSW11
-63
`define RLSW12 `RMSW12
-63
`define RLSW13 `RMSW13
-63
`define RLSW14 `RMSW14
-63
`define RLSW15 `RMSW15
-63
`define RDA0 `RMSW0
: `RLSW0
`define RDA1 `RMSW1
: `RLSW1
`define RDA2 `RMSW2
: `RLSW2
`define RDA3 `RMSW3
: `RLSW3
`define RDA4 `RMSW4
: `RLSW4
`define RDA5 `RMSW5
: `RLSW5
`define RDA6 `RMSW6
: `RLSW6
`define RDA7 `RMSW7
: `RLSW7
`define RDA8 `RMSW8
: `RLSW8
`define RDA9 `RMSW9
: `RLSW9
`define RDA10 `RMSW10
: `RLSW10
`define RDA11 `RMSW11
: `RLSW11
`define RDA12 `RMSW12
: `RLSW12
`define RDA13 `RMSW13
: `RLSW13
`define RDA14 `RMSW14
: `RLSW14
`define RDA15 `RMSW15
: `RLSW15
// ----- Little Endian (for resfifo -----
// SRam w ECC Msb Lsb, Word0~15
`define SMSW10 `SMSW9
+72
`define SMSW11 `SMSW10
+72
`define SMSW12 `SMSW11
+72
`define SMSW13 `SMSW12
+72
`define SMSW14 `SMSW13
+72
`define SMSW15 `SMSW14
+72
`define SLSW10 `SMSW10
-71
`define SLSW11 `SMSW11
-71
`define SLSW12 `SMSW12
-71
`define SLSW13 `SMSW13
-71
`define SLSW14 `SMSW14
-71
`define SLSW15 `SMSW15
-71
`define SDE0 `SMSW0
: `SLSW0
`define SDE1 `SMSW1
: `SLSW1
`define SDE2 `SMSW2
: `SLSW2
`define SDE3 `SMSW3
: `SLSW3
`define SDE4 `SMSW4
: `SLSW4
`define SDE5 `SMSW5
: `SLSW5
`define SDE6 `SMSW6
: `SLSW6
`define SDE7 `SMSW7
: `SLSW7
`define SDE8 `SMSW8
: `SLSW8
`define SDE9 `SMSW9
: `SLSW9
`define SDE10 `SMSW10
: `SLSW10
`define SDE11 `SMSW11
: `SLSW11
`define SDE12 `SMSW12
: `SLSW12
`define SDE13 `SMSW13
: `SLSW13
`define SDE14 `SMSW14
: `SLSW14
`define SDE15 `SMSW15
: `SLSW15
`define ZCP_TRAINING_SET SELECT_VALUE_OF_DEBUG_MUX
`define ZCP_TRAINING_LOAD SELECT_VALUE_OF_DEBUG_MUX
////////////////////////////////////////////////////////////////
`define PIM_24Buffers
16'd24
////////////////////////////////////////////////////////////////