This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320C6678: DDR3 write access issue

Guru 15520 points

Part Number: TMS320C6678

Hi,

My customer are using C6678 and they are having problem at DDR3 write access.
I attached file which the problem are written. Please take a look.

The problem doesn't always occur.
Occasionally occurs when the "board power on" -> write access -> "board power off"
process is repeated.

They are using evm6678_ddr.c which are included in Processor SDK,
and set the value of register calculated from the DDR3 calculation spread sheet which TI provided.

At the moment, we suspect the leveling failure.
At initialization of DDR3, we set initial value to each WRLVL_INIT_RATIO and GTLVL_INIT_RATIO.
My customer are using partial leveling and want to know the WRLVL and GTLVL ratio result value
issued by leveling to comapre with the above initial value.

Are there any registers which we can check the result value of WRLVL and GTLVL ratio?
Also, please let me know if there is anything to check against this problem.

best regards,
g.f.

C6678 DDR3 Write issue.pdf

  • Hi,

    Have you looked at how this is done in the GEL files?

    Best Regards,
    Yordan
  • Hi Yordan,

    Thank you for the reply.
    I will ask my customer if they have tested by GEL file.

    Also, could you give me an answer about following question which I posted previously?
    *************************************************************************************
    Are there any registers which we can check the result value of WRLVL and GTLVL ratio after leveling?
    *************************************************************************************

    best regards,
    g.f.
  • Hi Yordan,

    Our customer have additional question.

    They added some code to reinitialize DDR3 for workaround against this issue.
    The place they added is after write/read data compare test as follow:

    1. DDR3 initialization(include partial leveling).
    2. Write data to DDR3 memory then read the data from DDR3 where the data was written previously.
    3. Compare those write/read data.
    4. If data comparison failed, go back to the step 1 and then reinitialize the DDR3.

    After data comparison failed and then reinitializing the DDR3, the data compare test have passed.
    Are there any problem to reinitialize the DDR3?

    In "KeyStone I DDR3 Initialization" application note page.3,
    it said as follow:
    ////////////////////////////////////////////////////////////////////////
    The DDR3 controller initialization process as defined in this document has been proven to be robust. It is
    meant to be executed once from start to finish. Portions of this sequence cannot be implemented in a
    loop. If a system design requires multiple DDR3 Controller initialization sequences, each initialization
    should follow a device reset.
    ////////////////////////////////////////////////////////////////////////

    So, it seem if reseting the device after data comparison failed,
    it is allowed to reinitialize the DDR3, is it correct?
    If yes, which reset need to be used? Can soft reset be used?

    best regards,
    g.f.
  • Hi,

    The document is correct. DDR initialization should be done once during device boot (in u-boot, ibl/sbl or GEL depending on the use case). After that the OS should be able to use the ddr.

    In your case it seems that the DDR initialization is not successful. I guess you use a custom EVM.
    Did your customer used the Excel spreadsheets to calculate their DDR3 and DDR3PHY register values? You can download the spreadsheets from here:
    www.ti.com/.../getliterature.tsp

    The above link is also listed in the "KeyStone I DDR3 Initialization" application note.

    Best Regards,
    Yordan
  • Hi Yordan,

    Thank you for the reply.

    I'm sorry but I don't understand yet. In the document, it said
    "If a system design requires multiple DDR3 Controller initialization sequences,
    each initialization should follow a device reset.".
    So, I thought DDR3 controller are allowed to be re-initialize after following the device reset.
    And I want to know what kind of reset the document are suggesting.
    If re-initialization are not allowed, what kind of problems can be considered?

    Also, could you give me an answer about following question which I posted previously?
    *************************************************************************************
    Are there any registers which we can check the result value of WRLVL and GTLVL ratio after leveling?
    *************************************************************************************

    And as I said at above post, our customer used the Excel spreadsheets to calculate
    the DDR3 and DDR3 PHY register values.
    And they are referring to DDR3 initialization code which are included in Processor SDK of C6678
    and they are setting the value which have been calculated from the spreadsheets.

    best regards,
    g.f.
  • Hi Yordan,

    I got DDR3 initialization code and Excel Calculation spreadsheet from our customer
    and checked if there are any wrong setting.
    It seems there are no problem in initialization code and spreadsheets,
    but may be I missed looking something so if you don't mind could you check the attach files?

    By the way, they are using Winbond DDR3(W634GU6MB11I).
    www.winbond.com/.../w634gu6mb_a01.pdf
    This DDR3's speed grade are 1833MHz but they refer to parameter of
    1333MHz memory in datasheet and they set those value to the Excel spreadsheet.

    best regard,
    g.f.

    DDR3 PHY Calc v11 for E2E.xlsx

    DDR3 Register Calc v4 for E2E.xlsx

    /******************************************************************************
     * Copyright (c) 2010-2015 Texas Instruments Incorporated - http://www.ti.com
     *
     *  Redistribution and use in source and binary forms, with or without
     *  modification, are permitted provided that the following conditions
     *  are met:
     *
     *    Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     *    Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the
     *    distribution.
     *
     *    Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     *
     *****************************************************************************/
    
    #include <ti/csl/csl_bootcfgAux.h>
    #include <ti/csl/cslr_device.h>
    #include <ti/csl/csl_xmcAux.h>
    #include <ti/csl/csl_emif4fAux.h>
    #include <ti/csl/hw_types.h>
    
    #include "board_internal.h"
    
    extern void BOARD_delay(uint32_t usecs);
    
    static void xmc_add_emif_cfg_region()
    {
        /* mapping for ddr emif registers XMPAX*2 */
        CSL_XMC_XMPAXL    mpaxl;
        CSL_XMC_XMPAXH    mpaxh;
    
        /* base addr + seg size (64KB)*/    //"1B"-->"B" by xj */
        mpaxh.bAddr     = (0x2100000B >> 12);
        mpaxh.segSize   = (0x2100000B & 0x0000001F);
    
        /* replacement addr + perm*/
        mpaxl.rAddr     = 0x100000;
        mpaxl.sr        = 1;
        mpaxl.sw        = 1;
        mpaxl.sx        = 1;
        mpaxl.ur        = 1;
        mpaxl.uw        = 1;
        mpaxl.ux        = 1;
    
        /* set the xmpax for index2 */
        CSL_XMC_setXMPAXH(2, &mpaxh);
        CSL_XMC_setXMPAXL(2, &mpaxl);
    }
    
    /* Set the desired DDR3 configuration -- assumes 66.67 MHz DDR3 clock input */
    Board_STATUS Board_DDR3Init()
    {
        Board_STATUS             status = BOARD_SOK;
        uint32_t                 ddr3config, ddrPhyCtrl;
        uint8_t                  ddrPHYReadLatency;
        EMIF4F_TIMING1_CONFIG    sdram_tim1;
        EMIF4F_TIMING2_CONFIG    sdram_tim2;
        EMIF4F_TIMING3_CONFIG    sdram_tim3;
        EMIF4F_OUTPUT_IMP_CONFIG zqcfg;
        EMIF4F_PWR_MGMT_CONFIG   pwrmgmtcfg;
        EMIF4F_SDRAM_CONFIG      sdramcfg;
    
    	xmc_add_emif_cfg_region();
    
        CSL_BootCfgUnlockKicker();
    
        /**************** 3.3 Leveling Register Configuration ********************/
        CSL_BootCfgGetDDRConfig(0, &ddr3config);
        ddr3config &= ~(0x007FE000);  // clear ctrl_slave_ratio field
        CSL_BootCfgSetDDRConfig(0, ddr3config);
    
        CSL_BootCfgGetDDRConfig(0, &ddr3config);
        ddr3config |= 0x00200000;     // set ctrl_slave_ratio to 0x100
        CSL_BootCfgSetDDRConfig(0, ddr3config);
    
        CSL_BootCfgGetDDRConfig(12, &ddr3config);
        ddr3config |= 0x08000000;    // Set invert_clkout = 1
        CSL_BootCfgSetDDRConfig(12, ddr3config);
    
        CSL_BootCfgGetDDRConfig(0, &ddr3config);
        ddr3config |= 0xF;            // set dll_lock_diff to 15
        CSL_BootCfgSetDDRConfig(0, ddr3config);
    
        CSL_BootCfgGetDDRConfig(23, &ddr3config);
        ddr3config |= 0x00000200;    // See section 4.2.1, set for partial automatic levelling
        CSL_BootCfgSetDDRConfig(23, ddr3config);
    
        /**************** 3.3 Partial Automatic Leveling ********************/
        ddr3config = 0x000000D2;
        CSL_BootCfgSetDDRConfig(2, ddr3config);
        ddr3config = 0x000000CA;
        CSL_BootCfgSetDDRConfig(3, ddr3config);
        ddr3config = 0x000000C9;
        CSL_BootCfgSetDDRConfig(4, ddr3config);
        ddr3config = 0x000000C3;
        CSL_BootCfgSetDDRConfig(5, ddr3config);
        ddr3config = 0x000000AD;
        CSL_BootCfgSetDDRConfig(6, ddr3config);
        ddr3config = 0x000000AF;
        CSL_BootCfgSetDDRConfig(7, ddr3config);
        ddr3config = 0x00000086;
        CSL_BootCfgSetDDRConfig(8, ddr3config);
        ddr3config = 0x0000007C;
        CSL_BootCfgSetDDRConfig(9, ddr3config);
        ddr3config = 0x00000000;
        CSL_BootCfgSetDDRConfig(10, ddr3config);
    
        ddr3config = 0x00000158;
        CSL_BootCfgSetDDRConfig(14, ddr3config);
        ddr3config = 0x00000160;
        CSL_BootCfgSetDDRConfig(15, ddr3config);
        ddr3config = 0x0000012E;
        CSL_BootCfgSetDDRConfig(16, ddr3config);
        ddr3config = 0x00000134;
        CSL_BootCfgSetDDRConfig(17, ddr3config);
        ddr3config = 0x00000117;
        CSL_BootCfgSetDDRConfig(18, ddr3config);
        ddr3config = 0x00000115;
        CSL_BootCfgSetDDRConfig(19, ddr3config);
        ddr3config = 0x0000010B;
        CSL_BootCfgSetDDRConfig(20, ddr3config);
        ddr3config = 0x00000115;
        CSL_BootCfgSetDDRConfig(21, ddr3config);
        ddr3config = 0x00000000;
        CSL_BootCfgSetDDRConfig(22, ddr3config);
    
        /*Do a PHY reset. Toggle DDR_PHY_CTRL_1 bit 15 0->1->0 */
        CSL_EMIF4F_GetPhyControl(&ddrPhyCtrl, &ddrPHYReadLatency);
        ddrPhyCtrl &= ~(0x00008000);
        CSL_EMIF4F_SetPhyControl(ddrPhyCtrl, ddrPHYReadLatency);
    
        CSL_EMIF4F_GetPhyControl(&ddrPhyCtrl, &ddrPHYReadLatency);
        ddrPhyCtrl |= (0x00008000);
        CSL_EMIF4F_SetPhyControl(ddrPhyCtrl, ddrPHYReadLatency);
    
        CSL_EMIF4F_GetPhyControl(&ddrPhyCtrl, &ddrPHYReadLatency);
        ddrPhyCtrl &= ~(0x00008000);
        CSL_EMIF4F_SetPhyControl(ddrPhyCtrl, ddrPHYReadLatency);
    
        /***************** 3.4 Basic Controller and DRAM configuration ************/
        /* enable configuration */
        /*    hEmif->SDRAM_REF_CTRL    = 0x00005161; */
        CSL_EMIF4F_EnableInitRefresh();
        CSL_EMIF4F_SetRefreshRate(0x5161);
    
        /*    hEmif->SDRAM_TIM_1   = 0x1113783C; */
        sdram_tim1.t_wtr    = 0x4;
        sdram_tim1.t_rrd    = 0x7;
        sdram_tim1.t_rc     = 0x20;
        sdram_tim1.t_ras    = 0x17;
        sdram_tim1.t_wr     = 0x9;
        sdram_tim1.t_rcd    = 0x8;
        sdram_tim1.t_rp     = 0x8;
        CSL_EMIF4F_SetTiming1Config(&sdram_tim1);
    
        /*    hEmif->SDRAM_TIM_2   = 0x30B37FE3; */
        sdram_tim2.t_cke    = 0x3;
        sdram_tim2.t_rtp    = 0x4;
        sdram_tim2.t_xsrd   = 0x1FF;
        sdram_tim2.t_xsnr   = 0x0B3;
        sdram_tim2.t_xp     = 0x3;
        sdram_tim2.t_odt    = 0x0;
        CSL_EMIF4F_SetTiming2Config(&sdram_tim2);
    
        /*    hEmif->SDRAM_TIM_3   = 0x559F8ADF; */
        sdram_tim3.t_rasMax     = 0xF;
        sdram_tim3.t_rfc        = 0x0AD;
        sdram_tim3.t_tdqsckmax  = 0;
        sdram_tim3.zq_zqcs      = 0x3F;
        sdram_tim3.t_ckesr      = 4;
        sdram_tim3.t_csta       = 0x5;
        sdram_tim3.t_pdll_ul    = 0x5;
        CSL_EMIF4F_SetTiming3Config(&sdram_tim3);
    
        /*    hEmif->DDR_PHY_CTRL_1   = 0x0010010C; */
        ddrPHYReadLatency       = 0x0C;
        ddrPhyCtrl              = (0x08008);
        CSL_EMIF4F_SetPhyControl(ddrPhyCtrl, ddrPHYReadLatency);
    
        /*    hEmif->ZQ_CONFIG        = 0x70073214; */
        /*    (Calc Value)hEmif->ZQ_CONFIG        = 0x70074019;*/
        zqcfg.zqRefInterval     = 0x3214;
        zqcfg.zqZQCLMult        = 3;
        zqcfg.zqZQCLInterval    = 1;
        zqcfg.zqSFEXITEn        = 1;
        zqcfg.zqDualCSEn        = 1;
        zqcfg.zqCS0En           = 1;
        zqcfg.zqCS1En           = 0;
        CSL_EMIF4F_SetOutputImpedanceConfig(&zqcfg);
    
        /*    hEmif->PWR_MGMT_CTRL    = 0x0; */
        pwrmgmtcfg.csTime       = 0;
        pwrmgmtcfg.srTime       = 0;
        pwrmgmtcfg.lpMode       = 0;
        pwrmgmtcfg.dpdEnable    = 0;
        pwrmgmtcfg.pdTime       = 0;
        CSL_EMIF4F_SetPowerMgmtConfig(&pwrmgmtcfg);
    
        /* New value with DYN_ODT disabled and SDRAM_DRIVE = RZQ/7 */
        /*    hEmif->SDRAM_CONFIG     = 0x63063332; */
        CSL_EMIF4F_GetSDRAMConfig(&sdramcfg);
        sdramcfg.pageSize       = 2;
        sdramcfg.eBank          = 0;
        sdramcfg.iBank          = 3;
        sdramcfg.rowSize        = 6;
        sdramcfg.CASLatency     = 0xC; //-> This should be 0xA for Winbond DDR3(1333Mhz)
        sdramcfg.narrowMode     = 0;
        sdramcfg.CASWriteLat    = 2;
        sdramcfg.SDRAMDrive     = 1;
        sdramcfg.disableDLL     = 0;
        sdramcfg.dynODT         = 0;
        sdramcfg.ddrDDQS        = 0;
        sdramcfg.ddrTerm        = 3;
        sdramcfg.iBankPos       = 0;
        sdramcfg.type           = 3;
        CSL_EMIF4F_SetSDRAMConfig(&sdramcfg);
    
        BOARD_delay(600); /*Wait 600us for HW init to complete*/
    
        /* Refresh rate = (7.8*666MHz] */
        /*    hEmif->SDRAM_REF_CTRL   = 0x00001458;     */
        CSL_EMIF4F_SetRefreshRate(0x00001458);
    
        /***************** 4.2.1 Partial automatic leveling ************/
        /*    hEmif->RDWR_LVL_RMP_CTRL      =  0x80000000; */
        CSL_EMIF4F_SetLevelingRampControlInfo(1, 0, 0, 0, 0);
    
        /* Trigger full leveling - This ignores read DQS leveling result and uses ratio forced value */
        /*    hEmif->RDWR_LVL_CTRL          =  0x80000000; */
        CSL_EMIF4F_SetLevelingControlInfo(1, 0, 0, 0, 0);
    
        /************************************************************
          Wait for min 1048576 DDR clock cycles for leveling to complete
          = 1048576 * 1.5ns = 1572864ns = 1.57ms.
          Actual time = ~10-15 ms
         **************************************************************/
        BOARD_delay(30000); //Wait 3ms for leveling to complete
    
        return status;
    }
    
    

  • g.f.,

    Please refer to the DDR3 interface commissioning wiki:

    where the steps to bring up a DDR3 interface are outlined concisely.  I see the spreadsheets attached to this thread.  However, the length matching report is not provided.  This is the first step and it must be verified.  Please post a length matching report showing that the length matching rules have been met.

    Tom

  • Hi Tom,

    Thank you for the reply.

    I'm sorry that I didn't attach the length matching report.
    By the way, is "length matching report" an excel file(KeyStone DDR3 Length Rules Template v1p0.xlsx)
    attached in the above wiki?

    I'm offering to my customer to fill the length value to the file.
    So, could you please wait for a while?

    best regards,
    g.f.
  • g.f.,

    There are 2 options in the wiki text.  It shows a length report generated by a CAD tool that then was dropped into a spreadsheet so that the calculations could be added.  This is shown in "EVM DDR3 Rules.pdf".  The spreadsheet "KeyStone DDR3 Length Rules Template.xlsx" is a draft tool that can be used where you must manually add the lengths into the existing template.  Either solution is adequate.

    Tom

  • Hi Tom,

    Thank you for the reply.
    I understood.

    I will post the length matching report as soon as I get from my customer,
    but they will be out for summer vacation from tomorrow and will be back 8/20.
    So, if I can't get the report today, the report will be posted 8/20 or later.

    best regards,
    g.f.
  • g.f.,

    Please let us know when it is available.

    Tom

  • g.f.,

    Do you have an estimate on the availability of the length matching report for this board?

    Tom

  • Hi Tom,

    I'm sorry to keep you waiting.
    My customer are filling the report right now,
    and they are saying that the report will be finished this week.
    I will share the report as soon as possible, so please give us some more time.

    best regards,
    g.f.
  • Hi Tom,

    I'm sorry for the delay.
    I haven't received the report from my customer yet.
    I'm going to contact my customer about the progress of the report.

    best regards,
    g.f.
  • g.f.,

    Thanks for the update.  We will update it when provided.

    Tom

  • g.f.,

    Is this going to happen in the next week?  If not, I recommend that we close this thread.  Then later you can create a new one that is linked to this one.

    Tom

  • Hi Tom,

    I'm so sorry for keep you waiting so long time.
    I got the report from my customer, so please take a look at the report.

    And I have additional information from my customer.
    The issue will occur at one of Byte Lane 4, 5, or 6.
    And the issue won't occur simutaneously in those byte lane.
    When issue occur, the phases of DQS and CLK are 180 degrees out of phase compared to normal operation.
    Please take a look at waveform diagram and question#1 in page.1 of attached file.

    And they also have a question about Write latency register value.
    Please take a look at page.2 of attached file.

    best regards,
    g.f.

    KeyStone DDR3 Length Rules Template v1p0.xlsx

    C6678_DDR3 write issue.pdf

  • g.f.,

    I have reviewed the length report tables and agree that the numbers are pretty good.  There are some discrepancies but they should not result in the leveling failures that you observe.  I also compared the lengths from the new tables back with the lengths in the PHY_CALC worksheet submitted last month.  The numbers are close but do not quite match.  I recommend that you update the lengths in the PHY_CALC worksheet and check whether the failure results change.

    You report that the leveling process fails sometimes and that it passes sometimes.  Do all boards fail intermittently or only certain boards?  How many boards have you built?  How many fail?  For those that fail, what is the ratio of failures to total number of tests - i.e. if turned on 10 times, they normally fail 2 or 3 times.

    Have you tried running the DDR interface at a slower speed?  You can simply reduce the PLL frequency while keeping all other settings unchanged.  Does this resolve the problem?

    You indicated in the checklist that there were 4 vias per data group route.  Why so many?  Is the board using an HDI (microvia) stackup and you are counting the microvias and through vias separately?

    Tom

  • g.f.,

    I was looking at the C-code.  This appears to be the standard RTOS code provided by TI.  It contains a call to a function called BOARD_delay.  How is this implemented?  This delay is required.  You must implement the BOARD_delay function such that your optimizing compiler does not delete it.  Please test and make sure that the BOARD_delay function is working as expected.  Broken delay functions can result in intermittent leveling failures that are resolved by repeated leveling trials.

    Tom

  • Hi Tom,

    Thank you for the reply and the support.
    I'm asking to my customer right now, and I will be back as soon as I get the answer.
    So, please wait for a while.

    best regards,
    g.f.
  • Hi Tom,

    I will share the answer from my customer.

    >I recommend that you update the lengths in the PHY_CALC worksheet
    >and check whether the failure results change.

    The lenght in the PHY_CALC worksheet is more accurate value.
    The difference is the length of the damping resistor of the DQS/DQ line.
    But even they didn't take into account this phenomenon occurred.

    >Do all boards fail intermittently or only certain boards?  How many boards have you built?
    >How many fail?  For those that fail, what is the ratio of failures to total number of tests - i.e. if turned on 10 times,
    >they normally fail 2 or 3 times.

    They made 7 boards and the issue will occur in 6 boards.

    After the DSP boot up, the DDR3 memory test is automatically executed.
    In their system configuration, if the memory test have passed
    the system will going to power-OFF the DSP and then power-on the DSP then repeat the test,
    or if the memory test have failed the system will stop the operation.
    During this memory test, there is board which operation will stop after 7 times of power-off/on the DSP and this is the shortest.

    Please take a look at the attached file about the issue.
    (This file is same file which I posted a month ago)

    >You indicated in the checklist that there were 4 vias per data group route. 
    >Why so many?  Is the board using an HDI (microvia) stackup and you are counting the microvias and through vias separately?

    Since the damping resistor(10ohm) are inserted in the DQS/DQ line, the number of VIA have increased.

    The customer are checking the Board_delay() and going to test with lower PLL frequency right now.

    best regards,
    g.f.

    4401.C6678 DDR3 Write issue.pdf

  • g.f.,

    Multiple topics here:

    1.  Regarding difference in the trace routing and the PHY_CALC worksheet:

    The expectation is that the routed lengths in the length matching table are the same lengths loaded into the PHY_CALC worksheet.  In both cases, the lengths need to be proportional to signal delay.  If you believe the length of the resistor body is additive to the delay, then it should appear in both spreadsheets.  Similarly, we normally ignore via barrel length but if the variations are significant, that can be added too.

    2.  Regarding board failure rate:

    You built 7 prototypes and 6 of them fail occasionally.  The worst board fails after 7 trials.  Therefore, more stable boards take more iterations to fail.  Please provide an estimate of the average number of loops before failure for all 6 boards that intermittently fail?

    3.  Regarding damping resistors on DQ and DQS lines:

    Series damping resistors are not recommended on the DQ and DQS lines with the C6678 DSP.  The DDR PHY on this DSP as well as the DDR3 SDRAMs contain output buffers that are impedance compensated.  This impedance compensation controls the output impedance across variations in temperature, supply voltage and silicon process.  Addition of these damping resistors result in additional vias.  Additional vias degrade signal integrity and this is not allowed.

    4.  Regarding document attached describing leveling failure:

    I agree that this shows a leveling failure.  You have not provided enough information to determine whether this is a write leveling failure or a read leveling failure.  When you have a board in the failed state, read the block of memory multiple times.  If the values change on subsequent reads, then you are seeing read leveling failures.  If you always read the same contents showing the data shift, then you are getting write leveling failures.

    Tom

  • Hi Tom,

    Thank you for the reply and sorry for the delay.

    I'm asking to my customer about each topics.
    So, please wait for a while.

    best regards,
    g.f.
  • Hi Tom,

    I got answer from my customer.

    When they made PLL frequnecy slower the issue didn't occured.
    The following are what they tried:
    *************************************************************
    Case1:
    When DDR registers values was setup for DDR3-1333 memory,
    they setup PLL frequency to lower frequency 533MHz.

    The values of PLL register is as follow:
    Input CLK = 100MHz
    PLLD=3, PLLM=16, OUTPUTDIV=1

    They tried with 2 boards and running the memory test 2000 loops,
    the test have been passed and no issue occured so far.

    Case2:
    When DDR registers values was setup for DDR3-1600 memory,
    they setup PLL frequency to lower frequency 666MHz.
    (I will attach the CALC spreed sheet for DDR3-1600 memory)

    DDR3 PHY Calc v11 for 1600.xlsx

    DDR3 Register Calc v4 for winbond_1600.xlsx

    The values of PLL register is as follow:
    Input CLK = 100MHz
    PLLD=3, PLLM=20, OUTPUTDIV=1

    They tried with 2 boards and running the memory test 1000 loops,
    the test have been passed and no issue occured so far.
    *************************************************************

    As a result of trial with lowering the frequency of DDR PLL,
    the issue no longer occurs.
    From this result, what kind of cause can be considered?

    And, are there any problem to setup PLL frequency to lower frequency 666MHz
    even DDR3 register value are setup for DDR3-1600 memory?

    best regards,
    g.f.

  • Hi Tom,

    I'm sorry for the delay.
    I got answer from my customer against the multiple topic from you.

    >1. Regarding difference in the trace routing and the PHY_CALC worksheet:
    They are reviewing right now.

    >2. Regarding board failure rate:

    They didn't confirmed the tendency of number of the memory test(board ON/OFF)times until error occurrence on the same board.
    And also, no average number of loop for error occurrence.
    But the number of loop when the error occurs in the five error boards is as follow:
    15 loops, 30 loops, 51 loops, 189 loops
    And the number of loop for 1 board is unknown.

    >3. Regarding damping resistors on DQ and DQS lines:

    I told the customer that damping resistors on DQ and DQS lines aren't recommended and remove it from the lines,
    but now they are asking if dumping resistance can be a direct cause of this issue.

    >4. Regarding document attached describing leveling failure:

    The data didn't change after reading the memory and also no data shift.
    And they also checked via CCS memory browser after error occured.
    They opened the memory address where error occur and enabled automatic refresh, but data never changed.
    So, they are guessing the failure of write leveling.

    best regards,
    g.f.
  • g.f.,

    The DDR3 interface on the C6678 is only rated for 1333MT/s (666MHz clock).  You must not operate it at 1600MT/s (800MHz clock).  You can use SDRAMs that have a speed rating for 1600 or 1866 but you must use the settings from the datasheet that correspond with 1333.  Therefore the 2 spreadsheets provided that configure the DDR3 interface to operation with an 800MHz clock are not valid.

    In case 1, you used register DDR configuration values for 1333MT/s but then configured the PLL to generate a 533MHz clock for 1066MT/s operation.  This was successful and resulted in robust leveling configuration on 2 boards for 2000 iterations.  This is a good data point in that it shows the board is fundamentally implemented correctly.  Operating at this reduced speed provides additional timing margin to the accesses.

    I am not clear on case 2.  You claim to have used the register settings for 1600MT/s.  As stated above, these settings are not valid.  Then you ran the interface at 1333Mt/s (666MHz clock from the PLL) and report success again on 2 boards.  This does not make sense.  What happens with these 2 boards if you simply restore the 1333MT/s register settings and keep the PLL set for 666MHz?  In theory, this should still be robust.

    Tom

  • g.f.,

    >>3. Regarding damping resistors on DQ and DQS lines:
    >I told the customer that damping resistors on DQ and DQS lines aren't recommended and remove it from the lines,
    >but now they are asking if dumping resistance can be a direct cause of this issue.

    I already explained this in my 9/27 post.  It is not the damping resistors that are a problem (assuming they are on the order of 10 ohms).  The problem is the additional 2 vias on each DQ and DQS route.  Each via creates an impedance discontinuity.  Degradation for each via accumulates and erodes signal integrity and timing margin.  Our routing guidelines only allow a maximum of 2 vias per route.

    I am still waiting for confirmation that the board_delay function is properly working (from my 9/25 post).  Simple delay loops can be stripped by the compiler.  The delay must be implemented so that it provides the delay time specified.  Multiple times I have seen leveling failures like yours caused by improper delay loop implementations.

    Tom

  • g.f.,

    I just realized that the PLL settings do not look correct.  Please have these double checked.  The equation from the DM is:

    CLK = CLKIN × ((PLLM+1) ÷ ((OUTPUT_DIVIDE+1) × (PLLD+1)))

    Therefore:

    Input CLK = 100MHz, PLLD=3, PLLM=16, OUTPUTDIV=1 yields 262.5MHz

    Input CLK = 100MHz, PLLD=3, PLLM=20, OUTPUTDIV=1 yields 262.5MHz

    To get the proper speeds, you need:

    Input CLK = 100MHz, PLLD=2, PLLM=39, OUTPUTDIV=1 yields 666.667MHz

    Input CLK = 100MHz, PLLD=2, PLLM=31, OUTPUTDIV=1 yields 533.333MHz

    Please verify the DDRCLOCK using an oscilloscope.  You might then need to replicate the tests previously reported.

    Tom

  • Hi Tom,

    Thank you so much for your support.

    I double checked the clkout frequency of DDR PLL.
    You are right, the DDR PLL configuration was uncorrect.
    I should confirm it before sending it to you. I'm very sorry.

    I will tell my customer about the setting of PLL and tell them to check the output clock by oscilloscope.
    Then ask them to retry the tests again with DDR configuration values for 1333MT/s or slower.
    I didn't recognize that I should not set the DDR3 configuration value for 1666MT/s even if I decrease the DDR clock.
    So, this is because limitation of C6678 which written in errata sheet(usage note14), am I correct?

    I understood that damping resistor are not the problem but the additional via are the problem.
    Thank you for explaining to me again, and sorry for I didn't understood so far.
    I will explain to my customer.

    I'm sorry to keep you waiting for the board_delay function.
    They increased the argument value of board_delay function which are inside of initialization function
    to check the completion time of initialization function will increase or not.
    So, they can figure it out that board_delay funciton are working or not.
    When they increase the argument value of board_delay function, the completion time of initialization function have been increased,
    so it seems that board_delay function are working.

    best regards,
    g.f.
  • Hi Tom,

    I got feedback about PLL settings from my customer and the value they sent previously was correct values.
    They are using source code of PDK with value modified for their board and
    the PLL value which they sent me previously was set to the pllcConfigs[] structure which are defined in evmC6678_pll.c.
    *********************************************************
    const pllcConfig pllcConfigs[] = {
    {CSL_PLL_SYS, 20, 1, 2}, /* 1000 MHz */
    {CSL_PLL_PA, 21, 1, 2}, /* 1050 MHz*/
    //{CSL_PLL_DDR3, 16, 1, 2}, /* 1600 MHz*/
    //{CSL_PLL_DDR3, 40, 3, 2}, /* 1333 MHz*/
    {CSL_PLL_DDR3, 20, 3, 1}, /* 1333 MHz*/
    //{CSL_PLL_DDR3, 16, 3, 1}, /* 1066 MHz*/
    };
    *********************************************************
    The above values(for PLLM, PLLD, OUTPUTDIV) will be substracted by 1 at initialization code of PDK.
    So, actual PLLM/PLLD/OUTPUTDIV value of register will be set to PLLM=19, PLLD=2, OUTPUTDIV=0 or
    PLLM=15, PLLD=2, OUTPUTDIV=0 and when CLKIN is 100MHz, the output frequency will be 666.667MHz or 533.333MHz.
    They also checked the output clock by oscilloscope and the output clock was as expected.

    Input CLK = 100MHz, PLLD=2, PLLM=19, OUTPUTDIV=0 yields 666.667MHz
    Input CLK = 100MHz, PLLD=2, PLLM=15, OUTPUTDIV=0 yields 533.333MHz

    best regards,
    g.f.
  • g.f.,

    Please go back to Case 1 and Case 2 from last week.  Rerun these tests while verifying the DDR clock using a scope probe.  Also, please re-check the configuration used for each.  Once you provide the results from these tests, we can determine how to proceed.

    Tom

  • Hi Tom,

    Thank you for the reply.
    I'm asking to my customer to rerun the test.
    Please wait for the result.

    best regards,
    g.f.
  • Hi Tom,

    The customer tried the memory test again.
    They sent me the attached files of DDR_CLK signal probed by oscilloscope and the DDR3 register values of each test cases.

    Customer DDR_CLK signal.xlsx

    Customer DDR3 Register Values.xlsx

    Test Case1:
    Configured DDR3 register values are  for DDR3-1333, DDR_CLK=533MHz
    Resutl: Test passed

    Test Case2:
    Configured DDR3 register values are for DDR3-1600, DDR_CLK=666MHz
    Result: Test passed

    Test Case3:
    Configured DDR3 register values are for DDR3-1333, DDR_CLK=666MHz
    (They used same board of Test Case2)
    Result: Test failed

    The DDR3 memory which they are using is Winbond [W634GU6MB11I(DDR3L-1866)].

    w634gu6mb_a01.pdf


    best regards,
    g.f.

  • g.f.,

    These results are consistent with the previous data.  That is good.  The summaries of the register settings are also good to have.  Can they also provide the PHY_CALC and REG_CALC spreadsheets used to calculated these register settings.

    Tom

  • Hi Tom,

    Thank you for the reply.

    I'm asking for the DDR3 Register&PHY calc spreadsheet to my customer,
    so please wait for awhile.

    By the way, I have a question about the DDR3 register configurations.
    As you know my customer are using DDR3-1866 speed grade memory but they refering to the parameters of
    DDR3-1333 speed bin or DDR3-1666 speed bin when they configure the DDR3 registers.

    Should they refer to the parameter of DDR3-1866 speed bin and select
    the CAS latency(CL)=10, CWL=7 for 666.67MHz(1.5ns)?
    (CL=9 are not supported in DDR3-1866 speed bin of their DDR3 memory.)

    best regards,
    g.f.
  • g.f.,

    You will need to find the speed bin table in the datasheet for the slowest part that will be placed in the board.  If this is a -107 device, then you will need to pull values form the DDR3L-1866 Speed Bins table.  In this table there will be a column for the -107 speed grade device.  The lower portion of this table contains CL and CWL settings based on clock speed.  Operating the DDR at 1333MT/s requires a clock running at 666MHz which has a period of 1.5ns.  Therefore, you will need to find the row(s) that have period boundaries 1.5ns min and 1.875ns max.  CL=10 with CWL=7 is a common combination for this clock rate.

    Tom

  • Hi Tom,

    Thank you for the reply.
    May I ask you again to make me sure?

    The part number of customer's Winbond DDR3 is "W634GU6MB11I" which speed grade is DDR3L-1866.
    So, should they refer to the table of DDR3L-1866 speed bin and set the value of tRCD, tRP, tRC, tRAS from the table?
    The each value is as follow:
    tRCD=13.91ns
    tRP=13.91ns
    tRC=47.91ns
    tRAS=34

    And need to set CL=10 and CWL=7 if operating the "W634GU6MB11I" at 1333MT/s.

    Is my understanding correct?

    best regards,
    g.f.
  • g.f.,

    Correct, as shown on page 135 of the DM provided.  Note that there are other timing parameters needed that will be pulled form the 1866 columns in the AC Characteristics table starting on page 138.

    Tom

  • Hi Tom,

    Thank you for the reply.

    I understood.
    My customer are going to correct the parameter value of DDR3 Register Calc
    from DDR3L-1333 parameter value to DDR3L-1866 Speed bin and AC characteristics parameter value.
    And then they will rerun the test.
    So, could you please wait for the test result and the correspond spreadsheets(Register/PHY).

    best regards,
    g.f.
  • Hi Tom,

    I'm sorry for the delay.
    I got the test result and appropriate spreadsheet from my customer
    Please take a look at the attached spreadsheet.

    There are two types of spreadsheets for 1333MT/s and 1600MT/s.
    The value of each parameter in spreadsheet for 1333MT/s was pulled from 1866 colums.
    But the value in spreadsheet for 1666MT/s was pulled from  1600 colums.
    Because from DDR3 datasheet, it seems there are no CAS Latency value
    which can be chosen for 1600(1.25ns) in 1866 colums.

    DDR3 PHY Calc v11 for 1333.xlsx

    DDR3 Register Calc v4 for 1333.xlsx

    8054.DDR3 PHY Calc v11 for 1600.xlsx

    DDR3 Register Calc v4 for 1600.xlsx

    The tests were done by using same board.
    The test details which they did and the result is as follow:

    Test sequence(it is same memory test as one I posted before):
    ***************************************************************
    After the DSP boot up, the DDR3 memory test is automatically executed.
    In their system configuration, if the memory test have passed
    the system will going to power-OFF the DSP and then power-on the DSP then repeat the test,
    or if the memory test have failed the system will stop the operation.
    ***************************************************************

    The result:
    *1333MT/s@666MHz DDR_CLK
     It seems the test failing once per twice.
     DSP boot up -> Test passed -> power-off -> power-on -> DSP boot up -> Test fails

    *1333MT/s@533MHz DDR_CLK
     No fail. It passed the test 2500 times so far without failing.

    *1600MT/s@666MHz DDR_CLK
     No fail. It passed the test 1000 times so far without failing.
     (They set the CL=10, CWL=7)

    best regards,
    g.f.

  • g.f.,

    Customer should contact Winbond about the missing CL/CWL settings for 1600MT/s (1.25ns) in the speed bin table for the 1866 speed grade device.  This appears to be a gap in their datasheet for this speed part.

    Tom

  • g.f.,

    You refer to configurations as 1333MT/s and 1600MT/s.  I believe that the files provided are a matched set (PHY_CALC and REG_CALC) for each speed configuration.  Is this correct?  What result do you see if you use the REG_CALC from 1333MT/s and the PHY_CALC from 1600 with a clock speed of 666MHz?

    Tom

  • Hi Tom,

    I'm sorry about taking so long time to reply to you.

    >Customer should contact Winbond about the missing CL/CWL settings for 1600MT/s (1.25ns)
    >in the speed bin table for the 1866 speed grade device. 
    >This appears to be a gap in their datasheet for this speed part.

    They are contacting to Winbond right now.
    As soon as they get CL/CWL vaules from Winbond, they will going to test.

    > I believe that the files provided are a matched set (PHY_CALC and REG_CALC) for each speed configuration. 
    > Is this correct?

    Yes, it is correct. The files which we provided are matched set for each speed configuration.

    >What result do you see if you use the REG_CALC from 1333MT/s and
    >the PHY_CALC from 1600 with a clock speed of 666MHz?

    The memory test passed about 7600 times without failure.

    best regards,
    g.f.

  • g.f.,

    This test confirms that the layout is good and that the DDR SDRAM and PHY configuration register settings are correct (and optimum).  The mismatch is only in the PHY_CALC register values which are used as initial values for the adaptive leveling logic.  This is not a problem.  Perhaps the stripline propagation delay in cell C2 is not correct.  This would scale all of the result values.  I recommend that the customer continue with the values used in this last test to commission their board.

    Tom

  • Hi Tom,

    Thank you for the reply.

    I'm sorry but I need to explain to my customer why the last test have been passed
    by using the value of PHY Calc spreadsheet(1600MT/s).

    Could you tell me the details why the last test have been passed
    when using the value of PHY Calc spreadsheet related to DDR Clock 800MHz?

    DDR clock frequency value of Cell C3 have been setting to 800MHz in
    PHY calc spreadsheet which are used at last test.
    So, do you mean that if the board are operating without failure,
    we could use the value of PHY Calc spreadsheet(800MHz) even the value of clock frequency are not
    set to real DDR clock(666MHz) in PHY Calc spreadsheet?

    By the way, you said the value of cell C2 in spreadsheet are probably uncorrect,
    but do you mean that they don't need to correct the value of C2?
    And recommendation is to keep using the value used in the last test, is it correct?

    best regards,
    g.f.
  • g.f.

    Cell C2 is the speed for signals traveling through the PCB in units of picoseconds per inch.  Cell C3 is the clock speed which establishes the timebase for the PHY logic.  This timebase is in DLL steps where there are 256 steps per clock period.  From this we calculate the DLL step size which is in units of picoseconds per step.  The spreadsheet inputs are PCB track lengths which are converted to time delay.  Spreadsheet outputs are delays in units of DLL steps.  Therefore, values in cells C2 and C3 are effectively scaling terms.  If you increase cell C3 from 666 to 800, this is a 20% increase.  If you similarly reduce the value in C2 by 20%, the results are the same.  This is why I said the propagation rate in cell C2 was probably too high.

    The PHY CALC worksheet computes initial values that are used for the adaptive leveling logic in the PHY.  This does not need exact values.  It only needs to be an approximate starting point.  Since you have a set of values that result in robust leveling on your board, the calculations have achieved their intended purpose.  There is no need to make more adjustments.  You have already proven that these are good initial values for your board.

    Tom

  • Hi Tom,

    Thank you for the reply.

    I'm very sorry but I have additional question about the effect of temperature.

    >The PHY CALC worksheet computes initial values that are used for the adaptive leveling logic in the PHY. 
    >This does not need exact values.  It only needs to be an approximate starting point.

    I understood that initial values only need to be an approximate starting point.
    But if the temperature of environment changed, doesn't configured starting point may be shifted out of valid range?
    If there are possibility of the configured starting point shifted out of valid range by temperature,
    should they find the middle point in the valid range by increasing the stripline delay(Cell C2) for example
    and then set that calculated value to the registers as starting point?

    For example, starting from 172.7[ps/inch] in Cell C2 which are invalid when DDR CLK is set to 666.667[MHz]
    then increase the Cell C2 and find the maximum, minimum of valid C2 value.
    And then select the middle value between maximum and minimum of valid C2 value.

    best regards,
    g.f.

  • g.f.,

    I do not think that this will provide an optimum solution as you are proposing.  The delay characteristics of PCB traces do not change significantly over temperature.  Silicon transistor characteristics do change over temperature but this is mitigated by compensation logic in the DSP's PHY and in the SDRAM.  If you want additional confidence in these numbers, I recommend testing a few units in a thermal chamber both at hot and cold temperature extremes.  If you see robust operation across the temperature range with this testing, then you have better confidence that they will work in the field across operational extremes.

    Tom

  • Hi Tom,

    Thank you for the reply and sorry for the delay.

    >The delay characteristics of PCB traces do not change significantly over temperature.
    >Silicon transistor characteristics do change over temperature but this is mitigated by compensation logic in the DSP's PHY >and in the SDRAM.

    I understood, thank you.

    Now, my customer are going to test the DDR3 with a few boards by using the PHY Calc register values of last test.
    So, we have no question right now.
    But could you wait for closing this forum? I would like to close this forum after I get the result from my customer.

    best regards,
    g.f.
  • g.f.,
    We will keep it open while the tests are run.
    Tom