Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

66AK2G12: potential issue for BWADJ bit-field in DDR3APLLCTL0 and DDR3APLLCTL1 in default GEL file

$
0
0

Part Number:66AK2G12

Hi,

The default gel file configures BWAJ for DDR3L PLL as below:

ddr3A_setup_1066(int ECC_Enable, int DUAL_RANK){
	unsigned int multiplier = 155;
	unsigned int divider = 0;
	unsigned int OD_val = 14;

	int temp,i;
	int delay = 2000;
	
	KICK0 = 0x83E70B13;
	KICK1 = 0x95A4F1E0;

	// Poll for IDONE=1 in the PHY General Status Register 0 (address offset 0x010).
	do {
		read_val = DDR3A_PGSR0;
	} while ((read_val&0x00000001) != 0x00000001);

	//	Clocks are enabled and frequency is stable---------------------------------------
		
	//DDR3A PLL setup
	GEL_TextOut ( "DDR3 PLL Setup ... \n");
    //DDR3APLLCTL0 = DDR3APLLCTL0 & 0xFF7FFFFF;
	//	Set ENSAT = 1
	DDR3APLLCTL1 |= 0x00000040;
	// Put the PLL in PLL Mode  
	DDR3APLLCTL0 |= 0x00800000;
	
	// Program the necessary multipliers/dividers and BW adjustments            
    // Set the divider values 
	DDR3APLLCTL0 &= ~(0x0000003F);
	DDR3APLLCTL0 |= (divider & 0x0000003F);
	
    // Program OD[3:0] in the SECCTL register            
    DDR3APLLCTL0 &= OUTPUT_DIVIDE_MASK;  // clear the OD bit field
    DDR3APLLCTL0 |= ~OUTPUT_DIVIDE_MASK & (OD_val - 1) << OUTPUT_DIVIDE_OFFSET;  // set the OD[3:0] bit field of PLLD to OD_val    

	// Set the Multipler values 
	DDR3APLLCTL0 &= ~(0x0007FFC0);
	DDR3APLLCTL0 |= ((multiplier << 6) & 0x0007FFC0 );
	temp = ((multiplier + 1) >> 1) - 1;
	DDR3APLLCTL0 &= ~(0xFF000000); 
	DDR3APLLCTL0 |= ((temp << 24) & 0xFF000000);
	DDR3APLLCTL1 &= ~(0x0000000F);
	DDR3APLLCTL1 |= ((temp >> 8) & 0x0000000F);
        ...
        ...
        ...

As you see, BWADJ bit-field is originated from the PLLM configuration. That should be basically half of PLLM, but not that if it is odd value, the fractional part should be round down (ex. If PLLM = 15, then BWADJ = 7). We have ddr3A_setup_1066 and ddr3A_setup_800 routine in gel scripts and these default configuration seems OK. However, if users would like to change the above multiplier value for their test, say, changing from 155 to 154, BWADJ should be still 77 for both multipliers, but problem is that it can be 76 in case of multiplier=154. This is because the following formula is not correct:

 

temp = ((multiplier + 1) >> 1) - 1;

What do you think ? I posted about the another potential issue in gel file and you agreed with my point (see the related post).  If you plan to revise the gel file in the future release, please fix this issue also if you agree.

Best Regards,
NK  


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>