****************************************************************************************************
This ZIP File is associated with the Application Note

xSPI PHY Configuration and Training (EE-468)

that can be found at http://www.analog.com/ee-notes.

Date Created:	08/07/2025

****************************************************************************************************
CONTENTS

	1. DESCRIPTION
	2. VERSION INFORMATION
	3. DIRECTORY STRUCTURE

****************************************************************************************************
1. DESCRIPTION

This readme file tells how to use Initial_PHY_Config.py for getting the values of Soft PHY registers.

Apart from Initial_PHY_Config.py, an input file flash_phy_reg_input.txt is required which have the following parameters to be programmed:

1) dqs_en                 --  Device is configured to Read Mode for which it generates strobe (DQS or RWDS).
2) lpbk_en                --  Device is configured to Read Mode for which it DOES NOT generate strobe (DQS or RWDS). So the controller uses internal loopback clock for sampling.
3) clk_period             --  Flash Clock period
4) flash_setup            --  Flash Setup timing from last negative clock edge to valid data (for Read Commands).
5) board_delay            --  Estimated Board delay. The value includes the total round trip delay for the signals and is
                              used for deciding on values associated with data read capture.
                              The example formula is the following:
                              board_delay = PCB trace to device + PCB trace from device 
6) tdqsq                  --  Maximum timing definig skew between DQS (RWDS) strobe and stable data window (DQ)
7) tx_flash_setup         --  Minimum setup timing of data transmitted by the controller

Note -
=====
1. All the above timing parameters should be specified in ns.

2. Even if a parameter does not exist for the device, please make sure you pass a dummy value and ignore the corresponding output file.

The Initial_PHY_Config.py script creates few intermediatory output files:


Use the above output words to program the SOFT PHY after initialization and booting of Flash Controller is over.

The parameters calculated have been validated in our verification but depending on the use case and memory models used they do not need to be optimal.
Therefore, the calculations should be treated just as a reference.


****************************************************************************************************
2. VERSION INFORMATION

Tested on:
Python 3.10.11

****************************************************************************************************

3. DIRECTORY STRUCTURE

- 1. flash_phy_reg_input.txt

- 2. Initial_PHY_Config.py