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.

TMS320F28379D: EMIF timing calculation for Asynchronous memory interface

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Hi,

In the TRM, chapter 25.4.2.2 Configuring the Flash Interface provides an example to configure the EMIF register to interface SHARP LH28F800BJE-PTTL90 8Mb Flash memory with a clock frequency of fEM1CLK = 100 MHz. In the example to calculate the setup, strobe and hold time for the EMIF registers, tSU, tH and tD AC characteristics are considered and the values used for them are tSU = 6.5 ns (min), tH = 1 ns (min) and tD = 7 ns (max).

How did you calculate or arrives at the values for tSU, tH and tD? Are those values device specific? If they are device specific then why do we have same values for F2807x (chapter 23.4.2.2 Configuring the Flash Interface in TRM for F28075)? Is there any common way to arrive at the values for tSU, tH and tD?

I also referred to the spreadsheet tool at location: ~\C2000Ware\boards\TIDesigns\F28379D_EMIF_DC\C2000-EMIF_ConfigurationTool.xlsx. In that sheet I do not see tSU, tH and tD but I see some entries like PCB Delay (ns),  Read Setup, Min (ns) and Read Hold, Min (ns). Are they same? If yes, the example values used in the spreadsheet has different compared to the values shown in TRM. Can you provide me a way to find the required values for the same?

Thanks,

