﻿---------------------------------------------------------------------------------------
Hardware Required
-	DS90UB960 EVM (or SVB – silicon validation board)
-	DS90UB953 EVM (or SVB)
-	Coax cable (or STP)

Software
-	Download and install ALP from TI website

Setup
-	Refer UB960 EVM user guide on ALP install and startup with DS90UB960 profile selected
-	Connect coax cable between RX Port 0 of DS90UB960 EVM to TX Port of DS90UB953 EVM
-	Save the enclosed “ub960_margin_analysis.py” python script file 

Exercising Margin Analysis script:

NOTE: THIS SCRIPT OUTPUTS A .LOG AND .CSV FILE. TO RUN THE SCRIPT FROM 
C:\Program Files (x86)\Texas Instruments\Analog LaunchPAD v1.57.0010
FOLDER, ALP SHOULD BE RUN IN ADMINISTRATOR MODE (RIGHT CLICK AND RUN ALP IN ADMIN MODE).  
OTHERWISE, PLEASE COPY THIS FOLDER TO USER DESKTOP FOLDER AND RUN THE SCRIPT.

a)	Running the script: 
	Script should be run from Deserializer (DS90UB960) side
	Go to Script Tab of ALP and use the “Run” button to select and run the above script 
	Script file definitions user can customize:
		•	Log File Name (Line 43)
			Script outputs debug and info messages to “ub960sfeq_testlog.log” file. Feel free to change this name to your need.
		•	CONST_RXPORT (choosing RX port, Line 46): 
			RX_PORT0_960B or RX_PORT1_960B or RX_PORT2_960B or RX_PORT3_960B
		•	Configure I2C device address (choosing devAddr_DES, Line 50):
			Default devAddr_DES = 0x60
		•	Output Margin Analysis File Name (Line 61)
			Default name is set as “ub960sfeq_test.csv”. Feel free to change this name to your need    
b)	Margin Analysis Color Scaling
	a.	File “ub960sfeq_test.csv” contains the margin analysis (also sometimes called eye diagram) output (in current script folder)
	b.	Open using Microsoft Excel “ub960sfeq_test.csv” and save as “ub960sfeq_test.xlsx” file
	c.	In file ub960sfeq_test.xlsx
		i.	Choose and highlight cells B3 to P17  
		ii.	Go to Home --> Conditional Formatting --> Color Scales--> More Rules…
		iii.	Set Lowest Value color as RED and Highest Value color as GREEN and save
	d.	This is the required Margin Analysis output or Eye Diagram. See sample output enclosure for EVM with 12m coax cable.
---------------------------------------------------------------------------------------

