External Memory Interfaces (EMIF) IP User Guide: Agilex™ 3 FPGAs and SoCs

ID 847458
Date 4/24/2025
Public
Document Table of Contents

3.3.1.4. Example: DQ Pin Swizzling Within DQS Group for 2 Channel x16 LPDDR4 Interface

This example uses the lane placement of the following table for a two-channel x16 LPDD4 interface.

Table 21.  Lane Placement for a 2-Cchannel x16 LPDDR4 Interface
Lane Number BL0 BL1 BL2 BL3 BL4 BL5 BL6 BL7
Default placement wDQ[0] wDQ[1] wAC0 wAC[1] sAC0 sAC[1] sDQ[0] sDQ[1]

The operation for pin swizzling and byte swizzling for two-channel design is similar to single-channel design. The definitions for channel 0 and channel 1 are as shown below:

Table 22.  Channel 0 and Channel 1
  Channel 0 Channel 1
Pin Swizzle PIN_SWIZZLE_CH0_DQS0 PIN_SWIZZLE_CH0_DQS1 PIN_SWIZZLE_CH1_DQS0 PIN_SWIZZLE_CH1_DQS1
Byte Swizzle BYTE_SWIZZLE_CH0 BYTE_SWIZZLE_CH1
Table 23.  Example of Swizzling DQ pin in Channel 1 BL0 ( DQS Group 0)
Lane Pin Index LPDDR4 x32 (Default placement) After Swizzling/Swapping
BL6 83 MEM_DQ[7] MEM_DQ[6]
82 MEM_DQ[6] MEM_DQ[7]
9 MEM_DQ[5] MEM_DQ[4]
8 MEM_DQ[4] MEM_DQ[5]
7    
6 MEM_DMI[0] MEM_DMI[0]
5 MEM_DQS_C[0] MEM_DQS_C[0]
4 MEM_DQS_T[0] MEM_DQS_T[0]
3 MEM_DQ[3] MEM_DQ[0]
2 MEM_DQ[2] MEM_DQ[1]
1 MEM_DQ[1] MEM_DQ[2]
0 MEM_DQ[0] MEM_DQ[3]

To achieve this swizzling in DQS group 0 for channel 1, you must enter PIN_SWIZZLE_CH1_DQS0=1,2,3,0,4,5,7,6; in the Pin Swizzle Map under the PHY section in the External Memory Interfaces IP parameter editor.

Figure 14. Entering a PIN_SWIZZLE Specification for Channel 1 DQS0 in a Dual-Channel x16 Design