Aditya

  • Hi Aditya,

    How did you calculate or arrives at the values for tSU, tH and tD?

    These values are device specific and detail is provided in device datasheet.  (Table 5-37. EMIF Asynchronous Memory Timing Requirements and Table 5-38. EMIF Asynchronous Memory Switching Characteristics).

     If yes, the example values used in the spreadsheet has different compared to the values shown in TRM.

    Yes, these values should be same as one used in xls sheet but we are aware that timing values in examples need correction and will be corrected in next release but you can refer these values  from device datasheet.

    Regards,

    Vivek Singh

     

  • Hi Vivek,

    Thanks for the clarification. For the tSU I will use the entry number 12 "tsu(EMDV-EMOEH) Setup time, EMxD[y:0] valid before EMxOE high" and for tH I will use the entry number 13 "th(EMOEH-EMDIV) Hold time, EMxD[y:0] valid after EMxOE high" from the table Table 5-37. EMIF Asynchronous Memory Timing Requirements.

    I have few more questions on timing calculations for asynchronous devices

    1) Is the timing tD same as the entry "PCB delay (ns) Estimated One-Way PCB propagation delay" in the spreadsheet?

    2) Which entry should I need to consider for tD in the data sheet? Is it Entry 2 "tw(EM_WAIT) Pulse duration, EMxWAIT assertion and deassertion" in Table 5-37. EMIF Asynchronous Memory Timing Requirements which will amount to 20 ns for 100MHz clock frequency?

    3) In the example calculation in TRM, the formulas does not consider any error values as considered in the spreadsheet (-3 for setup and hold and -1 for strobe), but at the end in the TRM 10 ns margin is added to the calculated register values. Which approach should be considered?

    4) Also there is difference in formula for the calculations between TRM example and spreadsheet as noted below, which may result in variation in the final calculated values. Which one should be used?
    a) TRM - R_STROBE >= (tD + tELQV + tSU) × fEM1CLK - 1
    Spreadsheet - R_STROBE = (Read Strobe time (ns) - Read Strobe Err, Min (ns)
    + Read Setup, Min (ns) + 2* PCB Delay (ns)) × fEM1CLK - 1

    b) TRM - R_HOLD > = tH × fEM1CLK - 1
    Spreadsheet - R_HOLD = (Read Hold time (ns) - Read Hold Err, Min (ns) + Read Hold, Min (ns)) × fEM1CLK - 1

    c) TRM = R_SETUP >= tSU x fEMIFCLK
    Spreadsheet - R_SETUP = (Read Setup time (ns) - Read Setup Err, Min (ns)) × fEM1CLK - 1
    In the Spreadsheet for setup time there are 2 separate entries one in common area EMIF Async Read Requirements (OE/ Controlled Reads) and other in ASYNC_CSx_CR Configuration and only the later entry is considered in the formula.

    d) TRM - W_STROBE >= tELEH × fEM1CLK - 1
    Spreadsheet - W_STROBE = (Write Strobe time (ns) - Write Strobe Err, Min (ns)) × fEM1CLK - 1

    e) TRM - W_SETUP + W_HOLD > = tEHEL × fEM1CLK - 2
    W_SETUP + W_STROBE + W_HOLD >= tAVAV × fEM1CLK - 3
    Spreadsheet - W_SETUP = (Write Setup time (ns) - Write Setup Err, Min (ns)) x fEM1CLK - 1
    W_HOLD = (Write Hold time (ns) - Write Hold Err, Min (ns)) x fEM1CLK - 1 .

    Thanks,
    Aditya
  • Aditya Padmanabha said:
    1) Is the timing tD same as the entry "PCB delay (ns) Estimated One-Way PCB propagation delay" in the spreadsheet?

    2) Which entry should I need to consider for tD in the data sheet? Is it Entry 2 "tw(EM_WAIT) Pulse duration, EMxWAIT assertion and deassertion" in Table 5-37. EMIF Asynchronous Memory Timing Requirements which will amount to 20 ns for 100MHz clock frequency?

    tD (TURNAROUND TIME) is a delay inserted by the EMIF interface when switching between reads and writes or when switching to a different CS device.  This is meant to give external components time to respond to functional state changes.  This is different from propagation delay.

    EMxWAIT is used to delay the read or writing of data if the external component is busy.

    Aditya Padmanabha said:
    3) In the example calculation in TRM, the formulas does not consider any error values as considered in the spreadsheet (-3 for setup and hold and -1 for strobe), but at the end in the TRM 10 ns margin is added to the calculated register values. Which approach should be considered?

    4) Also there is difference in formula for the calculations between TRM example and spreadsheet as noted below, which may result in variation in the final calculated values. Which one should be used?

    In theory, you can factor in the datasheet errors and leave out the arbitrary 10ns margin.  However, there is usually some trial and error involved to find a good balance between performance and stability in your system.  It is generally a good idea to start with slower timings to confirm that the memory is working and then speed up the timings to increase performance.

    The spreadsheet and TRM approaches will arrive at similar settings for typical systems.  I would recommend the spreadsheet for ease of use.

  • Hi tlee, Vivek,

    Thanks for your inputs.

    tD(TURNAROUND TIME) as mentioned in the datasheet ((TA)*E–3 to (TA)*E+2 ns) depends on the TA register field in the Asynchronous bank  register.

    But in the example configuration mentioned in TRM, the tD description looks different - "tD (Output delay time, EM1CLK high to output signal valid)".

    Also the formula to calculate read strobe time uses different timings for TRM and spreadsheet

    a) TRM ---> R_STROBE >= (tD + tELQV + tSU) × fEM1CLK - 1

        Spreadsheet ---> R_STROBE = (Read Strobe time (ns) - Read Strobe Err, Min (ns) + Read Setup, Min (ns) + 2* PCB Delay (ns)) × fEM1CLK - 1

    Since PCB Delay and tD are two different timings, we will get two different values for strobe time if we take TRM example and spreadsheet approach right?

    Do you have any timing diagram which highlights what PCB Delay is?

    Thanks,

    Aditya

  • Aditya,

    Vivek informed me that the TRM reference to tD is erroneous and it will be removed.

    The PCB delay from the spreadsheet is the time for a signal to travel the length of trace between the MCU and external component.

    -Tommy

  • Hi Tommy, Vivek,

    Then it is better to use the PCB delay instead of tD to calculate the time for R_STROBE right?

    Is the value of PCB delay MCU specific? How to find it out? I do not see any reference to the PCB delay in the MCU data sheet.

    Thanks,

    Aditya

  • Aditya,

    The delay is layout specific. You can perform a search on the internet for "pcb trace propagation delay calculator" to see the relevant input variables.

    -Tommy
  • Aditya, let us know if you have further queries on this.
  • Hi Vivek,

    Sorry for the delay in responding back. I was working on other things.

    When you say the pcb delay calculation is layout specific, I am assuming it is specific to the C2000 device right? If so Where do I get the parameters for calculating the pcb delay.

    The formula needs parameters like Relative Permittivity, Height of Dielectric, Width of Trace and Trace Thickness. Where do I find these parameters for the processors?

    In the excel I see the value of PCB Delay is taken as 0.7 ns.

    Thanks,
    Aditya
  • Aditya,

    These are all parameters that are specific to the PCB (Printed Circuit Board) on which the C2000 is installed. Your board designer should be able to determine these values.

    Realistically, the PCB Delay will not factor greatly into most board designs where the memory is placed close to the C2000. If this parameter is causing you apprehension, just leave it at the default 0.7ns and adjust it later if you are having memory access issues.

    -Tommy
  • Hi Vivek, Tommy,

    Thanks a lot for all the clarifications you provided on the timing related queries for EMIF.

    Regards,
    Aditya