Home
PAPI - Wavecrest SIA Corporation is now handling sales and service
Contents
1. PARM tParm Contains acquisition parameters long 1PassCnt Acquisitions so far set to 0 to reset long lRefEdge Referenced to EDGE FALL or EDGE RISE long lErrProb Error probability used Total Jitter vd Valid range is 1 to 16 long 1ClokSmp Sample size while acquiring clock rate long 1FiltSmp Sample size when finding filter limits long 1TailFit If non zero a tail fit will be tried wA long lForcFit If non zero use the force fit method long 1MinHits Minimum hits before trying tail fit long 1FndEftv Flag to attempt effective jitter calc long 1MinEftv Min probability for effective fit 4 long lMaxEftv Max probability for effective fit 12 long 1DdrClok Non zero for double data rate clocks El double dMinSpan Minimum span between edges in seconds long 1Filtoff Filter offset in UI 100 to 100 Kip long lKeepOut If non zero use tailfit keep out below double dKpOutLt Keep out value for left side EJ double dKpOutRt Keep out value for right side Output parameters long 1Good Flag indicates valid data in structure long 1RiseCnt Number of hits in rising edge data long 1FallCnt Number of hits in falling edge data EJ long lPad2 double dDataMin Minimum value relative to clock edge double dDataMax
2. long 1Good Flag indicates valid data in structure long lPadl double dDutCycl Duty cycle measurement of clock signal HIST tHist Contains output data for clock channel EYEH tEyeh POSS CHNS Contains output data for enabled chans 7 The following are bitfields indicating PASS FAIL 0 1 for each channel 57 long 1TypclSetHldPF Means of histograms to setup hold time long lEyeOpenSpecPF Eye opening spec jitter only E long lWorstSetH1dPF Histogram means w jitter to setup hold The following indicate PASS only if all selected channels PASS Pass 1 Fail 0 long lTypcl1SetH1dA11 Means of histograms to setup hold time long lEyeOpenSpecAll Eye opening spec jitter only oh long lWorstSetH1dAl1 Histogram means w jitter to setup hold DBUS IClokChn Reference Clock channel Default 2 IChanNum Bitfield indicating channels to measure Default 1 dSetTime Setup time to assess PASS FAIL Default 5e 10 dHidTime Hold time to assess PASS FAIL Default 5e 10 dEyeSpec Eye opening size to assess PASS FAIL in UI Default 0 6 duserVit n Array of user voltages Default 0 0 tDbus This is the same structure as is defined in the Random Data With Bitclock tool It contains all the acquisition parameters that are used for the measurement with the exception of those defined directly above Default See Random Data With Bitclock Tool IGood
3. z Minimum value in accumulated edge data per channel Maximum value in accumulated edge data per channel Average value of accumulated edge data per channel 1 Sigma value of accumulated edge data per channel Pulsewidth plus per channel Pulsewidth minus per channel Carrier frequency per channel Duty Cycle per channel Periodic jitter on N clk basis per channel Corner Frequency used for measurement per channel IBinNumb n dWndFact n dLtSigma n m dRtSigma n m These values are for internal use only DO NOT ALTER or try to use SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES OWAVECREST CORPORATION 2005 qNorm n Input channel quantities qComp n Input channel quantities per channel per channel qDiff n Differential quantities per channel qComm n common A B quantities per channel tTfitin Structure containing tailfit info per channel IPeakNumb n Count of detected spikes per channel IPeakRsvd n Used to track memory allocation per channel IPeakData n Tracks detected spikes in RJ PJ data per channel tNorm n Normal channel voltage data per channel tComp n Complimentary channel voltage data per channel per channel per channel all acquires combined per channel per channel per channel per channel tDiff n Differential voltage data tComm n Common A B voltage data tHist n Histogram of tShrt n Total Jitter for
4. Valid Entries 0 no pulsefind prior to measurement 1 pulsefind if the measurement mode changed Default 0 IGood Flag indicates valid output data in structure dYstd 1 Sigma or standard deviation of all data dAvar Allan variance estimate tMean Structure of type PLTD which contains all of the plot nformation to generate a diagram of mean values versus ct 0 ation number Use this in PLTD structure in conjunction the structure tTime to generate a Maximum measurement plot See Section 2 3 for details of the PLTD u cture and its elements cture of type PLTD which contains all of the plot to generate a diagram of minimum measurement of a versus iteration number Use this in PLTD conjunction with the structure time to generate a i a with versus time stru tMini Structu information given burst structure in Maximum meas details of t tMaxi Structure of information given burst structure in urement versus time plot See Section 2 3 for he PLTD structure and its elements type PLTD which contains all of the plot to generate a diagram of maximum measurement of a versus iteration number Use this in PLTD conjunction with the structure time to generate a OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 3 Maximum measurement versus time plot See Section 2 3 for details of the PLTD structure and its elements tTime Struct
5. double dTyme Be as part of the measurement process DO NOT ALTER af RRR RK KKK KKK KK KK KR AA PLTD tMean Contains the average plot array PLTD tMini Contains the minimum plot array PLTD tMaxi Contains the maximum plot array PLTD tTime Contains the time samples were taken PLTD tSdev Contains the 1 Sigma plot array i PLTD tPeak Contains the max min plot array TSER tParm A structure of type PARM that contains acquisition parameter The PARM is discussed in full detail in Section 2 4 INumb When implemented correctly a measurement is performed repeatedly with the TSER structure to generate a Time Series plot of a given measurement User defines measurement parameters in fParm For the first execution set lNumb to Zero to reset the plot arrays All subsequent measurements should not assign any value to this structure element This parameter is automatically incremented by the next measurement and can be read after execution to determine the number of times this structure has been called Valid Entries 0 reset counter and clear all plot data Defaul Increment previous value lAutoFix Flag indicating whether to perform a pulse find as required Setting this value to any integer greater than zero tells the measurement to perform a pulse find if needed The system will know if a measurement was recently performed and if a pulse find is necessary
6. INPUTS path Number of the path being defined This value can be from 0 to 511 value Pointer to location containing the fixture Deskew value for the path indicated OUTPUTS Returns S A_ SUCCESS upon completion or a negative value to indicate error 158 SECTION 3 GENERAL COMMAND REFERENCE OWAVECREST CORPORATION 2005 3 6 MISCELLANEOUS RESULT AND STATUS FUNCTIONS double __stdcall FCNL GetXval PLTD plot long indx This function is used to simplify the process of extracting X axis information from a PLTD structure In order to reduce memory requirements only Y axis values are contained within PLTD structures This is permissible since X axis values represent the independent variable This function uses the same method for calculating the X axis values based on the elements in the measurement structure Results are only valid after a successful call to FCNL_RqstAll FCNL MultPkt or FCNL GrpGetPkt INPUTS plot Pointer to a PLTD structure Memory needs to be allocated by the caller This pointer will be the PLTD structure pointer used in the measurement command of interest indx Index from which to determine X value range is 0 to tPlot Numb 10 OUTPUTS The value is double of the x coordinate EXAMPLE FCNL_RgstAll ApiDevld amp hist WIND_ HIST execute a histogram based on settings in hist structure as defined in preceding lines val FCNL_GetXval amp hist tAcum inpIndx get x value of Accumu
7. OWAVECREST CORPORATION 2005 APPENDIX B VBASIC EXAMPLE 179 The definition doesn t acquire anything You can loop and re use the sam use WavGrpGetAll to acquire definition over and over again whole block of data results out of the group data For Round 0 To 1 Step 1 WavGrpGetAll does the measurements and gets th retn FCNL GrpGetAll ApiDevid 1 If retn lt gt SIA SUCCESS Then GoTo Error End If The following calls parse the individual There must be a 1 to 1 correspondence betw calls retn FCNL GrpGetAsc AsciData 0 256 If retn lt gt SIA SUCCESS Then GoTo Error End If For AsciLeng O To 255 Step 1 per per amp Chr AsciData AsciLeng n the definition and these Next AsciLeng The same method is used for binary blocks from ascii requests retn FCNL GrpGetAsc data 0 2400 If retn lt gt SIA SUCCESS Then GoTo Error End If For structure calls the bGetPlot argument must be the same as in the definition retn FCNL GrpGetPkt bHist WIND HIST 0 If retn lt gt SIA SUCCESS Then GoTo Error End If retn FCNL GrpGetAsc AsciData 0 256 If retn lt gt SIA SUCCESS Then GoTo Error End If For AsciLeng 0 To 255 Step 1 pw pw amp Chr AsciData AscilLeng Next AsciLeng If bGetPlot 1 plots are returned these can be BIG and will be slower retn FCNL GrpGetPkt bJitt
8. Transmit Mode Receiv Add In Card Mode Transmit Add In Card Mode Receiv System Card Mode Transmit System Card Mode PCIX_RX_MODE Point may be one of the following constants SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES OWAVECREST CORPORATION 2005 IPcnt IHiRFmV ILoORFmvV lIdleOk dAttn tRcpm IGood dEyeOffs dXmnDiff dXmxDiff Used internally DO NOT ALT dVdiffPP dVdRatio dOpnEyeT dMedEyeT dOpnEyeTiM dTranVolts dDeemVolts This field specifies the voltage thresholds to be used when calculating rise and fall times The voltage thresholds are assumed to be symmetrical about the 50 threshold and this is the distance from the 50 threshold to the starting and ending thresholds For example if this field is equal to 30 then 20 and 80 thresholds are used If this field is equal to 40 then 10 and 90 thresholds are used The absolute voltage levels used are based on the previous pulsefind minimum and maximum voltages If this field is negative then the absolute rise and fall thresholds are taken from the following fields 1HiRFmV and l1LoRFmv Default 30 Absolute rise fall voltage if 1Pcnt lt 0 in units of mV Default 250 Absolute rise fall voltage if 1Pcnt lt 0 in units of mV Default 250 This flag is set by the system when an Idle Mode measurement is successfully made The results are then applied in subsequent measurements Set this flag to zero to invalidate the pre
9. clear the memory for bcam structure FCNL DefRcpm bcam set beam structures to default values execute the measurement get plot data FCNL RqstPkt ApiDevld amp bcam WIND _RCPM FCNL_ RqstAll ApiDevld amp bcam WIND _RCPM 7 7 FCNL_ClrRcpm amp bcam deallocate the structure OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 45 2 21 DATACOM KNOWN PATTERN WITH MARKER TOOL The Datacom Known Pattern With Marker Tool is used to measure jitter on serial communication signals This tool is not protocol specific and works with all communication standards that rely on jitter separation to define jitter limits for compliance Such standards include Fibre Channel Gigabit Ethernet the XAUI layer of 10G Ethernet SFI 4 SFI 5 XFP RapidIO PCI Express and Serial ATA This tool requires that a pattern trigger be available either externally from the test environment or internally from the PM50 Measurements are made based on this diagram Each measurement is from the first edge after the pattern trigger to each subsequent edge in the pattern DDJ is based on edges 1 through n where n is the last edge in the pattern PJ and RJ estimates are based on edges 1 through m where m is last edge measured based on the prescribed cutoff frequency Pattern Trigger dJ Ld Lg typedef struct Input parameters PARM tParm Contains
10. 38 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 dPerPdev Contains the Pl dPerPmin Contains the Pl dPerPmax Contains the Pl dPerMavg Contains the Pl R 1 Sigma value R minimum value R maximum value average valu Hef ff ef A YU dPerMdev Contains the PER 1 Sigma value dPerMmin Contains the PER minimum value dPerMmax Contains the PER maximum value dDuty Contains the returned duty cycle dFreq Contains the carrier frequency dVmin Pulse find Min voltage dVmax Pulse find Max voltage void _ stdcall FCNL DefClok CLOK clok This function is used to fill the Clok structure for the Clock Statistics tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the CLOK structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS clok Pointer to a CLOK structure Memory needs to be allocated by the caller OUTPUTS None void _ stdcall FCNL_ClrClok CLOK clok This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the clok structure INPUTS clok Po
11. Next Round Error Return an error message if we had a problem If retn Then mainDisplay Text mainDisplay amp vbCrLf amp ERROR Return Code amp Format retn 0 End If Perform any cleanup and exit FCNL ClrHist bHist FCNL ClrJitt bJitt FCNL ClrDcom bDcom COMM CloseDev ApiDevid End Sub 182 APPENDIX B VBasic EXAMPLE WAVECREST CORPORATION 2005 APPENDIX C PAPI REVISION CHANGES The following listings provide changes to the measurement window structures and sub structures for all supported revisions of PAPI Find the version of GigaView or VISI that is currently installed on your SIA 3000 All the changes in that section and previous sections newer versions show the differences between the latest version of PAPI and the version of PAPI compatible with your SIA 3000 GIGAVIEW 1 5 CHANGES FROM GIGAVIEW 1 4 New Tools Folded Eye Diagram FEYE Measurement Window Structure Changes Added Input Parameters None Sub Structure Changes None GIGAVIEW 1 4 CHANGES FROM GIGAVIEW 1 3 New Tools PCI Express 1 1 Clock Analysis PCLK PCI Express 1 1 Hardware Clock Recovery PCIM PCI Express ATA 1 1 Software Clock Recovery EXPR Serial ATA Gen2i amp Gen2m ATA2 Serial ATA Gen1x amp Gen2x ATAX Measurement Window Structure Changes Added Input Parameters None Sub Structure Changes None GIGAVIEW 1 3 CHANGES FROM GIGAVIEW 1 2 New Tools Feature Analysis
12. Tail fit FFT plots for enabled modes DCOM OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 47 48 tParm sPtnName lAcqMode IRndMode IQckMode lIntMode A structure of type PARM that contains acquisition parameters The PARM structure is discussed in full detail in Section 2 4 A character array containing the name of pattern file to be used the file must exist in the pattern directory C VISI on the SIA3000 or else an error will be returned The first time a measurement is performed the pattern is loaded into structure tPatn Valid Entries a valid file name including extension Default k285 ptn Measurement mode for Random Jitter RJ and Periodic Jitter PJ estimate To calculate RJ and PJ variance data for each transition must be captured This variance data is then passed through an FFT to create the frequency response Since rise time and fall time may be asymmetrical bogus frequency components could be inserted into the RJ amp PJ records if both rising and falling edges were used in the data records Since the frequency response will be calculated based on the records the slew rat ffect must be eliminated from the data To do this we force the measurement to either capture only rising edges or falling edges for this data record For completeness the start of the measurement could be either a rising or a falling edge This parameter allows the user to select
13. WAVECREST CORPORATION 2005 tComp A structure of type PLTD which contains the single ended time domain plot of the negative channel voltage information for channel n structures See Section 2 3 for further details on PLTD void _ stdcall FCNL_DefOsci OSCI osci This function is used to fill the osci structure for the Oscilloscope tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the OSCI structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS osci Pointer to a OSCI structure Memory needs to be allocated by the caller OUTPUTS None void _ stdcall FCNL_ClrOsci OSCI osci This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the OSCi structure INPUTS osci Pointer to a OSCI structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static OSCI oscope memset oscope 0 sizeof OSCI FCNL DefOsci oscope oscope oscope oscope oscope oscope oscope tparm tparm tparm tparm ISLE 1Stop lIncr FCNL_RgstPkt FCNL RqstA
14. FFT window and analysis parameters ra long lIncStop Increase stop count by this value XJ long lMaxStop Maximum stop count to collect data xJ long lAutoFix If true calculate the above parameters long lPadl double dCornFrq Corner Frequency for RJ PJ E double dRjpjFmn Minimum integration limit for RJ PJ double dRjpjFmx Maximum integration limit for RJ PJ long 1FftAvgs 2 fft_avgs averages used to smooth FFT Output parameters long 1Good Flag indicates valid data in structure RRR KK RK KKK KK KK KR KK KK KK KK KK KK KK double dWndFact1Clk These values are used internally double dWndFactNClk DO NOT ALTER x AA PLTD tSigm Contains the 1 Sigma plot array 2 PLTD tPeak Contains the max min plot array PLTD trfti Frequency plot data on 1 clock basis xJ double dPjit1Clk Periodic jitter on 1 clk basis E double dRjit1Clk Random jitter on 1 clk basis long PeakDatalClk Tracks detected spikes in RJ PJ data long 1PeakNumb1Clk Count of detected spikes Af long 1PeakRsvd1Clk Used to track memory allocation XF long lPad2 PLTD tFftN Frequency plot data on N clock basis aif double dPjitNClk Periodic jitter on N clk basis double dRjJitNClk Random jitter on N clk basis long 1PeakDataNClk Tracks detected spikes in RJ PJ data KJ long 1PeakNumbNC1k Count of detected spikes ES long lPeakRsvdNC1k Used to track memory alloca
15. This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the stat structure INPUTS stat Pointer to a STAT structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE define TRUE 1 define FALSE 0 static STAT statistics declare statistics to be a structure of type STAT memset statistics 0 sizeof STAT clear the memory for statistics structure FCNL DefStat statistics set statistics structure to default values NOTE statistics tparm are also set to defaults by this command statistics tParm 1ChanNum 2 3 lt lt 16 Set ch 2 for start and ch 3 for stop statistics tParm 1SampCnt 1 000 Set sample size to 1k per burst statistics tParm 1FuncNum FUNC_TPD PP make propogation delay meas from rising edge on ch2 to rising edge on ch 2 statistics tParm lExternArm 1 use chl as arm channel statistics tParm lAutoArm ARM_EXTRN use External Arming statistics tParm 1StrtCnt 1 start measurement on first edge of ch2 after the arm signal statistics tParm 1StopCnt 6 stop measurement on sixth edge of ch3 after the arm signal FCNL RqstPkt ApiDevId amp statistics WIND STAT execute the measurement If statistics lGood TRUE printf nSkew d n statistics dMean Print skew measurement printf nSkew jitter d n statistics dSdev print skew jitter result FCNL
16. double dMeasSig 1 Sigma value of measured normal data long 1NormCnt Hits in adjacent cycle normal data long lPadl double dNormMin Min in adjacent cycle normal data double dNormMax Max in adjacent cycle normal data double dNormAvg Avg of adjacent cycle normal data double dNormSig 1 Sig of adjacent cycle normal data Kf 30 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 long 1TotlCnt of hits in measured accumulated data long lPad2 double dTotlMin Min in measured accumulated data double dTotlMax Max in measured accumulated data double dTotlAvg Avg of measured accumulated data x7 double dTotlSig 1 Sig of measured accumulated data long lAcumCnt Hits in adjacent cycle accumulated data long lPad3 double dAcumMin Min in adj cycle accumulated data double dAcumMax Max in adj cycle accumulated data double dAcumAvg Avg of adj cycle accumulated data x double dAcumSig 1 Sig of adj cycle accumulated data m s double dDutyMax Maximum value of duty cycle measurement double dDutyMin Minimum value of duty cycle measurement double dDutyAvg Average value of duty cycle measurement long 1BinNumb RRR RK KKK KKK KKK KK A long lPad4 These values are all used internally double dLtSigma PREVSIGMA as part of the measurement process double dRtS
17. long 1FuncNum long 1ChanNum long 1StrtCnt long 1StopCnt long lSampCnt long lPadLocl double dStrtvlt double dStopVlt long 1ExtnArm long lPadLoc2 long lOscTrig long lOscEdge long 1FiltEnb long lPadLoc3 double dFiltMin double dFiltMax long lAutoArm long lArmEdge long lGatEdge long 1PadLoc4 double dArmVolt double dGatVolt long 1GateEnb long 1CmdFlag long 1FndMode long 1FndPcnt long lPadLoc5 long lPadLoc6 long lPadLoc7 2 6 long 1TimeOut long lArmMove long NotUsed 2 PARM 1FuncNum Function to meas 2 Channel F F F F 1 Channel F F F F F F F Default F Function to measure Channel to measure Channel start count Channel stop count Sample size Start voltage Stop voltage Arm when external is selected O scope trigger O scope rise fall trig Filter enable Filter minimum Filter maximum Auto arm enable mode Arm rise fall edge Gate rise fall edge Arm user voltage Gate voltage Enable gating Command flag for timestamping etc Pulse find mode Pulse find percent Timeout in sec s if negative it s ms Arming delay in steps can be ure use any of the following UNC_TPD PP TPD UNC_TPD MM TPD UNC_TPD_PM TPD UNC_TPD_MP TPD UNC_TT_P Rising edge time UNC_ TT M Falling edge time UNC_PW_P Posi
18. long 1MinEftv Min probability for effective fit 4 long lMaxEftv Max probability for effective fit 12 46 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES OWAVECREST CORPORATION 2005 long 1FiltEnb Enable IDLE character insertion filter long 10ckT3it Fast total jitter calc no bathtubs long LTETeCnt Sample count per pass when tailfitting Output parameters long 1Good Flag indicates valid data in structure PATN tPatn Internal representation of pattern double dWndFact E A long 1MaxStop These values are all used internally long 1CmpMode es long 1PosRoll DO NOT ALTER long lNegRo11 long lAdjustPW Z 1 RR KR KK RK KK KR KK KK KK AA DDJT tDdjtData Raw DCD DDJ measurements Ki long 1DdjtRsvd Used to track memory allocation Ey double dMeasDatal 2 Raw allmeas histogram when auto arming long lMeasRsvd 2 Used to track memory allocation Y double dRjpjDatal 4 Raw variance data E long 1RjpjRsvd 4 J Used to track memory allocation E double dTfitData 4 Raw tail fit data if used i long 1TfitRsvd 4 J Used to track memory allocation ES long lPeakDatal 4 Tracks detected spikes in RJ PJ data Ep long lPeakNumb 4 J Count of detected spikes Ef long lPeakRsval 4 1
19. Bathtub plot PLOT tEftvPlot Effective Bathtub plots if enabled PLOT tSigmNorm 1 Sigma plots 7 PLOT tFreqNorm Frequency plots es KPWM tParm A structure of type PARM that contains acquisition parameters The PARM structure is discussed in full detail in Section 2 4 tFfts A structure of type FFTS that contains the setup parameters for the FFT See Section 2 10 for further details on FFTS structures sPtnName A character array containing the name of pattern file to be used the file must exist in the pattern directory C VISI on the SIA3000 or else an error will be returned The first time a measurement is performed the pattern is loaded in structure tPatn Valid Entries a valid file name including extension Default k285 ptn lAcqEdge Reference Edge and RJ PJ measure edge EDGE FALL or EDGE RISE Default EDGE_RISE lOneEdge This parameter is used to enable a special mode where only rising or falling edges are used to access DCD ISI as is the Case for the special PCI Express Clock Tool Setting this parameter to 1 will enable this special mode Valid Entries 0 disable single edge mode 1 enable single edge mode Default 0 IQckMode Parameter used to enable Quick Mode QuickMode uses a sparse sample of data points for the PJ and RJ estimates In this mode the accuracy of these estimates is greatly reduced depending on the application Setting this structure element to 1 enables quick mode valid with externa
20. OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 89 2 31 OSCILLOSCOPE TOOL The Oscilloscope Tool is typically used to view the waveform of a signal relative to a trigger In a diagnostic environment this tool is essential when debugging any signal measurement challenge In a production environment this capability is used to make voltage measurements on signals such as amplitude glitch energy overshoot and undershoot This section describes the structure used to initiate a waveform capture This is the original measurement window structure for conducting an oscilloscope measurement and was later replaced by the Scope Tool but is still supported for legacy operations typedef struct Input parameters PARM tParm Contains acquisition parameters FETS tFfts FFT window and analysis parameters y long LStrts Start time ps 20 000 to 100 000 000 long 1Stop Stop time ps 20 000 to 100 000 000 long lIncr Time increment ps minimum is 10 Output parameters long 1Good Flag indicates valid data in structure PLTD tTime POSS CHNS Time domain plot of voltage data ES PLTD tFreq POSS CHNS Frequency domain plot of voltage data PLTD tNorm POSS _CHNS Normal channel voltage data 3000 only PLTD tComp POSS CHNS Complimentary voltage data 3000 only OSCI tParm A struc
21. iCnt dCal lLpat lEpat dCalUI Pointer to raw hex data wd Pointer to run length encoded data KJ Pointer to start stop counts to use X Pointer to calibration data if present The length of pattern in UI El The edge count of pattern pos or neg No Cal data taken at this unit interval el FFT WINDOW AND ANALYSIS STRUCTURE This is an input structure used to specify the type of windowing function to use when generating an FFT It also contains information for an average calculation that is performed on the resulting FFT for some specific tools such as Low Frequency Modulation Analysis typedef struct long long double double double FFTS lWinType lPadMult dctrFreq dRngWdth dAlphFct lWinType lPadMult dCtrFreq dRngWdth dAlphFct Window type FFT FFT RCT KAI FFT_TRI FFT_HAM FFT_H A FFT BL A 1 Na FFT G Default Power of Default G Default Default Default Frequency over which to assess dYavg in plot array Width over which to assess dYavg Window type use FFT constants above ef Power of 2 to use for padding 0 5 Frequency to assess yavg in plot array Width over which to assess yavg Alpha factor for Kaiser Bessel window use one of the following Rectangular window Kaiser Bessel window Triangular window Hamming window Hanning window Blackman window Gaussian window FFT KAI 2 to
22. 250 Absolute rise fall voltage if 1Pcnt lt 0 in units of mV Default 250 Input selection can be any of the following SCOP_INPS NORM Input Only SCOP_INPS COMP Input Only SCOP_INPS DIFF Input minus Input SCOP_INPS BOTH Input and Input SCOP_INPS COMM Input plus Input Default SCOP_INPS NORM Measure flag this is a bitfield which may be created by combining any or all of the following constants SCOP MEAS RISEFALL Rise and Fall times are calculated SCOP_MEAS VTYPICAL Vtop and Vbase are calculated SCOP MEAS VEXTREME Vmin and Vmax are calculated SCOP_MEAS OVERUNDR Overshoot and Undershoot are calculated SCOP_MEAS WAVEFORM Vavg and Vrms are calculated SCOP_MEAS VERTHIST Create a vertical histogram SCOP MEAS HORZHIST Create a horizontal histogram SCOP_MEAS EYEMASKS Apply an Eye Mask Keep In Out Region Default None of the above are included This parameter is a bi directional structure element that tracks the number of acquisitions since last reset This flag can be read after an execution or set prior to an execution Setting this parameter to 0 essentially resets this register It will be automatically incremented when a measurement is performed Valid Entries any integer greater than or equal to 0 Default 0 This variable is used to calculate the number of averages to use Increasing the numbe
23. CANL clear the memory for clk structure set clk structures to default values execute the measurement get plot data deallocate the structure OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 37 2 18 CLOCK STATISTICS TOOL The Statistics panel displays the results of several basic clock parameters mean minimum maximum 1 sigma peak to peak hits frequency and duty cycle Also displayed are the measured Vstart Vstop as well as the Vp p Vmax and Vmin of the input channels The Statistics panel provides a summary of the statistics from a single histogram of measurements of the chosen function period rise time fall time positive pulse width and negative pulse width The tool reports the clock frequency with 9 digits of precision Duty cycle is displayed in this tool typedef struct Input parameters PARM tParm Contains acquisition parameters 4 long 1Pfnd Force a pulse find befor ach measure long lOckMeas Tf true skip frequency and voltages Output parameters long 1Good Flag indicates valid data in structure long lPadl double dPwPavg Contains the PW average valu double dPwPdev Contains the PW 1 Sigma value ae double dPwPmin Contains the PW minimum value f double dPwPmax Contains the PW maximum value ES double dPwMavg Contai
24. Differential channel voltage data last pass only bNrmData INrmRsvd bCmpData ICmpRsvd bDifData IDifRsvd for internal use only DO NOT ALTER or try to use OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 7 72 void __stdcall FCNL DefFeye FEYE feye This function is used to fill the feye structure for the Folded Eye tool with reasonable default values It is recommended that this function be called initially even 1f parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the FEYE structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS feye Pointer to a FEYE structure Memory needs to be allocated by the caller OUTPUTS None void __stdcall FCNL_ClrFeye FEYE feye This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the feye structure INPUTS feye Pointer to a FEYE structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static FEYE feye memset amp feye 0 sizeof FEYE FCNL DefFeye amp feye FCNL_RqstPkt ApiDevId amp feye WIND FEYE FCNL RqstAll ApiDevId amp feye WIND FEYE 7 7 FCNL
25. GENERAL COMMAND REFERENCE 55 long __stdcall FCNL_DSM16SetSwitchNumber long ApiDevId long MuxAddr long switchNum Use this function to reconfigure the switch settings of the DSM connected to the device specified in ApiDevld INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 MuxAddr An integer address identifying DSM to select The range is 1 to 8 based on information in above note SwitchNum Integer containing the switch number to activate The range for the relays is 11 to 18 for bank 1 21 to 28 for bank 2 OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error long __stdcall FCNL_DefPathMap long path long DevType char DevName long Channel long MuxSwitch long MuxIsADsm Use this function to map an unique path pin number to an individual channel on a particular device This function will initialize the device if this had not been done previously INPUTS Path Number of the path being defined This value can be from 0 to 511 DevType Number that indicates the device type HPIB 0 HP Systems Only GPIB 1 CUST1 11 CUST2 12 CUST3 13 DevName A pointer to an ASCII string containing a device name Channel A valid SIA channel of the device named in DevName above MuxSwitch A flag indicating if an external MUX is included in path MuxlsADsm A flag indicating if a DSM is included in this path OUTPUTS Ret
26. Maximum value relative to clock edge E double dDataSig 1 Sigma of all values relative to clock double dAvgSkew Average of all values relative to clock double dUnitInt Measured Unit Interval long JUNitoff RR RRR KKK KK KR KK KK IK A long 1SpanCnt AY double dRiseMin These values are all used internally double dRiseMax ea as part of the measurement process E double dFallMin ER double dFallMax E long lRiseBin pe DO NOT ALTER ES long lFallBin J5 ES double dLtSigma PREVSIGMA double ARtSigma PREVSIGMA ad double dAltMean RR RR KK RK KKK KR KK KK I A PLTD tRise Histogram of rising edge data PLTD tFall Histogram of falling edge data ay PLTD tBoth Histogram of combined edge data PLTD tRiseProb Probability Histogram of rising edges PLTD tFallProb Probability Histogram of falling edges PLTD tBothProb Probability Histogram of combined edges PLTD tBath Bathtub curves determined from PDF PLTD tEftv Effective Bathtub curves if enabled TFIT tTfit Structure containing tail fit info f EYEH 58 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 tParm IChanNum dStrtvit dStopVIt IPassCnt IRefEdge A structure of type PARM that contains acquisition parameter The PARM is discussed in full detail in Section 2 4 Be sure to ither set the following parameters in tParm for a successful EyeHistogram
27. Measure flag see defines above long lPass Acquisitions so far set to 0 to reset long lAvgs 2 lAvgs averages used to smooth data long lPadl MASK tMask Structure which holds mask definition double dMargin Margin in percentage 1 0 to 1 0 E double dHistDly Histogram horizontal location seconds double dHistWid Histogram horizontal width seconds double dHistVlt Histogram vertical location volts Xy double dHistHgt Histogram vertical height volts E double dAttn POSS CHNS Attenuation factor dB per channel Output parameters long 1Good Flag indicates valid data in structure long lPad2 OTYS qNorm POSS CHNS Normal channel quantities ay QTYS qComp POSS _CHNS Complimentary channel quantities OTYS qDiff POSS CHNS Differential quantities eh QTYS qComm POSS _CHNS Common A B quantities A PLTD tXval Xaxis data to go with the voltage data PLTD tNorm POSS_CHNS Normal channel voltage data xf PLTD tComp POSS CHNS Complimentary channel voltage data PLTD tDiff POSS CHNS Differential voltage data PLTD tComm POSS CHNS Common A B voltage data OHIS tHorz POSS CHNS Horizontal histogram data Xj OHIS tVert POSS CHNS Vertical histogram data Ay SCOP tParm A structure of type PARM that contains acquisition parameter The PARM is discussed in full detail in Section 2 4 LVoff n Offset voltage us
28. Pk pk differential voltage Fh double dVdRatio De emphaisis voltage ratio x7 double dOpnEyeT Eye opening double dMedEyeT Median to max jitter E double dVcommonAc V x cm acp Af double dVcommonDc V x cm dc Ki double dVcmDcActv V x cm dc active idle delta double dVcmIdleDc V x cm idle dce ay double dVcmDcLine V x cm dc line delta me double dVcmDcDpls V x cm dc d oh double dVcmDcDmin V x cm dce d double dVIdleDiff V x idle diffp x QTYS qNorm Normal channel quantities Ef QTYS qComp Complimentary channel quantities E PLTD tNrmScop Normal channel voltage data ES PLTD tCmpScop Complimentary channel voltage data char bTranEye long lTranRsv char bDeemEye long 1DeemRsv PCIX ICompPnt Compliance Point may be one of the following constants PCIX RX MODE Receive Mod PCIX TX MODE Transmit Mode PCIX RX CARD Receive Add In Card Mode PCIX TX CARD Transmit Add In Card Mode OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES JOI PCIX_RX_SYST Receive System Card Mode PCIX TX SYST Transmit System Card Mode Default PCIX_RX_MODE IPcnt This field specifies the voltage thresholds to be used when calculating rise and fall times The voltage thresholds are assumed to be symmetrical about the 50 threshold and this is the distance from the 50 threshold to the starting and ending thresholds For example if this field is equa
29. Used to track memory allocation Hy double dFreqData 4 Raw FFT output when averaging long lFreqRsvd 4 Used to track memory allocation eS double dTailData 4 Raw tailfit FFT output when averaging long lTailRsvd 4 J Used to track memory allocation E long lHits Total samples for DDJT RJ PJ combined long lPad2 double dDdjt DCD DDJ jitter double dRang Pk Pk of allmeas histogram for auto arm double dRjit 4 Random jitter for enabled modes x7 double dPjit 4 Periodic jitter for enabled modes double dTjit 4 Total jitter for enabled modes me double dEftvLtDj 4 Effective jitter when enabled af double dEftvLtR3 4 double dEftvRtDj 4 double dEftvRtRj 4 PLTD tRiseHist DCD DDJ histogram of rising edges aA PLTD tFallHist DCD DDJ histogram of falling edges 2 PLTD tRiseMeas Rising allmeas histo auto arm only Xj PLTD tFallMeas Falling allmeas histo auto arm only PLTD tNormDdjt DCD DDJvsUI for external arming only a PLTD tHipfDdjt High Pass Filtered DCD DDJvsUI m f PLTD tLopfDdjt Low Pass filtered DCD DDJvsUI PLTD tBathPlot 4 1 Bathtub plots for enabled modes PLTD tEftvPlot 4 Effective Bathtub plots if enabled PLTD tSigmNorm 4 1 Sigma plots for enabled modes ey PLTD tSigmTail 4 1 Sigma tail fits for enabled modes PLTD tFreqNorm 4 Frequency plots for enabled modes PLTD tFregTail 4
30. WAVECREST Be certain of the signal you send PRODUCTION APPLICATION PROGRAMMING INTERFACE PAPI REFERENCE MANUAL 200212 04 REV A This page intentionally left blank WAVECREST CORPORATION continually engages in research related to product improvement New material production methods and design refinements are introduced into existing products without notice as a routine expression of that philosophy For this reason any current WAVECREST product may differ in some respect from its published description but will always equal or exceed the original design specifications unless otherwise stated Copyright 2005 WAVECREST CORPORATION 7626 GOLDEN TRIANGLE DRIVE EDEN PRAIRIE MINNESOTA 55344 952 831 0030 800 733 7128 WWW WAVECREST COM ALL RIGHTS RESERVED U S Patent Nos 4 908 784 and 6 185 509 6 194 925 6 298 315 Bl 6 356 850 6 393 088 6 449 570 and R O C Invention Patent No 146548 other United States and foreign patents pending WAVECREST SIA 3000 GigaView Remote GigaView and TailFit are trademarks of WAVECREST CORPORATION PCI Express is a registered trademark of PCI SIG in the United States and or other countries Visual Basic is a registered trademark of Microsoft Corporation ATTENTION USE OF THE SOFTWARE IS SUBJECT TO THE WAVECREST SOFTWARE LICENSE TERMS SET FORTH BELOW USING THE SOFTWARE INDICATES YOUR ACCEPTANCE OF THESE LICENSE TERMS IF YOU DO NOT ACCEPT THESE LICENSE TERMS YOU MUST RETURN THE
31. Window to draw within CDC pCdc CRect wind in device coordinates PLDT pldt Source plot structure double xmin Plot extents to use when double xmax drawing this allows a double ymin margin to be added around double ymax plot or overlay of plots with differing extents t X point as a percent of window extents gt dXmin xmin xmax xmin t X point in device coordinates wind gt right wind gt left uble wind gt left t Y point as a percent of window extents dData 0 ymin ymax ymin t Y point in device coordinates wind gt bottom wind gt top y double wind gt top ent location int x to the first plot point int y i lt pldt gt lNumb i te what the next X point is dt gt dXmax pldt gt dXmin le pldt gt 1Numb 1 double i pldt gt dXmin ot X point as a percent of window extents xmax xmin xmin ot X point in device coordinates le wind gt right wind gt left double wind gt left ot Y point as a percent of window extents gt dData i ymin ymax ymin ot Y point in device coordinates le wind gt bottom wind gt top y double wind gt top ne to this plot point TO de IAE y r AA y Y de 168 SECTION 4 CODE SAMPLES OWAVECREST CORPORATION 2005 PERFORMING A DATACOM MEASUREMENT This code snippet shows
32. dataJit lQckT3it TRUE FCNL_RgstPkt ApiDevld amp dataJit WIND_DCOM FCNL_RgstAll Print Total If dataJit lGood gt 0 FCNL_ClrDcom ApiDevld Jitter Estimate printf nTJ amp dataJit amp dataJit WIND DCOM type DCOM clear the memory for dataJit structure set dataJit structure to default values NOTE dataJit tparm dataJit tRatelnf dataJit DdjtInf dataJit tRjpjinf dataJit tPatn and dataJit tDdjtData are also set to defaults by this command Set channel number to 1 Set Pattern Marker to Channel 2 Capture 500 measurements per pass Set to External Arming mode Use k28 5 pattern Perform TailFit for RJ estimate SIA3000 decide how many TailFit samples to take Set sample count for BitRate meas To 10 000 and Pattern Repeats to 100 for improved DDJ measurement accuracy Set Corner Frequency to 637kHz Use simple calc for TJ for faster result Let execute the measurement get plot data Sd n dataJit dTjit 0 deallocate the structure 56 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 2 22 DATACOM RANDOM DATA WITH BIT CLOCK TOOL The Datacom Random Data With Bit Clock Tool is used to measure jitter from a reference clock to a data signal This measurement setup is the same as the setup used by an oscilloscope when generating an Eye Diagram or for Eye Mask testing The measurement starts out
33. 0 sizeof HIST Allocate memory for measurement structure FCNL DefHist amp hist set structure to defaults hist tParm 1FuncNum FUNC_PER Select period meas function of histogram tool hist tParm 1ChanNum 1 Select channel number 1 hist tParm 1StrtCnt 1 start on first edge after arm hist tParm 1StopCnt 2 stop measurement on second rising edge FCNL RqstPkt ApiDevld amp hist WIND HIST execute the measurement IO SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES OWAVECREST CORPORATION 2005 long __stdcall FCNL_RqstAll long ApiDevid void pData long nType This function is for getting the plot data of a particular type of measurement like histogram that was done immediately prior to this request This command is kept separate from the measurement command to minimize test time when the plot data is not desired Once this command is executed the plot data can be extracted from the measurement window histogram See Section 2 3 for information on the PLTD structure and Section 2 40 for an example on extracting plot data from a measurement window structure INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 pData Pointer to a particular tool structure like HIST DCOM etc that contains the input output and plot values nType Flag specifying the type of the request such as WIND_HIST WIND_JITT etc OUTPUTS Returns SIA SUCCESS upon successful
34. 1000 0 dFreqRes Frequency resolution that is desired Default 1 0 IFftAvgs 2 fft_avgs averages used to smooth FFT Default 2 IGood Flag indicates valid data in structure tTime Time domain plot data tStmp Time stamp array not normally plotted tFft1 Frequency plot data on 1 clock basis tPhas Phase noise plot in dBc Hz 104 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 dCarFreq Carrier frequency dSmpRate Sampling rate dValByDec n Phase Noise by Decade first is 10Hz last is fMax zero means illegal value void __stdcall FCNL DefPhas PHAS phas This function is used to fill the phas structure for the Phase Noise tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the PHAS structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS phas Pointer to a PHAS structure Memory needs to be allocated by the caller OUTPUTS None void __stdcall FCNL_ClrPhas PHAS phas This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the phas structure INPUTS phas Pointer to a PHA
35. 172 SECTION 4 CODE SAMPLES WAVECREST CORPORATION 2005 5 1 SECTION 5 BUILD CONSIDERATIONS SUPPORTED COMPILERS FOR THE WAVECREST PRODUCTION API The WAVECREST Production API was built and is supported using the following compilers Other compilers may be used and provide satisfactory results although performance is not guaranteed Win32 Win9x WinNT 4 0 and Win2k Microsoft Visual C 5 0 and later Microsoft C C Optimizing Compiler 11 00 Microsoft Visual Basic 6 0 and later National Instruments LabVIEW 6 1 and later HP UX 9 05 10 2 and 11i HP C ANSI C Developer s Bundle B 10 20 03 Sun 4 1 x Solaris 1 SPARCompiler C 3 0 1 Sun 2 5 1 or above Solaris 2 SPARCompiler C 3 0 1 LINUX 7 2 and above GNU compiler gcc version 2 96 or above BUILD REQUIREMENTS When building an application using the WAVECREST Production API the following requirements need to be considered DEVELOPING WITH C The define CPLUSPLUS must be supplied if you are developing a C application This informs the compiler that the module was created as a C library and does not contain the additional information that is normally contained in a C library If you are developing a standard C application supplying this define will result in an error If you are using a command line compiler this define may be supplied as follows cl c DCPLUSPLUS sample c WIN32 WIN9X WINNT 4 0 WIN2K AND WINXP A static stub library and dynamic libra
36. CallBackFunc function 1f the return value is gt 0 the current channel is calibrated If the return value is 0 the current channel is skipped INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 CallBackFunc A pointer to a function to call to determine if the channel should be calibrated or skip the channel see functional description below CallBackFunc cannot be NULL It must follow these rules long CallBackFunc long ApiDevID char Prompt It must return an integer value of gt 0 Continue with this channel 0 Skip this channel ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 Prompt A pointer to a string prompt generally specifying what an operator needs to do before calibrating the channel OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error abort Deskew external calibration without DC Calibration OWAVECREST CORPORATION 2005 SECTION 3 GENERAL COMMAND REFERENCE 53 long __stdcall FCNL_CalDeskewDc long ApiDevid long CallBackFunc long ApiDevID char prompt This function will calibrate all the channels installed in the device according to the following conditions determined by the CallBackFunc function If the return value is gt 0 the current channel is calibrated If the return value is 0 the current channel is skipped INPUTS ApiDevid Integer cont
37. Default 0 Random Data With Bit Clock Tool which specifies most of the input and output parameters necessary for a data signal analysis The user will need to review all of the default parameters of the Random Data With Bit Clock Tool and decide which to change Cl Gl Fl FI Flag indicates valid data in structure Internal parameter do not modify Normal channel voltage data Complimentary channel voltage data Differential mode IN IN voltage data Common mode IN IN voltage data OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 9 void _ stdcall FCNL DefAtax ATAX atax This function is used to fill the atax structure for the Serial ATA tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the ATAX structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS atax Pointer to a ATAX structure Memory needs to be allocated by the caller OUTPUTS None void _ stdcall FCNL_ClrAtax ATAX atax This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the atax
38. Normal channel voltage data ES tCmpScop Complimentary channel voltage data tDifScop Differential voltage data ef tComScop Common A B voltage data Kf Offset voltage used for scope acquire specified in mV this is provided to allow the for external attenuation Attenuation factor in dB results to be scaled to compensat from sources such as probes Default 0 This is the same struc With Bitclock tool It ture as is defined in the Random Data contains all the acquisition parameters and all the output results associated with this measurement with the exception of those defined directly above Default See Random Data With Bitclock Tool Flag indicates valid data in structure Normal channel voltage data Complimentary channel voltage data Differential voltage data A B Common voltage data void _ stdcall FCNL_DefInfi INFI infi This function is used to fill the infi structure for the Infiniband Compliance tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the INFI structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS infi Pointe
39. OUTPUTS None int _ stdcall IO write int ApiDevid void buf long cnt Write cnt bytes from buf to ApiDevid Use IO_count to check actual number of bytes written INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 The device must have been opened using IO_ open buf Location of data to write cnt Number of bytes to write OUTPUTS Returns an integer containing the status of the last I O operation 148 SECTION 3 GENERAL COMMAND REFERENCE OWAVECREST CORPORATION 2005 3 2 MEASUREMENT UTILITY FUNCTIONS The following functions perform actions that will prepare a configured measurement for execution by setting thresholds or timing values based on detection algorithms long __stdcall FCNL_CalcArmDelay double dFreq PARM tParm This function calculates the Arm Delay for a given input frequency If a math error occurs or an error is found a negative value is returned INPUTS dFreq The current test frequency in MHz tParm A pointer to the PARM structure OUTPUTS Returns S A_ SUCCESS upon completion or a negative value to indicate error long __stdcall FCNL_PulsFnd long ApiDevId PARM tParm This function is used to perform a pulse find operation The pulse find feature determines minimum and maximum voltage levels for the channels specified in the PARM structure and sets the voltage thresholds based on the percentage set in the tParm IFndPent field s
40. PLTD stru ure of DDJ histogram for rising edges re of DDJ histogram for falling edges ture of All Measurements of rising edges ure of All Measurements of falling edges tDcom tBathPlot n PLTD structure of bathtub curves for ach measurement mode cture of Effective Jitter for ach measurement mode tDcom tSigmNorm n PLTD structure of standard Deviation lo versus time tDcom tSigmTail n PLTD str tDcom tFreqNorm n PLTD st tDcom tFreqTail n PLTD stru IGood dDjit Deterministic the Data Dependant Ji any Periodic Jit ructure of lo versus frequ Jitter estimate This valu present dRjit Random Jitter TailFits that dTjit Total Jitter estimate DDJ probability densi estimate This value comes were performed on the accu estimate captured in dRjit tSigmTail create a plot standard deviation Structure of type PLT ucture of lo versus time using TailFit for RJ ency cture of lo versus frequency using TailFit for RJ Flag indicates valid output data in structure e is based strictly on tter calculation and does not account for ter since it is impossible to accurately separate Periodic Jitter in the FFT results when DDJ is from the series of mulated jitter data This value is the convolution of the ty function captured in dDjitand the RJ D containing information necessary to of RJ based on the TailFit results and 1 0 as a function of ac
41. built a basic application and reviewed its composition You should now have a basic understanding of the underlying framework and be ready to leverage that understanding to further explore the interface Subsequent chapters present additional detail concerning the structures and functions provided with the WAVECREST PAPI 8 SECTION INTRODUCTION OWAVECREST CORPORATION 2005 2 1 SECTION 2 TOOL SPECIFIC COMMANDS AND STRUCTURES INTRODUCTION There are 29 tools currently supported in the Production API These tools or measurement windows perform all measurement functions of the SIA 3000 as well as all calculations based on the measurements All of these tools are represented in software to enable easy measurement programming over GPIB For any particular measurement simply select the appropriate tool program the necessary settings and then execute the measurement command All measurements are handled by sending a measurement window structure containing all input parameters to a calling function which initiates the measurement Each of the measurement window structures is specific to one of the standard acquisition tools contained in the GigaView software Additional sub structures are also defined that are used within these standard measurement window structures Beginning with Section 2 3 the additional structures are defined The measurement window structures and commands are detailed for the standard acquisition tools starting
42. if retn FCNL GrpGetPkt amp jitt WIND JITT 1 SIA SUCCESS printf nFCNL GrpGetPkt failed n goto Error if retn FCNL GrpGetPkt amp dcom WIND DCOM 1 SIA SUCCESS printf nFCNL GrpGetPkt failed n goto Error if retn FCNL GrpGetAsc freq sizeof freq SIA SUCCESS 164 SECTION 3 GENERAL COMMAND REFERENCE WAVECREST CORPORATION 2005 printf AnFCNL GrpGetAsc failed n goto Error Print the simple ascii command results printf Group Loop i Period Measurement s n printf Group Loop i Pulsewidth Measurement s n printf Group Loop 1 Frequency Measurement s n Print the start of the binary block of raw data printf Group Loop i Raw Period Measurements lf 1 data 0 le9 data 1 le9 data 2 le9 Print out some of the statistics from the HIST and J printf Group Loo i Histogram Mean lfns n loop 4 printf Group Loo Histogram Sdev lfps n loop 4 ole ole H H H H p p p p printf Group Loop 1 1Clock RJ lfps n loop 1 printf Group Loop i NClock RJ lfps n loop 1 loop 1 per loop 1 pw loop 1 freg fr SLE one ES LOG L TT tool structures t 1 hist dNormAvg 1e9 t 1 hist dNormSig lel2 jitt dRjit1C1k 1e12 jitt dRjitNC1k 1e12 Print the max of the FFT to show how data within a pl printf
43. make period measurements execute the measurement call subroutine which generates a plot of the data contained in the tseries tPeak PLTD structure deallocate the structure see section 2 40 for an example of a subroutine which will plot a PLTD structure OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 133 2 46 RETRIEVING SPIKELISTS Many of the tools that contain FFT s have the ability to detect and characterize spikes by their frequency and amplitude from within the GUI The commands used to retrieve the spikelists were designed to remain flexible and if used properly will adapt from release to release with a simple recompile of your source code This functionality is supported via the low level GPIB command set and the low level communication functions in Section 4 The spikelist GPIB commands take the following form Command syntax SPIKelist lt toolname gt n lt offset gt lt toolname gt is replaced with the same name used with the ACQUIRE command tn is used to specify the channel which the spikelist is taken from lt offset gt is the length in bytes from the start of a binary packet to the pointer to the spikelist to be returned in the same binary packet it is normally calculated from the structure definition The correct way to obtain the spikelist is shown in the following example Initialize RCPM structure and set to defaults stati
44. out the SCOp structure INPUTS scop Pointer to a SCOP structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static SCOP scope declare scope to a structure of type SCOP memset amp scope 0 sizeof SCOP clear the memory for scope structure FCNL DefScop amp scope set scope structures to default values FCNL RqstPkt ApiDevId amp scope WIND SCOP execute the measurement FCNL RqstAll ApiDevId amp scope WIND SCOP get plot data FCNL ClrScop amp scope deallocate the structure 16 Section 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 2 40 SERIAL ATA GEN2I 8 GEN2M TOOL The SERIAL ATA GEN2I amp GEN2M Tool provides both timing and amplitude compliance measurements It accurately determines device performance by quantifying both random and deterministic jitter components typedef struct Input parameters Compliance Point 0 Gen2i 1 Gen2m Offset voltage used for scope acquire Attenuation factor dB KPWM structure holds most information Flag indicates valid data in structure TJ Fbaud 10 RJ Fbaud 10 DJ Fbaud 10 TJ Fbaud 500 RJ Fbaud 500 DJ Fbaud 500 TJ Fbaud 1667
45. 1TailFit TRUE histogram 1MinHits 50 000 histogram lAutoFix TRUE FCNL ClrHist amp histogram memset amp histogram 0 sizeof HIST declare histogram to be a structure of type HIST clear the memory for histogram str set histogram structures to default values capture waveform on channel 1 set measurement to be period measure from first edge to second edge measure 10 000 samples per burst reset pass count to zero indicate TailFit desired don t attempt a TailFit until at least 50 000 measurements are accumulated perform pulse find initially if needed FCNL RqstPkt ApiDevld amp histogram WIND_HIST execute the measurement FCNL RqstAll ApiDevId amp histogram WIND HIST get plot data deallocate the structure SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 2 28 INFINIBAND TOOL This tool is similar to the Random Data With Bitclock Tool but also provides voltage information typedef struct Input parameters long long double E YEH Outpu long long LTD LTD LTD LTD INFI tEyeh IGood tNrmScop tCmpScop tDifScop tComScop ey 1Voff Offset voltage used for scope acquire lPadl dAttn Attenuation factor dB e tEyeh EYEH structure holds most information t parameters 1Good Flag indicates valid data in structure lPad2 tNrmScop
46. 2 MEASUREMENT COMMANDS AND STRUCTURES 93 void __stdcall FCNL DefPcim PCIM pcim This function is used to fill the pcim structure for the PCI Express Compliance tool with reasonable default values It is recommended that this function be called initially even 1f parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the PCIM structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS pcim Pointer to a PCIM structure Memory needs to be allocated by the caller OUTPUTS None void __stdcall FCNL_ClrPcim PCIM pcim This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the pcim structure INPUTS pcim Pointer to a PCIM structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static PCIM pcim declare pcim to a structure of type PCIM memset amp pcim 0 sizeof PCIM clear the memory for pci structure FCNL DefPcim amp pcim set pci structures to default values FCNL_RgstPkt ApiDevId amp pcim WIND PCIM FCNL RqstAll ApiDevId amp pcim WIND PCIM execute the measurement get plot data includes tRcpm 7 7 FCNL ClrPcim amp pcim deallocate t
47. 20 level for pulse find calculation Default PCNT 5050 1TimeOut Seconds for timeout before returning an error A positive number is used to indicate a value in seconds a negative number is used to indicate a value in milliseconds Ex 100 indicates 100ms The range of valid times is 10ms to 50s Default 2 lArmMove This variable controls an arming delay that can be applied to ither an external arm source or the channel itself if auto arming is enabled Values in the range of 40 to 40 are acceptable each step represents a 25ps delay from nominal Arm Delay ns Index Value 19 0 40 19 75 10 20 0 o AR 40 Default 10 1NotUsed n Formerly DSM channel select no longer used void __stdcall FCNL_DefParm PARM parm This function is used to fill a PARM structure with default values that are reasonable It is not necessary to clear a PARM structure using the standard memset function prior to calling this function since no dynamic memory allocation exists within this structure INPUTS parm Pointer to a PARM structure Memory needs to be allocated by the caller OUTPUTS None OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 15 2 5 TAILFIT RESULT STRUCTURE This output structure holds the results of a TailFit algorithm execution This structure is imbedded in all of the measurement structures that use the TailFit algorithm to separate Random Jitter and Deterministic Jitter from a
48. 7 Ef E E El s7 Ah kkkkkkkkkkkk kkkkkkkkkkkk kkkkk kkkkk kkkkkkk kkkkk kkkkk kkkkk kk kkkkk kkkkk kkkkk kkkkkxkx void DrawPlot CDC pCdc double xmin long i double x double xrange Y double yrange x x y y pCdc for pCdc Linel plot gt dXmin xmin doub Windows plot doub double MoveTo 1 pe I double rect right rect left x double rect left double rect bottom rect top 1 0 y doubl return 0 CRect xmax xmin ymax ymin dData 0 ymin yrange le rect bottom rect top 1 0 y rect top int x int y i x xmin xrange e lt plot lNumb plot dData i ymin yrange rect top Po int x int y double xmax xrange rect PLTD plot double ymin double ymax normalize first X plot point le rect right rect left x double rect left coordina normalize first Y plot point tes in pixels convert first plot point to convert first plot point to Windows coordinates in pixels Note function is used to account for the reverse direction of the coordinate system between pixels and the plot elements 1 0 y the move display cursor to start of plot i normalize new x coordinate plot dXmax plot dXmin double i find next x coordinate double plot 1Numb 1 plot dXm
49. ACYC structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE define define TRUE 1 FALSE 0 static ACYC cyc2cyc declare cyc2cyc to be a structure of type ACYC memset amp cyc2cyc 0 sizeof ACYC clear the memory for cyc2cyc FCNL_DefAcyc amp cyc2cyc set histogram structures to default values cyc2cyc tparm 1ChanNum 1 capture waveform on channel 1 cyc2cyc tparm 1SampCnt 10 000 measure 10 000 samples per burst cyc2cyc 1TailFit TRUE indicate TailFit desired cyc2cyc 1MinHits 50 000 don t attempt a TailFit until at least 50 000 measurements have been accuired cyc2cyc 1DutCycl TRUE Measure true duty cycle my measuring successive edges FCNL RqstPkt ApiDevId amp cyc2cyc WIND _ACYC execute the measurement FCNL RqstAll ApiDevId cyc2cyc WIND _ACYC get plot data print the worst case period decrease between two adjacent cycles printf Maximum Period Decrease in sample is d n ABS cyc2cyc dNormMin print the worst case period increase between two adjacent cycles within the sample printf Maximum Period Increase in sample is d n ABS cyc2cyc dNormMax FCNL_ClrAcyce 8 cyc2cyc deallocate the structure SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES OWAVECREST CORPORATION 2005 2 17 CLOCK ANALYSIS TOOL This tool combines a few different measurement tools in the SIA 3000 By doing this a larg
50. HIST Added 1Pad0 EYEH RCPM SIMP and STRP Added 1Pad1 PCIX Added 1Pad0 and lPadl SATA Added 1Pad3 1Pad4 and 1Pad5 SCOP Added lPadl and 1Pad2 Sub Structure Changes None 182 APPENDIX C PAPI REVISION CHANGES WAVECREST CORPORATION 2005 GIGAVIEW 1 0 CHANGES FROM VISI 7 4 0 NOTE Beginning with this release VISI is now called GigiView and a new version numbering system has been started New Tools Clock Analysis CANL Infiniband INFT PCI Express PCIX Recovered Clock Pattern Marker dataCOM RCPM Serial ATA SATA Measurement Window Structure Changes Added Input Parameters SCOP dAttn POSS CHNS Added Output Parameters HIST tShrt tLong tBoth SCOP qNorm POSS CHNS qComp POSS_CHNS qDiff POSS CHNS Modified Parameters SCOP qDisp POSS CHNS eliminated Use qNorm POSS CHNS Sub Structure Changes None VISI 7 4 0 CHANGES FROM VISI 7 3 0 New Tools None Measurement Window Structure Changes Added Input Parameters SCOP 1Voff POSS CHNS dHistDly dHistWid dHistVlt dHistHgt Added Output Parameters SCOP tHorz POSS CHNS tVert POSS CHNS Modified Parameters SCOP 1Mask eliminated Sub Structure Changes New Structures Oscilloscope Histogram OHIS Added Parameters QTYS dMidVolts OWAVECREST CORPORATION 2005 APPENDIX C PAPI REVISION CHANGES 83 VISI 7 3 0 CHANGES FROM VISI 7 2 1 New Tools Clock St
51. PLOT tCmpScop Complimentary channel voltage data e PLOT tDifScop Differential voltage data xy char bNrmData Eye diagram of normal data El long 1NrmRsvd This value is used internally char bCmpData Eye diagram of complimentary data long 1CmpRsvd This value is used internally if char bDifData Eye diagram of differential data ES long 1DifRsvd This value is used internally FEYE tParm A structure of type PARM that contains acquisition parameter tParm is discussed in full detail in a previous section IPassCnt This parameter is a bi directional structure element that tracks the number of acquisitions in the data set This flag can be read after an execution or set prior to an execution Setting this parameter to 0 essentially resets the accumulated data on the instrument The value in the returned structure will be automatically incremented by the instrument Valid Entries any integer greater than or equal to 0 Default 0 IPatnLen This parameter configures the number of UI that are measured and folded into the Eye Mask Valid Entries any integer greater than or equal to 1 Default 40 IScopRes This parameter configures the sample interval and is entered in units of picoseconds Valid Entries any integer greater than or equal to 1 7O SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES OWAVECREST CORPORATION 2005 lInps IVoff IVdif tMask dMargin dBitRate
52. PLTD which contains all of the plot information for generating an all measurements histogram of falling edges This plot is only valid when using random mode This histogram is for informational use and qualitative assessment Numbers originating from this measurement methodology are not to be confused with jitter measurements See Section 2 3 for details concerning the PLTD structure and its elements tNormDdjt Structure of type PLTD which contains all of the plot information for generating a DCD DDJ versus UI plot This plot ry f 2 S f 2 S tRiseMeas is only valid in Pattern Marker mode S Section 2 3 for details concerning the PLTD structure and its elements tHipfDdjt Structure of type PLTD which contains all of the plot information for generating an DCD DDJ versus UI plot with the DCD DDJ High Pass Filter enabled This plot is only valid in Pattern Marker Mode and dDdjtHpf is a non negative number For a discussion on the High Pass Filter Function for DCD DDJ data see dDdjtHpf above When dDdjtHpf is enabled the dDdjt value is calculated based on applying the dDdjtHpf filter See Section 2 3 for details concerning the PLTD structure and its elements OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 53 54 tLopfDdjt tBathPlot n tEftvPlot n Structure of type PLTD which con
53. RJ Fbaud 1667 DJ Fbaud 1667 DCD DDJvsUI Fbaud 10 Frequency PLTD Fbaud 10 Bathtub PLTD Fbaud 10 DCD DDJvsUI Fbaud 500 Frequency PLTD Fbaud 500 Bathtub PLTD Fbaud 500 DCD DDJvsUI Fbaud 1667 Frequency PLTD Fbaud 1667 Bathtub PLTD Fbaud 1667 Normal channel voltage data Complimentary channel voltage data Differential voltage data Common A B voltage data may be one of the following constants Offset voltage used for scope acquire specified in mV Attenuation factor in dB this is provided to allow the results to be scaled to compensate for external attenuation from sources such as probes Known Pattern With Marker Tool which specifies most of the input and output parameters necessary for a data signal analysis The user will need to review all of the default parameters of the Known Pattern With Marker Tool and decide Flag indicates valid data in structure er do not modify long 1CompPnt long 1Voff double dAttn KPWM tKpwm Output parameters long 1Good long lPad2 double dTjit10 double dRjit10 double dbDjit10 double dTjit500 double dRjit500 double daDJit500 double dTjit1667 double dRjitl667 double dDjitl667 PLTD tDdjt10 PLTD tFregl0 PLTD tBath10 PLTD tDdjt500 PLTD tFreq500 PLTD tBath500 PLTD tDdjt1667 PLTD tFreql667 PLTD tBath1667 PLTD tNrmScop PLTD tCmpScop PLTD tDifScop PLTD tComScop ATA2 ICompPnt Compliance Po
54. RK KK RK Y double dHistMed Total Jitter Histogram median location double dLeftMed Left Edge Histogram median location double dRghtMed Right Edge Histogram median location Ay long lAcumHit Accumulated Histogram hits ef long lPassHit Histogram hits for this pass only LA TFIT ELEC Structure containing tail fit info Xj PATN tPatn Internal representation of pattern j long lPeakNumb Count of detected spikes x7 long lPeakRsvd Used to track memory allocation x long lPeakData Tracks detected spikes in RJ PJ data K long 1DdjtRsvd Used to track memory allocation DDJT tDdjtData Raw DCD DDJ measurements is long lPadl PLTD tRiseHist DCD DDJ histogram of rising edges PLTD tFallHist DCD DDJ histogram of falling edges PLTD tNormDdjt DCD DDJvsUI for external arming only ay PLTD tTotlHist Histogram of all acquires combined PLTD tLeftHist Leftmost Histogram Af PLTD tRghtHist Rightmost Histogram PLTD tBathPlot Bathtub curves determined from PDF PLTD tSigmPlot 1 Sigma vs span plot a PLTD tFreqPlot Jitter vs frequency plot E RCPM OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 43 tParm A structure of type PARM that contains acquisition parameters The PARM structure is discussed in full detail in Section 2 4 sPtnName A character array containing the name of pattern file to be used the file must exist in the
55. SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 2 35 PCI EXPRESS 1 0a TOOL The PCI Express 1 0a Tool provides both timing and amplitude compliance measurements in any environment system or IC electrical or optical Compliance tests can be completed in seconds with a simple pass fail indication for each test parameter It is the most comprehensive and easy to use signal integrity test solution on the market today The PCI Express 1 0a Tool accurately determines device performance by quantifying random and deterministic jitter components In addition the PCI Express 1 0a Tool can quickly isolate and quantify unwanted deterministic jitter due to crosstalk and EMI with a spectral view of jitter as well as perform Eye Diagram analysis for a quick qualitative view of device performance typedef struct Input parameters long 1CompPnt Compliance Point 0 RX 1 TX f long 1Pent Amount 50 to calc rise fall time long 1HiRFmV Absolute rise fall voltage if lPcnt lt 0 long 1LoRFEmV Absolute rise fall voltage if lPcnt lt 0 long 1Idleok Common mode idle voltages are valid Ep long 1Pad0 double dAttn Attenuation factor dB RCPM tRepm Contains acquisition parameters Kof Output parameters long 1Good Flag indicates valid data in structure long lPadl double dEyeOffs double dxXmnDiff double dXmxDiff double dvVdiffPP
56. SOFTWARE FOR A FULL REFUND WAVECREST SOFTWARE LICENSE TERMS The following License Terms govern your use of the accompanying Software unless you have a separate written agreement with Wavecrest License Grant Wavecrest grants you a license to use one copy of the Software USE means storing loading installing executing or displaying the Software You may not modify the Software or disable any licensing or control features of the Software Ownership The Software is owned and copyrighted by Wavecrest or its third party suppliers The Software is the subject of certain patents pending Your license confers no title or ownership in the Software and is not a sale of any rights in the Software Copies You may only make copies of the Software for archival purposes or when copying is an essential step in the authorized Use of the Software You must reproduce all copyright notices in the original Software on all copies You may not copy the Software onto any bulletin board or similar system You may not make any changes or modifications to the Software or reverse engineer decompile or disassemble the Software Transfer Your license will automatically terminate upon any transfer of the Software Upon transfer you must deliver the Software including any copies and related documentation to the transferee The transferee must accept these License Terms as a condition to the transfer Termination Wavecrest may terminate your license upon notice
57. SYST NOGO skip command should be sent to the device see functional description below CallBackFunc can be NULL or it must follow these rules long CallBackFunc long ApiDevID char Prompt It must return an integer value of gt 0 Send SYST GO to device 0 Send SYST NOGO to device ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 Prompt A pointer to a string prompt generally specifying what an operator needs to do before the SYST GO or SYST NOGO command should be sent to the device Prompt A pointer to a string prompt that will be passed to the CallBackFunction generally specifying what an operator needs to do before the SYST GO or SYST NOGO command should be sent to the device see functional description below This parameter is simply passed through and is not checked for NULL OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error abort EXAMPLE long CallBackFunc long ApiDeviId char prompt Declare CalBackFunc to be a pointer to a function with two parameters passed in Declare ConChan to be function with two parameters passed in static long ConChan long ApiDevId char Prompt main char userPrompt 256 declare userPrompt to be a string of 256 characters in length CallBackFune ConChan Let CallBackFunc point to ConChan strcpy userPrompt Connect CH1 Define userPrompt string FCN
58. Tool execution or review the default settings This is a 32 bit word that represents the channel for this measurement The upper 16 bits define which channel will be used as the referenc dge or bit clock the lower 16 bits are used for identifying the channel to be measured It is best to manipulate the channel selection field using HEX format or by using binary shift functions See sample code at the end of this section for an example of using binary shift function in the channel declaration in HEX format simply enter the reference channel number in the first two bytes and the measured channel in the last two bytes such that 0x000m000n would indicate a reference channel of m and a measured channel of n in hexadecimal format where m and n are elements of the set 1 2 3 4 5 6 7 8 9 a For example 0x00050003 would indicate that channel 5 was the channel with the bit clock signal and channel 3 was the channel with the data signal The default for tParm 1ChanNum within a EYEH structure is 0x00010002 indicating that the reference channel is defaulted to channel 1 and the measured channel is set to 2 Since measurements are made from the data signal to the next clock signal the start of measurement is the data signal and thus dStrtVlt controls the threshold level for the data channel It is typically best to leave this variable at the default and allow Pulse Find to establish th
59. a long lAcqEdge Reference Edge and RJ PJ measur dg if Could be EDGE FALL or EDGE RISE E long lOneEdge If true DCD ISI is rise or fall only long lQckMode Enable quick mode external arm only long lIntMode Interpolation mode non zero is linear long lErrProb Error probability for Total Jitter af Valid range is 1 to 16 mi long lHeadoOff Header offset external arming only ef double dCornFrq Corner Frequency for RJ PJ SPEC tRatelInf Parameters to acquire Bit Rate Ef SPEC tDdjtInf Parameters to acquire DCD DDJ Sl SPEC tRjpjInf Parameters to acquire RJ PJ XX double dLpfFreq Low pass filter corner frequency double dHpfFreq High pass filter corner frequency aA double dLpfDamp Low pass filter 2nd order damp factor double dHpfDamp High pass filter 2nd order damp factor long lLpfMode LPF mode see constants above ES long lHpfMode HPF mode see constants above mal long 1FndEftv Flag to attempt effective jitter calc long 1MinEftv Min probability for effective fit 4 long 1MaxEftv Max probability for effective fit 12 long 1FiltEnb Enable IDLE character insertion filter long 10ckT3it Fast total jitter calc no bathtubs long 1P11Comp Enable PLL Curve Spike Compensation long 1Pad0 Output parameters long 1Good Flag indicates valid data in structure PATN tPatn Internal representation
60. acp double dVcommonDc V x cm dce AA double dVcmDcActv V x cm dc active idle delta E double dVcmIdleDc V x cm idle dc double dVcmDcLine V x cm dc line delta f double dVcmDcDpls V x cm dc d double dVcmDcDmin V x cm dce d y double dVIdleDiff V x idle diffp El OTYS qNorm Normal channel quantities ay QTYS qComp Complimentary channel quantities PLTD tNrmScop Normal channel voltage data ef PLTD tCmpScop Complimentary channel voltage data E PLTD tTtlHist Total Histogram of median to max data char pbTranEye long lTranRsv char bDeemEye long 1DeemRsv EXPR ICompPnt Compliance Point may be one of the following constants PCIX_RX_MOD Receive Mod PCIX_TX_MODE Transmit Mode PCIX_RX CARD Receive Add In Card Mode PCIX TX CARD Transmit Add In Card Mode PCIX_RX_SYST Receive System Card Mode PCIX TX SYST Transmit System Card Mode Default PCIX_RX_MODE my F py my F py OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 095 IPcnt IHIRFmV ILoORFmV lIdleOk IPass dAttn tKpwm IGood ITtlHits dHistMed dVdiffPP dVdRatio dOpnEyeT dMedEyeT dOpnEyeTiM dTranVolts dDeemVolts This fi calculating rise and fall times assumed to be symmetrical about the 50 threshold ld specifies th voltage thresholds to be used when The voltage thresholds are and this is then 20 absolu
61. amp eyehist set eyehist structure to default values NOTE eyehist tparm are also set to defaults by this command eyehist tParm lChanNum 1 2 lt lt 16 Set ch 1 for data and ch 2 for ref clk eyehist tParm 1SampCnt 50 000 Set sample size to 50k eyehist 1TailFit TRUE Enable TailFit for RJ estimate eyehist ForcFit TRUE Force the fit with first 50k samples eyehist MinHits 50 000 set minimum samples to 50k FCNL RqstPkt ApiDevld amp eyehist WIND EYEH execute the measurement Print Total Jitter Estimate If eyehist lGood gt 0 printf nTJ Sd n eyehist tTfit dTjit FCNL_ClrEyeh amp eyehist deallocate the structure OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 63 2 23 DATACOM RANDOM DATA WITH NO MARKER TOOL The Datacom Random Data With No Marker Tool is used to estimate jitter components on random data signals without the benefit of a repeating data pattern or access to a bit clock This tool is used primarily to capture relative jitter amplitudes and is not considered an accepted means of accurately measuring jitter components on a data signal For accurate jitter measurements on data signals it is imperative to have a repeating pattern and a pattern trigger or have access to a bit clock This tool the Random Data Tool is prone to inaccuracies when periodic jitter is present and data dependent jitter is present on the signal This tool does not
62. channel inputs for illustration purposes define IN 1 1 define IN 2 2 int main int argc char argv Allocate Required Structures Each tool has a specific structure and several function calls to facilitate the data acquisition process These structures contain input information concerning how to acquire the data and output data as a result of the acquisition DCOM dcom HIST hist JITT jitt long ApiDevld retn 0 char cmnd 256 Avoid compiler warnings argc argv Initialize The Structures Before utilizing a Tool Structure it must be initialized This initialization may involve two or more parts The first part is to zero out the array using the standard memset function This step should only be performed once immediately after the structure is allocated and prior to it being used as information concerning dynamic memory allocation is subsequently added to the structure The second part is to call the function intended to initialize each of the particular structure parameters to their default values In this case the FCNL_Defxxxx function is called This insures that all parameters contain reasonable values The final step is to manually modify any parameters from their default values Great care should be used when manually adjusting parameters to ensure that valid values are used NOTE IChanNum contains start channel in the lower 16 bits and stop channel in the upper 16 bits OWAVECREST COR
63. completion or a specific error code negative value indicating what type of error occurred EXAMPLE FCNL RqstPkt ApiDevld amp hist WIND HIST execute the measurement FCNL RqstAll ApiDevId amp hist WIND HIST get plot data long __stdcall FCNL_MultPkt long ApiDevId void pData long nType long nRefChn long nChns Use this function to perform pseudo parallel data acquisitions with a particular tool Histogram dataCOM etc on multiple channels Measurement setup is contained in the first element of the array of structures pointed to by pData Results of the measurement are contained in the array structures Only the structure needs to be defined All other structures will be copied from the first array structure In the example below two structures are created hist 0 to hist 1 and defined as type HIST Then only the first element hist 0 is modified with the desired measurement setup parameters The calling function will copy the info in hist 0 to hist 1 INPUTS ApiDevid Contains the API Device ID of the device This value can be from 1 to 31 pData Pointer to an array of particular tool structures such as HIST DCOM etc to hold the input and output values nType Flag specifying the type of tool structure WIND_HIST WIND_JITT etc nRefChn Specifies the reference channel for channel to channel measurements For single channel measurements set to 0 nChns Bit field specifying the channels to measu
64. data pattern generator But in many cases this signal is not externally available and it is useful to have the SIA 3000 Pattern Marker PM50 option The pattern requirements are such that it needs to be a repeating pattern typedef struct PARM tParm Contains acquisition parameters char sPtnName 128 Name of pattern file to be used Xy long lPassCnt Acquisitions so far set to 0 to reset long lHeadoff Header offset external arming only long 1FftMode O NOFFT 1 Fc 1667 2 Use dCornFrq long 1MinHits Minimum hits before trying tail fit m s long 1TailFit If non zero a tail fit will be tried long lErrProb Error probability for Total Jitter EJ Valid range is 1 to 16 double dBitRate Bit Rate may be specified or measured double dCornFrq Corner Frequency for RJ PJ o double dMaxSerr LIM ERROR if this std error exceeded long 1Good Flag indicates valid data in structure long 1BinNumb RRR RK KKK KKK KK KK KK A long 1MaxStop Le long 1PtnRoll El long 1FallAdj These values are all used internally long 1ClokAdj is as part of the measurement process Ail long lLeftCnt pe DO NOT ALTER long 1RghtCnt double dWndFact y double dDdjMove JE EL double dLtSigma PREVSIGMA double aRtSigma PREVSIGMA FA AKERA RK RK RR EK KK RR KKK RAK KK ARIK AK
65. frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the pcix structure INPUTS pcix Pointer to a PCIX structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static PCIX pci declare pci to a structure of type PCIX memset amp pci 0 sizeof PCIX clear the memory for pci structure FCNL_DefPcix amp pci set pci structures to default values execute the measurement get plot data includes tRcpm FCNL RqstPkt ApiDevId amp pci WIND PCIX FCNL RqstAll ApiDevId amp pci WIND PCIX 7 7 FCNL_ClrPcix pci deallocate the structure OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 103 2 36 PHASE NOISE TOOL The Phase Noise tool allows users to measure phase noise in clock oscillator sources By simply choosing the highest frequency to be displayed and the frequency resolution the tool will measure and display the phase noise spectrum This tool reports the phase noise values at common offset frequencies The Phase Noise tool is used to show the amplitude and frequency of phase noise relative to the carrier signal frequency This tool measures the fluctuations in the phase of a signal caused by time domain instabilities Fast and easy phase noise measurements of oscillators and PLL devices can be easily correlated to other noise effects on the signal The sensitivity of the tool is limited by
66. g edge This measurement is performed tParm SampCnt number of Entries 0 do not perform a Duty Cycle measurement 1 perform a Duty Cycle measurement LESS 0 indicates valid output data in structure r of hits in measured normal data um period measurement as captured from the latest tion of adjacent cycle jitter measurement um period measurement as captured from the latest tion of adjacent cycle jitter measurement tion of adjacent cycle jitter measurement Standard deviation lo of period measurements as captured from the latest execution of the measurement 32 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 INormCnt Number of measurements captured in latest adjacent cycle jitter execution dNormMin Minimum measured value of adjacent cycle period deviation This value indicates the smallest amplitude of period change between two adjacent periods This value is most likely a negative number indicating that the measurement is actually the largest decreas in period between two adjacent periods dNormMax Maximum measured value of adjacent cycle period deviation This value indicates the largest amplitude of period change between two adjacent periods This value is most likely a positive value indicating that this register contains the largest increase in periods between two adjacent periods To identify the overall largest change in perio
67. guaranteed If the curve fit is unsuccessful a negative value will be returned in this variable tRiseHist Structure of type PLOT which contains all of the plot information for generating a DCD DDJ histogram of rising dges S Section 2 3 for details concerning the PLOT structure and its elements tFallHist Structure of type PLOT which contains all of the plot information for generating a DCD DDJ histogram of falling dges S Section 2 3 for details concerning the PLOT structure and its elements tNormDdjt Structure of type PLOT which contains all of the plot information for generating a DCD DDJ versus UI plot This plot is only valid in Pattern Marker mode S Section 2 3 for details concerning the PLOT structure and its elements tHipfDdjt Structure of type PLOT which contains all of the plot information for generating an DCD DDJ versus UI plot with the DCD DDJ High Pass Filter enabled This plot is only valid in Pattern Marker Mode and dDdjtHpf is a non negative number For a discussion on the High Pass Filter Function for DCD DDJ data see dDajtHpf above When dDdjtHpf is enabled the dDdjt value is calculated based on applying the dDdjtHpf filter See Section 2 3 for details concerning the PLOT structure and its elements tLopfDdjt Structure of type PLOT which contains all of the plot information for generating an DCD DDJ versus UI plot with the DCD DDJ Low Pass Filter enabled This plot is only valid in Pattern Marker Mode and dDdjt
68. idle character filter 1 nable idle character filter Default 0 IQckTjit Flag to indicate a fast total jitter calculation will be performed using simple linear calculation of Total Jitter instead of convolving the DJ Probability Density Functions and the RJ Probability Density Functions This calculation is based on the formula TJ DJ n RJ where DJ and RJ are measured and n is the multiplier based on a theoretical Gaussian distribution Valid Entries 0 do not use convolution for TJ est 1 Convolve DJ and RJ for TJ est Default 0 26 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 IPIIComp IGood tPatn dBitRate Hits dDdjt dDjit dRjit dPjit dTjit dEftvLtDj dEftvLtRj dEftvRtDj Enable PLL Curve Spike Compensation If a low frequency spike is detected in the Power Spectral Density FFT plot it is automatically removed and it s energy is dispersed evenly across the rest of the Power Spectral Density Default 0 Flag indicates valid output data in structure A positive value in this parameter indicates that the measurement was completed successfully and valid data can be extracted from this structure Structure of type PATN which holds all of the pattern information with regards to pattern length pattern content marker placement relative to location in pattern and other pattern specific metrics See Section 2 9 for a detailed description of th
69. if the measurement mode changed Default 0 Flag indicating whether to perform a duty cycle measurement Measuring thr successive transitions this measurement represents the absolute duty cycle and allows the user to identify the maximum minimum and average duty cycle Valid Entries 0 do not perform a duty cycle measurement 1 perform a duty cycle measurement Default 0 Flag to indicate whether to use a user specified limit for maximum minimum cycle to cycle jitter or to use the Rambus defined specification If this flag is set the parameter specified in dSpecVal will be used as the pass fail limit for this test Valid Entries O Use Rambus defined specification 1 Use limit defined in dSpecVal 0 Default Test limit used by this tool depending on the state of lUsrSpec indicate a pass fail condition based on the measured cycle to cycle jitter for each pass polarity and accumulation Flag used to indicate valid output data in structure dDutyMin dDutyAvg Maximum minimum and average values of duty cycle measurement Structure of type PLTD containing all of the necessary information to draw a histogram of data containing the maximum increase in period of adjacent positive periods periods characterized by a rising edges S Section 2 3 for details of the PLTD structure and its elements Structure of type PLTD containing all of the necessary information to draw a histogram of data containing
70. is 1 Data is collected tParm IStrtCnt to IMaxStrt Valid Entries 1 to 1Max Default ik Maximum start count used Defaul 250 Relationship of start an measurement is done eith time measurements This parameter to skip between successive tart count by this value the default for start counts ranging from Strt The start count will be incremented from the value in tParm IStriCnt to IMaxStrt in step size of IIncStrt Valid Entries tParm StrtCnt to 10 000 000 d stop counts In general this er on a Single channel measuring successive cycles slew the stop count will alwa or one more than the sta measurements Valid Entries ANL_FNC_PLUS1 ANL_FNC_START Default ANL_FNC_PLUS1 If set to 1 calculate t the total number of meas lDataPts plus informatio Valid Entries 0 use 1M rate period or pulse width As such ys be either equal to the start count rt count in the case of period top Count Start Count 1 se this for period measurements top Count Start Count se this for skew slew rate and ulse width Ol Eu E a he number of measurements skipped and urements based on lSpanCnt and n measured on the live data signal axStrt tParm 1StrtCnt amp lIncStrt to ate the stop counts for each 1 use 1lSpanCnt DataPts and measured data from calcul measurement signal measur Default 0 The total number of edge maximum delay count for MaxStrt V
71. locations 28 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 dWndFact IMaxStop IPtnRoll AdjustPW These values are for internal use only DO NOT ALTER or try to use tDdjtData Structure which contains the raw DCD DDJ measurements This value is for internal use only DO NOT ALTER or try to use IDdjtRsvd Used to track memory allocation for tDdjtData structures This value is for internal use only DO NOT ALTER or try to use dRjpjData Raw variance data used for the calculation of RJ and PJ This structure is for internal use only DO NOT ALTER or try to use IRjpjRsvd Used to track memory allocation for dRjpjData values This value is for internal use only DO NOT ALTER or try to use IPeakData Tracks detected spikes in RJ PJ data This value is for internal use only DO NOT ALTER or try to use IPeakNumb Count of detected spikes i the IPeakData array IPeakRsvd Used to track memory allocation for IPeakData values This value is for internal use only DO NOT ALTER or try to use ndicates the number of values in OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 29 2 16 ADJACENT CYCLE JITTER TOOL The Adjacent Cycle Jitter tool is used to capture period deviation information for two adjacent cycles This measurement is called out in a few standards as a means to estimate short term jitter Although this metric has li
72. o 1WChpb 1WCcul 1WCcu2 1WCcu3 1WCio lWCmc 1WCfnl lsicl lm o sample SUN 4 1 X SOLARIS 1 The ANSI C compiler must be used ANSI compatibility is enabled from a command line by using the ace command as follows acc c DSUNOS sample c Required GPIB support is supplied by linking to the National Instruments GPIB Library This library must already be installed per manufacturers documentation This library can be included by adding 1gpib to the link command The resulting link command including the Wavecrest API libraries takes the form acc sample o 1WChpb 1WCcul 1WCcu2 1WCcu3 1WCio 1WCmc 1WCfnl lgpib 0 sample SUN 2 5 1 OR ABOVE SOLARIS 2 The standard ANSI C compiler must be used The command line would appear as follows cc c DSUNOS DSOLARIS sample c Required GPIB support is supplied by linking to the National Instruments GPIB Library This library must already be installed per manufacturers documentation This library can be included by adding 1gpib to the link command The resulting link command including the Wavecrest API libraries takes the form cc sample o 1WChpb 1WCcul 1WCcu2 1WCcu3 1WCio 1WCmc 1WCfnl lgpib lm o sample 174 SECTION 5 BUILD CONSIDERATIONS WAVECREST CORPORATION 2005 APPENDIX A ERROR CODES Define Value Description SIA_ SUCCESS 0 Success SIA_ERROR 1 Communication error with device MEM_ERROR 2 Could not allocate required memory CMD_ERROR 3 Invalid param
73. of the device This value can be from 1 to 31 nNumb Long Integer specifying the index of a group to be defined A maximum of 10 groups is allowed at present OUTPUTS Returns an integer 0 specifying a success or a negative value to indicate error long __stdcall FCNL_GrpGetAsc void sBuff long nSize This function gets the ASCII data back corresponding to the FCNL_GrpDefAsc command in the sequence Refer to the manual for the example program that lists the order in which the commands in a group are defined and used INPUTS sBuff Pointer to a void to store the ASCII string from this call Memory to be allocated by the caller nSize Long Integer specifying the number of bytes to fetch OUTPUTS Returns an integer 0 specifying a success or a negative value to indicate error 162 SECTION 3 GENERAL COMMAND REFERENCE WAVECREST CORPORATION 2005 long __stdcall FCNL_GrpGetPkt void pData long nType long bGetPlots This function gets the data back corresponding to the FCNL_GrpDefPkt command in the sequence Refer to the manual for the example program that lists the order in which the commands in a group are defined and used This command is mostly used for getting a single histogram dataCOM etc data back INPUTS pData Pointer to a data structure like HIST DCOM etc to hold the input output plot values nType Long Integer specifying the type of the request like WIND_HIST WIND_JITT etc bGetPlots Long Integer specify
74. only valid when IHpfMode is enabled Low pass damping factor This is only valid when ILpfMode is enabled and a 2 order filter is selected High pass damping factor This is only valid when IHpfMode is enabled and a 2 4 order filter is selected Low pass filter mode One of the following may be used Valid Entries FILTERS DISABLED BRICKWALL FILT ROLLOFF_1STORDI ROLLOFF_2NDORDI PCIX CLOK FILTI Default FILTERS_DISABLED High pass filter mode One of the following may be used Valid Entries FILTERS DISABLED BRICKWALL FILT ROLLOFF_1STORDI ROLLOFF_2NDORDI PCIX CLOK FILT FILTERS_DISABLED Cl El ADD YD dd El E N N NNK A Default OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 25D IFndEftv Flag to indicate that an ffective jitter calculation is to be attempted Effective Jitter is a means of estimating the effective deterministic jitter as it relates toa 5 E Sampled error E Extrapolated probability Actual This is done by first capturing E lated Bathtub 1 bathtub read xtrapolated Bathtub curve versus real bathtu curve as seen by BERT curve using conventional RJ amp DJ estimation techniques then extrapolating from a few points in the bathtub curve to the 5 error probability level to estimate effective DJ Effective RJ is extracte
75. order to project the value of Total Jitter Valid Entries 1 to 16 Default 12 dBitRate Bit Rate may be specified or measured Default 2 5e9 dCornFrq Corner Frequency for RJ PJ estimate in Hertz This value is used in conjunction with the Bit Rate and pattern to determine the maximum stop count to be used to acquire RJ PJ data A lower value increase acquisition time Valid Entries Bit Rate 10 000 000 to Bit Rate I Default 637e3 637kHz Fibre Channel 1X dMaxSerr An error is returned if this std error is exceeded Default 0 5 IGood Flag indicates valid data in structure IBinNumb IMaxStop PtnRoll IFallAdj IClokAdj lLeftCnt IRghtCnt dWndFact dDdjMove dLtSigma n dRtSigma n These values are for internal use only DO NOT ALTER or try to use dHistMed Total Jitter Histogram median location dLeftMed Left Edge Histogram median location dRghtMed Right Edge Histogram median location AcumHit Accumulated Histogram hits IPassHit Histogram hits for this pass only 44 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 tTfit Structure containing tail fit info tPatn Internal representation of pattern IPeakNumb Count of detected spikes IPeakRsvd Used to track memory allocation IPeakData Tracks detected spikes in RJ PJ data IDdjtRsvd Used to track memory allocation tDdjtData Raw DCD DDJ measurem
76. plot magnitude gain response tBodePha Bode plot phase response void __stdcall FCNL_DefApll APLL apll This function is used to fill the apll structure for the PLL Analysis tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the APLL structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS apll Pointer to a APLL structure Memory needs to be allocated by the caller OUTPUTS None OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES void __stdcall FCNL_ClrApll APLL apll This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the apll structure INPUTS apll Pointer to a APLL structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static APL memset FCNL_DefApl FCNL_RqstP FCNL RqstAl a kt 1 FCNL_ClrApl pll L pll 0 sizeof APLL pll ApiDevid amp pll WIND APLL ApiDevid amp pll WIND APLL p11 declare pll to a structure of type APLL clear the memory for pll st
77. provide an eye mask test to be applied to a repeating pattern This allows a DSP Bandwidth Extension algorithm to be applied to improve the apparent front end performance See the SIA 3000 User Manual for additional information concerning the Bandwidth Extension typedef struct Input parameters PARM tParm Contains acquisition parameters long 1PassCnt Acquisitions so far set to 0 to reset long lPatnLen Pattern length in bit periods j long lScopRes Scope resolution in ps increments ES long lInps Input selection see defines above El long 1Voff Voltage offset mV per channel long 1Vdif Differential offset mV per channel MASK tMask Structure which holds mask definition double dMargin Margin in percentage 1 0 to 1 0 ES double dBitRate Bit Rate must be specified double dAttn Attenuation factor dB Output parameters long 1Good Flag indicates valid data in structure long lPad2 double dlstEdge This value is used internally double dNrmPkpk Vpp for Normal Channel Eye Diagrams double dCmpPkpk Vpp for Complimentary Eye Diagrams E double dDifPkpk Vpp for Differential Eye Diagrams E OTYS qNorm Normal channel quantities OTYS qComp Complimentary channel quantities OTYS qDiff Differential channel quantities PLOT tNrmScop Normal channel voltage data a
78. ps n printf dataCOM TJ 1f ps n dcom dDdjt lel2 dcom dRjit 0 lel2 dcom dTjit 0 lel2 Error Return an error message if we had a problem if retn printf Return Code i n retn Perform any cleanup and exit FCNL ClrDcom amp dcom COMM CloseDev ApiDevId return retn SIA SUCCESS SIA SUCCESS OWAVECREST CORPORATION 2005 SECTION 4 CODE SAMPLES 169 4 5 USING A PM50 PATTERN MARKER IN A DATACOM MEASUREMENT This example illustrates how to utilize a PM50 Pattern Marker in a dataCOM measurement to determine bit errors and the Bit Error Rate using the PM50 s Bit Error Counter in in in in in if de de el if de de en en de int clude lt stdio h gt clude lt stdlib h gt clude lt string h gt clude WCcomm h clude WCfcnl h Uncomment for SUNOS define SUNOS 1 WIN32 fine APIDEVTYPE fine DEVICENAME se HPUX fine APIDEVTYPE fine DEVICENAME dif dif fine PATN_WORD_SIZ1 E 20 main DCOM dcom PMKR pmkr SUNOS SOLARIS2 char buff PATN WORD SIZE long ApiDevid Markerld In this example us Ss E GPIB_IO dev5b HPIB_IO hpib 5 indx bitIndx retn 0 the PM50 associated with Input 1 Markerld 1 Initialize our DCOM structure memset amp dcom 0 sizeof DCOM FCNL DefDcom amp dc
79. structure INPUTS atax Pointer to a ATAX structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static ATAX atax declare atax to a structure of type ATAX memset amp atax 0 sizeof ATAX clear the memory for atax structure FCNL_DefAtax amp atax set atax structures to default values execute the measurement get plot data FCNL RqstPkt ApiDevld amp atax WIND ATAX FCNL RqstAll ApiDevld amp atax WIND ATAX 7 7 FCNL_ClrAtax amp atax deallocate the structure 120 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 2 42 SERIAL ATA TOOL The SATA Specification requires that jitter measurements be made from Data edge to Data edge across varying spans The spans are from 0 to 5 UI and then from 6 to 250 UI This tool automates these measurements and provides pass fail results For the specification point A2 or 25 000 UI a 1010 pattern is used and the Low frequency modulation tool can be used This tool requires no knowledge of the data stream prior to making a measurement It simply measures data edge to data edge and places the measurements in their relative bins The bin size is base on the Bit Rate Gb s entered into the tool plus or minus 0 5 UI For example if a span of 1 12UI is measured it is placed in the 1UI bin Some random time later see SIA 3000 measurement theory another measurement is made and is 2 34 UI so it is
80. sure to initialize the TSER structure element INumb to zero when the first measurement is performed via a call to FCNL_RgstPkt On subsequent calls be sure to leave the INumb parameter undeclared so that the tool will continue to accumulate measurements on each successive measurement burst Measurements are acquired as follows Time Series of Period Measurements Example w s Q Q n E p rm IStopCnt Q pP 5 o E oO E E B TParm IStopCnt TParm IStrtCnt TParm StopCnt TParm StrtCnt iT Parm StopCnt TParm StopCnt TParm StrtCnt TParm StrtCnt TParm StrtCnt TParm StopCnt TParm StrtCnt TParm StopCnt Signal F 1 Meas 2nd n Measurement Burst 2 Measurement Burst 4 Measurement Burst typedef struct Input parameters PARM tParm Contains acquisition parameters long 1Numb Measurements so far set to 0 to reset long lPadl double dSpan Span between measurements in seconds EJ long lAutoFix If true perform a pulsefind as req d SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES OWAVECREST CORPORATION 2005 Output parameters long 1Good double dyYstd double dAvar double dSumm Flag indicates valid data in structure g 1 Sigma value calculated on all data g Allan variance calculation E A These values are all used internally
81. take into account any PJ amplitude when estimating Total Jitter Secondly this tool may underestimate the amplitude of DDJ due to data binning errors Data Signal AAA AA A A AA 2UI bin 4UI bin 5UI bin 2UI bin 5UI bin Example of Random Data utility when edge count equals 1 In a complete execution of the random data utility edge count will range from 1 to FC 4 FM where FC is the carrier frequency and FM is the modulation cutoff frequency To capture jitter information this tool measures time from randomly selected transitions in the pattern to a subsequent edge in the pattern some n number of transitions after the start of the measurement n is swept from a count of 1 to a count as defined by the carrier frequency and the desired cutoff frequency Once all of the measurements are captured the data is binned according to their proximity to integer multiples of the bit period For example all measurements within SUI of 5xbit period are placed in the SUI bin Then each bin is parsed for statistical information including jitter and mean offset from ideal The mean offset is used to estimate Data Dependent Jitter DDJ As such the location of the mean for a given bin s histogram could be artificially inflated based on combining measurements from transitions which are not from the same point in the data pattern The above example shows a given burst of measurements where the edge count was equal to 1 During the course of the c
82. the maximum decrease in period of adjacent positive periods See Section 2 3 for details of the PLTD structure and its elements Structure of type PLTD containing all of the necessary information to draw a histogram of data containing the maximum increase in period of adjacent negative periods periods characterized by a falling edges S Section 2 3 for details of the PLTD structure and its elements O SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 tFallMin Structure of type PLTD containing all of the necessary information to draw a histogram of data containing the minimum deltaT of falling adjacent periods See Section 2 3 for details of the PLTD structure and its elements tMaxiLim ucture of type PLTD containing all of the necessary ormation to draw a histogram of maximum limits per ication See Section 2 3 for details of the PLTD ure and its elements La Hh ct Fh tMiniLim ct ure of type PLTD containing all of the necessary mation to draw a histogram of minimum limits per fication See Section 2 3 for details of the PLTD ture and its elements Ye i E ruc r i struc dRiseMax m n A 6x4 array of maximum period increase between two adjacent positive periods organized by the number of accumulated periods and the sweep number Each execution of this structure results in 6 accumulations and 4 sweeps Each sweep is a burst of 40
83. the polarity of both the referenc dge and the measured edge in the data signal The user can select all permutations of rising and falling edges This parameter is parsed as a 4 bit binary value with each bit representing a possible permutation A value of b1111 would indicate that the measurement is to be run using all permutations Valid Entries b0001 rising edge to rising edge b0010 falling edge to falling edge b0100 rising edge to falling edge b1000 falling edge to rising edge Default b0001 rising edge to rising edge Parameter used to enable Random Mode This parameter is only used in conjunction with RAND structures as used in the Random Data Tool This parameter enables random mode valid when auto arming only Setting this parameter to 1 will enable Random Mode Valid Entries 0 disable random data mode 1 enable random data mode Default 0 Parameter used to enable Quick Mode QuickMode uses a sparse sample of data points for the PJ and RJ estimates In this mode the accuracy of these estimates is greatly reduced depending on the application Setting this structure element to 1 enables quick mode valid with external arm only Valid Entries 0 disable quick capture mode 1 enable quick capture mode Default 0 Parameter used to enable linear Interpolation mode for RJ amp PJ estimate RJ amp PJ are calculated based on the frequency data of the n
84. to define the polarity of the clock edge which will be used as the reference Valid Entries EDGE_FALL reference clock to data measurements tothe falling edge of the clock signal EDGE_RISEreference clock to data measurements to the rising edge of the clock signal Default EDGE_RISE OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 50 lErrProb IClokSmp IFItSmp ITailFit IForcFit IMinHits IFndEftv Exponent of Bit Error Probability BER to which Total Jitter will be calculated if TailFit is enabled TJ is calculated based on the convolution of DJ and RJ out to 10 BER where n IErrProb Valid Entries Any integer from 1 to 16 Default 12 Sample size while acquiring clock rate Valid Entries Any integer less than or equal to 1 000 000 Default 10000 Sample size when finding filter limits Valid Entries Any integer less than or equal to 1 000 000 Default 1000 Flag to indicate whether to perform a TailFit on data in the rising and falling data histograms If non zero a tail fit will be attempted The IGood element of the tTfit structure will indicate if the TailFit was successful Setting this structure element to 1 will initiate the TailFit algorithm Valid Entries 0 disable TailFit algorithm 1 enable TailFit algorithm Default 0 Flag to indicate whether to force a TailFit on a fixed sample size or to continu
85. to using the structure INPUTS ssca Pointer to a SSCA structure Memory needs to be allocated by the caller OUTPUTS None void _ stdcall FCNL_ClrSsca SSCA ssca This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the ssca structure INPUTS ssca Pointer to a SSCA structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static SSCA spread declare spread to a structure of type SSCA memset amp spread 0 sizeof SSCA clear the memory for spread structure FCNL_DefSsca amp spread set spread structures to default values FCNL_ RqstPkt ApiDevld amp spread WIND _CLOK FCNL_ RqstAll ApiDeviId amp spread WIND _CLOK execute the measurement get plot data 7 7 FCNL_ClrSsca spread deallocate the structure 126 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES OWAVECREST CORPORATION 2005 2 44 STATISTICS TOOL The statistics tool is used to capture a few basic parameters of a measurement that the user selected in the tParm structure The statistics tool will also return voltage parameters of the signal under test As seen in the accompanying example Vmax for a simple period measurement the number of 7 edge dVmin parameters returned may be more extensive than is typically desired in a production program For la measurement y a simple time measurement it is best to use the gt
86. use only DO NOT ALTER or attempt to interpret IPeakNumbiClk Count of detected spikes observed in the normalized Accumulated Jitter versus frequency plot spectral peaks in 1 clock FFT IPeakRsvdiCIk for internal use only DO NOT ALTER or try to use tFftN A structure of type PLTD containing the Accumulated Jitter versus Frequency plot data The amplitudes show the total amplitude of the modulation and is referred to as N clock mode in reference to edge deviation due to a given modulation tone relative to an ideal clock This is sometimes referred to as accumulated edge jitter S Section 2 3 for details of the PLTD structure elements dPjitNCIk Amplitude of the largest spectral component in the accumulated jitter versus frequency plot N clock PJ estimate dRjitNClk Random jitter calculated based on filter functions if enabled and Accumulated Jitter versus frequency plot RJ as a function of n clock FFT IPeakDataNClk For internal use only DO NOT ALTER or attempt to interpret IPeakNumbNCIk Count of detected spikes observed in the accumulated jitter versus frequency plot spectral peaks in n clock FFT IPeakRsvdNCIk for internal use only DO NOT A dFreq Measured clock frequency TER or try to use OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 75 76 void __stdcall FCNL DefJitt JITT 3it
87. value can be from 1 to 31 tParm Pointer to a PARM acquisition structure filename Name of pattern file to be used for comparison purposes dBits Pointer to a array representing each bit in a pattern ISize Size of array representing each bit in a pattern OUTPUTS Returns S A_ SUCCESS upon successful completion or a specific error code negative value indicating what type of error occurred OWAVECREST CORPORATION 2005 SECTION 3 GENERAL COMMAND REFERENCE 5 3 4 CALIBRATION UTILITY FUNCTIONS long __stdcall FCNL_GoReq long ApiDeviId long ApiDevID char Prompt char Prompt CallBackFunc long This is an internal function used by the calibration functions to allow the programmer to physically change the connections to the instrument either through a matrix or manually with cables This function requires that a process be running on the SIA3000 which has paused operation and sent a RQC_BIT back At present the only functions doing this are the calibration routines Future expansion of This function waits for the RQC_BIT to be set then sends a SYST GO or SYST NOGO to the specified device based on the return value of CallBackFunc Only the calibration commands have the ability to set RQC_BIT and monitor SYST GO and SYST NOGO INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 CallBackFunc A pointer to a function to call to determine if a SYST GO continue or
88. variable Effective Random eRJ jitter estimate in seconds for the left side of the bathtub curve Total effective RJ is calculated by averaging dEftvLtRj and dEftvRtRj In order to calculate the effective jitter the flag IFndEftv must be enabled Since th ffective jitter is calculated by optimizing a curve fit to the bathtub curve a result is not guaranteed If the curve fit is unsuccessful a negative value will be returned in these variables Effective Deterministic eDJ jitter estimate in seconds for the right side of the bathtub curve Total effective DJ is calculated by adding dEftvLtDj to dEftvRtDj In order to calculate the effective jitter the flag IFndEftv must be enabled Since the ffective jitter is calculated by optimizing a curve fit to the bathtub curve a result is not guaranteed If the curve fit is unsuccessful a negative value will be returned in this variable WAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 27 dEftvRtRj Effective Random eRJ jitter estimate in seconds for the right side of the bathtub curve Total effective RJ is calculated by averaging dEftvLtRj and dEftvRtRj In order to calculate th ffective jitter the flag IFndEftv must be enabled Since th ffective jitter is calculated by optimizing a curve fit to the bathtub curve a result is not
89. with Section 2 15 Please note that many of the measurement window structures contain padding fields These fields are usually called 1Pad1 1Pad2 or 1PadLocl 1PadLoc2 and are used to insure that variables are placed in the same absolute locations within the structure regardless of compiler padding which varies from system to system These fields are only used to take up space and can be safely ignored Section 2 2 outlines the calling functions that are used to initiate a measurement and to retrieve the data from the instrument The commands in Section 2 2 are completely independent of the measurement window structure to be used and are used with all of the structures Once the measurement has been successfully completed the results are returned in the output section of the same measurement window structure The basic process for conducting a measurement is as follows 1 Initialize a window structure This means that memory must be allocated variables declared and the structure set to defaults 2 Modify any structure elements as needed for the given measurement Typical modifications include channel number pattern file name if data number of measurements and triggering information 3 Call a measurement command Use one of the measurement commands from Section 3 2 and pass it the window structure defined in 1 and 2 4 Parse the window structure for the results Once the measurement is completed the command will return an
90. with a quick frequency measurement for the reference clock Based on this information the algorithm finds the next clock transition and establishes data filters that limit the data to only those transitions that are within a 0 5 UI window of the expected clock This means that the software will throw out any measurements that are not valid and belong to a different location in the pattern Then the instrument measures from the bit clock to the data channel and generates two histograms of measurements one for each polarity of the data signal Then the histograms are overlaid and the right most and left most edges are used to perform a TailFit for RJ DJ separation Eye Histogram Tool is used primarily for long data patterns greater than 2k in length or for fully random data streams in which no repeating pattern is available The bit clock for this measurement could be placed on any one of the other input channels or may come from the optional Clock Recovery Module CRM available on most SIA3000 systems Ref Channel Bit Clock Data Channel Start of Measurement End of Measurement Histogram of Measurements for rising edges TailFit performed on outermost histogram in both Histogram of directions Measurements for falling edges Measurement methodology for Eye Histogram Measurements WAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 57 typedef struct Input parameters
91. 00 measurements dRiseMin m n A 6x4 array of maximum period decrease between two adjacent positive periods organized by the number of accumulated periods and the sweep number Each execution of this structure results in 6 accumulations and 4 sweeps Each sweep is a burst of 4000 measurements dFallMax m n A 6x4 array of maximum period increase between two adjacent negative periods organized by the number of accumulated periods and the sweep number Each execution of this structure results in 6 accumulations and 4 sweeps Each sweep is a burst of 4000 measurements dFallMin m n A 6x4 array of maximum period decrease between two adjacent negative periods organized by the number of accumulated periods and the sweep number Each execution of this structure results in 6 accumulations and 4 sweeps Each sweep is a burst of 4000 measurements dFreq Measured carrier frequency void _ stdcall FCNL DefDrcg DRCG drcg This function is used to fill the drcg structure for the Rambus DRCG tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the DRCG structure using the standard memset function to ensure that any information pertaining to dynamic mem
92. 18 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 2 41 SERIAL ATA GEN1X amp GEN2X TOOL The SERIAL ATA GEN1X amp GEN2X Tool provides both timing and amplitude compliance measurements It accurately determines device performance by quantifying both random and deterministic jitter components typedef struct Input parameters long long double E YEH Outpu long long PLTD PLTD PLTD PI LTD ATAX ICompPnt IVoff dAttn tEyeh IGood IPad2 tNrmScop tCmpScop tDifScop tComScop 1CompPnt Compliance Point see defines above 1Voff Offset voltage used for scope acquire dAttn Attenuation factor dB tEyeh EYEH structure holds most information t parameters 1Good Flag indicates valid data in structure lPad2 tNrmScop Normal channel voltage data tof tCmpScop Complimentary channel voltage data tDifScop Differential voltage data E tComScop Common A B voltage data K Compliance Point may be one of the following constants ATAX RX 1X MODI 1X Receive Mod ATAX TX 1X MODE 1X Transmit Mode ATAX RX 2X MODE 2X Receive Mod ATAX TX 2X MODE 2X Transmit Mode Default 0 Offset voltage used for scope acquire specified in mV Default 0 Attenuation factor in dB this is provided to allow the results to be scaled to compensate for external attenuation from sources such as probes
93. 2005 The following parameters are for internal use only They are presented for reference only Do not try to read the values or parse the structures nor try to write the various locations dWndFact IMaxStop ICmpMode IPosRoll INegRoll lAdjustPW Thes TER or try to Structure which contains the raw DCD DDJ m DO NOT A tDdjtData IDdjtRsvd dMeasData IMeasRsvd dRjpjData IRjpjRsvd dTfitData ITfitRsvd IPeakData IPeakNumb IPeakRsvd dFreqData IFreqRsvd dTailData ITailRsvd internal value is Used to t structure use Used to t is for in Raw tail as indica non zero ALTER or Used to t is for in ks de rnal Trac inte Count of Used to t is for in not norma value is Used to t is for in Raw tail enabled applicati NOT ALTER is for in the IPeakData DO NOT A use only for internal use only values are for use asurements This T ER or try to use rack memory allocation for tDdjtData structures This is for internal use only DO NOT ER or tructure is for internal use only r dTfitData values ER or rack memory allocation for ternal use only DO NOT AL fit data if tail fit data ted by the IGood variable This s try to use rack memory allocation fo ternal use only DO NOT AL tected spikes in RJ PJ data use only DO NOT ALTER or t detec
94. AE R a E a ds 130 2 46 RETRIEVING SRIKELISTS oi iioii oe oi deadly pound ox tans Cee pee ae ee arate eee 134 2 47 EXAMPLE OF How To DRAW USING A PLOT STRUCTURE ce cece eee ccoo 135 2 48 DEFINES FOR VALUES IN MEASUREMENT STRUCTURES 0 ce cece eee cnc 136 SECTION 3 GENERAL COMMAND REFERENCE escu stos ronda talas 139 3 1 GPIB COMMUNICATION AND I O LAYER FUNCTIONS 0 cece eee ce eee rere 140 COMM LAYER FUNCTIONS 25 5e rs seme aaeed sb ised ace seein adas 140 I O LAYER FUNCTIONS sirere reri ros ia Sete dns Mtn aie ee oa oe eee S 149 3 2 MEASUREMENT UTILITY FUNCTIONS GENERAL DATA ACQUISITION FUNCTIONS 49 3 3 PATTERN AND PM5O FUNCTIONS 1 1 0 cece cence cece re 150 3 4 CALIBRATION UTILITY FUNCTIONS 20 00 cece cence cnn n tenet nent e nen rrer eens 152 3 5 SIGNAL PATH FUNCTIONS DSM 6 PATH MAPPING AND PATH DESKEW 155 3 6 MISCELLANEOUS RESULT AND STATUS FUNCTIONS 0 cece cece cnc 159 3 7 ADVANCED GROUP MEASUREMENT FUNCTIONS 0 cece cece cece een ete n een e nee IGI SECTION 4 CODE SAMPLES 4 MODIFYING WINDOW STRUCTURE PARAMETERS cecececee conri 167 4 2 PERFORMING TAIL E Tnd tect aldo at ld aa dale lntes ide sw 167 4 3 DRAWING FROM A PLOT STRUCTURE cece cece cece erent rr 168 44 PERFORMING A DATACOM MEASUREMENT 0 cece cence ete e ete e teen een ees 169 4 5 USING A PM50 PATTERN MARKER IN A DATACOM MEASUREMENT 0665 170 SECTION 5 BUILD C
95. ApiDevid Contains the API Device ID of the device This value can be from 1 to 31 tPmkr Pointer to a PM50 PMKR measurement and control structure OUTPUTS Returns SIA SUCCESS upon successful completion or a specific error code negative value indicating what type of error occurred long __stdcall FCNL_MarkerStatus long ApiDevId PMKR tPmkr Use this function to monitor the current state of the specified PM50 INPUTS ApiDevid Contains the API Device ID of the device This value can be from 1 to 31 tPmkr Pointer to a PM50 PMKR measurement and control structure OUTPUTS Returns a value gt 0 to indicate the presence of an arming condition on the specified PM50 or an error code negative value indicating what type of error occurred long __stdcall FCNL_MarkerReadErr long ApiDevId PMKR tPmkr Use this function to read bit errors recorded by the specified PM50 INPUTS ApiDevid Contains the API Device ID of the device This value can be from 1 to 31 tPmkr Pointer to a PM50 PMKR measurement and control structure OUTPUTS Returns SIA SUCCESS upon successful completion or a specific error code negative value indicating what type of error occurred long __stdcall FCNL_PatternMatch long ApiDevId PARM tParm const char filename double dBits long 1Size Use this function to perform a functional pattern match test and report results to the user INPUTS ApiDevid Contains the API Device ID of the device This
96. Arm Start Arm 2 S S S top Arm 2 ample Size top Count i ay af E The following code snippet shows how a tailfit can be performed in a Histogram Window Note that it may take many passes for the tailfit to succeed Therefore you may want to error if not successfully in a certain number of passes Set the Pass parameter to 0 to start a new tailfit analysis Allocate window structure HIST tHist memset amp tHist 0 FCNL_DefHist amp tHis Enable tailfit tHist 1TailF Loop until tailfit is successful it sizeof E while tHist tTfit lGood HIST and initialize to defaults if FCNL RqstPkt ApiDevid tHist WIND HIST amp tHist goto ErrorHandler OWAVECREST CORPORATION 2005 SECTION 4 CODE SAMPLES 67 4 3 DRAWING FRO M A PLOT STRUCTURE This code snippet shows how to draw from a plot structure The example is for Microsoft Visual C but can be modified for other platforms void DrawPlot long i double x y First plo x pldt First plo x double x do First plo y pldt gt First plo y double Aas DO Move curr pCdc gt MoveTo for i 1 Calcula x pl doub This pl x X This pl x doub OREA This pl y pldt This pl y doub O Draw li pCdc gt Line Pointer to device context
97. ClrFeye amp feye declare feye to a structure of type FEYE clear the memory for FEYE structure set FEYE structures to default values execute the measurement get plot data deallocate the structure SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 2 26 HIGH FREQUENCY MODULATION ANALYSIS TOOL The High Frequency Modulation Analysis Tool is used typically for frequency analysis of noise on clock and clock like signals 101010 The controls for the tool deal primarily with measurement setup corner frequency selection and normalization technique E ee n n l Signal 71244 Acumn gt gt q This tool will take several randomly selected time measurements using Accumulated Time Analysis ATA The data can be displayed in the time domain accumulated jitter versus time or in the frequency domain jitter versus frequency This latter plot is used to identify spectral peaks in the noise which may indicate modulation and can typically be attributed to crosstalk or EMI effects The Jitter Analysis Tool can be set up to calculate RJ and DJ of a clock signal over a specified frequency band typically the corner frequency to 1 2 the clock rate and separate the DJ by frequency content The DJ measured in this tool is strictly Periodic Jitter typedef struct Input parameters PARM tParm Contains acquisition parameters EL FFTS tFfts
98. ClrStat amp statistics deallocate the structure OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 29 2 45 STRIPCHART TOOL 130 The Time Series Tool is used to capture timing issues that are occurring at sub Hertz rates This tool performs a measurement extracts the statistical information from the measurement burst then waits a defined interval and performs the measurement again This type of measurement is used in Allan Variance measurements and in real time debugging of various environment parameters such as VDD VIL VIH timing skew etc and their impact on various time measurements such as period jitter slew rate and modulation To use this tool the user must initiate a measurement with the TSER structure in a loop that includes the wait time between measurements If this tool is to be used as a debug tool it is recommended that the plot be redrawn between measurements so as to allow the user to see a real time display of the successive measurements It is also recommended that this routine be placed in a user aborted infinite loop such that the user can initiate and stop a Time Series measurement session If this tool is used to simply gather a fixed number of successive measurements and to analyze the variance of the mean peak peak 1s min max over the said number of successive iterations then the last execution s plot structures will contain all of the combined results In both cases be
99. DCD DDJ filter frequency in Hertz negative valu disables filter This filter allows the user to apply a low pass filter function to the DCD DDJ data to approximate the low pass filtering effects that would be present on the receiver or in the transmission line The low pass filter is basically the bandwidth of the transmission line and the input bandwidth of the receiver This is only valid when external arming is enabled Valid Entries 0 to the Carrier Frequency F or 1 to disable Default 1 indicating the filter is off dDdjtHpf High pass DCD DDJ filter frequency in Hertz a negative valu disables filter This filter allows the user to apply a high pass filter function to the DCD DDJ data to approximate the high pass filtering effects that would be present on the receiver or in the transmission line The High Pass filter is basically the PLL s response to the DCD DDJ Since the data will be clocked into the de serializer by the PLL the response of the PLL to the DCD DDJ will become apparent as a function of the PLL to the de serializer This is only valid when external arming is enabled Valid Entries 0 to the Carrier Frequency F or 1 to disable Default 1 indicating the filter is off dRjpjFmn Minimum integration limit for RJ PJ in Hertz a negative valu disables filter This filter is used post measurement as a means of focusing the RJ amp PJ est
100. Default O indicating 2 averages 1 execution 74 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 IGood Flag indicates valid output data in structure A positive value in this parameter indicates that the measurement was completed successfully and valid data can be extracted from this structure dWndFactiClk dWndFactNClk These values are for internal use only DO NOT ALTER or try to use tSigm A structure of type PLTD containing the 1 Sigma plot array This plot is used to observe the standard deviation 10 of accumulated jitter versus time See Section 2 3 for details of the PLTD structure elements tPeak A structure of type PLTD containing the peak to peak 1 s J w o3 Accumulated jitter versus time plot array See Section 2 3 for details of the PLTD structure elements tFft1 A structure of type PLTD containing the Accumulated jitter versus frequency with amplitudes normalized to their effect on 1 clock This is sometimes referred to as accumulated period jitter See Section 2 3 for details of the PLTD structure elements dPjitiClk Amplitude of the largest spectral component in the normalized accumulated jitter versus frequency l clock PJ estimate dRjiticlk Random jitter calculated based on filter functions if enabled and Normalized Accumulated Jitter versus frequency plot RJ as a function of l clock FFT IPeakData1Clk For internal
101. EASUREMENT COMMANDS AND STRUCTURES 137 define CANL MEAS WAVEMATH 1 lt lt 4 define CANL MEAS TIMEPARM 1 lt lt 5 define CANL MEAS TAILFITS 1 lt lt 6 define CANL MEAS PERIODIC 1 lt lt 7 Constants to define the number of random data tailfits to perform A S ND define AUTO 0 define ND_FIT3 1 define ND_ FITS 2 define ND_FIT9 3 Constants for percentage to succeed when Random Data using auto mode define ND PCNT5 0 define ND PCNT10 1 define ND PCNT25 2 define ND _PCNT50 3 Constants used for Rambus DRCG adjacent cycle tool define DRCG SWEEPS 4 define DRCG CYCLES 6 Constants used for Spread Spectrum tool define SSCA_USER 0 define SSCA SATA1 1 define SSCA SATA2 2 define SSCA PCIX 3 RA RA RA RA define RAND_FIT17 4 an RA RA RA RA Constants used for filter selection define FILTERS DISABLED 0 define BRICKWALL FILTER 1 define ROLLOFF_1STORDER 2 define ROLLOFF_2NDORDER 3 define PCIX CLOK FILTER 10 138 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 SECTION 3 GENERAL COMMAND REFERENCE The WAVECREST Production API provides low level and administrative functions to simplify GPIB operations and provide advanced configuration and measurement options With the exception of the GPIB functions that initialize device communication via the ApiDevID t
102. EP 2 Perform a Group Acquire and Print Results When the function FCNL_GrpGetAll devicelD groupNumber is called the group of commands indicated by groupNumber is executed by the SIA 3000 and the measurement results are available to the user in the same order the corresponding measurement commands were defined in that particular group WavGrpGetAll does the measurements and gets the whole block of data if retn FCNL GrpGetAll ApiDevId 1 SIA SUCCESS printf nFCNL GrpGetAll failed n goto Error The following calls parse the individual results out of the group data There must be a 1 to 1 correspondence between the definition and these calls if retn FCNL GrpGetAsc per sizeof per SIA SUCCESS printf AnFCNL GrpGetAsc failed n goto Error The same method is used for binary blocks from ascii requests if retn FCNL GrpGetAsc data sizeof data SIA SUCCESS printf AnFCNL GrpGetAsc failed n goto Error For structure calls the bGetPlot argument must be the same as in the definition if retn FCNL GrpGetPkt amp hist WIND HIST 0 SIA SUCCESS printf AnFCNL GrpGetPkt failed n goto Error if retn FCNL GrpGetAsc pw sizeof pw SIA SUCCESS printf nFCNL GrpGetAsc failed n goto Error If bGetPlot 1 plots are returned these can be BIG and will be slower
103. EST PRODUCTION API The WAVECREST PAPI consists of ten header files and associated libraries The header files are platform independent while the libraries are platform dependent Libraries for Microsoft Windows applications are provided in the form of run time Dynamic Link Libraries while Libraries for UNIX applications are provided in both static and shared forms In addition to the header and library files sample application source code and makefiles are also provided There is also a directory containing various dataCOM patterns Files are located on the CDROM in the following directory locations Name Size Type a hp10x File Folder a hp9x File Folder ca patns File Folder Cl solaris2 File Folder CI sunos File Folder CI win32 File Folder ReadMe txt SKB Text Document El sample c 8KB WordPad Document laa WCcomm h 6KB HFile ls wCcusti h 2KB HFile la WCcust2 h 2KB HFile laa WCcust3 h 2KB HFile laa wcfcDefs h 9KB HFile laa wCfcnl h 7KB HFile laa wcfcstrc h 38KB HFile laa WCgpib h 2KB HFile la wChpib h 1KB HFile laa WCio h 3KB HFile 1 4 WAVECREST PRODUCTION API INSTALLATION To install the WAVECREST PAPI first create a target directory on the host system Copy the files from the WAVECREST PAPI CDROM contained in the base directory as well as those from the particular platform directory to the newly created target directory 1 5 BUILDING THE SAMPLE APPLICATION Before attempting to build the sampl
104. EftvRtRj n Effective Random eRJ jitter estimate in seconds for the right side of the bathtub curve Total eRJ is calculated by averaging dEftvLtRj and dEftvRtRj Each of the enabled acquire modes is stored in the appropriate array location as specified in the table below In order to calculate th ffective jitter the flag IFndEftv must be enabled Since the effective jitter is calculated by optimizing a curve fit to the bathtub curve a result is not guaranteed If the curve fit is unsuccessful a negative value will be returned in this variable tRiseHist St ct ure of type PLTD which contains all of the plot information enerating a DCD DDJ histogram of rising edges S Section details concerning the PLTD structure and its elements ry FY O Ww hA A AQAA O K tFallHist ure of type PLTD which contains all of the plot information enerating a DCD DDJ histogram of falling edges S Section or details concerning the PLTD structure and its elements ct ct my TY o 3 tructure of type PLTD See Section 2 3 which contains all of the plot information for generating an all measurements histogram of rising edges This plot is only valid when using random mode This histogram is for informational use and qualitative assessment Numbers originating from this measurement methodology are not to be confused with jitter measurements tFallMeas Structure of type
105. FCNL DefDcom DCOM dcom This function is used to fill the dcom structure for the Datacom Known Pattern default values It is recommended that this function be called initially even if pa with Marker tool with reasonable rameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the DCOM structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS dcom Pointer to a DCOM structure Memory needs to be allocated by the caller OUTPUTS None void _ stdcall FCNL ClrDcom DCOM dcom This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the dcom structure INPUTS dcom Pointer to a DCOM structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE define TRUE 1 static DCOM dataJit declare dataJit to be a structure of memset amp dataJit 0 sizeof DCOM FCNL DefDcom amp dataJit dataJit tParm 1ChanNum 1 dataJit tparm lExtnArm 2 dataJit tParm lSamCnt 500 dataJit tParm lAutoArm ARM EXTRN strcpy amp dataJit sPtnName 0 cjtpat ptn dataJit 1TailFit DCOM AUTO dataJit tRateInf SampCnt 10000 dataJit tRateInf PtnReps 100 dataJit dCornFrq 637000
106. FEAT Measurement Window Structure Changes Added Input Parameters EYEH 1Filtoff Sub Structure Changes None OWAVECREST CORPORATION 2005 APPENDIX C PAPI REVISION CHANGES 8 GIGAVIEW 1 2 CHANGES FROM GIGAVIEW 1 1 New Tools None Measurement Window Structure Changes Added Input Parameters CANL 1HiRFmV 1LORFmV dAttn POSS CHNS FCMP dAttn INFI dAttn PCIX 1Pcnt 1HiREmV lLORFmV liIdleOk dAttn SCOP 1Vdif POSS CHNS 1Vcom POSS CHNS 1HiRFmV lLoRFmV Added Output Parameters CANL gComm POSS_CHNS tComm POSS CHNS INFI tDifScop tComScop PCIX dEyeOffs dXmnDiff dXmxDiff dVcommonAc dVcommonDc dVemDcActv dVcmIdleDc dVemDcLine dVcmDcDpls dVcmDcDmin dVidleDiff bTranEye lTranRsv bDeemEye l1DeemRsv SCOP gComm POSS CHNS tComm POSS CHNS Element Order and Padding INFI tEyeh moved INFI Added 1Pad1 and 1Pad2 Sub Structure Changes Added Parameters MASK dV0pas dXwdUI dXflUI dYiPct dVlRel dVORel QTYS dMaskRgn1 dMaskRgn2 dMaskRgn3 Modified Parameters MASK dToffs dVoffs are now ignored MASK dVpass renamed to dVlpas GIGAVIEW 1 1 CHANGES FROM GIGAVIEW 1 0 New Tools Spread Spectrum Clock Analysis SSCA Measurement Window Structure Changes Added Input Parameters DCOM 1TfitCnt EYEH 1KeepOut dKpOutLt dKpOutRt HIST 1KeepOut dKpOutLt dKpOutRt Added Output Parameters EYEH tBoth tBothProb Element Order and Padding
107. Flag indicates valid data in structure dDutCycl Duty cycle measurement of clock signal tHist This is the same structure as is defined for the Histogram Tool It contains all the output data for the clock channel tEyeh n This is an array of the same structures as are defined in the Random Data With Bitclock tool It contains all the output data for each of the channels which a measurement is performed on ITypclSetHIdPF Means of histograms to setup hold time this is a bitfield indicating PASS FAIL 0 1 for each channel lEyeOpenSpecPF Eye opening spec this is a bitfield indicating PASS FAIL 0 1 for each channel IWorstSetHIdPF Histogram means w jitter to setup hold this is a bitfield indicating PASS FAIL 0 1 for each channel ITypclSetHIdAll Means of histograms to setup hold time this is a bitfield indicating PASS FAIL 0 1 for each channel lEyeOpenSpecAll Eye opening spec jitter only this is a bitfield indicating PASS FAIL 0 1 for each channel IWorstSetHIdAll Histogram means w jitter to setup hold this is a bitfield indicating PASS FAIL 0 1 for each channel OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 4 void _ stdcall FCNL DefDbus DBUS dbus This function is used to fill the dbus structure for the DataBus tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be calle
108. Group Loop i NClock Plot Max lfps n loop lot is accessed L Jitt tFftN dDatal Jitt tFftN 1YmaxIndx lel2 Print the dataCOM tool DJ amp RJ values printf Group Loo dataCOM DJ lfps n printf Group Loo dataCOM RJ lfps n loop 1 dcom dDdjt lel2 loop 1 dcom dRjit 0 lel2 OWAVECREST CORPORATION 2005 SECTION 3 GENERAL COMMAND REFERENCE 165 This page intentionally left blank 166 SECTION 3 GENERAL COMMAND REFERENCE OWAVECREST CORPORATION 2005 SECTION 4 CODE SAMPLES The following code samples are provided in order to aid in getting started using the WAVECREST Production API These code samples are provided for instructional purposes only 4 1 MODIFYING WINDOW STRUCTURE PARAMETERS The following code snippet shows how parameters pertaining to a high level window structure may be modified Allocate window structure STAT tStat Zero out the structure sizeof memset amp tStat 0 FCNL DefStat tSta Change inpu tStat tParm 1FuncNum tStat tParm 1ChanNum tStat tParm lAutoArm tStat tParm 1StrtArm tStat tParm 1StopArm tStat tParm 1SampCnt tStat tParm 1StopCnt 4 2 PERFORMING TAILFIT E and initialize to defaults STAT FUNC PW P 2 ARM 2 2 500 11 EXTRN t parameters from defaul E Function PWt Channel 2 External
109. ID through which higher level Production API measurement functions are called All other functions are strictly optional unless low level GPIB functions must be sent or more customized GPIB error handling is required Required Functions void _ _stdcall COMM _CloseDev long ApiDevld Calls IO_close to close the device specified by ApiDevid INPUTS ApiDevid API Device ID of the device This value can be from 1 to 31 The device must have been opened using COMM InitDev OUTPUTS None long __stdcall COMM InitDev long ApiDevTyp char devname This function first calls IO_open to open the device specified by devname Then initializes the device for communication using the COMM library and returns the API Device ID If an error occurs a negative number is returned instead INPUTS ApiDevType An integer value indicating the device type HPIB 0 HP Systems Only GPIB 1 CUST1 11 CUST2 12 CUST3 13 devname A pointer to an ASCII string containing a device name OUTPUTS Returns an integer containing the API Device ID or a negative number to indicate an error long __stdcall COMM ResetDev long ApiDevld This function first calls IO_clear to reset the device specified by devname Then initializes the device for communication using the COMM library If an error occurs a negative number is returned instead INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 OUTP
110. IN IN voltage data void _ stdcall FCNL DefAta2 ATA2 ata2 This function is used to fill the ata2 structure for the Serial ATA tool with reasonable default values It is recommended that this function be called initially even 1f parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the ATA2 structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS ata2 Pointer to a ATA2 structure Memory needs to be allocated by the caller OUTPUTS None void _ stdcall FCNL ClrAta2 ATA2 ata2 This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the ata2 structure INPUTS ata2 Pointer to a ATA2 structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static ATA2 ata2 memset amp ata2 FCNL DefAta2 FCNL RqstPkt FCNL RqstAll FCNL ClrAta2 0 sizeof amp ata2 ATA2 ApiDevId amp ata2 WIND_ATA2 ApiDevId amp ata2 WIND_ATA2 7 7 Sata2 declare ata2 to a structure of type ATA2 clear the memory for ata2 structure set ata2 structures to default values execute the measurement get plot data deallocate the structure 1
111. ION PARAMETER STRUCTURE cece cece cnc rr 13 225 TALE RESULT STRUCTURE 0000 arde 1S 2 6 SINGLE SIDE OF TAILFIT STRUCTURE 1 cece eee tenet net n etn e teen etn e enna 1S 2 7 SPECIFICATION LIMIT STRUCTURE cece cece cece cnc orar tenn nee n teen ene e eee e ence ened 7 2 8 DDJTDCD DATA STRUCTURE ii A A Ee adidas ead A 18 2 9 PATTERN STRUCTURE sei a cose eevee rea eee ee 19 2 10 FFT WINDOW AND ANALYSIS STRUCTURE 0 cece cee cece nro 19 2 11 gt QIYS STRUCTURE pistes herbie carat eer e e a ob Meee prat 20 2 52 MEAS STRUCTURE us A A AA AA eh se 2 2 1 3 OHIS STRUCTURE i inate bovis eae ol ii hsnet kaa ke Tob beaae hoc 2 2 14 MASK STRUCTURE sisas pace on clep Gated yen ey bak dey er tl stat ria ta 22 215 KPWM STRUCTURE tng ca cduscixteantiled tna 23 2 16 ADJACENT CYCLE JITTER TOOL 0oococccccccccccccccc nro 30 2217 CLOCK ANALYSIS TOOL oia A ad 35 2 1 8 GLOCK STATISTICS TOOL ici da geese nets e 38 2 1 9 DATABUS POOL ura ia wo ta da avalon A Welle beds a aa 40 2 20 DATACOM BIT CLOCK AND MARKER TOOL 0ooocccccccccccccncccc cc 43 2 21 DATACOM KNOWN PATTERN WITH MARKER TOOL ccc eee cece n teen ence ene en ees 46 2 22 DATACOM RANDOM DATA WITH BIT CLOCK TOOL cece cence cence tenet nen enn 57 2 23 DATACOM RANDOM DATA WITH NO MARKER TOOL cccoccccccccncc conoci 64 2 24 FIBRE CHANNEL COMPLIANCE TOOL 0 cece cece nee enn nnn enn e nen n nen ene nnens 68 22 01 FOLDED EYE TOOL rocosa ature et
112. L_GoReq ApiDevId CallBackFunc inpPrompt continue execution of paused calibration command after ConChan is executed and ConChan has returned a 1 ConChan long ApiDevID char Prompt User defined function that prompts the char buf 10 printf Ready to execute gets buf return 1 Please s n Prompt user to Connect CH1 as defined by the calling function above display string passed from FCNL_GoReq pause execution until enter key is pressed return a value of 1 to allow SIA3000 to proceed with calibration routine 152 SECTION 3 GENERAL COMMAND REFERENCE OWAVECREST CORPORATION 2005 long __stdcall FCNL_CalInt long ApiDevId long Multiplier The internal calibration function will process 10 000 000 samples multiplied by Multiplier taking 5 5 minutes 10 000 000 samples to complete INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 Multiplier Integer containing a value 1 MAX CAL MULT The selected multiplier from 1 MAX CAL MULT sets the calibration period of approximately 5 5 minutes by that factor OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error long __stdcall FCNL_CalDeskew long ApiDeviId long CallBackFunc long ApiDevID char prompt This function will calibrate all the channels installed in the device according to the following conditions determined by the
113. Lee 50 to indicate that an effective jitter calculation is to be attempted This is necessary for those instances in which correlation BERT scan is necessary In all other practical applications this parameter and it s resultant measurement should be ignored Entries 0 do not estimat ffective jitter values 1 calculat ffective jitter values IES 0 IMinEftv IMaxEftv Defines the range of the bathtub curve that is to be used lAutoFix IDutCycl IGood IMeasCnt dMeasMin dMeasMax dMeasAvg dMeasSig to ca Valid Defau Flag perfo measu Valid Defau Flag measu measu lculate an effective jitter value Entries 1 to 16 with 1MinEftv lt 1MaxEftv LES 4 for MaxEftv and 12 for MinEftv indicating whether to perform a pulse find as required Setting this value to any integer greater than zero tells the measurement to rm a pulse find if needed The system will know if a rement was recently performed and if a pulse find is necessary Entries 0 No pulsefind prior to measurement 1 Pulsefind if the measurement mode changed Lite 0 to indicate whether to perform a duty cycle measurement This rement is done using thr time measurement markers It cisin times Valid Defau Flag Numbe Minim execu Maxim execu Average period measurement as captured from the latest execu res the tim lapsed from a rising edge to falling edge to
114. Lpf is a non negative number For a discussion on the Low Pass Filter Function for DCD DDJ data see dDajtLpf above See Section 2 3 for details concerning the PLOT structure and its elements tBathPlot Structure of type PLOT which contains all of the plot information for generating a Bathtub curve See Section 2 3 for details concerning the PLOT structure and its elements tEftvPlot Structure of type PLOT which contains all of the plot information for generating an Bathtub curve based on Effective Jitter if IFndEftv is set and a valid fit is obtained For a detailed description of Effective Jitter see IFndEftv above See Section 2 3 for details concerning the PLOT structure and its elements tSigmNorm Structure of type PLOT which contains all of the plot information for generating an 1 Sigma versus UI plot x axis can be converted to time from UI based on dBitRate value This plot describes the standard deviation for each accumulated time sample See Section 2 3 for details concerning the PLOT structure and its elements tFreqNorm Structure of type PLOT which contains all of the plot information for generating a Jitter versus Frequency plot See Section 2 3 for details concerning the PLOT structure and its elements The following parameters are for internal use only They are presented for reference only Do not try to read the values or parse the structures nor try to write the various
115. ND_AUTO Continue to perform tailfits until RJ is within some percentage of the previous pass RAND_FIT3 Perform 3 tailfits RAND_FIT5 Perform 5 tailfits RAND_FIT9 Perform 9 tailfits RAND_FIT17 Perform 17 tailfits IPcnt Target maximum amount of deviation between adjacent RJ estimates Each RJ estimate is calculated based on a histogram of accumulated bit periods Then each RJ is compared with the RJ estimate of the adjacent accumulations The percentage difference is compared with this entry to determine if the RJ estimate is valid RAND_PCNT5 RJ within 5 of adjacent estimates RAND_PCNT10 RJ within 10 of adjacent estimates RAND_PCNT25 RJ within 25 of adjacent estimates RAND_PCNT50 RJ within 50 of adjacent estimates tDcom Structure of type DCOM which specifies most of the input and output parameters necessary for a data signal analysis See D 3 for more details on the DCOM structure and the elements described below The user will need to review all of the default parameters of the DCOM structure and decide which to change The following entities from the DCOM structure are valid for use with the random data tool tDcom tParm Acquisition parameter sub structure tDcom AcqMode Acquire Mode rise rise rise fall fall rise fall fall tDcom IRndMode Enable Disable Random Mode tDcom lErrProb Error Probably level to which TJ is to be calculated OWAVECREST CORPORATION 2005 SECTION 2 MEASU
116. ONSIDERATIONS 5 1 SUPPORTED COMPILERS tcscucomcecags Dat Anta ds 173 5 2 BUILD REQUIREMENTS odia a a NS Vine es 173 5 3 DEVELOPING WITH OF Toses a a a eaan 173 5 4 WIN32 95 98 2000 AND NT 4 0 20 cen R o aea 173 5 5 ALL UNIX PLATFORMS ci cocida ce dine eee e ow A e a A 174 5 6 HP UX S 05 AND HPUX LO Z O is ccs cedo coins tetas e tale EEEE ered esis 174 5 7 SUN 4 21 SOLARIS licita ii ado ns 174 5 8 SUN 2 5 1 OR ABOVE SOLARIS 2 0ccoccccccccccccccc occ 174 OWAVECREST CORPORATION 2005 Table of Contents CONT D APPENDIX A ERROR CODES is aa odia iaa 175 APPENDIX B VBASIGC EXAMPLE ses sites sha Deo di rrr errr n 177 APPENDIX C PAPI REVISION CHANGES occoccccccononcnnononcnnoncncnnannnonnoo 183 OWAVECREST CORPORATION 2005 vii TABLE OF CONTENTS This page intentionally left blank viii OWAVECREST CORPORATION 2005 PURPOSE AND ORGANIZATION OF THIS MANUAL The WAVECREST SIA 3000 and GigaView software have the ability to run automated tests or control the SIA 3000 remotely through a workstation or PC This manual covers the Production Application Programming Interface PAPI method Section 1 introduces the user to the elements of an application utilizing the WAVECREST PAPI software This section will aid in getting PAPI set up and ready to compile into applications There is also a simple example demonstrating the basic PAPI commands and concepts that can be applied to any measurements wit
117. ORATION 2005 long __stdcall COMM PollUntilTrue long ApiDevid long mask time t tyme This function will poll the response byte of the specified device until one of the specified bits becomes true or the specified number seconds elapses INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 mask Integer containing the response bits to wait for Refer to the device documentation for definition of the response bits tyme Integer containing the amount of time in seconds to wait for one of the specified response bits to become true OUTPUTS Returns an integer containing the response byte from ApiDevld Refer to the device documentation for definition of the response bits or a negative value to indicate error long __stdcall COMM PollWhileTrue long ApiDevid long mask time t tyme This function will poll the response byte of the specified device until one of the specified bits becomes true or the specified number seconds elapses INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 mask Integer containing the response bits to wait for Refer to the device documentation for definition of the response bits tyme Integer containing the amount of time in seconds to wait for one of the specified response bits to become true OUTPUTS Returns an integer containing the response byte from ApiDevld Refer to the device documentation for definitio
118. PORATION 2005 SECTION INTRODUCTION 5 6 STEP 4 Initialize our structures memset amp hist 0 sizeof HIST FCNL DefHist amp hist memset amp jitt 0 sizeof JITT FCNL DefJitt amp jitt memset amp dcom 0 sizeof DCOM FCNL DefDcom amp dcom To measure propagation delay between IN_1 and IN 2 these inputs are identified within a bitfield hist tParm 1ChanNum IN_1 IN 2 lt lt 16 hist tParm 1StopCnt LF hist tParm 1FuncNum FUNC_TPD_PP Make Known Pattern w Marker measurements using a simple clock pattern strcpy amp dcom sPtnName 0 clock ptn dcom tParm lChanNum IN 1 dcom tParm lAutoArm ARM EXTRN dcom tParm 1ExtnArm IN 2 Measure High Frequency Modulation Rising Edge Triangular FFT window jitt tParm 1FuncNum FUNC_TT P jitt tFfts lWinType FFT TRI jitt lAutoFix 1 Initializing the SIA 3000 COMM_InitDev must be called once at the beginning of your application to pass information concerning the remote configuration The initialization values shown may need to be altered if a non standard configuration is used See Section 3 1 1 for complete details concerning configuration options All PAPI functions return a non zero value in the event of an error These error codes are defined in the supplied include files A successful call to COMM_InitDev must be accomplished before any other calls to the WAVECRES
119. POSS CHNS Maximum value in accumulated edge data double dHistAvg POSS CHNS Average value of accumulated edge data double dHistSig POSS CHNS 1 Sigma value of accumulated edge data double dPwP1 POSS CHNS Pulsewidth plus E double dAPwMn POSS_CHNS Pulsewidth minus E double dFreq POSS_CHNS Carrier frequency double dDuty POSS CHNS Duty Cycle aA double dPjit POSS CHNS Periodic jitter on N clk basis ahs double dCorn POSS CHNS Corner Frequency used for measurement long 1BinNumb POSS CHNS FA FRA ARA KK KK KKK KK KK KKK KKK KKK KK KK KK KK KK double dWndFact POSS CHNS These values are all used internally double dLtSigma POSS CHNS PREVSIGMA DO NOT ALTER Ko double dRtSigma POSS_CHNS PREVSIGMA KKK KKK KKK KKK KKK KKK KK KK KK KK KK OTYS qNorm POSS_CHNS Normal channel quantities mel QTYS qComp POSS_CHNS Complimentary channel quantities E OTYS qDiff POSS_CHNS Differential quantities QTYS qComm POSS_CHNS Common A B quantities X TFIT tTfit POSS_CHNS Structure containing tailfit info Ky long lPeakN mb POSS_CHNS Count of detected spikes Ef long lPeakRsvd POSS_CHNS Used to track memory allocation long lPeakData POSS_CHNS Tracks detected spikes in RJ PJ data PLTD tNorm POSS_CHNS Normal channel voltage data PLTD tComp POSS CHNS Complimentary channel voltage data PLTD EDiff POSS CHNS Diffe
120. PW PER PER macro Stop count designators specific to ANAL FUNC macro define ANL FNC_FIRST 0 Arm start first Bye define ANL FNC _PLUS1 1 fe Starts toil E define ANL _FNC_START 2 Start E Rise Fall edge designators define EDGE FALL 0 Measurement reference is falling edge define EDGE RISE 1 Measurement reference is rising edge Rj define EDGE BOTH 2 Used for DDR in EYEH DBUS amp FCMP Pulsefind mode designators define PEND_FLAT 0 Use flat algorithm for pulse find calc define PFND_PEAK 1 Use peak value for pulse find calc x Pulsefind percentage designators define PCNT_5050 0 Use 50 50 level for pulse find calc E define PCNT_1090 1 Use 10 90 level for pulse find calc AY define PCNT_9010 2 Use 90 10 level for pulse find calc define PCNT_USER 3 Do NOT perform pulse find manual mode define PCNT_2080 4 Use 20 80 level for pulse find calc E define PCNT_8020 5 Use 80 20 level for pulse find calc Arming mode designators define ARM EXTRN 0 Arm using one of the external arms define ARM START 1 Auto arm on next start event E define ARM STOP 2 Auto arm on next stop event e Valid 1CmdFlag values for special features define CMD_PATNMARK 1 lt lt 4 define CMD _BWENHANCED 1 lt lt 10 Constants to assist in setting lArmMove Es define ARMMOVE MAX STEP 40 define ARMMOVE MIN STEP 40 define ARMMOVE PICO PER_STEP 25 Used for structure
121. REMENT COMMANDS AND STRUCTURES 65 66 tDcom IPassCnt Number of passes using same RAND structure since tDcom IFftAvgs Number of FFTs to capture and average tDcom tDdjtInf SPEC structure tDcom dBitRate Bit Rate of data signal under test used to set up DDJ measurement tDcom dCornFrq Corner Frequency as specified by given standard tDcom IFndEftv Enable Disabl Effective Jitter measurements tDcom IMinEftv Minimum BER point in Bathtub curve used for Effective Jitter tDcom IMaxEftv Maximum BER point in Bathtub curve used for Effective Jitter tDcom IQckTjit Enable Quick TJ estimate rather than convolving RJ DDJ for TJ tDcom IGood Flag to indicate valid data results exist in structure tDcom dHits total number of measurements made tDcom dDdJt peak peak amplitude of DDJ tDcom dRang peak peal of all measurements histogram tDcom dRjit n RJ estimate for each possible mode tDcom dPjit n PJ estimate for each possible mode tDcom dTjit n TJ estimate for each possible mode tDcom dEftvLtDj n Effective DJ estimate for left or short cycle side tDcom dEftvLtRj n Effective RJ estimate for left or short cycle side tDcom dEftvRtDj n Effective DJ estimate for right or long cycle side tDcom dEftvRtRJ n Effective RJ estimate for right or long cycle side tDcom tRiseHist PLTD struct tDcom tFallHist PLTD structu tDcom tRiseMeas PLTD struc tDcom tFallMeas PLTD struct tDcom tEftvPlot n
122. S structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static PHAS phase declare phase to a structure of type PHAS memset amp phase 0 sizeof PHAS clear the memory for phase structure FCNL DefPhas amp phase set phase structures to default values FCNL RqstPkt ApiDevld amp phase WIND PHAS FCNL RqstAll ApiDevld amp phase WIND PHAS execute the measurement get plot data 7 7 FCNL ClrPhas phase deallocate the structure OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 105 2 37 PLL ANALYSIS TOOL The PLL Analysis tool permits users to study characteristics and parameters of a 2nd order PLL With a simple set of variance measurements the tool can extract information such as damping factor natural frequency input noise level lock range lock in time pull in time pull out range and noise bandwidth The tool also presents a transfer function and Bode plots up to the natural frequency as well as a plot of the poles and zero for a 2nd order PLL typedef struct Input parameters PARM tParm Contains acquisition parameters ES double dxXiGuess Initial value for damping factor double dWnGuess Initial value for natural frequency Ky double dSQGuess Initial power spectral density dBc Hz double dInitoff Initial offset frequency delta WO EJ long lIncSto
123. SHORT Cycles tLong n Total Jitter forCycles per channel tBoth n Total Jitter fors amp SHORT Cycles tFftN n Frequency data on 1 clock basis tSave n Average Frequency before scaling void _ stdcall per channel FCNL_DefCanl CANL canl This function is used to fill the canl structure for the Clock Analysis tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the CANL structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS canl Pointer to a CANL structure Memory needs to OUTPUTS None be allocated by the caller void _ stdcall FCNL_ClrCanl CANL canl This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the canl structure INPUTS canl Pointer to a CANL structure Memory needs to OUTPUTS None EXAMPLE static CANL clk memset amp clk 0 sizeof CANL FCNL_DefCanl amp clk FCNL RqstPkt ApiDevld amp clk WIND CANL FCNL RqstAll ApiDevld amp clk WIND CANL FCNL_ClrCanl amp clk be allocated by the caller declare clk to a structure of type
124. SPECS 6 define PCIX EYE XDOTS 408 for iT ailert define DCOM_ NONE 0 define DCOM AUTO 1 define DCOM FIT3 2 define DCOM FITS 3 4 5 define DCOM FIT9 define DCOM FIT17 define DCOM ALL 6 define DCOM_1SIGMA 7 for l1FitPcnt define DCOM PCNT5 0 define DCOM PCNT10 1 define DCOM PCNT25 2 define DCOM PCNT50 3 used for PCI define PCIX_SCOP_AVG 8 RX MOD a Ba JN E RX_CAR RX_SYST OO WNFR O EYE YDOTS 630 used to ident Gaussian window Constants used by new scope tool to identify which plot to show cope tool for measures to calculate 1 lt lt 0 1 lt lt 1 1 lt lt 2 1 lt lt 3 1 lt lt 4 1 lt lt 5 1 lt lt 6 1 lt lt 7 1fit algorithm ol FCT le 3 FCT 10 0 L INI NAT FREQ 10 0 L INI NAT FREQ 10e9 PSD 120 PSD 40 l for number of decades to span the number of dataCOM tailfits to perform the auto mode percentage to converge within Express mode used for Serial ATA tool define SATA_SPANS 250 define SATA_TFITS 11 ify which clock analysis measures to calculate define CANL EAS RISEFAL EAS VTYPICAL define CANL EAS VEXTREME define CANL me ES M ae EAS OVERUNDR 1 lt lt 0 1 lt lt 1 1 lt lt 2 1 lt lt 3 OWAVECREST CORPORATION 2005 SECTION 2 M
125. T PAPI Initialize device if ApiDevld COMM _InitDev APIDEVTYPE DEVICENAME lt 1 printf nCOMM InitDev failed n goto Error Turn on calibration source if retn COMM TalkDev ApiDevId CAL SIG 10MSQ SIA SUCCESS printf nCOMM TalkDev failed n goto Error STEP 5 Perform PulseFind In this exercise the calibration signals are used to provide a signal FCNL_PulsFnd requires two parameters The first parameter is the Apld number returned from the COMM_InitDev function call The second parameter is a pointer to one of the PARM structures initialized in step 3 Go ahead and perform a pulsefind if retn FCNL PulsFnd ApiDevld amp hist tParm SIA SUCCESS printf nFCNL PulsFnd failed n goto Error SECTION INTRODUCTION WAVECREST CORPORATION 2005 STEP 6 Perform Measurement and Return Statistics A single call is made to perform the acquisition Information concerning how to acquire the data is drawn from the HIST structure and output data as a result of the acquisition is also returned in the HIST structure If an error occurs during the acquisition a non zero value is returned See Appendix A for definition of error codes Note that the WAVECREST PAPI performs its own dynamic memory allocation as required The calling application does not need to concern itself with memory management However since dynamic memory allocatio
126. TE hfm tparm amp hfm tFfts are also set to defaults by this command perform measurement on CH1 measure 500 different samples per accumulated edge use dCornFrq instead of 1MaxStop set corner frequency to 2MHz execute the measurement get plot data deallocate the structure SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 2 27 HISTOGRAM TOOL The histogram tool is used for displaying the statistical distribution of a given measurement Measurements made with this tool are limited to repetitive signal measurements such as clock period duty cycle pulse width rise time fall time propagation delay and frequency This tool is typically used for displaying the statistical distribution of thousands of measurements Important distribution parameters can be calculated based on the data including RMS peak to peak Random Jitter RJ Deterministic Jitter DJ and Total Jitter TJ typedef struct Input parameters PARM tParm Contains acquisition parameters double dUnitInt Unit Interval to assess Total Jitter long 1PassCnt Acquisitions so far set to 0 to reset long lErrProb Error probability for Total Jitter x Valid range is 1 to 16 uA long lTailFit If non zero a tail fit will be tried Rf long lForcFit If non zero use the force fit method j lo
127. TtlHist Total Jitter Histogram data bTranEye TranRsv bDeemEye IDeemRsv Used internally DO NOT ALTER E void __stdcall FCNL_DefExpr EXPR expr This function is used to fill the expr structure for the PCI Express Compliance tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the EXPR structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS expr Pointer to a EXPR structure Memory needs to be allocated by the caller OUTPUTS None void __stdcall FCNL_ClrExpr EXPR expr This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the expr structure INPUTS expr Pointer to a EXPR structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static EXPR expr declare expr to a structure of type EXPR memset expr 0 sizeof EXPR clear the memory for expr structure FCNL_DefExpr amp expr set expr structures to default values FCNL_RgstPkt ApiDevId amp expr WIND EXPR FCNL RqstAll ApiDevId amp expr WIND EXPR execute the measurement get plot data include
128. UTS Returns SIA_SUCCESS upon completion or a negative value to indicate error 140 SECTION 3 GENERAL COMMAND REFERENCE WAVECREST CORPORATION 2005 long __stdcall COMM TalkDev long ApiDevId char cmnd This function first clears the response byte of the specified device and then sends the specified command with an opc command appended and waits for the ESB bit in the response byte to be set or LONG_TIME 100 seconds Ifthe ESB bit is set the ESR byte is checked for errors If a timeout occurs or an error is found a negative value is returned INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 cmnd A pointer to a NULL terminated ASCII string containing the command to send OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error long __stdcall COMM TalkBin long ApiDeviId char sCmnd long 1Cmnd This function first clears the response byte of the specified device and then sends the specified command with an opc command appended and waits for the ESB bit in the response byte to be set or LONG_TIME 100 seconds Ifthe ESB bit is set the ESR byte is checked for errors If a timeout occurs or an error is found a negative value is returned INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 sCmnd A pointer to buffer containing the command and binary data to send ICmnd Integer containing the
129. VECREST CORPORATION 2005 2 30 LOW FREQUENCY MODULATION ANALYSIS TOOL The Low Frequency Modulation Analysis tool is used to analyze low frequency modulation on clock signals It uses its internal time stamp capability to identify when a given measurement is made This tool combines the actual time measurements with the relative time each measurement was made to identify low frequency modulation components This tool can be used for modulation frequencies below 120kHz n F IMaxFreq TParm StrtCnt n F IMaxFreq TParm StopCnt F IMaxFreq TParm StrtCnt F IMaxFreq TParm IStopCnt E 5 E E B a E E oO 0 E Signal Fc Lig lg hliightitg 1g MPL gt 1 Meas lt 2 Meas lt gt n Meas lt F IMaxFreq typedef struct Input parameters PARM tParm Contains acquisition parameters FETS tFfts FFT window and analysis parameters ans long lAutoFix If true calculate the above parameters long lPadl double dMaxFreq Maximum Frequency that is desired X long lFftAvgs 2 fft_avgs averages used to smooth FFT Output parameters long 1Good Flag indicates valid data in structure PLTD tTime Time domain plot data 7 PLTD tStmp Time stamp array not normally plotted PLTD tFftl Frequency plot data on 1 clock basis ey PLTD tFftN Frequency plot data on N clock basis double dCarFreq Carrier frequency double dSmpRate Sampling rate double dFftNdBc dB
130. WAVECREST CORPORATION 2005 be used to correlate to a BERT Scan measurement and should not be used as a vehicle for quantifying jitter This technique was developed to allow BERT systems to correlate with SIA3000 results Valid Entries 0 disabl ffective Jitter estimate 1 nabl ffective jitter estimate Default 0 IMinEftv IMaxEftv Defines the error rates at which the eye width calculation will be used in the estimating effective jitter components IMinEftv and IMaxEftv define points on the bathtub curve from which the extrapolated RJ curve is traced Then where this extrapolated curve intersects the 5 error probability the effective DJ is calculated Valid Entries 1 to 16 indicating 107 to 107 error rate Default 4 and 12 indicating 10 BER for IMaxEftv and 107 BER for IMinEftv dMinSpan Minimum delay between reference clock and measured edges This parameter will skip a sufficient number of edges to measure the data transitions that are at least dMinSpan in seconds away from the reference clock This parameter is used to correlate with oscilloscopes which have a trigger delay of at least 20ns typ It is not typically used in a production environment Valid Entries 0 to 1 0 Default 0 IFiltOff This allows an offset to be made to the filter that is used to isolate histogram data to within 1 UI of the bit clock The filter is established on the first pass by the instr
131. WIND JITT 1 If retn lt gt SIA SUCCESS Then GoTo Error End If retn FCNL GrpGetPkt bDcom WIND DCOM 1 If retn lt gt SIA SUCCESS Then GoTo Error End If 180 APPENDIX B VBASic EXAMPLE WAVECREST CORPORATION 2005 retn F If retn GoTo End If For Asci rise Next Asc Print t block mainDisp Form Di Fo Di Fo Di Fo Fo Fo Fo ain ain ain Prin mainDi Fo Fo vb Fo Fo vb Fo Fo vb For For Print prin mainDi Fo Fo vb Fo Fo vb Fo Form amp vbC sp cm cm Cr cm cm Cr cm amp Os CNL_GrpGetAsc AsciData 0 256 lt gt SIA SUCCESS Then Error Leng O To 255 Step 1 rise ChrS AsciData AsciLeng iLeng the simple ascii command results and print the start of the binary of raw data lay Text mainDisplay Group Loop amp _ at Round 1 0 amp Period Measurement amp per lay Text mainDisplay amp vbCrLf amp Group Loop amp _ at Round 1 0 amp Pulsewidth Measurement amp pw lay Text mainDisplay amp vbCrLf amp Group Loop amp _ at Round 1 0 amp Risetime Measurement amp rise lay Text mainDisplay amp vbCrLf amp Group Loop amp _ at Round 1 0 amp Raw Period Measurements amp _ at data 0 1000000000 0 000 amp n
132. acquisition parameters el char sPtnName 128 Name of pattern file to be used Ej long lAcqMode Mask defining modes for RJ PJ acquire Bit3 PW Bit2 PW Bitl Per Bit0 Per long 1RndMode Enable random mode auto arming only long 1QckMode Enable quick mode external arm only long lIntMode Interpolation mode non zero is linear long lGetRate If non zero Bit Rate will be measured Not valid for random mode El long 1TailFit Count of tailfits see constants above Not valid when auto arming long lErrProb Error probability for Total Jitter El Valid range is 1 to 16 EL long lPassCnt Acquisitions so far set to 0 to reset long lFftAvgs 2 fft_avgs averages used to smooth FFT long 1FitPcent Automode suceed see constants above SPEC tRatelnf Parameters to acquire Bit Rate 24 SPEC tDdjtinf Parameters to acquire DCD DDJ y SPEC tRjpjInf Parameters to acquire RJ PJ ae Negative values disable these filters double dDdjtLpf Low pass DCD DDJ filter frequency ES double dDdjtHpf High pass DCD DDJ filter frequency double dRjpjFmn Minimum integration limit for RJ PJ e double dRjpjFmx Maximum integration limit for RJ PJ E double dBitRate Bit Rate may be specified or measured double dCornFrq Corner Frequency for RJ PJ long lHeadoff Header offset external arming only ES long 1FndEftv Flag to attempt effective jitter calc
133. ain structure element that last reset This flag execution r to 0 essentially resets this register rement is reater than or equal nsate for external a to 0 this is provided to allow the ttenuation r Tool which specifies most of the input and output parameters necessary for a data signal analysis paramete change The user will rs of the Known Flag indicates valid data in structure Total hi ts collected in Median location for the Total Jitter Histogram dEyeOffs dXmnDiff dXmxDiff Used internally DO NOT ALTER Pk pk di De empha Eye open Eye open Vpp for Vpp for fferential voltage isis voltage ratio ing at Bit ing at Bit Transition E De ye Eye Emphasis dVcommonAc V x cm acp dVcommonDc v x cm dc dVcmDcActv dVcmidleDc dVcmDcLine dVcmDcDpls V x cm d V x cm i c active idle delta dle dc V x cm d V x cm d c line delta c d Error rate 10e 12 Median to max jitter based on 1 million samples Error rate 10e 6 need to review all of the default Pattern With Tool and decide which to the Total Jitter Histogram 96 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES OWAVECREST CORPORATION 2005 dVcmDcDmin v x cm dc d dVIdleDiff V x idle diffp qNorm Normal channel quantities qComp Complimentary channel quantities tNrmScop Normal channel voltage data tCmpScop Complimentary channel voltage data t
134. aining the API Device ID of the device This value can be from 1 to 31 CallBackFunc A pointer to a function to call to determine if the channel should be calibrated or skip the channel see functional description below CallBackFunc cannot be NULL It must follow these rules long CallBackFunc long ApiDevID char Prompt It must return an integer value of gt 0 Continue with this channel 0 Skip this channel ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 Prompt A pointer to a string prompt generally specifying what an operator needs to do before calibrating the channel OUTPUTS Returns SIA SUCCESS upon completion or a negative value to indicate error abort Deskew external calibration with DC Calibration long __stdcall FCNL_CalStrobe long ApiDevId The strobe calibrarion funtion does an Oscilloscope Strobe calibration INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error long __stdcall FCNL_GetCalData long ApiDevid long pChannelCards double pDeSkewData Use this function to obtain the current external deskew values for all available channels in the device INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 pChannelCards Upon successful completion pointer to variable containi
135. alid Entries 1 to 10 0 Default 1000 The total data points wi point is to be measured are incremented by one Valid Entries 1 to ISpan Default 100 to calculate the stop counts for each ement s across which to measure This is the a measurement and is synonymous with 00 000 tParm StrCnt thin span to measure If every data such that the start and stop counters then IDataPts must equal ISpanCnt The Cnt Flag indicates valid output data in structure A structure of type PLTD See Section 2 3 for deta A structure of type PLTD domain plot data See Se structure elements A structure of type PLTD data See Section 2 3 fo elements containing the time domain plot data ils on the PLTD structure elements containing lst derivative of time ction 2 3 for details on the PLTD containing Frequency domain plot r details on the PLTD structure SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 tFftD A structure of type PLTD containing Frequency domain of 1st derivative plot data See Section 2 3 for details on the PLTD structure elements tSigm A structure of type PLTD containing 1 Sigma plot array See Section 2 3 for details on the PLTD structure elements tPeak A structure of type PLTD containing the max min plot array See Section 2 3 for details on the PLTD structure elements tMini A structure of type PLTD conta
136. an Average Value for this span This is the tim lapsed from the first edge in the pattern to transition associated with this structure In an ideal signal one which contains no jitter this value would be an integer multiple of the bit period Any deviation there of is considered jitter and becomes an element of the DDJ DCD histogram dVars Variance value for this span This is net deviation of the mean to the ideal bit transition dMini Minimum value for this span This is the earliest transition for this bit period It defines th arliest transition for this location in the pattern dMaxi Maximum value for this span This is the latest transition for this bit period It defines the latest transition for this location in the pattern dDdjt Static displacement for this span UI drilt DDJT after HPF is applied UI 1Numb Number of measures in this span 18 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 2 10 PATTERN STRUCTURE The pattern structure is used internally by the system as part of the measurement process When tools are used that reference a pattern they have a member called sPtnName in their binary packet This field holds the name of the pattern file that is to be used Whenever a binary packet is sent which contains a new value in sPtnName a new internal representation is loaded typedef struct char short short double long long double PATN bHex iPos
137. and the simple example Refer to Sections 2 3 through 2 14 for information on interpreting any sub structures within the data structure for the tool e Refer to the application in Section 1 7 replacing any tool specific calls and structures with your own e Refer to Section 3 and the Appendices as needed for explanations of other functions Appendix A lists error codes Appendix B shows what the sample program in Chapter 1 might look like if written as a Visual Basic subroutine Appendix C lists changes to the measurement window structures and sub structures for all supported revisions of PAPI OWAVECREST CORPORATION 2005 vii This page intentionally left blank viii OWAVECREST CORPORATION 2005 SECTION INTRODUCTION WAVECREST has implemented the Production Applications Programming Interface PAPI to provide direct access to the algorithms available in the SIA 3000 This Production API allows programmers to quickly integrate the functionality available in the SIA 3000 with their own applications Many tedious tasks such as GPIB interfacing and memory management are eliminated A layered approach is utilized which provides access to all the statistics and plot data available This API is cross platform Versions for Microsoft Windows as well as many UNIX platforms are available The PAPI also provides routines to utilize configurations established with the SIA 3000 software to streamline the transition from laboratory characterizat
138. are delivered and licensed as commercial computer software as defined in DFARS 252 227 7013 Oct 1988 DFARS 252 211 7015 May 1991 or DFARS 252 227 7014 Jun 1995 as a commercial item as defined in FAR 2 101 a or as restricted computer software as defined in FAR 52 227 19 Jun 1987 or any equivalent agency regulations or contract clause whichever is applicable You have only those rights provided for such Software and Documentation by the applicable FAR or DFARS clause or the Wavecrest standard software agreement for the product Table of Contents SECTION INTRODUCTION l 1 ELEMENTS OF AN APPLICATION USING THE WAVECREST PRODUCTION API l 1 2 FUNCTION CAEL STRUCTURES siii as eons Gap eee dirt es 2 l 3 FILES INCLUDED IN THE WAVECREST PRODUCTION API 0c cece cece conca 3 1 4 WAVECREST PRODUCTION API INSTALLATION 1 0 0 cc cece cece eee carac narrar 4 1 5 BUILDING THE SAMPLE APPLICATION 2 0 c eee een rc een een en een t een ene teen teen nen ens 4 1 6 EXECUTING THE SAMPLE APPLICATION 0c cece ener erent enn nee ete n teen eben e en enenens 4 1 7 REVIEWING THE SAMPLE APPLICATION 0 0 0 cece eee eee enn ene eee n nen ene teen enen ens 5 1287 WHERE TO GO FROM HERE dci tex se ne a A td ai 8 SECTION 2 TOOL SPECIFIC COMMANDS AND STRUCTURES 2 1 INTRODUCTION a a dd 9 2 2 MEASUREMENT COMMANDS 00 cc cece nen EE EEE EE ee tnt etn a 1O 2 3 PEOTIDATA STRUCTURE oo arae ce A A ka RENA ia 12 2 4 ACQUISIT
139. ase acquisition time Valid Entries Bit Rate 10 000 000 to Bit Rate I Default 637e3 637kHz Fibre Channel 1X IHeadOff Header offset parameter for use in packet ized data which may have a frame header before the test pattern This offset value can be used to skip past header information and into the repeating data pattern stream This can be useful when analyzing data from disk drives when the pattern marker may be synchronized with the start of frame data Valid Entries 0 to 10 000 000 pattern length I Default O indicating no header present IFndEftv Flag to indicate that an effective jitter calculation is to be attempted Effective Jitter is a means of estimating the effective deterministic jitter as it relates to a 5 error probability This is done by first E capturing the bathtub i Sampled data point curve using H A Extrapolated Bathtub conventional RJ DJ E Curve estimation g Actual Bathtub techniques then a Extrapolated Bathtub curve versus real bathtub extrapolating from a curve as seen by BERT few points in the bathtub curve to the 5 error probability level to estimate effective DJ Effective RJ is extracted based on the curve that was fitted to the sample points These values should only be used to correlate to a BERT Scan measurement and should not be used as a vehicle for quantifying jitter This technique was developed to allow BERT systems to co
140. atistics CLOK New Oscilloscope SCOP Measurement Window Structure Changes Added Output Parameters APLL tInit Sub Structure Changes New Structures Measurement MEAS Quantities QTYS Mask MASK VISI 7 2 1 CHANGES FROM VISI 7 2 0 NOTE VISI 7 2 2 and 7 2 1 are identical as far as PAPI structures are concerned New Tools None Measurement Window Structure Changes Added Input Parameters APLL dRecTime lRecUnit lIniCond Modified Parameters APLL 1AutoFix eliminated Element Order and Padding APLL dCornFrg moved APLL 1Pad1 eliminated Sub Structure Changes None 184 APPENDIX C PAPI REVISION CHANGES WAVECREST CORPORATION 2005 WAVECREST CORPORATION World Headquarters West Coast Office 7626 Golden Triangle Drive 1735 Technology Drive Ste 400 Eden Prairie MN 55344 San Jose CA 95110 TEL 952 831 0030 TEL 408 436 9000 FAX 952 831 4474 FAX 408 436 9001 Toll Free 1 800 733 7128 1 800 821 2272 Www wavecrest com Europe Office Hansastrasse 136 D 81373 Miinchen TEL 49 0 89 32225330 FAX 49 0 89 32225333 Japan Office Otsuka Sentcore Building 6F 3 46 3 Minami Otsuka Toshima Ku Tokyo 170 0005 Japan TEL 81 03 5960 5770 FAX 81 03 5960 5773 200212 04 REV A
141. ble dvVdiffPP double dVdRatio double dOpnkEyeT double dMedEyeT double dOpnEyeT1M double dTranVolts double dDeemVolts double dVcommonAc double dVcommonDc double dVcmDcActv double dVcmIdleDc double dVcmDcLine double dVcmDcDpls double dVcmDcDmin double dVIdleDiff QTYS aNorm OTYS qComp PLTD tNrmScop PLTD tCmpScop char bTranEye long lTranRsv char bDeemEye long 1DeemRsv PCIM ICompPnt Compliance PCIX RX MODI PCIX TX MODI PCIX_RX_CAR PCIX TX CARD PCIX RX SYST PCIX TX SYST Default UO FF FI Compliance Point O RX 1 TX Amount 50 to calc rise fall time Absolute rise fall voltage if lPcnt lt 0 Absolute rise fall voltage if 1Pcnt lt 0O Common mode idle voltages are valid E Attenuation factor dB if Contains acquisition parameters E Flag indicates valid data in structure Pk pk differential voltage De emphaisis voltage ratio x Eye opening E Median to max jitter Es Eye opening 10 6 BER Vpp for Transition Eye Ef Vpp for De Emphasis Eye El V x cm acp El V x cm dc Ef V x cm dc active idle delta Ef V x cm idle dc V x cm dc line delta Rif V x cm dc d EJ V x cm dc d X7 V x idle diffp Normal channel quantities Complimentary channel quantities Ey Normal channel voltage data Complimentary channel voltage data Receive Mod
142. c RCPM bcam memset amp bcam 0 sizeof RCPM FCNL DefRcpm amp bcam execute the measurement FCNL RgqstPkt ApiDevld Create the command to get the spikelist SPIK CLKANDMARK 1 n ol y sprintf buffer long amp bcam Send the command and place th COMM RegBin ApiDevld buffer Use the spikelist as required amp bcam WIND RCPM long amp bcam 1PeakData returned data into the spikelist buffer strlen buffer spikes sizeof spikes 134 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 2 47 EXAMPLE OF HOW TO DRAW USING A PLTD STRUCTURE BORK KK RR RO RR ROTOR RR RO ROO ROO RRA RR RR RR RR RR RR A RR RRA KK KARA DrawPlot in the PLTD structure passed into this function 5 PLT dou ol D1 ol get initial Normalize is a function that will plot a graph based on the variables defined x y x y xmin xmax or x coordinates and y coordinates respectively Initialize the pointer pCdc to the start of the plot in units of pixels step through the data array coordinates within diagram to start plot coordinates to amplitudes between 0 and 1 to represent their relative location between ymin ymax f or normalize the coordinates and pass them to the pCdc funct
143. c assessed on 1 clock FFT data E TDIG tParm A structure of type PARM that contains acquisition parameters The PARM structure is discussed in full detail in Section 2 4 tParm IStampTm is enabled for this tool by default All other defaults listed in Section 2 4 apply tFfts A structure of type FFTS that contains the FFT setup parameters such as window type and padding factor See Section 2 10 for further details lAutoFix This tool uses tParm ISampCnt to define the number of measurements to make and the span of tParm IStrCnt to tParm IStopCnt to define the maximum frequency observed in the FFT plots If this structure element is set to 1 then tParm StrCnt and OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 87 88 dMaxFreq IFftAvgs IGood tTime tStmp tFft1 tFftN dCarFreq dSmpRate dFftNdBc INPUTS tParm IStopCnt will be calculated based on dMaxFreq plus information measured on the live data signal Valid Entries 0 use tParm data 1 calculate tParm data using dMaxFreq Default 0 Maximum Frequency information that is desired This variable is used to calculate the number of averages to use in the FFT Increasing the number of averages reduces th background noise associated with the FFT algorithm The number of averages is calculated based on the equation AVERAGES 2 where n IFftAvgs Valid Entries any integer great
144. ccurs or an error is found a negative value is returned INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 sRetn A pointer to store the returned binary data This buffer must be long enough to hold the expected number of bytes IRetn An integer containing the length of sRetn This value must be the length or greater than the expected number of bytes returned or the IO_read will not return all the data from the specified device OUTPUTS Returns S A_ SUCCESS upon completion or a negative value to indicate error void _ _stdcall COMM _libver char StrPtr This function returns the current COMM library versions i e 2 5 0 INPUTS Strptr Pointer to location to store version string Memory must be allocated by user OUTPUTS None 146 SECTION 3 GENERAL COMMAND REFERENCE OWAVECREST CORPORATION 2005 I O Layer Functions NOTE These functions can be used to control other devices using the same I O protocol GPIB HPIB or Custom void __stdcall IO_clear int ApiDevid Clears the internal or device functions of the specified device INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 The device must have been opened using IO_ open OUTPUTS None void __stdcall IO_close int ApiDevid Closes the device specified by ApiDevid INPUTS ApiDevid Integer containing the API Device ID of the device T
145. cs test on the device Ifany portion of the test fails a negative value 1s returned INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 OUTPUTS Returns S A_ SUCCESS upon completion or a negative value to indicate error void __stdcall FCNL_libver char StrPtr This function returns the current API version i e 2 5 0 INPUTS Strptr Pointer to location to store version level Memory must be allocated by user OUTPUTS None I amp O SECTION 3 GENERAL COMMAND REFERENCE OWAVECREST CORPORATION 2005 3 7 ADVANCED GROUP MEASUREMENT FUNCTIONS Grouping of commands provides an advanced Production API technique to further minimize GPIB bus traffic and set up complex sequences including multiple tools and or channels Once a group is established it can be quickly and repeatedly executed If the fastest possible test time is desired then these commands and programming techniques may be of use Keep in mind that any measurement sequence can be accomplished through repeated calls to the standard FCNL_RqstPkt FCNL_RgstALL or FCNL_MultPkt functions Since the measurement sequences are stored remotely on the GPIB host rather than the SIA 3000 the standard calls will require some GPIB bus overhead each time a measurement is taken This overhead is reduced via grouping by storing all the measurement configuration information for the group locally on the SIA 3000 instrument Configuring a g
146. cumulated bit periods See Section 2 3 for details of the PLTD structure and its elements SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 void _ stdcall FCNL DefRand RAND rand This function is used to fill the rand structure for the Datacom Random Data With No Marker tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the RAND structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS rand Pointer to a RAND structure Memory needs to be allocated by the caller OUTPUTS None void _ stdcall FCNL ClrRand RAND rand This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the rand structure INPUTS rand Pointer to a RAND structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE define TRUE 1 define FALSE 0 static RAND rdataJit amp rdataJit 0 sizeof amp rdataJdit memset FCNL_DefRand Declare rdataJit to be a structure of type RAND Clear the memory for rdataJit structure Set rdataJit structure to defa
147. d based on the curve that was fitted to the sample points These values should only be used to correlate to a BERT Scan measurement and should not be used as a vehicle for quantifying jitter This technique was developed to allow BERT systems to correlate with SIA3000 results Valid Entries 0 disabl ffective jitter estimate 1 nabl ffective jitter estimate Default 0 IMinEftv IMaxEftv Defines the error rates at which the eye width calculation will be used in the estimating effective jitter components IMinEftv and IMaxEftv define points on the bathtub curve from which the extrapolated RJ curve is traced Then where this extrapolated curve intersects the 5 error probability the effective DJ is calculated Valid Entries 1 to 16 indicating 107 to 10 error rate Default 4 and 12 IMaxEftv 10 BER IMinEftv 10 BER IFiltEnb Flag to enable IDLE character insertion filter When enabled any edge measurements that are not within 0 5 UI will be discarded This filter is used in systems which may insert an idle character from time to time to compensate for buffer under run overrun issues In those instances where an idle character was inserted during a measurement the edge selection may be off If this parameter is greater than or equal to one the filter is enabled and measurements that differ from the mean by 0 5 UI will be discarded Valid Entries 0 disable
148. d repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the DBUS structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS dbus Pointer to a DBUS structure Memory needs to be allocated by the caller OUTPUTS None void _ stdcall FCNL ClrDbus DBUS dbus This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the dbus structure INPUTS dbus Pointer to a DBUS structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static DBUS databus declare clkstat to a structure of type DBUS memset amp databus 0 sizeof DBUS clear the memory for databus structure FCNL DefDbus amp databus set databus structures to default values execute the measurement get plot data in tEyeh n FCNL_RgstPkt ApiDevld amp databus WIND DBUS FCNL_RqstAll ApiDevld amp databus WIND DBUS 7 7 FCNL_ClrDbus amp databus deallocate the structure 42 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 2 20 DATACOM BIT CLOCK AND MARKER TOOL This tool can operate either with the Clock Recovery option installed or with an external bit clock applied to another input A pattern marker is necessary and is possibly derived from the
149. d this is the distance from the 50 threshold to the starting and ending thresholds For example if this field is equal to 30 then 20 and 80 thresholds are used If this field is equal to 40 then 10 and 90 thresholds are used The absolute voltage levels used are based on the previous pulsefind minimum and maximum voltages If this field is negative then the absolute rise and fall thresholds are taken from the following fields 1HiRFmV and l1LoRFmv Default 30 Absolute rise fall voltage if 1Pcnt lt 0 in units of mV Default 250 Absolute rise fall voltage if 1Pcnt lt 0 in units of mV Default 250 Measure flag this is a bitfield which may be created by combining any or all of the following constants CANL MEAS RISEFALL Rise and Fall times are calculated CANL MEAS VTYPICAL Vtop and Vbase are calculated CANL MEAS VEXTREME Vmin and Vmax are calculated CANL MEAS OVERUNDR Overshoot and Undershoot are calculated M M CANL MEAS WAVEMATH Vavg and Vrms are calculated CANL MEAS TAILFITS Enables Histogram tailfits CANL EAS PERIODIC Yields Hi Freq Mod results Default All of the above are included Attenuation factor in dB this is provided to allow the results to be scaled to compensate for external attenuation from sources such as probes Default 0 Flag indicates valid data in structure Number of hits in accumulated edge data per channel
150. dAttn IGood distEdge dNrmPkpk dCmpPkpk dDifPkpk qNorm qComp qDiff tNrmScop tCmpScop tDifScop Default 2 Input selection can be any of the following SCOP_INPS NORM Input Only SCOP_INPS COMP Input Only SCOP_INPS DIFF Input minus Input Default SCOP_INPS_DIFF Offset voltage used for scope acquire specified in mV Default 0 Differential offset voltage used for display specified in mV Default 0 MASK Structure which holds mask definition See the definition above Defaults tMask dXwdUI 0 40 tMask dXf1lUI 0 20 tMask dYiPct 0 60 tMask dV1lRel 0 20 tMask dVORel 0 20 tMask dVmask 64e 3 tMask dTmask 700e 12 tMask dVlpas feye gt tMask dVmask 0 75 feye gt tMask dVOpas feye gt tMask dVmask 0 75 tMask dTflat feye gt tMask dTmask 3 0 7 0 Margin in percentage for Eye Mask 1 0 to 1 0 Default 0 Bit Rate must be specified Default 2 5e9 Attenuation factor in dB this is provided to allow the results to be scaled to compensate for external attenuation from sources such as probes Default 0 Flag indicates valid data in structure DO NOT ALTER Vpp for normal Channel scope data Used internally Vpp for complimentary Channel scope data Vpp for differential Channel scope data Normal channel quantities Complimentary channel quantities Differential channel quantities Normal channel voltage data last pass only Complimentary channel voltage data last pass only
151. definitions below define POSS_CHNS 10 Constants used to identify FFT window type define FFT RCT 0 Rectangular window ES define FFT KAI 1 Kaiser Bessel window Ay define FFT TRI 2 Triangular window define FFT HAM 3 Hamming window el define FFT_HAN 4 Hanning window define FFT_BLK 5 Blackman window 136 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 define FFT_GAU 6 define SCOP_INPS_NORM 0 define SCOP_INPS COMP 1 define SCOP_INPS_DIFF 2 define SCOP_INPS BOTH 3 define SCOP_INPS COMM 4 Constants used by new s define SCOP_MEAS VEXTREME define SCOP_MEAS VTYPICAL define SCOP_MEAS WAVEFORM define SCOP_MEAS OVERUNDR define SCOP_MEAS RISEFALL define SCOP MEAS VERTHIST define SCOP_MEAS HORZHIST define SCOP MEAS EYEMASKS Used internally for tai define PREVSIGMA 5 Used by Advanced PLL to define MIN APLL INI DAMP define MAX iL INI DAMP define MI a define MA x define MIN define MAX zZ Used by Phase Noise too iL INI NOISE L INI NOISE A A A A A MU U U U U define DECADES 8 Constants Constants Constance define PCIX define PCIX define PCIX define PCIX Constants Constants define CANL define PCIX TX MOD define PCIX TX CARD define PCIX_TX SYST define PCIX
152. ds compare the absolute value of dNormMin and dNormMax dNormAvg Average value of adjacent cycle period deviation This value should be zero indicating that the period amplitude on average is remaining fixed If this value is something other than zero the period was shifting during the measurement In most cases the period of a clock signal will have instantaneous amplitude deviations also known as Jitter but on average the periods tend toward the same amplitude dNormSig Standard deviation lo of adjacent cycle jitter measurements as captured from the latest execution of the measurement ITotiCnt Number of hits in measured accumulated period measurement data This accumulation is of the absolute period measurements and not the adjacent cycle jitter measurements dTotiMin Minimum period measurement found in the accumulated data dTotiMax Maximum period measurement found in the accumulated data dTotlAvg Average period measurement found in the accumulated data dTotlSig Standard deviation lo of period measurements found in the accumulated data lAcumCnt Number of measurements in adjacent cycle jitter accumulated data dAcumMin Minimum adjacent cycle jitter measurement found in accumulated data dAcumMax Maximum adjacent cycle jitter measurement found in accumulated data dAcumAvg Average value of adjacent cycle jitter found in accumulated data dAcumSig Standard deviation lo o
153. duty cycle measurement double dDutyMin Minimum value of duty cycle measurement OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 109 double PLTD PLTD PLTD PLTD PLTD PLTD double double double double double DRCG tParm lAutoFix IDutCycl lUsrSpec dSpecVal IGood dDutyMax tRiseMax tRiseMin tFallMax dDutyAvg Average value of duty cycle measurement tRiseMax Minimum deltaT of rising adj periods tRiseMin Maximum deltaT of rising adj periods tFallMax Minimum deltaT of falling adj periods tFallMin Maximum deltaT of falling adj periods tMaxiLim Maximum limit per specification El tMiniLim Minimum limit per specification dRiseMax DRCG_ CYCLES DRCG_ SWEEPS dRiseMin DRCG_ CYCLES DRCG_ SWEEPS dFallMax DRCG_ CYCLES DRCG_ SWEEPS dFallMin DRCG_ CYCLES DRCG SWEEPS dFreq Carrier frequency El A structure of type PARM that contains acquisition parameter The PARM is discussed in full detail in Section 2 4 Flag indicating whether to perform a pulse find as required Setting this value to any integer greater than zero tells the measurement to perform a pulse find if needed The system will know if a measurement was recently performed and if a pulse find is necessary Valid Entries 0 No pulsefind prior to measurement 1 Pulsefind
154. e 50 level at which to test the device However there are two cases in which this may not be desirable First in a production environment it may be too time consuming to perform a Pulse Find each time the test is to be executed All of the parts should have roughly the same voltage characteristics if they are passing parts and will most likely have the same threshold settings Second in some cases it might be desirable to account for any slew rate issues by adjusting the threshold voltage to the cross point A simple script can be written to identify the cross point prior to testing Since measurements are made from the data signal to the next clock signal the stop of measurement is the reference clock signal and thus dStopVlt controls the threshold level for the clock channel It is typically best to leave this variable at the default and allow Pulse Find to establish the 50 level at which to test the device In a production environment this value can be forced by turning pulse find off and setting this parameter This parameter is a bi directional structure element that tracks the number of acquisitions since last reset This flag can be read after an execution or set prior to an execution Setting this parameter to 0 essentially resets this register It will be automatically incremented when a measurement is performed Valid Entries any integer greater than or equal to 0 Default 0 Parameter
155. e PATN structure elements This is an internal structure that the system uses to store pattern information and does not need to be altered by the user The first time a measurement is performed the pattern is loaded into tPatn which is used internally for all subsequent acquisition and analysis The bit rate is measured and placed in this field Hertz Total samples taken to calculate DDJ RJ and PJ values combined Gives an indication of the actual data to support the calculated total jitter number DCD DDJ measurement in seconds This measurement is taken from the mean deviation of each pattern edge from it s ideal location All deviations are placed in a histogram and the peak peak value from this histogram is placed in this structure location Deterministic jitter measurement in seconds This is the DCD DDJ summed with the Periodic Jitter Random jitter estimate in seconds Periodic jitter measurement in seconds Total jitter estimate in seconds Effective Deterministic eDJ jitter estimate in seconds for the left side of the bathtub curve Total effective DJ is calculated by adding dEftvLtDj to dEftvRtDj In order to calculate the effective jitter the flag IFndEftv must be enabled Since the ffective jitter is calculated by optimizing a curve fit to the bathtub curve a result is not guaranteed If the curve fit is unsuccessful a negative value will be returned in this
156. e acquiring data until a sufficient amount of data has been collected resulting in a high level of confidence in the accuracy of the TailFit on the given sample If selected the TailFit algorithm will make a single attempt at fitting Gaussian tails to the tail regions of the histograms after acquiring the minimum number of samples as defined by IMinHits Valid Entries 0 continue acquiring data until chi squared X estimate indicates a good TailFit was accomplished 1 perform tail fit on only IMinHits amount of data Default 0 Minimum number of samples in thousands to acquire prior to attempting a TailFit Valid Entries any positive integer less than or equal to 100 000 Default 50 Flag to indicate that an effective jitter calculation is to be attempted Effective Jitter is a means of estimating the effective deterministic jitter as dE relates to a 5 Sampled error probability 4 E Extrapolated This is done by A i Actual first capturing i j the bathtub curve using conventional Extrapolated Bathtub curve versus real bathtub RJ amp DJ estimation curve as seh By BERT techniques then extrapolating from a few points in the bathtub curve to the 5 error probability level to estimate effective DJ Effective RJ is extracted based on the curve that was fitted to the sample points These values should only 60 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES
157. e application the supported compiler should be installed and properly configured This may include modifying the PATH environment variable so that the compiler s executable can be launched from a command line It may also involve setting INCLUDE and LIB environment variables so that the standard include files and libraries may be located by the compiler Consult the compiler documentation for further information To build the sample application on UNIX execute the following from a command prompt make To build the sample application on Microsoft Windows execute the following from a command prompt nmake OWAVECREST CORPORATION 2005 SECTION INTRODUCTION 3 A EXECUTING THE SAMPLE APPLICATION Before attempting to execute the sample application the supported GPIB interface card must be installed and properly configured on the host workstation Consult the interface card manufacturer s documentation for further information The WAVECREST SIA 3000 should be powered on attached via GPIB cable to the host workstation with CAL OUT connected to IN1 and CAL OUT connected to IN2 NOTE Support is included for both National Instruments and SICL interface libraries on the Linux platform The only required change is that your application must be linked against the PAPI library libWChpb so instead of libWCgpb so when using the SICL libraries The makefile included with the Linux sample application includes a detailed explanation of
158. e can be from 1 to 31 The device must have been opened using IO_ open buf Location to place data read Must be at least cnt long cnt Number of bytes to try and read OUTPUTS Returns an integer containing the status of the last I O operation int _ stdcall IO response int ApiDevid char rsp Get response byte from ApiDevid and place it in rsp Refer to the device documentation for definition of the response bits INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 The device must have been opened using IO_ open rsp Location to place response byte OUTPUTS Returns an integer containing the status of the last I O operation int _ _stdcall IO status int ApiDevid This function returns the status of the last I O operation Fourteen bits within the status word are meaningful Three are used throughout the API ERROR bit 15 hex value 8000 Error detected TIMEO bit 14 hex value 4000 Time out END bit 13 hex value 2000 END detected INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 OUTPUTS Returns an integer containing the status of the last I O operation void __stdcall IO trigger int ApiDevid Sends a device trigger to the specified device INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 The device must have been opened using IO_ open
159. e from it s ideal location All deviations are placed in a histogram and the peak peak value from this histogram is placed in this structure location dRang Peak to peak of All Measurements histogram This histogram is part of the random data analysis package and should not be used as a metric of jitter measurement Numbers captured in this tool are for comparison purposes only and only coincidentally share some terminology with jitter measurements dRjit n Random jitter estimate in seconds for each of the enabled acquire modes Each mode s RJ estimate is kept separate sinc the data came from frequency information derived from different FFTs dPjit n Periodic jitter measurement in seconds for each of the enabled acquire modes Each enabled acquire mode s PJ measurement is kept separate since the data came from frequency information derived from different FFTs dTjit n Total jitter estimate in seconds for each of the enabled acquire modes Each mode s TJ estimate is kept separate sinc the data came from frequency information derived from different FFTs dEftvLtDj n Effective Deterministic eDJ jitter estimate in seconds for the left side of the bathtub curve Total eDJ is calculated by adding dEftvLtDj to dEftvRtDj Each of the enabled acquire modes is stored in the appropriate array location as specified in the table below In order to calculate th ffective jitter th flag IFndEftv must be enabled Since the effective jitter is ca
160. e number of useful results can be displayed quickly The IMeas parameter allows you to toggle on or off certain measurements The measurement settings provide the best configuration to a variety of users This ease of use means that there is less control over individual settings There may be instances where there is the need to have more control over a specific measurement An example would be changing the trigger delay on the oscilloscope or measuring a histogram over two periods rather than single period jitter Another example would be to find very low frequency jitter below the clock 1667 low cutoff frequency of this tool If you need access to more configuration settings use one of the individual tools instead typedef struct PARM tParm Contains acquisition parameters Xj long lPass Acquisitions so far set to 0 to reset long 1Pent Amount 50 to calc rise fall time long 1HiRFmV Absolute rise fall voltage if lPcnt lt 0 long 1LoRFmvV Absolute rise fall voltage if lPcnt lt 0 long 1Meas Measure flag see defines above long lInps Input selection see defines above double dAttn POSS CHNS Attenuation factor dB per channel long 1Good Flag indicates valid data in structure long 1Pad0 long lHistCnt POSS CHNS Number of hits in accumulated edge data double dHistMin POSS CHNS Minimum value in accumulated edge data double dHistMax
161. e only double dRjit Random jitter this side only double dChsq ChiSquare indicator goodness of fit 7 double dLoValu dHiValu Xval range over which tail was fitted double dMuValu Projected Xval where mu was determined double dEftvDj dEftvRj Effective jitter if calculated double dTjit Total jitter calculated from bathtub SIDE dCoef Coefficient used to generate idealized tail fit curves dDjit Deterministic jitter this side only dRjit Random jitter this side only dchsq ChiSquare indicator goodness of fit dLoValu dHiValu range over which tail was fitted dMuValu Projected dXval where mu was determined dEftvDj dEftvRj Holds th ffective jitter values if calculated To calculate th ffective jitter 1FndEftv must contain a non zero value Since th ffective jitter is calculated by optimizing a curve fit a result is not guaranteed If the curve fit fails a negative value will be returned in these variables 16 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 2 7 SPECIFICATION LIMIT STRUCTURE This input structure is used by the Datacom Known Pattern With Marker Tool to contain the parameters for tRateInf tDdjtInf and tRjpjInf This tool uses these specifications when setting up the measurement for capturing bit rate DDJ and RJ PJ spectra respectively typedef struct long 1SampCnt Sample size to use E long lPadl double dMaxSer
162. eatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the SATA structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS sata Pointer to a SATA structure Memory needs to be allocated by the caller OUTPUTS None void _ stdcall FCNL ClrSata SATA sata This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the sata structure INPUTS sata Pointer to a SATA structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static SATA ser ata memset ser ata 0 sizeof SATA FCNL DefSata amp ser ata FCNL_RgstPkt ApiDevld amp ser_ata WIND SATA FCNL_ RqstAll ApiDevld amp ser_ata WIND SATA 7 7 FCNL_ClrSata amp ser_ata declare ser_ata to a structure of type SATA clear the memory for ser _ata structure set ser ata structures to default values execute the measurement get plot data deallocate the structure 122 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES OWAVECREST CORPORATION 2005 2 43 SPREAD SPECTRUM TOOL The SSC tool will measure the appropriate number of the input clock cycles to see the maximum peak to peak deviation due to the SSC profile see figure below This will be equal to the fundam
163. ed by the next measurement Valid Entries any integer greater than or equal to 0 Default 0 lErrProb Error probability level for Total Jitter Total Jitter is calculated based on the desired Error Probability level This value is used in conjunction with the bathtub curve after the successful completion of a tail fit in order to project the value of Total Jitter OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 3 ITailFit IForcFit IMinHits IFndEftv Valid Defau Flag data data if th param Valid Defau If no measu TailF Valid Defau Minim is 50 be fo Valid Defau Flag to a Valid Defau Entries 1 to 16 lt 12 to indicate whether to perform a TailFit on data in tAcum array If non zero a tail fit will be attempted on the tAcum array The IGood element of the tTfit structure will indicate e TailFit was successful Any positive interger for this eter will initiate the TailFit algorithm Entries 0 disable TailFit 1 enable TailFit Its 0 n zero uses the force fit method If set to zero the rement will continue to loop until a reasonably accurate it can be achieved Entries 0 do not use force fit 1 force a fit using IMinHits number of hits Lee 0 um hits before attempting a tail fit in 1000 s the default The larger the number the more likely a valid tailfit will und Entries any integer 2 50
164. ed for RJ content The smallest sample is three Th dges selected are the first edge in the pattern the middle edge and the last edge This allows a reasonable span of frequency content It is assumed that the noise components can be approximated by a continuous function as is generally the case If the RJ changes over frequency there will be a delta between the different samples A change in value of less than 5 between adjacent points is considered acceptabl If the delta is larger more TailFit points should be taken Valid Entries DCOM NONE Do not perform a TailFit DCOM AUTO Perform TailFits until the delta Between successive fits lt 5 DCOM FIT3 Perform 3 TailFits DCOM FITS Perform 5 TailFits DCOM FIT9 Perform 9 TailFits DCOM FIT17 Perform 17 TailFits DCOM ALL Perform TailFit on every edge Default DCOM_ NONE Error probability level for Total Jitter Total Jitter is calculated based on the desired Error Probability level This value is used in conjunction with the bathtub curve after the successful completion of a tail fit in order to project the value of Total Jitter Valid Entries 1 to 16 Default 12 This parameter is a bi directional structure element that tracks the number of acquisitions since last reset This flag can be read after an execution or set prior to an execution Setting this parameter to 0 essentially resets this register It wi
165. ed for scope acquire specified in mV per channel IVdif n Differential offset voltage used for scope acquire specified in mV one per channel IVcom n Common mode offset voltage used for scope acquire specified in mV one per channel ITper Time per division specified in ps applies to all channels any of the following are valid values 5000000 2000000 1000000 500000 200000 100000 50000 20000 10000 5000 2000 1000 500 200 100 50 OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 13 ITdel IPcnt IHiRFmV ILORFmV lInps IMeas IPass lAvgs tMask Default 10000 Delay time to start specified in ps applies to all channels Valid Range 24 000 to 100 000 000 Default 24 000 This field specifies the voltage thresholds to be used when calculating rise and fall times The voltage thresholds are assumed to be symmetrical about the 50 threshold and this is the distance from the 50 threshold to the starting and ending thresholds For example if this field is equal to 30 then 20 and 80 thresholds are used If this field is equal to 40 then 10 and 90 thresholds are used The absolute voltage levels used are based on the previous pulsefind minimum and maximum voltages If this field is negative then the absolute rise and fall thresholds are taken from the following fields 1HiRFmV amp l1LoRFmv Default 30 Absolute rise fall voltage if 1Pcnt lt 0 in units of mV Default
166. eing measured This is not measured if a two channel measurement is being performed dFreq Contains the frequency of the signal being measured This is not measured if a two channel measurement is being performed dVmin Min voltage returned from last pulse find It is important to note that the accuracy of this voltage measurement is severely bandwidth limited For accurate amplitude measurements use the oscilloscope tool dVmax Max voltage returned from last pulse find It is important to note that the accuracy of this voltage measurement is severely bandwidth limited For accurate amplitude measurements use the oscilloscope tool void _ stdcall FCNL DefStat STAT stat This function is used to fill the stat structure for the Statistics tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the STAT structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS stat Pointer to a STAT structure Memory needs to be allocated by the caller OUTPUTS None 128 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 void _ stdcall FCNL ClrStat STAT stat
167. el any non zero value enables gating When gating is enabled the arming edge and reference voltages of the current external arm channel are associated with gating Default 0 14 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES OWAVECREST CORPORATION 2005 1CmdFlag Bitfield containing modifiers Most of the bits are reserved for internal use and should be left to zero However the following bits are provided for enabling user selectable options CMD_PATNMARK 1 lt lt 4 Use PM50 card as arm source on the selected external arming channel CMD BWENHANCED 1 lt lt 10 Apply Bandwidth Enhancement algorithm to scope data This is only appropriate if a stationary waveform relative to the trigger is available Default 0 1FndMode Pulse find mode may be one of the following PFND FLAT Use flat algorithm for pulse find calculation PFND_ PEA Use peak value for pulse find calculation Default PFND PEAK 1FndPcnt Pulse find percentage may be one of the following PCNT_ 5050 Use 50 50 level for pulse find calculation PCNT_1090 Use 10 90 level for pulse find calculation PCNT_ 9010 Use 90 10 level for pulse find calculation PCNT USER Do NOT perform pulse find manual mode When this mode is selected valid voltages must be loaded in the dStrtVlt dStopVlt dArmVolt and dGatVolt parameters PCNT 2080 Use 20 80 level for pulse find calculation PCNT_ 8020 Use 80
168. ental frequency divided by the frequency of 2 the SSC cycle The tool will search for this maximum deviation within the range of possible SSC frequencies entered in the Max SSC Freq kHz and Min SSC Freq kHz inputs Max SSC Span stop edges toskip for amp SSC cycle Clock like data signal Stop Edges to Skip 0 Measures a single period Stop Edges to Skip 1 Measures two periods The SSC tool will then measure a histogram of this span and determine the PPM deviation form the input Nominal Freq MHz The figure below shows what this corresponds to in the frequency domain WAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 123 typedef struct Input parameters PARM tParm Contains acquisition parameters double dBegFreq Starting freq to find peak jitter span double dEndFreq Ending freq to find peak jitter span double dNomFreq Nominal frequency long 1ClokDiv Scaling factor for divided clock long lHstSamp Samples for histogram at peak span long l1PpmAvgs 2 1PpmAvgs used to average results e long 1SscStds Standard used s above defines Output parameters long 1Good Flag indicates valid data in structure long 1MaxSpan Span across which max jitter is found double dCarFreq Measured carrier frequency e double dModFreq Apparent jitter modulation fr
169. ents tRiseHist DCD DDJ histogram of rising edges tFallHist DCD DDJ histogram of falling edges tNormDdjt DCD DDJvsUI for external arming only tTotlHist Histogram of all acquires combined tLeftHist Leftmost Histogram tRghtHist Rightmost Histogram tBathPlot Bathtub curves determined from PDF tSigmPlot 1 Sigma vs span plot tFreqPlot Jitter vs frequency plot void __stdcall FCNL_DefRcpm RCPM rcpm This function is used to fill the rcpm structure for the Datacom Bit Clock and Marker tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the RCPM structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS rcpm Pointer to a RCPM structure Memory needs to be allocated by the caller OUTPUTS None void __stdcall FCNL_ClrRcpm RCPM rcpm This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the rcpm structure INPUTS rcpm Pointer to a RCPM structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static RCPM bcam declare bcam to a structure of type RCPM memset amp bcam 0 sizeof RCPM
170. equency double dPpmPstv Parts per million positive double dPpmNgtv Parts per million negative double dMeasMin Minimum value in measured normal data double dMeasMax Maximum value in measured normal data double dMeasAvg Average value of measured normal data double dMeasSig 1 Sigma value of measured normal data double dUnitInt Unit Interval of data signal EJ PLTD tHist Histogram of results for peak freq xy PLTD tSigm 1 Sigma data to find max jitter span SSCA 24 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 tParm dBegFreq dEndFreq dNomFreq IClokDiv IHstSamp IPpmAvgs ISscStds IGood IMaxSpan dCarFreq dModFreq dPpmPstv dPpmNgtv dMeasMin dMeasMax dMeasAvg dMeasSig dUnitInt tHist tSigm A structure of type PARM that contains acquisition parameter The PARM is discussed in full detail Starting freq to find peak jitter span in Section 2 4 Valid Range le3 to 1e6 Default 30e3 Ending freq to find peak jitter span Valid Range 1e3 to 1e6 Default 33e3 Nominal frequency Valid Range le6 to 10e9 Default 750 6 Scaling factor for divided clock Valid Range 1to5 Default 1 Samples for histogram at peak span Valid Range 1 to 950 000 Default 100 000 This variable is used to calculate the number of averages to use Increasing the number of averages reduces the background noise associated with
171. er is independent of clock jitter effects and because the Arm is not a trigger any jitter on the marker will not transfer to the measurement of the Data For an in depth description on Known Pattern With Marker measurement theory refer to the Known Pattern With Marker quick reference guide typedef struct Input parameters double dAttn DCOM tDcom Output parameters Attenuation factor dB DCOM structure holds most information Flag indicates valid data in structure Normal channel voltage data Complimentary channel voltage data tion factor in dB this is provided to allow the to be scaled to compensate for external attenuation from sources such as probes 0 re of type DCOM which specifies most of the input and output parameters necessary for a data signal analysis The user will need long lGood long lPad0 PLTD tNrmScop PLTD tCmpScop FCMP dAttn Attenua results Default tDcom Structu DCOM st IGood ructure Flag indicates tNrmScop Normal channel tCmpScop to review all of the default parameters of the and decide which to change valid data in structure voltage data Complimentary channel voltage data void __stdcall FCNL_DefFcmp FCMP fcmp This function is used to fill the fcmp structure for the Fibre Channel Compliance tool with reasonable default values It is recommended that this function be called initially even if
172. er than or equal to 0 Default 0 indicating 2 averages 1 execution Flag to indicate valid output data is in structure A structure of type PLTD containing the time domain plot data See Section 2 3 for details on the PLTD structure elements A structure of type PLTD containing time stamp data plot data This is not normally plotted See Section 2 3 for details on the PLTD structure elements A structure of type PLTD containing the Frequency plot data with frequency amplitude roll off of 20dB decade from the sampling Nyquist Frequency This plot is typically used for debug purposes only See Section 2 3 for details on the PLTD structure elements A structure of type PLTD containing the Frequency plot data with amplitudes representing the cumulative effect of the frequency component See Section 2 3 for details on the PLTD structure elements Carrier frequency Sampling rate dBc assessed on 1 clock FFT data void __stdcall FCNL_DefTdig TDIG tdig This function is used to fill the tdig structure for the Low Frequency Modulation tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the TDIG structure using the standard memset function to ensure that an
173. ere is one structure and associated plot for each of the acquisition modes specified in lAcqMode See Section 2 3 for details concerning the PLTD structure and its elements Structure of type PLTD which contains all of the plot information for generating a lo TailFit results versus UI plot x axis can be converted to time from UI based on dBitRate value Each successful TailFit will be displayed as a data point and connected to adjacent TailFit samples The plot value represents the overall RJ for the given amount of accumulated UI This plot is only valid if tail fit is enabled There is one structure and associated plot for each of the acquisition modes specified in lAcqMode See Section 2 3 for details concerning the PLTD structure and its elements information for generating a Jitter versus Frequency plot There is one structure and associated plot for each of the acquisition modes specified in lAcqMode See Section 2 3 for details concerning the PLTD structure and its elements Structure of type PLTD which contains all of the plot information for generating a lo TailFit results versus frequency plot This plot is only valid if tail fit is nabled There is one structure and associated plot for each of the acquisition modes specified in lAcqMode See Section 2 3 for details concerning the PLTD structure and its elements SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES OWAVECREST CORPORATION
174. erformed using simple linear calculation of Total Jitter instead of convolving the DJ Probability Density Functions and the RJ Probability Density Functions This calculation is based on the formula TJ DJ n RJ where DJ and RJ are measured and n is the multiplier based on a theoretical Gaussian distribution Valid Entries 0 do not use convolution for TJ est 2 Convolve DJ and RJ for TJ est Default 0 IGood Flag indicates valid output data in structure A positive value in this parameter indicates that the measurement was completed successfully and valid data can be extracted from this structure tPatn Structure of type PATN which holds all of the pattern information with regards to pattern length pattern content marker placement relative to location in pattern and other pattern specific metrics See Section 2 9 for a detailed description of the PATN structure elements This is an internal structure that the system uses to store pattern information and does not need to be altered by the user The first time a measurement is performed the pattern is loaded into tPatn which is used internally for all subsequent acquisition and analysis dHits Total samples taken to calculate DDJ RJ and PJ values combined Gives an indication of the actual data to support the calculated total jitter number dDdjt DCD DDJ measurement in seconds This measurement is taken from the mean deviation of each pattern edg
175. eters passed to function VER_ERROR 4 Wrong version of software detected FIT_ERROR 5 Failure applying tail fit LIM_ERROR 6 Results exceed specified limits FIO_ ERROR 7 File I O error ARM_ERROR 8 No suitable arm signal detected TRG ERROR 9 No suitable trigger signal detected USR_ERROR 10 Operation was terminated by user UNT_ERROR 11 Unit Interval data exceeds limits DDJ_ERROR 12 DCD DDJ data exceeds limits VAR_ERROR 13 Variance data for RJ PJ exceeds limits LRN_ERROR 14 Learn Mode data exceeds limits INT_ERROR 15 Insufficient points for interpolation TIM_ERROR 16 Maximum measurement timeout exceeded PCI_ERROR 17 PCI bus error LOK ERROR 18 Memory transfer error CAL_ERROR 19 Missing or invalid calibration file SYS ERROR 20 System or hardware failure PTN_ ERROR 21 Indicates an invalid pattern was used FRQ ERROR 22 Channel does not support this Bit Rate BEC ERROR 23 Pattern is too long for BEC comparison NOL ERROR 24 Obtained an invalid Phase Noise result PAT ERROR 25 DCD ISI calibration pattern is no longer supported PKT ERROR 26 Invalid data returned in binary packet OWAVECREST CORPORATION 2005 APPENDIX A ERROR CODES 75 This page intentionally left blank 176 APPENDIX A ERROR CODES OWAVECREST CORPORATION 2005 The following example shows what the sample program in Chapter 1 might look like written as a Visual Basic subroutine Private Sub Sample Click Start of Sample Program Dim bHist A
176. f accumulated adjacent cycle jitter data tNorm Structure of type PLTD containing all of the necessary information to draw a Histogram of latest adjacent cycle jitter measurements from most recent execution See Section 2 3 for details of the PLTD structure and its elements tAcum Structure of type PLTD containing all of the necessary information to draw a Histogram of accumulated data from all adjacent cycle acquisitions See Section 2 3 for details of the PLTD structure and its elements tMaxi Structure of type PLTD containing all of the necessary information to draw a Histogram with the maximum number of occurrences of a given measurement in all previous executions of adjacent cycle jitter S Section 2 3 for details of the PLTD structure and its elements tBath Structure of type PLTD containing all of the necessary information to draw a Bathtub curve based on the Probability Density Function PDF of DJ and RJ as measured by the TailFit OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 33 tEftv tTfit rou when a successful tail fit has b for mw oct 0 HAnDHONtHEHN o ine ne 1 d E i amplitud Cc i elements if enabled The data in this s t ructure is only valid rmed S Section 2 3 n perf re of type PLTD containing all of tion to draw an of effectiv re is only valid if lFndEftv is s See Section 2 3
177. fined previously using FCNL_DefPathMap INPUTS path Number of the path being defined This value can be from 0 to 511 DevType Pointer to location that returns the device type HPIB 0 HP Systems Only GPIB 1 CUST1 11 CUST2 12 CUST3 13 OUTPUTS Returns S A_ SUCCESS upon completion or a negative value to indicate error long __stdcall FCNL_GetPathApiDeviId long path long ApiDevld Use this function to retrieve the device id for the path indicated The path must have been defined previously using FCNL_DefPathMap INPUTS path Number of the path being defined This value can be from 0 to 511 DevType Pointer to location that returns the ApiDevId a value between 1 and 31 OUTPUTS Returns S A_ SUCCESS upon completion or a negative value to indicate error long __stdcall FCNL_GetPathChannel long path long Channel Use this function to retrieve the channel for the path indicated The path must have been defined previously using FCNL_DefPathMap INPUTS path Number of the path being defined This value can be from 0 to 511 Channel Pointer to location that returns the device channel OUTPUTS Returns S A_ SUCCESS upon completion or a negative value to indicate error OWAVECREST CORPORATION 2005 SECTION 3 GENERAL COMMAND REFERENCE 57 long __stdcall FCNL GetPathMuxSwitch long path long MuxSwitch Use this function to indicate the MUX switch index for the path indicated The path must
178. for details of uding plot and limits ccessful tail fit has b tails of the TFIT structure and its elem re of type TFIT containing all of This struc n performed O tails of the PLTD structure and its e t S elements the necessary Effective Jitter Bathtub curve based on DJ and effective RJ The data in this t and a valid fit is the PLTD structure and the TailFit information ure is only valid when a Section 2 3 for IBinNumb dLtSigma dRtSigma dFreq Used internally void __stdcall FCNL DefAcyc ACYC acyc ents DO NOT ALTE R This function is used to fill the acyc structure for the Adjacent Cycle Jitter tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the ACYC structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS acyc Pointer to a ACYC structure Memory needs to be allocated by the caller OUTPUTS None void __stdcall FCNL_ClrAcyc ACYC acyc This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the acyc structure INPUTS acyc Pointer to a
179. for failure to comply with any of these License Terms Upon termination you must immediately destroy the Software together with all copies adaptations and merged portions in any form Limited Warranty and Limitation of Liability Wavecrest SPECIFICALLY DISCLAIMS ALL OTHER REPRESENTATIONS CONDITIONS OR WARRANTIES EITHER EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTY OR CONDITION OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ALL OTHER IMPLIED TERMS ARE EXCLUDED IN NO EVENT WILL WAVECREST BE LIABLE FOR DIRECT INDIRECT SPECIAL INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE WHETHER OR NOT WAVECREST MAY BE AWARE OF THE POSSIBILITY OF SUCH DAMAGES IN PARTICULAR WAVECREST IS NOT RESPONSIBLE FOR ANY COSTS INCLUDING BUT NOT LIMITED TO THOSE INCURRED AS THE RESULT OF LOST PROFITS OR REVENUE LOSS OF THE USE OF THE SOFTWARE LOSS OF DATA THE COSTS OF RECOVERING SUCH SOFTWARE OR DATA OR FOR OTHER SIMILAR COSTS IN NO CASE SHALL WAVECREST S LIABILITY EXCEED THE AMOUNT OF THE LICENSE FEE PAID BY YOU FOR THE USE OF THE SOFTWARE Export Requirements You may not export or re export the Software or any copy or adaptation in violation of any applicable laws or regulations U S Government Restricted Rights The Software and documentation have been developed entirely at private expense and are provided as Commercial Computer Software or restricted computer software They
180. g data from disk drives when the pattern marker may be synchronized with the start of frame data Valid Entries 0 to 10 000 000 pattern length Default 0 indicating no header present Corner Frequency for RJ amp PJ estimate in Hertz This value is used in conjunction with the Bit Rate and pattern to determine the maximum stop count to be used to acquire RJ amp PJ data A lower value increase acquisition time Valid Entries Bit Rate 10 000 000 to Bit Rate I Default 637e3 637kHz Fibre Channel 1X A structure of type SPEC used by the Bit Rate measurement The structure holds measurement specific parameters such as sample count pattern repeats and maximum standard error See Section 2 7 for a description of the SPEC structure and its elements A structure of type SPEC used by the Data Dependant Jitter DDJ measurement The structure holds measurement specific parameters such as sample count pattern repeats and maximum standard error See Section 2 7 for a description of the SPEC structure and its elements A structure of type SPEC used by RJ amp PJ estimate The structure holds measurement specific parameters such as sample count pattern repeats and maximum standard error See Section 2 7 for a description of the SPEC structure and it s elements Low pass filter frequency in Hertz This is only valid when ILpfMode is enabled High pass filter frequency in Hertz This is
181. h any SIA 3000 tool Section 2 provides information in greater detail pertaining to the basic measurement functions that comprise PAPI This section should help the developer gain a basic understanding of the measurement commands in PAPI and serve as a reference for the variety of data structures used to pass information to and from the SIA 3000 Section 3 is a function reference for any remaining functions not addressed in Section 2 Functions for setting up patterns calibration and making low level GPIB calls are among the calls listed in this section Most functions addressed in Section 3 are for advanced PAPI usage or for making low level GPIB calls Some mandatory functions for getting started and basic PAPI usage are COMM InitDev and COMM_CloseDev in Section 3 1 as well as FCNL PulsFind in Section 3 2 Section 3 7 addresses the definition of groups for defining advanced measurement sequences It is not necessary to utilize the group functionality for basic PAPI applications The best approach for the beginning PAPI developer is to review Section 1 followed by Sections 2 1 and 2 2 Once this is complete go through the following process when referring to the PAPI manual e Choose an SIA 3000 tool and the desired parameters results e Refer to the appropriate sub section of Section 2 for the selected tool i e Histogram Section 2 25 e Review the input and output parameters for the structure the functions that apply to that tool
182. hardware and is dependent on f0 and Maximum Freq Alternate methods of characterizing random noise in clock sources are available in the SIA 3000 typedef str uct Input parameters PARM tParm Contains acquisition parameters Rif FETS tFfts FFT window and analysis parameters Es long lAutoFix If true calculate the above parameters long lPadl double dMaxFreq Maximum Frequency that is desired El double dFreqRes Frequency resolution that is desired e long 1FftAvgs 2 fft_avgs averages used to smooth FFT Output parameters long 1Good Flag indicates valid data in structure PLTD tTime Time domain plot data uy PLTD tStmp Time stamp array not normally plotted PLTD trftl Frequency plot data on 1 clock basis ie PLTD tPhas Phase noise plot in dBc Hz double dCarFreq Carrier frequency double dSmpRate Sampling rate double dValByDec DECADES Phase Noise by Decade first is 10Hz last is fMax zero means illegal value PHAS tParm A structure of type PARM that contains acquisition parameter The PARM structure is discussed in full detail in Section 2 4 tFfts A structure of type FFTS that contains the FFT setup parameters such as window type and padding factor See Section 2 10 for further details AutoFix If true calculate some of the above tParm parameters Default 0 dMaxFreq Maximum Frequency that is desired Default
183. have been defined previously using FCNL_DefPathMap INPUTS path Number of the path being defined This value can be from 0 to 511 MuxSwitch Pointer to location that returns the MUX switch index OUTPUTS Returns S A_ SUCCESS upon completion or a negative value to indicate error long __stdcall FCNL_GetPathMuxIsADsm long path long MuxIsADsm Use this function to inquire if a DSM is being used as a MUX in this path indicated The path must have been defined previously using FCNL_DefPathMap INPUTS path Number of the path being defined This value can be from 0 to 511 MuxlsADsm Pointer to location that indicates if a DSM is being used as a MUX in this path OUTPUTS Returns S A_ SUCCESS upon completion or a negative value to indicate error long __stdcall FCNL_GetPathDutDeskew long path double value Use this function to retrieve the external deskew value for the DUT path indicated The path must have been defined previously using FCNL_DefPathMap INPUTS path Number of the path being defined This value can be from 0 to 511 value Pointer to location containing the DUT Deskew value for the path indicated OUTPUTS Returns S A_ SUCCESS upon completion or a negative value to indicate error long __stdcall FCNL_GetPathFixDeskew long path double value Use this function to retrieve the external deskew value for the fixture path indicated The path must have been defined previously using FCNL_DefPathMap
184. he measurement mode changed Default 0 Corner Frequency for RJ amp PJ estimate in Hertz This value is used in conjunction with the measured clock frequency Fem to determine the maximum number of accumulated periods used to acquire A lower value increases acquisition time while capturing more low frequency data Valid Entries Fo 10 000 000 to Foy I Default 637e3 637kHz Fibre Channel 1X High pass digital filter function in Hertz for calculating RJ and DJ A negative value disables filter The accuracy of low frequency modulation measurements can be improved by setting the measurement corner frequency lower than the desired corner frequency and then using this filter for the RJ and PJ estimate Valid Entries 1 to dCornFreq or Clock Frequency IMaxStop Default Low pass Digital filter function in Hertz for calculating RJ and DJ A negative value disables filter This filter is used as a post processing filter applied to the measured data to limit high frequency information present in the data when calculating RJ DJ estimate Valid Entries 1 to Clock Frequency lIncStop Default 1 This variable is used to calculate the number of averages to use in the FFT Increasing the number of averages reduces th background noise associated with the FFT algorithm The number of averages is calculated based on the equation AVERAGES 2 where n IFftAvgs Valid Entries any integer greater than or equal to 0
185. he structure 94 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 2 33 PCI EXPRESS 1 1 WITH SOFTWARE CLOCK RECOVERY TOOL The PCI Express 1 1 with Software Clock Recovery Tool provides both timing and amplitude compliance measurements using the SIA3000 This tool accurately determines device performance by quantifying both random and deterministic jitter components typedef struct Input parameters long 1CompPnt Compliance Point 0 RX 1 TX E long 1Pent Amount 50 to calc rise fall time long 1HiRFmvV Absolute rise fall voltage if lPcnt lt 0 long 1LoRFEmvV Absolute rise fall voltage if lPcnt lt 0 long 1Idleok Common mode idle voltages are valid SL long lPass Acquisitions so far set to 0 to reset double dAttn Attenuation factor dB KPWM tKpwm Contains acquisition parameters E Output parameters long 1Good Flag indicates valid data in structure long 1TtlHits double dEyeOffs double dHistMed double dxXmnDiff double dXmxDiff double dvVdiffPP Pk pk differential voltage No double dVdRatio De emphaisis voltage ratio double dOpnEyeT Eye opening double dMedEyeT Median to max jitter double dOpnEyeT1M Eye opening 10 6 BER ay double dTranVolts Vpp for Transition Eye Ef double dDeemVolts Vpp for De Emphasis Eye double dVcommonAc V x cm
186. hese functions are not prerequisite for using the Production API to acquire simple measurements Most of these routines provide greater flexibility for the advanced user This chapter provides a general overview of these functions along with examples for the more commonly used functions These functions apply to all tools but may require the pointer to a specific measurement window structure to be passed along with a type identifier 1 e WIND HIST For more information regarding specific measurement tools and their corresponding measurement window structures and commands refer to the previous chapter NOTE __stdcall and D11Cal11 are part of the function definitions in the header file but can essentially be ignored They are utilized to provide options when building and using DLLs on Microsoft Windows They are implemented to allow the same header file to be used for building the DLL and importing the DLL ensuring consistent declarations OWAVECREST CORPORATION 2005 SECTION 3 GENERAL COMMAND REFERENCE 39 3 1 GPIB COMMUNICATION AND I O LAYER FUNCTIONS COMM Layer Functions The functions in this section provide GPIB bus functionality GPIB commands may be used in conjunction with Production API commands for advanced functionality However COMM_InitDev and COMM_CloseDev are the only functions that must be called in order to utilize the Production API These functions initialize and close a GPIB connection and acquire an API Device
187. his value can be from 1 to 31 The device must have been opened using IO_open OUTPUTS None int _ stdcall IO_count int ApiDevid This function returns the byte count of the last data transfer operation INPUTS ApiDevTyp Integer containing the API Device ID of the device This value can be from 1 to 31 OUTPUTS Returns an integer containing the byte count of the last data transfer operation void _ stdcall IO _libver char StrPtr This function returns the current IO library version i e 2 5 0 INPUTS Strptr Pointer to location to store version string Memory must be allocated by user OUTPUTS None int _ stdcall IO_open int ApiDevTyp char devname INPUTS ApiDevType An integer value indicating the device type HPIB 0 HP Systems Only GPIB 1 CUST1 11 CUST2 12 CUST3 13 devname A pointer to an ASCII string containing a device name OUTPUTS Returns an integer containing the API Device ID or a negative number to indicate an error Opens the device specified by devname and returns the API Device ID If an error occurs a negative number is returned instead OWAVECREST CORPORATION 2005 SECTION 3 GENERAL COMMAND REFERENCE 47 int _ stdcall IO read int ApiDevid void buf long cnt Read a maximum of cnt bytes from ApiDevid and place it in buf Use IO_count to check actual number of bytes read INPUTS ApiDevid Integer containing the API Device ID of the device This valu
188. histogram of measurements Should the measurement come to completion without a successful TailFit re execute the measurement to acquire more data typedef struct long 1Good Flag to indicate successful tail fit EJ long lPadl SIDE tL tr Individual left right tail fit data EJ double dDjit Deterministic jitter from both sides double dRjit Random jitter average from both sides double dTjit Total jitter calculated from bathtub TR ED 1Good Flag to indicate successful tail fit This flag will be set to a one if the TailFit algorithm successfully separated RJ and DJ from within the histogram of measurements tL tR Structures of type SIDE defined below containg individual left amp right tail fit data dDjit Total Deterministic jitter from both sides dRjit Total Random jitter average from both sides dTjit Total jitter calculated from bathtub curve 2 6 SINGLE SIDE OF TAILFIT STRUCTURE This output structure is used within the TFIT structure to contain all of the results of a Tail Fit pertaining to one side of the measurement histogram This structure contains side specific RJ and DJ information as well as Chi squared data defining the goodness of fit criteria typedef struct double dCoef 3 Used by WavGetTfit to generate ES idealized tail fit curves f double dDjit Deterministic jitter this sid
189. how a dataCOM measurement can be taken Error checking is performed at each step and several acquisition parameters are overridden A pulsefind is used to determine suitable voltage levels and results are printed include lt stdio h gt include lt stdlib h gt include lt string h gt include WCcomm h include WCfcnl h long main DCOM dcom long ApiDevId retn 0 Initialize device if ApiDevld COMM _InitDev APIDEVTYPE DEVICENAME fprintf stderr nUnable to initialize device n return 1 Initialize structure to default values memset amp dcom 0 sizeof DCOM FCNL_DefDcom amp dcom Measure on Channel 1 External Arm using Channel 2 dcom tParm 1ChanNum 1 dcom tParm lAutoArm ARM _EXTRN dcom tParm 1lExtnArm 2 Select the pattern to use strcpy amp dcom 0 sPtnName crpat ptn Do not measure the Bit Rate assign the Bit Rate to use dcom 1GetRate 0 dcom dBitRate 1 0625e9 Perform a pulsefind if retn FCNL PulsFnd ApiDevId amp dcom tParm SIA SUCCESS goto Error Acquire measurement and obtain all values if retn FCNL RqstPkt ApiDevId amp dcom WIND_DCOM goto Error if retn FCNL RqstAll ApiDevId amp dcom WIND_ DCOM goto Error Print out the dataCOM DJ RJ and TJ values in picoseconds printf dataCOM DJ 1f ps n printf dataCOM RJ 1f
190. iId char sCmnd long 1Cmnd char sRetn long lRetn This function first clears the response byte of the specified device and then sends the specified command and waits for the ESB or MAV bit in the response byte to be set or LONG_TIME 100 seconds If the MAV bit is set an IO_read of the specified number of bytes IRetn is done and the returned binary data is placed in the specified location sRetn The ESR byte is then checked for errors If a timeout occurs or an error is found a negative value is returned INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 sCmnd A pointer to buffer containing the command and binary data to send ICmnd Integer containing the length of sCmnd sRetn A pointer to store the returned binary data This buffer must be long enough to hold the expected number of bytes Retn An integer containing the length of sRetn This value must be the length or greater than the expected number of bytes returned or the IO_read will not return all the data from the specified device OUTPUTS Returns S A_ SUCCESS upon completion or a negative value to indicate error long __stdcall COMM RegqInt long ApiDevId char cmnd long ival This function first clears the response byte of the specified device and then sends the specified command and waits for the ESB or MAV bit in the response byte to be set or LONG_TIME 100 seconds If the MAV bit is set an IO_read is do
191. if applicable PLTD dData Pointer to y axis data array LNumb Number of valid data points LRsvd Used to track memory allocation dXmin dXmax X axis values for ends of data array dYmin dYmax Min amp Max values in Y axis data array dYavg dYstd Average 1 Sigma values for data array 1XminIndx 1XmaxIndx Used by histograms to indicate location of first and last valid bins 1YminIndx 1YmaxIndx Indicates the location where the Min amp Max values occur in data array dAltXmin dAltXmax Alternate X axis values if applicable For graphs where it makes sense an alternate X axis unit may be calculated Examples include time or index on a Clock High Frequency Modulation Analysis 1 sigma plot or unit interval or time on a Datacom Known Pattern With marker bathtub plot If no applicable alternate unit is defined these variables will both be set to zero SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 ACQUISITION PARAMETER STRUCTURE An acquisition parameter structure is contained in every measurement window structure It is an input structure that holds common information for a variety of tool measurements such as channel number voltage and sample size For some simple tools information such as start and stop counts will also be drawn from this structure For more algorithm based tools these values may be computed as needed typedef struct
192. igma PREVSIGMA DO NOT ALTER double dFreq RRR RK KKK KKK KK KKK A PLTD tNorm Histogram of prev adj cycles K PLTD tAcum Histogram of all adj cycles combined PLTD tMaxi Histogram of max across all adj cycles PLTD tBath Bathtub curves determined from PDF El PLTD tEftv Effective Bathtub curves if enabled TFIT tTETES Structure containing tail fit info XJ ACYC tParm A structure of type PARM that contains acquisition parameter The PARM is discussed in full detail in Section 2 4 dUnitInt Unit Interval UI in seconds to assess Total Jitter as a percent of UI Set this parameter as the metric against which TJ will be evaluated as a percentage It is displayed as the span of the x axis in a bathtub curve This parameter is only used if tail fit is enabled Valid Entries any number greater than 0 which represents the time in secs of a bit period or unit interval Default le 9 Ins IPassCnt This parameter is a bi directional structure element that tracks the number of acquisitions since last reset This flag can be read after an execution or set prior to an exectution Setting this parameter to 0 essentially resets this register A measurement can be performed repeatedly with the same HIST structure In this case data is then accumulated in the tAcum and tMaxi plot structures When IPassCnt is set to 0 the tAcum and tMaxi plot structures are flushed It will be automatically increment
193. imates on specific frequency bands with in the FFT This filter is not normally used in a production program and should be left disabled Valid Entries 0 to the Carrier Frequency Fe or 1 to disable Default 1 indicating the filter is off dRjpjFmx Maximum integration limit for RJ PJ in Hertz a negative valu disables filter This filter is used post measurement as a means of focusing the RJ amp PJ estimates on specific frequency bands with in the FFT This filter is not normally used in a production program and should be left disabled Valid Entries 0 to the Carrier Frequency F or 1 to disable Default 1 indicating the filter is off dBitRate A bi directional variable that allows the user to specify the bit rate or read back what the SIA3000 measured as the bit rate If IGetRate is non zero the bit rate is measured and placed in this field If IGetRate is set to zero an the bit rate is read by the software from this field This value must be supplied when Random mode is being used Valid Entries 0 to the maximum bit rate of channel card Default O indicating bit rate will be measured 50 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 dCornFrq Corner Frequency for RJ PJ estimate in Hertz This value is used in conjunction with the Bit Rate and pattern to determine the maximum stop count to be used to acquire RJ amp PJ data A lower value incre
194. in convert new x coord to Windows coordinates in pixels coordinates draw a line from previous cursor location to new x y coordinates find next y coordinate and normalize it convert y coord to Windows pixel OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 135 2 48 DEFINES FOR VALUES IN MEASUREMENT STRUCTURES The following defines were created to aid in assigning values to various fields in the binary packet structure They would have been referenced in the above definitions Standard acquire functions define FUNC_TPD_PP 1 TPD 2 Chan define FUNC_TPD MM 2 TPD 2 Chan El define FUNC_TPD PM 3 TPD 2 Chan define FUNC_TPD MP 4 TPD 2 Chan define FUNC_TT_P 5 Rising edge 1 Chan av define FUNC_TT M 6 Falling Edge 1 Chan A define FUNC_PW_P 7 Positive pulse width 1 Chan define FUNC_PW M 8 Negative pulse width 1 Chan e define FUNC_PER 9 Period 1 Chan E define FUNC_FREQ 10 Frequency 1 Chan AY define FUNC_PER_M 11 Period minus 1 Chan Ep Available analysis macros define ANAL FUNC 0 Function analysis macro define ANAL JITT 1 Jitter analysis macro define ANAL RANG 2 Range analysis macro af define ANAL CLOK 3 PW
195. ined onc There can be up to 20 different groups defined retn FCNL GrpDefBeg 1 If retn lt gt 0 Then GoTo Error End If retn FCNL GrpDefAsc ACO RUN PER If retn lt gt SIA SUCCESS Then GoTo Error End If You can also retrieve blocks of binary data retn FCNL GrpDefAsc MEAS DATA If retn lt gt SIA SUCCESS Then GoTo Error End If retn FCNL GrpDefPkt bHist WIND HIST 0 If retn lt gt SIA SUCCESS Then GoTo Error End If Ascii structure calls can be interspersed retn FCNL GrpDefAsc ACO RUN PWt If retn lt gt SIA SUCCESS Then GoTo Error End If You can have standard ascii commands included in a group And you can also use the structure calls the zero argument skips plots With this structure call the 1 argument requests all the plot data retn FCNL GrpDefPkt bJitt WIND JITT 1 If retn lt gt SIA SUCCESS Then GoTo Error End If retn FCNL GrpDefPkt bDcom WIND DCOM 1 If retn lt gt 0 Then GoTo Error End If You can nest multiple ascii commands but only the last should return data retn FCNL GrpDefAsc ACQ FUNC TT ACQ COUN 1000 ACQ MEAS If retn lt gt SIA SUCCESS Then GoTo Error End If Finalize the group definition for group 1 retn FCNL GrpDefEnd ApiDevid 1 If retn lt gt SIA SUCCESS Then GoTo Error End If
196. ing whether to get the plot data Zero no plot data retrieved non zero get plot data OUTPUTS Returns an integer 0 specifying a success or a negative value to indicate error EXAMPLE The following example shows how to utilize the group functions together to define a measurement group and acquire multiple passes of the group This code is meant to replace Steps 6 7 and 8 of the Sample c example given in Section 1 7 STEP 1 Define a Group Up to 20 distinct command groups can be sent to the SIA 3000 where any number of commands can be grouped together sent down to the SIA 3000 and executed in the order they are received pseudo parallel mode Controlling the SIA3000 with Command Groups significantly reduces any overhead associated with the remote driver GPIB HPIB Refer to the sample program comments or the SIA3000 GPIB Programming Guide for further details regarding command groups Now define a group the group must only be defined once There can be up to 20 different groups defined if retn FCNL GrpDefBeg 1 SIA SUCCESS printf nFCNL GrpDefBeg failed n goto Error You can have standard ascii commands included in a group if retn FCNL GrpDefAsc ACQ RUN PER SIA SUCCESS printf nFCNL GrpDefAsc failed n goto Error You can also retrieve blocks of binary data if retn FCNL GrpDefAsc MEAS DATA SIA SUCCESS
197. ining the Minimum plot array See Section 2 3 for details on the PLTD structure elements tMaxi A structure of type PLTD containing the Maximum plot array See Section 2 3 for details on the PLTD structure elements dSigmAvg Average 1 Sigma value dSigmMin Minimum 1 Sigma value dSigmMax Maximum 1 Sigma value dTimePos Maximum increase between time values dTimeNeg Maximum decrease between time values ITimePosLoc Index to maximum increase between values ITimeNegLoc Index to maximum decrease between values dDervPos Maximum increase between lst derivative values dDervNeg Maximum decrease between 1st derivative values IDervPosLoc Index to maximum increase between lst derivative values IDervNegLoc Index to maximum decrease between lst derivative values dFreq Carrier frequency void _ stdcall FCNL_DefFunc FUNC func This function is used to fill the func structure for the Locktime tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the FUNC structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS func Pointer to a FUNC structure Memor
198. int O GEN21 Specification 1 GEN2M Specification Default 0 IVoff Default 0 dAttn Default 0 tKpwm which to change IGood IPad2 Internal paramet dTjit10 Total Jitter with Fbaud 10 High Pass Filter Applied ap ay x7 x 3 A AE Ef E MS a x7 AY Af aif af if x7 OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 17 th Fbaud 10 High Pass Filter Applied d 10 High Pass Filter Applied Fbaud 500 High Pass Filter Applied igh Pass Filter Applied d 500 High Pass Filter Applied igh Pass Filter Applied High Pass Filter Applied d 1667 High Pass Filter Applied voltage data dRjit10 Random Jitter wi dDjiti0 Deterministic Jitter with Fbau dTjit500 Total Jitter with dRjit500 Random Jitter with Fbaud 500 H dDjit500 Deterministic Jitter with Fbau dTjit1667 Total Jitter with Fbaud 1667 H dRjiti667 Random Jitter with Fbaud 1667 dDjiti667 Deterministic Jitter with Fbau tDdjt10 DCD DDJvsUI Fbaud 10 tFreqi0 Frequency plot Fbaud 10 tBath10 Bathtub plot Fbaud 10 tDdjt500 DCD DDJvsUI Fbaud 500 tFreq500 Frequency plot Fbaud 500 tBath500 Bathtub plot Fbaud 500 tDdjt1667 DCD DDJvsUI Fbaud 1667 tFreq1667 Frequency plot Fbaud 1667 tBath1667 Bathtub plot Fbaud 1667 tNrmScop Normal channel voltage data tCmpScop Complimentary channel voltage data tDifScop Differential mode IN IN tComScop Common mode
199. inter to a CLOK structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static CLOK clkstat declare clkstat to a structure of type CLOK memset amp clkstat 0 sizeof CLOK clear the memory for clkstat structure FCNL DefClok amp clkstat set clkstat structures to default values FCNL RqstPkt ApiDevId amp clkstat WIND _CLOK execute the measurement FCNL RqstAll ApiDevId amp clkstat WIND _CLOK get plot data FCNL_ClrClok amp clkstat deallocate the structure OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 39 2 19 DATABUS TOOL 40 With the SIA 3000 Signal Integrity Analyzer and GigaView Databus software single ended and differential clock and data signals can be characterized for timing clock and data jitter clock to data skew channel to channel skew and Bit Error Rate BER on up to ten channels in parallel The analysis is done using one reference clock and up to nine data channels Users can input the setup and hold specifications Setup and Hold violations can be measured based on the actual mean of the data histogram referenced to the clock edge For each data lane there are two histograms one showing the transitions before the clock edge and one showing the transitions after the clock edge The tool also applies statistical long term BER in the form of a bathtub curve This measurement is used to determine long term system reliabi
200. ion to draw a line to from the previous pCdc location repeat step 4 for all coordinates The variables passed into the function are CDC pCdc Windows pointer to communicate cursor location during plot Crect wind Windows pointer to indicate window size and location in the display the parameters are in units of pixels top le xmax le xmin le ymax le ymin and right define the boundaries for the display window left hand corner with increasing origin is set to the upper amplitude to the lower right hand corner user specified ct he pldt ser specified ser specified t u t the pldt u E a u D pldt Wavecrest plot structure maximum x val han pltd dXmax if a margin structure s x axis minimum x val han pltd dXmin if a margin structure s x axis maximum y val han pltd dYmax if a margin pldt structure s y axis minimum x val than pltd dYmin if a margin is d as the pldt structure s y axis Gu Lue for x axis This may is desired Xmax is in elements Lue for x axis This may is desired Xmin is in elements ue for y axis This may is desired Ymax is in elements Lue for x axis This may esired Ymin is in elements bottom left The be larger same units as be smaller same units as be larger same units be larger same units xy El 7 E xy e E 47 E xy z7 aa
201. ion to production floor The PAPI is compatible with SIA 3000 Giga View software 1 1 ELEMENTS of an APPLICATION Using the WAVECREST PRODUCTION API A typical application using the WAVECREST PAPI can be seen in the following figure HosT COMPUTER WAVECREST i l SIA 3000 PAPI SIA 3000 IC Test Program using PAPI Calling Functions A an tay The WAVECREST PAPI is divided into three layers The I O layer provides a hardware abstraction layer to isolate the higher level algorithms from the hardware itself Although GPIB and HPIB are the only physical medium supported at this time this abstraction layer provides templates for custom I O routines The communication layer is an intermediate layer between the functional layer and the hardware abstraction layer and provides functions such as polling and data requests The FCNL functional layer provides high level functionality such as implementing the standard windows contained in the SIA 3000 system pulse find and interpreting plot arrays OWAVECREST CORPORATION 2005 SECTION INTRODUCTION 1 2 FUNCTION CALL STRUCTURES As function calls are listed throughout the manual they will appear in the following format long _ stdcall FCNL PtnName char sPtnName char name This function is used to assist an application load the pattern file into the required measurement structure This function 1s included to assist when programming in Microsoft Visual Basic Whe
202. l arm only Valid Entries 0 disable quick capture mode 1 enable quick capture mode Default 0 lIntMode Parameter used to enable linear Interpolation mode for RJ amp PJ estimate RJ amp PJ are calculated based on the frequency data of the noise Since data points are captured only on the Single polarity transitions interpolation must be performed between sample points There are two types of interpolation available in the SIA3000 linear and cubic Setting this parameter to 1 will enable linear interpolation otherwise cubic int Valid Ent erpolation will be used ries 0 use cubic interpolation in FFT data SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 lErrProb lIHeadOff dCornFrq tRateInf tDdjtInf tRjpjinf dLpfFreq dHpfFreq dLpfDamp dHpfDamp ILpfMode IHpfMode 1 use linear interpolation in FFT data Default 0 Error probability level for Total Jitter Total Jitter is calculated based on the desired Error Probability level This value is used in conjunction with the bathtub curve after the successful completion of a tail fit in order to project the value of Total Jitter Valid Entries 1 to 16 Default 12 Header offset parameter for use in packet ized data which may have a frame header before the test pattern This offset value can be used to skip past header information and into the repeating data pattern stream This can be useful when analyzin
203. l in Section 2 4 dXiGuess Initial value for damping factor Default 0 25 dWnGuess Initial value for natural frequency Default 315e3 dSOGuess Initial power spectral density dBc Hz Default 90 0 dInitOff Initial offset frequency delta WO Default 1000 0 lIncStop Increase stop count by this value Default 1 l OG SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 IMaxStop Maximum stop count to collect data Default 1000 dCornFrq Corner Frequency for Record Length Default 50e3 dRecTime Record Length in units of time s Default 10e 6 IRecUnit Record length units must be one of O 1MaxStop l dCornFreq 2 dRecTim Default 2 lIniCond Calc initial conditions if non zero Default 1 IGood Flag indicates valid data in structure IVfit Indicates if the variance fit was good dDampFct Damping factor from variance fit dNatFreq Natural frequency from fit rad s dSONoise Noise process power spectral density dChSquar Chi square of variance fit dFreq Carrier frequency dPole 2 Location of Poles of transfer function dZero Location of zero of transfer function dLockRng Lock Range rad s dLockInT Lock in Time s dPullInT Pull in Time s dPullOut Pull out Range rad s dNoiseBW Noise Bandwidth rad s tSigm Contains the 1 Sigma plot array tvfit Resulting variance fit plot array tInit Initial Conditions variance plot array tXfer PLL Transfer Function plot array tBodeMag Bode
204. l to 30 then 20 and 80 thresholds are used If this field is equal to 40 then 10 and 90 thresholds are used The absolute voltage levels used are based on the previous pulsefind minimum and maximum voltages If this field is negative then the absolute rise and fall thresholds are taken from the following fields 1HiRFmV and 1LORFmv Default 30 IHiRFmV Absolute rise fall voltage if 1Pcnt lt 0 in units of mV Default 250 ILoRFmV Absolute rise fall voltage if 1Pcnt lt 0 in units of mV Default 250 lIdleOk This flag is set by the system when an Idle Mode measurement is successfully made The results are then applied in subsequent measurements Set this flag to zero to invalidate the previous Idle Mode measurement results and force a new Idle measurement to be made using the command PCIX IDLE Before the common mode idle voltages are applied once again Default 0 dAttn n Attenuation factor in dB this is provided to allow the results to be scaled to compensate for external attenuation from sources such as probes Default 0 tRcpm Datacom With Bitclock and Marker Tool which specifies most of the input and output parameters necessary for a data signal analysis The user will need to review all of the default parameters of the Datacom With Bitclock and Marker Tool and decide which to change IGood Flag indicates valid data in structure dEyeOffs dXmnDiff dXmxDiff Used inte
205. lag i arameter is ab i directional structure element that the number of read after an A measurement c ure It will be ement Entries any in Es 0 te must be spe 1 5e9 ndicates valid f x7 EVSIGMA pK RK RIRS af a a af El ni uisition parameter acquisitions since last reset This flag execution or set prior to an execution g this parameter to 0 essentially resets the accumulated an be performed repeatedly with the same automatically incremented by the next teger greater than or equal to 0 cified data in structure WAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 121 ITfit Flag indicates all tailfits are good IMinHits Min hits across all DJ spans ISetSave n IBinNumb n dLtSigma n m dRtSigma n m These values are all used internally DO NOT ALTER dDjit5 DJ at 5 spans dDjit250 DJ at 250 spans dTjit5 TJ at 5 spans dTjit250 TJ at 250 spans IHits n Contains count of histogram hits tTfit n Structure containing tail fit info tDjit Determinstic Jitter tTjit Total Jitter tHist n Histograms for specific spans void _ stdcall FCNL DefSata SATA sata This function is used to fill the sata structure for the Serial ATA tool with reasonable default values It is recommended that this function be called initially even 1f parameters within the structure are to be adjusted manually and may be called rep
206. lated Jitter Plot inpIndx number of units from the minimum x value printf Plot value of hist tAcum for index d 2 181f ns n inpIndx val 1e9 double __stdcall FCNL_GetYval PLTD plot long indx This function is used to simplify the process of extracting Y axis information from a PLDT structure It is primarily included to assist when programming in Microsoft Visual Basic When programming in C the data array can be accessed directly This function is called after a successful execution of a measurement The return value is the Y value at an X location offset from X min by indx Results are only valid after a successful call to FCNL_RqstAll FCNL MultPkt or FCNL GrpGetPkt INPUTS plot Pointer to a PLDT structure Memory needs to be allocated by the caller indx Index from which to determine Y value range is 0 to tPlot Numb 10 OUTPUTS The value is double the y coordinate EXAMPLE FCNL_RgstAll ApiDevild amp hist WIND_ HIST execute a histogram based on settings in hist structure as defined in preceding lines val FCNL_GetYval amp hist tAcum inpIndx get y value of Accumulated Jitter Plot inpIndx number of units from the minimum y value printf Plot value of hist tAcum for index d 2 181f ns n inpIndx val 1e9 OWAVECREST CORPORATION 2005 SECTION 3 GENERAL COMMAND REFERENCE 59 long __stdcall FCNL Diagnostics long ApiDevId Use this function to perform a system diagnosti
207. lculated by optimizing a curve fit to the bathtub curve a result is not guaranteed If the curve fit is unsuccessful a negative value will be returned in this variable 52 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 dEftvLtRj n Effective Random eRJ jitter estimate in seconds for the left side of the bathtub curve Total eRJ is calculated by averaging dEftvLtRj and dEftvRtRj Each of the enabled acquire modes is stored in the appropriate array location as specified in the table below In order to calculate th ffective jitter the flag IFndEftv must be enabled Since the effective jitter is calculated by optimizing a curve fit to the bathtub curve a result is not guaranteed If the curve fit is unsuccessful a negative value will be returned in these variables dEftvRtDj n Effective Deterministic eDJ jitter estimate in seconds for the right side of the bathtub curve Total eDJ is calculated by adding dEftvLtDj to dEftvRtDj Each of the enabled acquire modes is stored in the appropriate array location as specified in the table below In order to calculate th ffective jitter the flag IFndEftv must be enabled Since the effective jitter is calculated by optimizing a curve fit to the bathtub curve a result is not guaranteed If the curve fit is unsuccessful a negative value will be returned in this variable d
208. le dtTmask double dToffs No longer used double dTflat double dv0pas Relative voltages double dXwdUI double dxXfl1UI double dYiPct double dvi1Rel double dv0ORel MASK dVmask Absolute width of mask in secs dVoffs No longer used this field can be ignored dVipas Distance from the top of the mask to the upper region in Volts dTmask Absolute position of the center of the mask in secs dToffs No longer used this field can be ignored dTflat Width of the top and bottom flats of the mask in secs dVOpas Distance from the bottom of mask to the lower region in Volts dXwdUI Relative width of mask in UI dXflUI Relative width of the top and bottom flats of the mask in UI dYiPct Height of inner region of mask relative to the data expressed as dVikRel Distance from top of inner region to top region expressed as a of data height dVORel Distance from bottom of inner region to bottom region o expressed as a of data height 22 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 2 15 KPWM STRUCTURE KPWM is a measurement structure used by some of the PCI Express and Serial ATA tools typedef struct Input parameters PARM tParm Contains acquisition parameters Xj FFTS tFfts FFT window and analysis parameters char sPtnName 128 Name of pattern file to be used
209. length of sCmnd OUTPUTS Returns S A_ SUCCESS upon completion or a negative value to indicate error long __stdcall COMM_RegAsc long ApiDevId char cmnd char sval long svalLen This function first clears the response byte of the specified device and then sends the specified command and waits for the ESB or MAV bit in the response byte to be set or LONG_TIME 100 seconds If the MAV bit is set an IO_read of the specified number of bytes minus one svalLen 1 is done and the returned NULL terminated ASCII data is placed in the specified location sval The ESR byte is then checked for errors If a timeout occurs or an error is found a negative value is returned INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 cmnd A pointer to a NULL terminated ASCII string containing the command to send sval A pointer to store the returned NULL terminated ASCH data This buffer must be long enough to hold the expected number of ASCII bytes plus a NULL terminator svalLen An integer containing the length of sval This value must be the length of or greater than the expected number of bytes returned plus one 1 or the IO_read will not return all the data from the specified device OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error OWAVECREST CORPORATION 2005 SECTION 3 GENERAL COMMAND REFERENCE 4 long __stdcall COMM _RegqBin long ApiDev
210. lid Entries any integer greater than or equal to 0 Default 0 Error probability level for Total Jitter Total Jitter is calculated based on the desired Error Probability level This value is used in conjunction with the bathtub curve after the successful completion of a tail fit in order to project the value of Total Jitter Valid Entries 1 to 16 Default 12 Flag to indicate whether to perform a TailFit on data in tAcum data array If non zero a tail fit will be attempted on the tAcum data array The IGood element of the tTfit structure will indicate if the TailFit was successful Any positive interger for this parameter will initiate the TailFit algorithm Valid Entries 0 disable TailFit 1 enable TailFit Default 0 If non zero uses the force fit method If set to zero the measurement will continue to loop until a reasonably accurate TailFit can be achieved Valid Entries 0 do not use force fit 1 force a fit using IMinHits number of hits Default 0 1 Minimum hits before attempting a tail fit in 1000 s the a i default is 50 The larger the number the more likely a valid it will be found Valid Entries any integer 50 Default 50 Flag to indicate that an effective jitter calculation is to be attempted This is necessary for those instances in which correlation to a BERT scan is necessary In all other practical applications this parameter and it s
211. lity If the jitter is too high the tool will indicate a failure The following example shows the Data signal connected to Channel 1 and Bit Clock Signal connected to Channel 2 Therefore two histograms can be made One histogram represents a measurement of Data RISING edges to clock reference edge the other represents Data FALLING edges to the clock reference edge These histograms would show many modes or distributions because there are many possible relationships between clock and data edges These histograms are filtered to show only those times that relate to the measured Data edges closest in time to the Reference Clock Edge Oscilloscope Voltage vs Time T Data RISING gt Clock Reference rising possible h gram measurements Dark Arrow indicates filtered relationship displayed as RISING Data FALLING gt possible histogra typedef struct Input parameters long 1ClokChn Reference Clock channel long 1ChanNum Bitfield indicating channels to measure double dSetTime Setup time to assess PASS FAIL double dHldTime Hold time to assess PASS FAIL double dEyeSpec Eye opening size to assess PASS FAIL double dUserVlt POSS CHNS Array of user voltages my EYEH tDbus Contains acquisition parameters Output parameters SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005
212. ll amp 0Scope 1ChanNum lOscTrig lOscEdge 1FndPent 1 2 EDGE_RISE PCNT_5050 200 10 000 10 ApiDevId amp oscope ApiDevId amp oscope FCNL ClrOsci amp oscope dF WIND _OSCI WIND OSCI 7 7 declare oscope to a structure of type OSCI clear the memory for oscope structure set oscope structures to default values capture waveform on channel 1 trigger on channel 2 trigger on rising edge of channel 2 set trigger level at 50 point start waveform capture at 200ps stop waveform capture at 10ns set resolution to 10ps this means that there will be 980 points in oscope tTime 1 data array execute the measurement get plot data deallocate the structure OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES QO 2 32 PCI EXPRESS 1 1 WITH HARDWARE CLOCK RECOVERY TOOL The PCI Express 1 1 with Hardware Clock Recovery Tool provides both timing and amplitude compliance measurements using the SIA3000 Multirate Clock Recovery Option This tool accurately determines device performance by quantifying both random and deterministic jitter 92 components typedef struct Input parameters long 1CompPnt long 1Pcnt long LHiRFmvV long 1LORFmvV long 1IdleOok long 1Pad0 double dAttn RCPM tRepm Output parameters long 1Good long lPadl double dEyeOffs double dxXmnDiff double dXmxDiff dou
213. ll be automatically incremented when a measurement is performed Valid Entries any integer greater than or equal to 0 Default 0 This variable is used to calculate the number of averages to use in the FFT Increasing the number of averages reduces th background noise associated with the FFT algorithm The number of averages is calculated based on the equation AVERAGES 2 where n IFftAvgs Valid Entries any integer greater than or equal to 0 Default 0 indicating 2 averages 1 execution A structure of type SPEC used by the Bit Rate measurement The structure holds measurement specific parameters such as sample count pattern repeats and maximum standard error See Section 2 7 for a description of the SPEC structure and its elements OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 49 tDdjtInf A structure of type SPEC used by the Data Dependant Jitter DDJ measurement The structure holds measurement specific parameters such as sample count pattern repeats and maximum standard error See Section 2 7 for a description of the SPEC structure and its elements tRjpjinf A structure of type SPEC used by RJ amp PJ estimate The structure holds measurement specific parameters such as sample count pattern repeats and maximum standard error See Section 2 7 for a description of the SPEC structure and it s elements dDdjtLpf Low pass
214. lt tACCUM_PER histogram tool which can be set to return just the A dFreq 100 000 tACCUM_PER Statistics of the interest and not any of the voltage information nor the extra timing measurements as is captured in this tool There is added test time to capture duty cycle frequency Example of a period measurement usin and the voltage parameters dMini dMean dMaxi the n tatistics Utility a typedef struct Input parameters PARM tParm Contains acquisition parameters long 1Pfnd Force a pulse find befor ach measure long lAutoFix Tf true perform a pulsefind as req d Output parameters long 1Good Flag indicates valid data in structure long lPadl double dMean Contains the returned average valu E double dMaxi Contains the returned maximum value double dMini Contains the returned minimum value double dSdev Contains the returned 1 Sigma value Ef double dDuty Contains the returned duty cycle double dFreq Contains the carrier frequency Ef double dVmin 2 Pulse find Min voltage for Start stop double dVmax 2 Pulse find Max voltage for Start amp Stop STAT tParm A structure of type PARM that contains acquisition parameter The PARM is discussed in full detail in Section 2 4 IPfnd A flag used to force the execution of a pulse find execution In normal operation the SIA3000 dynamical
215. ly decides whether a pulsefind is necessary based on previous test conditions In may cases this is sufficient However in a production environment the previous test may have the same type of voltage settings however the devices are different and may have different voltage characteristics and would thus require a pulse find on each device Be aware that most production test have specified amplitudes at which measurements are to be made such that the programmer must specify the amplitude in tPARM rather than use pulse find to establish test conditions Valid Entries 0 No pulsefind prior to measurement 1 perform a pulse find Default 0 AutoFix Flag to indicate to the system whether pulse find should be performed if needed This flag essentially enables the automatic pulse find capability which will execute a OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 27 pulsefind based on the previous test setup and not with any regard to device device variations in amplitude Valid Entries 0 No pulsefind prior to measurement 1 Pulsefind if the measurement mode changed Default 0 IGood Flag used to indicate valid output data in structure dMean Contains the returned average valu dMaxi Contains the returned maximum value dMini Contains the returned minimum value dSdev Contains the returned 1 Sigma value dDuty Contains the returned duty cycle of the signal b
216. m a simple measurement and get the averag retn COMM ReqDbl ApiDevid ACQ RUN PER avg If retn lt gt SIA SUCCESS Then GoTo Error End If Print the results mainDisplay Text Wavecrest Production API amp _ vbCrLf amp Sample Application amp vbCrLf amp vbCrLf amp Simple Period Command amp Format avg 1000000000 0 000 amp ns amp vbCrLf Perform a measurement and return the statistics retn FCNL RgqstPkt ApiDevid bHist WIND HIST If retn lt gt SIA SUCCESS Then GoTo Error End If Now retrieve the plot structures for the previous measurement This call is not necessary unless you want the plot data retn FCNL_ RqstAll ApiDevid bHist WIND_HIST If retn lt gt SIA SUCCESS Then GoTo Error End If Print the results mainDisplay Text mainDisplay amp Single Histogram Mean amp _ Format bHist dNormAvg 1000000000 0 000 amp ns amp _ vbCrLf amp Single Histogram Sdev amp Format bHist dNormSig 1000000000000 0 000 amp ps amp vbCrLf retn FCNL RqstPkt ApiDevid bDcom WIND DCOM If retn lt gt SIA SUCCESS Then GoTo Error End If retn FCNL RqstAll ApiDevid bDcom WIND DCOM If retn lt gt SIA SUCCESS Then GoTo Error End If 178 APPENDIX B VBasic EXAMPLE WAVECREST CORPORATION 2005 Now define a group the group must only be def
217. mber of measurements made with the given result See Section 2 3 for details of the PLTD structure and its elements OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 6 tFallProb Structure of type PLTD which contains all of the plot information to generate a probability histogram of falling edge data to next reference clock measurements The amplitude of each point in the probability histogram is normalized to the probability of a given measurement occurring as opposed to the total number of measurements made with the given result See Section 2 3 for details of the PLTD structure and its elements tBath Structure of type PLTD which contains all of the plot information to generate a bathtub curve based on Probability Density Function derived from histogram data and RJ estimate from TailFit algorithm See Section 2 3 for details of the PLTD structure and its elements tEftv Structure of type PLTD which contains all of the plot information to generate a bathtub curve based on the estimate of effectiv Deterministic Jitter eDJ and effective Random Jitter eRJ derived from the true data bathtub curve This plot is only available when IFndEftv is set and a valid fit is obtained See Section 2 3 for details of the PLTD structure and its elements tTfit A structure of type TFIT containing tail fit info See Section 2 5 for details of the TFIT structure and its elements lU
218. mited value in the physical world it is a required measurement in many PLL test standards then Pit ther gt i r tper 4 tper A t I 1 t t 4 l l 1 1 t t I 1 I 1 t 1 I i I t ji tper2 tper1 Ate tper2 treri 1 t if Histogram of n number of Atper measurements dMini dMean dMaxi typedef struct Input parameters PARM tParm Contains acquisition parameters double dUnitInt Unit Interval to assess Total Jitter long 1PassCnt Acquisitions so far set to 0 to reset long lErrProb Error probability for Total Jitter Valid range is 1 to 16 long 1TailFit If non zero a tail fit will be tried long lForcFit If non zero use the force fit method ej long 1MinHits Minimum hits before trying tail fit x7 long 1FndEftv Flag to attempt effective jitter calc long 1MinEftv Min probability for effective fit 4 long 1MaxEftv Max probability for effective fit 12 long lAutoFix If true perform a pulsefind as req d long lDutCycl If non zero make duty cycle measurement Output parameters long 1Good Flag indicates valid data in structure long MeasCnt Number of hits in measured normal data double dMeasMin Minimum value in measured normal data double dMeasMax Maximum value in measured normal data double dMeasAvg Average value of measured normal data
219. n programming in C the data array can be accessed directly VS ica Depas INPUTS ATT Input variables used sPtnName Location where pattern name will be updated Memory needs to be allocated by the caller name Name of pattern to load into measurement structure OUTPUTS A ON Output variables used Returns SIA SUCCESS if operation is successful or a negative value to indicate error FCNL_PtnName sPtnName k28 5_pttn this function will change the pattern loaded to the pattern pointed to by the pointer k28 5_pttn k28 5_pttn is user definable Sample code S Sample code comments A few helpful notes NOTE stdcall andD1llCall are part of the function definitions in the header file but can essentially be ignored They are utilized to provide options when building and using DLLs on Microsoft Windows They are implemented to allow the same header file to be used for building the DLL and importing the DLL ensuring consistent declarations NOTE Many of the measurement window structures contain padding fields These fields are usually called 1Pad1 1Pad2 or 1PadLoc1 lPadLoc2 and are used to insure that variables are placed in the same absolute locations within the structure regardless of compiler padding which varies from system to system These fields are only used to take up space and can be safely ignored 2 SECTION INTRODUCTION OWAVECREST CORPORATION 2005 1 3 FILES INCLUDED IN THE WAVECR
220. n FCNL RqstPkt ApiDeviId amp dcom WIND DCOM SIA SUCCESS printf FCNL RqstPkt Return Code i n retn goto Error Print the results printf Edge Count Mode n n printf Pattern s n pmkr sPtnName printf Edge Count Sin pmkr lEdgeCnt printf dataCOM DCD ISI lfps n dcom dDdjt x lel2 printf dataCOM RJ Slfpsinin dcom dRjit 0 lel2 PART II Configure the PM50 for pattern match mode 1 0625 GBit s pmkr lModeSel PMKR_PATN_MATCH pmkr lProtSel PMKR_FC1X strcpy amp pmkr sPtnName 0 cjtpat ptn if retn FCNL MarkerConfig ApiDevid amp pmkr SIA SUCCESS printf FCNL MarkerConfig Return Code Siln retn Is the PM50 detecting the pattern if retn FCNL MarkerStatus ApiDevld amp pmkr lt 0 printf FCNL MarkerStatus Return Code Siln retn Perform a pulsefind before making a DCOM measurement if retn FCNL PulsFnd ApiDevld amp dcom tParm SIA SUCCESS printf FCNL PulsFnd Return Code i n retn if retn FCNL RqstPkt ApiDevld amp dcom WIND DCOM SIA SUCCESS printf FCNL RqstPkt Return Code i n retn goto Error OWAVECREST CORPORATION 2005 SECTION 4 CODE SAMPLES 7 Print the results printf Patter
221. n of the response bits or a negative value to indicate error long __stdcall COMM PollWithStatUntilTrue long ApiDeviId long mask time_t tyme This function will poll both the status byte and the response byte of the specified device while all of the specified bits are clear or the specified number of seconds elapses INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 mask Integer containing the response bits to wait for Refer to the device documentation for definition of the response bits tyme Integer containing the amount of time in seconds to wait for one of the specified response bits to become true OUTPUTS Returns an integer containing the response byte from ApiDevId Refer to the device documentation for definition of the response bits or a negative value to indicate error OWAVECREST CORPORATION 2005 SECTION 3 GENERAL COMMAND REFERENCE 43 long __stdcall COMM ClearRspByt long ApiDevId If any of the status indicators are set on the specified device this function send a cls command to the specified device and waits for the response byte to clear or SHORT_TIME 5 seconds If the function times out an error is returned INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 OUTPUTS Returns an integer containing the response byte from ApiDevId Refer to the device documentation for definition of the respon
222. n Match Mode n n printf Pattern Ssin dcom sPtnName printf dataCOM DCD ISI lfps n dcom dDdjt lel2 printf dataCOM RJ Slfpsinin dcom dRjit 0 lel2 Did the PM50 detect any bit errors if retn FCNL MarkerReadErr ApiDevld amp pmkr SIA SUCCESS printf FCNL MarkerReadErr Return Code i n retn goto Error Print the Bit Error Counter results printf Number of Bit Errors i n pmkr iNumBitErr printf Total Compare Count 01f n pmkr dTtlCmpCnt printf Bit Error Rate 10e n n pmkr dBitErrRat for indx 0 indx lt BEC_ERRS indx BECT bec amp pmkr tBerTest indx if bec gt lErrBits break printf Error i n indx 1 printf Pattern Repeat 01f n bec gt dLoopCnt printf Frame Number i n bec gt 1FrameNo printf 20 bit Data in Error Display each bit noting bits in error with special characters buff 1 0 for bitIndx PATN WORD SIZE 1 bitIndx gt 0 bitIndx if bec gt lErrBits amp 1 lt lt bitIndx buff 0 bec gt lExpBits 1 lt lt bitIndx 140 147 else buff 0 bec gt lExpBits 1 lt lt bitIndx 1 EOT printf Sc buff 0 if bitIndx PATN_WORD_SIZE 2 Print MI printf r n n Error Perform any cleanup and exit FCNL ClrDcom amp dcom COMM CloseDev ApiDevld return retn
223. n in tAcum plot array dAcumMax Minimum and maximum values of distribution in tAcum plot array Average value of distribution in tAcum plot array 1 Sigma value of distribution in tAcum plot array IBinNumb dLtSigma dRtSigma These values are for internal use only DO tNorm tAcum tMaxi tBath tEftv trfit NOT ALTER or try to use A structure of type PLTD containing a Histogram of data from latest acquisition only See Section 2 3 for further details on PLTD structures A structure of type PLTD containing Histogram of data from all acquisitions combined See Section 2 3 for further details on PLTD structures A structure of type PLTD containing Histogram with the maximum value obtained for every particular bin across all of the acquisitions performed so far See Section 2 3 for further details on PLTD structures A structure of type PLTD containing Bathtub curves determined from PDF only valid when a successful tail fit has been performed S Section 2 3 for further details on PLTD structures A structure of type PLTD containing Effective Bathtub curves if IFndEftv is set and a valid fit is obtained Effective Bathtub curves are used for correlation to BERT scan only See Section 2 3 for further details on PLTD structures A structure of type TFIT containing tail fit info only valid when a successful tail fit has been perfo
224. n information is contained within the structure the supplied cleanup functions detailed below must be utilized in order to avoid memory leaks Acquisition functions may be called repeatedly with the same Tool Structure When doing so the output results contained within the structure are simply overwritten Any dynamic memory previously allocated is re utilized Using the same Tool Structure over and over again has the desirable attribute of reducing the memory fragmentation that would occur if memory was allocated freed and reallocated repeatedly Perform a measurement and return the statistics if retn FCNL RqstPkt ApiDevld hist WIND_HIST l SIA SUCCESS printf AnFCNL RqstPkt failed n goto Error Now retrieve the plot structures for the previous measurement This call is not necessary unless you want the plot data if retn FCNL RqstAll ApiDevId hist WIND_HIST SIA SUCCESS printf AnFCNL RgstAll failed n goto Error STEP 7 Print Results Results to be printed are drawn directly from the HIST structure Note that all results are returned in the units of Hertz Volts and seconds Therefore a conversion factor may be required in order to display the results in more appropriate units For complete details on the HIST structure see Section 2 25 Print the results printf Single Histogram Mean lfns n hist dNormAvg 1e9 printf Single Histogram Sdev lf
225. nArm Channel to use for external arming Only used if lAutoArm is set to ARM EXTRN The minimum is 1 the maximum is based on the system configuration Default I lOscTrig Channel to use for oscilloscope trigger Default 1 10scEdge Edge to use to trigger oscilloscope use any of the following EDGE FALL EDGE RISE Default EDGE RISE 1FiltEnb Filter enable any non zero value enables filters Default 0 dFiltMin Filter minimum in seconds only used if 1FiltEnb is non zero valid range is 2 49 seconds Default 2 49 dFiltMax Filter maximum in seconds only used if lFiltEnb is non zero valid range is 2 49 seconds Default 2 49 lAutoArm Auto arm enable and mode use any of the following ARM_EXTRN Arm using one of the external arms ARM_START Auto arm on next start event ARM_STOP Auto arm on next stop event Default ARM_STOP lArmEdge Arming edge to use only used if lAutoArm is set to ARM_EXTRN and may be either EDGE FALL or EDGE RISE Default EDGE RISE 1GateEdge Edge to use when external arming gate is enabled only used if lAutoArm is set to ARM EXTRN and may be either EDGE FALL or EDGE RISE Default EDGE RISE dArmVolt Arml voltage the valid range is 2 0 volts and is only used if lAutoArm is set to ARM EXTRN Default 0 0 dGatVolt Arm2 voltage the valid range is 2 0 volts and is only used if lAutoArm is set to ARM EXTRN Default 0 0 1GateEnb Enable external arm gating on the currently selected external arming chann
226. ne and the returned ASCII data is converted to a long integer and placed in the specified location ival The ESR byte is then checked for errors If a timeout occurs or an error is found a negative value is returned INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 cmnd A pointer to a NULL terminated ASCII string containing the command to send ival A pointer to a long integer to store the returned value OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error long __stdcall COMM ReqDbl long ApiDevId char cmnd double dval This function first clears the response byte of the specified device and then sends the specified command and waits for the ESB or MAV bit in the response byte to be set or LONG_TIME 100 seconds If the MAV bit is set an IO_read is done and the returned ASCII data is converted to a double and placed in the specified location dval The ESR byte is then checked for errors If a timeout occurs or an error is found a negative value is returned INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 cmnd A pointer to a NULL terminated ASCII string containing the command to send dval A pointer to a double to store the returned value OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error 142 SECTION 3 GENERAL COMMAND REFERENCE WAVECREST CORP
227. ng lMinHits Minimum hits before trying tail fit long 1FndEftv Flag to attempt effective jitter calc long 1MinEftv Min probability for effective fit 4 long 1MaxEftv Max probability for effective fit 12 long lAutoFix Tf true perform a pulsefind as req d long 1KeepOut If non zero use tailfit keep out below double dkKpOutLt Keep out value for left side double dKpOutRt Keep out value for right side aA long 1Pad0 Output parameters long 1Good Flag indicates valid data in structure long lPadl long 1NormCnt Number of hits in normal edge data ey double dNormMin Minimum value in normal edge data ml double dNormMax Maximum value in normal edge data e double dNormAvg Average value of normal edge data Ef double dNormSig 1 Sigma value of normal edge data long lPad2 long l1AcumCnt Number of hits in accumulated edge data double dAcumMin Minimum value in accumulated edge data double dAcumMax Maximum value in accumulated edge data double dAcumAvg Average value of accumulated edge data double dAcumSig 1 Sigma value of accumulated edge data long 1BinNumb RRR RK RR KK IKK RK KK IK A long 1Pad3 These values are all used internally double dLtSigma PREVSIGMA as part of the measurement process El double dRtSigma PREVSIGMA DO NOT ALTER double dFreq E A PLTD tNorm Histogram of previous acquisition E PLTD tAcum Hist
228. ng the number of channels in the device pDeSkewData Upon successful completion pointer to an array containing a deskew value for each channel OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error long __stdcall FCNL_SetCalData long ApiDevId long ChannelCards double pDeSkewData Use this function to update the current external deskew values for the number of channels specified in the device INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 ChannelCards Number of channels to set external deskew values for pDeSkewData Pointer to an zero based indexed array containing the desired deskew values for each channel OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error 154 SECTION 3 GENERAL COMMAND REFERENCE WAVECREST CORPORATION 2005 3 5 SIGNAL PATH FUNCTIONS DSM16 PATH MAPPING AND PATH DESKEW NOTE MuxAddr 1 thru 8 is assigned based on the RS232C output connectors on the USB to RS232C interface module long __stdcall FCNL_DSM16Switch long ApiDevId long MuxAddr long switch_ON_OFF Use this function to enable or disable the DSM connected to the device specified in ApiDevld INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 MuxAddr An integer address identifying DSM to select The range is 1 to 8 based on information in above note switch_ON_OFF An i
229. nitOff dRiseMin dRiseMax dFallMin dFallMax IRiseBin IFallBin dLtSigma dRtSigma ISpanCnt These values are all used internally DO NOT ALT E w void __stdcall FCNL_DefEyeh EYEH eyeh This function is used to fill the eyeh structure for the Datacom with Bit Clock tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the EYEH structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS eyeh Pointer to a EYEH structure Memory needs to be allocated by the caller OUTPUTS None 62 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 void __stdcall FCNL_ClrEyeh EYEH eyeh This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the eyeh structure INPUTS eyeh Pointer to a EYEH structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE define TRUE 1 define FALSE 0 static EYEH eyehist declare eyehist to be a structure of type EYEH memset amp eyehist 0 sizeof EYEH clear the memory for eyehist structure FCNL DefEyeh
230. ns the PW average valu xI double dPwMdev Contains the PW 1 Sigma value double dPwMmin Contains the PW minimum value double dPwMmax Contains the PW maximum value j double dPerPavg Contains the PER average valu ES double dPerPdev Contains the PER 1 Sigma value double dPerPmin Contains the PER minimum value double dPerPmax Contains the PER maximum value ae double dPerMavg Contains the PER average valu f double dPerMdev Contains the PER 1 Sigma value x7 double dPerMmin Contains the PER minimum value xI double dPerMmax Contains the PER maximum value double dDuty Contains the returned duty cycle double dFreq Contains the carrier frequency a4 double dVmin Pulse find Min voltage double dvVmax Pulse find Max voltage CLOK tParm A structure of type PARM that contains acquisition parameter The PARM is discussed in full detail in Section 2 4 IPfnd If true force a pulse find befor ach measur IQckMeas If true skip frequency and voltages IGood Flag indicates valid output data in structure dPwPavg Contains the PW average valu dPwPdev Contains the PW 1 Sigma value dPwPmin Contains the PW minimum value dPwPmax Contains the PW maximum value dPwMavg Contains the PW average valu dPwMdev Contains the PW 1 Sigma value dPwMmin Contains the PW minimum value dPwMmax Contains the PW maximum value dPerPavg Contains the PER average valu
231. nteger with value 0 to disable the DSM16 front panel buttons and any non zero value or 1 to enable OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error long __stdcall FCNL_DSM16Ver long ApiDeviId long MuxAddr char outbuf Use this function to determine the revision level of the DSM connected to the device specified in ApiDevId INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 MuxAddr An integer address identifying DSM to select The range is 1 to 8 based on information in above note OUTPUT PARAMETER outbuf A pointer to a character array which will be filled with the revision level OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error long __stdcall FCNL_DSM16GetSwitchNumbers long ApiDevId long MuxAddr char switchNums Use this function to determine the current configuration of the DSM connected to the device specified in ApiDevld INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 MuxAddr An integer address identifying DSM to select The range is 1 to 8 based on information in above note OUTPUT PARAMETER switchNum A pointer to a character array which will be filled with the switch numbers currently active in the banks OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error OWAVECREST CORPORATION 2005 SECTION 3
232. ods y a H gt e Accumulation Accumulation Accumulation of 1 period gt e of 3 periods y a 1 of 4 periods y e i gt je gt i gt ta Accumulation Accumulation of 5 periods y e NS of 6 periods y a gt lt i gt lt Histogram of 4000 APER Repeat Repeat ors O ee Se L eas Ra ey Sat PERA PER PER PER PERni i of period cycle cycle jitter sweeps of 4000 APER PER PER APERN PERg PERmvi x Pp Y y J Repeat Acq O cycle cycle a E Z a of Period and Measurements p Histogram of 4000 APER T me APR measurements for 1 Sweep PER PERz PER PER PERm PERmi i of period cycle cycle jitter sweeps of 4000 APER PER PER APER2 PERs PERs APERN PERn PER mvs i Op Y ye Ea cycle cycle Measurements period and 6 Repeat A a period Acquisition for 4 dRiseMin dRiseMax DRCG Utility s measurement algorithm typedef struct Input parameters PARM tParm Contains acquisition parameters long lAutoFix Tf true perform a pulsefind as req d KY long lDutCycl If non zero make duty cycle measurement long lUsrSpec If non zero use the specified TJ value long lPadl double dSpecVal User defined TJ specification Output parameters long 1Good Flag indicates valid data in structure long lPass double dDutyMax Maximum value of
233. of pattern double dWndFact RR KR KK RK KKK KK KK KR A long 1MaxStop These values are all used internally long 1PtnRoll JS DO NOT ALTER ae long 1AdjustPW E A long lPadl double dBitRate Bit Rate that was measured El DDJT tDdjtData Raw DCD DDJ measurements E long 1DdjtRsvd Used to track memory allocation e double dRjpjData Raw variance data long 1RjpjRsvd Used to track memory allocation EA long lPeakData Tracks detected spikes in RJ PJ data ah long 1PeakNumb Count of detected spikes ef long 1PeakRsvd Used to track memory allocation Kf OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 23 24 long lHits Total samples for DDJT RJ PJ combined double dDdjt DCD DDJ jitter Ed double dDjit Deterministic jitter double dRjit Random jitter El double dPjit Periodic jitter EL double dTjit Total jitter El double dEftvLtDj Effective jitter when enabled double dEftvLtRj double dEftvRtDj double dEftvRtRj PLOT tRiseHist DCD DDJ histogram of rising edges aA PLOT tFallHist DCD DDJ histogram of falling edges e PLOT tNormDdjt DCD DDJvsUI for external arming only EJ PLOT tHipfDdjt High Pass Filtered DCD DDJvsUI xy PLOT tLopfDdjt Low Pass filtered DCD DDJvsUI PLOT tBathPlot
234. ogram of all acquires combined El PLTD tMaxi Histogram of max across all acquires PLTD tBath Bathtub curves determined from PDF PLTD tEftv Effective Bathtub curves if enabled PLTD tShrt Total Jitter for SHORT Cycles aA PLTD tLong Total Jitter for LONG Cycles a PLTD tBoth Total Jitter for LONG amp SHORT Cycles ay TFIT ETL it Structure containing tail fit info AEST OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 77 tParm dUnitInt IPassCnt lErrProb ITailFit IForcFit IMinHits IFndEftv A structure of type PARM that contains acquisition parameters tParm is discussed in full detail in Section 2 4 Unit Interval UI in seconds to assess Total Jitter as a percent of UI Set this parameter as the metric against which TJ will be evaluated as a percentage It is displayed as the span of the x axis in a bathtub curve This parameter is only used if tail fit is enabled Valid Entries any number greater than 0 which represents the time in seconds of a bit period or unit interval Default le 9 Ins This parameter is a bi directional structure element that tracks the number of acquisitions in the data set This flag can be read after an execution or set prior to an execution Setting this parameter to 0 essentially resets the accumulated data on the instrument The value in the returned structure will be automatically incremented by the instrument Va
235. oise Since data points are captured only on the single polarity transitions interpolation must be performed between sample points There are two types of interpolation available in the SIA3000 linear and cubic Setting this parameter to 1 will enable linear interpolation otherwise cubic interpolation will be used Valid Entries 0 use cubic interpolation in FFT data 1 use linear interpolation in FFT data Default 0 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 IGetRate ITailFit lErrProb IPassCnt IFftAvgs tRateInf Parameter used to enable Bit Rate measurement Knowledge of the pattern enables the instrument to measure from one transition in the pattern to the sam dge several pattern repeats later If this function is disabled an appropriate value must be supplied in dBitRate variable This function is NOT available when using random mode Valid Entries 0 use user specified bit rate 1 measure bit rate from data Default 0 Parameter used to enable TailFit algorithm for RJ estimate The TailFit algorithm yields the highest level of accuracy when calculating an RJ estimate However millions of samples must be taken in order to perform an accurate TailFit Valid with external arm only The number of TailFits to be performed is based on the value assigned to this parameter In practice only a small sampling of edges need to be analyz
236. om strcpy amp dcom sPtnName 0 cjtpat ptn dcom tParm lChanNum 1 Request that the PM50 be used as the arm dcom tParm lAutoArm ARM _ dcom tParm 1ExtnArm 1 dcom tParm 1CmdFlag Initialize SIA3000 EXTRN CMD PATNMARK if ApiDevId COMM InitDev APIDEVTYPE DEVICENAME lt 1 printf Unable to initialize SIA3000 Program terminated n goto Error I 70O SECTION 4 CODE SAMPLES WAVECREST CORPORATION 2005 Initialize PM50 if retn FCNL MarkerInit ApiDevld Markerld amp pmkr SIA SUCCESS printf FCNL MarkerInit Return Code i n retn printf Wavecrest Production API An Sample PM50 Application Anin PART I Configure the PM50 for edge count mode pmkr lModeSel PMKR_EDGE COUNT strcpy pmkr sPtnName 0 cjtpat ptn if retn FCNL MarkerConfig ApiDevid amp pmkr SIA SUCCESS printf FCNL MarkerConfig Return Code Siln retn Is the PM50 detecting the pattern if retn FCNL MarkerStatus ApiDevld amp pmkr lt 0 printf FCNL MarkerStatus Return Code Siln retn Perform a pulsefind before making a DCOM measurement if retn FCNL PulsFnd ApiDevid amp dcom tParm SIA SUCCESS printf FCNL PulsFnd Return Code i n retn if ret
237. omplete measurement the edge count will be varied from an initial value of 1 to a final value determined based on the bit rate and the intended cutoff frequency Each is bin is also sorted based on edge count and polarity in an attempt to maximize accuracy of DDJ estimate Once all of the data is captured the mean of each histogram for each sub bin is compared to an ideal bit clock and the deviation is taken as Data Dependant Jitter All DDJ estimates are combined to determine the peak to peak spread of DDJ Then the algorith selects appropriate edge counts to create a histogram from which to capture TailFit information in an attempt to estimate RJ Based on the users selection of the structure element tDcom TailFit The structure used in this tool incorporates a Datacom Known Pattern With Marker structure In other words this tool basically creates a wrapper structure around the dataCOM structure which has settings unique to the random data tool To estimate Random Jitter RJ on a random signal without the benefit of a reference clock the random data tool uses TailFit on sampled data histograms from various amounts of accumulated bit periods The precision of the measurement is increased as the number of different accumulations used is increased There is a significant increase in test time for increasing the number of tailfit points As such the user can specify 4 different setting selections or have the instrument dynamically decide which
238. or OWAVECREST CORPORATION 2005 SECTION 3 GENERAL COMMAND REFERENCE 6 long __stdcall FCNL_GrpDefPkt void pData long nType long bGetPlots This function is for setting up for getting data and or plot values from a measurement like histogram datacom etc within the scope of a group command If bGetPlots is non zero memory is allocated for plot too and the binary structure will hold the binary plot data when executed later INPUTS pData Pointer to a data structure like HIST DCOM etc to hold the input output plot values nType Long Integer specifying the type of the request like WIND HIST WIND_JITT etc bGetPlots Long Integer specifying whether to get the plot data Zero no plot data retrieved non zero get plot data OUTPUTS Returns an integer 0 specifying a success or a negative value to indicate error long __stdcall FCNL_GrpDefEnd long ApiDevid long nNumb Finalize the group definition for group specified in nNumb INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 nNumb Long Integer specifying the index of a group to be defined A maximum of 20 groups are allowed at present OUTPUTS Returns an integer 0 specifying a success or a negative value to indicate error long __stdcall FCNL_GrpGetAll long ApiDevid long nNumb This function does the measurements and gets the whole block of data INPUTS ApiDevid Integer containing the API Device ID
239. or long __stdcall COMM SendFile long ApiDevId Use this function to send a file to the SIA3000 INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 The device must have been opened using COMM _InitDev filename A pointer to the name of the file whose contents will be saved to the SIA3000 in a file with the same name const char filename OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error long __stdcall COMM InitSingleShot long ApiDevId char sCmnd long 1Cmnd Use this function to configure a device specified by ApiDevId to perform a Single Shot measurement If a timeout occurs or an error occurs a negative value is returned INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 sCmnd A pointer to buffer containing the command and binary data to send ICmnd Integer containing the length of sCmnd OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error OWAVECREST CORPORATION 2005 SECTION 3 GENERAL COMMAND REFERENCE 45 long __stdcall COMM ReqSingleShot long ApiDeviId char sRetn long 1Retn Use this function to read the results of the Single Shot measurement requested by COMM _InitSingleShot for the device specified by ApiDevld If result exists the returned binary data is placed in the location specified by sRetn If a timeout o
240. ory allocation is cleaned out prior to using the structure INPUTS drcg Pointer to a DRCG structure Memory needs to be allocated by the caller OUTPUTS None OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES void __stdcall FCNL _ClrDrcg DRCG drcg This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the drcg structure INPUTS drcg Pointer to a DRCG structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE define TRUE 1 define FALSE 0 define ACCUM_MAX 6 define SWEEP MAX 4 int i j static DRCG rambus memset amp rambus 0 sizeof DRCG FCNL_DefDrcg amp rambus rambus tparm 1ChanNum 1 rambus 1lDutCyc FCNL_RqstPkt FCNL RqstAll printf MAX PE printf tSwee for 1 1 i lt ACC printf Si P for 3 0 3 lt SW printf t printf Nnn printf MAX PE printf ltSwee for 1 1 i lt ACC 1 TRUE ApiDevId amp rambus WIND_DRCG ApiDevId rambus WIND DRCG RIOD DECREASE NEGATIVE PERIODS n p1 tSweep2 tSweep3 tSweep4 n UM MAX i ER CYC CYC t i EEP_MAX 3 Sd ABS rambus dFallMin i j RIOD INCREASE NEGATIVE PERIODS n p1 tSweep2 tSweep3 tSweep4 n UM MAX i printf i PER CYC CYC t i for j 1 j lt SWEEP_MAX j printf t d ABS rambu
241. output structure used to return scope rise fall time results typedef struct long 1Good long lPadl double dValu double dAXpnt 2 double dYpnt 2 MEAS IGood Flag indicates valid output data in structure DValu Field holds rise or fall time result dXpnt 2 The starting and ending threshold location in secs dYpnt 2 The starting and ending threshold location in Volts 2 13 OHIS STRUCTURE OHIS is an output structure used to return oscilloscope histogram results typedef struct PLTD tPlot long 1Coun long lPadl double dAver double dMini double dMaxi double dSdev double dEpsl double dvVars OHIS tPlot Plot structure that holds the histogram representation ICoun Count of the total number of hits in the histogram dAver Average of all the data contained in the histogram dMini Minimum of all the data contained in the histogram dMaxi Maximum of all the data contained in the histogram dSdev Standard deviation of all the data contained in the histogram dEpsl dVars Used internally DO NOT ALTER OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 2 2 14 MASK STRUCTURE MASK is an input structure that is used to specify an Eye Mask to be used in the Scope Tool Top Width A E Level 1 Height A reve typedef struct Absolute voltages double dvVmask double dVoffs No longer used double dVlpas doub
242. p Increase stop count by this value 7 long 1MaxStop Maximum stop count to collect data x double dCornFrq Corner Frequency for Record Length E double dRecTime Record Length in units of time s af long 1RecUnit Record length units must be one of ey O 1MaxStop 1l dCornFreq 2 dRecTim long 1IniCond Calc initial conditions if non zero Output parameters long 1Good Flag indicates valid data in structure long 1Vfit Indicates if the variance fit was good double dDampFct Damping factor from variance fit double dNatFreq Natural frequency from fit rad s aaa double dSONoise Noise process power spectral density EJ double dChSquar Chi square of variance fit double dFreq Carrier frequency E complex dPole 2 dZero Poles and zero ES double dLockRng Lock Range rad s double dLockInT Lock in Time s ES double dPulliInT Pull in Time s double dPullOut Pull out Range rad s ES double dNoiseBW Noise Bandwidth rad s PLTD tSigm Contains the 1 Sigma plot array A PLTD tvfit Resulting variance fit plot array PLTD tInit Initial Conditions variance plot array PLTD tXfer PLL Transfer Function plot array ay PLTD tBodeMag Bode plot magnitude gain response PLTD tBodePha Bode plot phase response APLL tParm A structure of type PARM that contains acquisition parameter The PARM structure is discussed in full detai
243. parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the FCMP structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS fcmp Pointer to a FCMP structure Memory needs to be allocated by the caller OUTPUTS None 68 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 void __stdcall FCNL_ClrFcmp FCMP fcmp This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the fcmp structure INPUTS femp Pointer to a FCMP structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static FCMP fibre declare fibre to a structure of type ECMP memset amp fibre 0 sizeof FCMP clear the memory for fibre structure FCNL_DefFcmp amp fibre set fibre structures to default values FCNL RqstPkt ApiDevld amp fibre WIND FCMP FCNL_ RqstAll ApiDevld amp fibre WIND FCMP execute the measurement get plot data including tDcom plots 7 7 FCNL_ClrFcmp amp fibre deallocate the structure OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 69 2 25 FOLDED EYE DIAGRAM TOOL The Folded Eye Tool is designed to
244. pattern directory C VISI on the SIA3000 or else an error will be returned The first time a measurement is performed the pattern is loaded into structure tPatn Valid Entries a valid file name including extension Default k285 ptn IPassCnt This parameter is a bi directional structure element that tracks the number of acquisitions since last reset This flag can be read after an execution or set prior to an execution Setting this parameter to 0 essentially resets this register It will be automatically incremented when a measurement is performed Valid Entries any integer greater than or equal to 0 Default 0 IHeadOff Header offset parameter for use in packet ized data which may have a frame header before the test pattern This offset value can be used to skip past header information and into the repeating data pattern stream This can be useful when analyzing data from disk drives when the pattern marker may be synchronized with the start of frame data Valid Entries 0 to 10 000 000 pattern length T Default O indicating no header present IFftMode O NoFFT 1 Fc 1667 2 Use dCornFrq Default 0 IMinHits Minimum hits before trying tail fit Default 0 ITailFit If non zero a tail fit will be tried Default 1 lErrProb Error probability level for Total Jitter Total Jitter is calculated based on the desired Error Probability level This value is used in conjunction with the bathtub curve after the successful completion of a tail fit in
245. placed in the 2UI bin After each bin has sufficient data a tail fit is performed on each UI span to get RJ DJ and TJ at 10 12 BER typedef struct PARM long long double tParm lPassCnt lPadl dBitRate Output parameters long long long long long long long long double double double double long long TFIT PLTD PLTD PLTD SATA tParm IPassCnt dBitRate IGood 1Good eT favs lMinHits 1Pad2 ali 1Pad3 es 1BinNumb SATA _TFITS 1Pad4 ES dLtSigma SATA TFITS PR dRtSigma SATA TFITS PR dDjit5 dDjit250 PX dTjit5 dTjit250 lHits SATA TFITS lPad5 Jos tTfit SATA TFITS tDjit i tT jit ae tHist SATA TFITS A stru cture of type PARM that contains acq Contains acquisition parameters Bit Rate must be specified Flag indicates valid data in structure Flag indicates all tailfits are good Min hits across all DJ spans xJ A xj SetSave SATA TFITS pK RK OK IK IK IK A RARA AAA AAA AAA These values are all used internally EVSIGMA DO NOT ALTER DJ at 5 and 250 spans TJ at 5 and 250 spans Contains count of histogram hits Structure containing tail fit info Determinstic Jitter plot Total Jitter plot Histograms for specific spans The PARM is discussed in full detail in Section 2 4 This p tracks can be Settin data struct measur Valid Defaul Bit Ra Default F
246. printf nFCNL GrpDefAsc failed n goto Error And you can also use the structure calls the zero argument skips plots if retn FCNL GrpDefPkt amp hist WIND HIST 0 SIA SUCCESS printf nFCNL GrpDefPkt failed n goto Error Ascii amp structure calls can be interspersed if retn FCNL GrpDefAsc ACQ RUN PW SIA SUCCESS printf nFCNL GrpDefAsc failed n goto Error With this structure call the 1 argument requests all the plot data if retn FCNL GrpDefPkt amp jitt WIND JITT 1 l SIA SUCCESS printf AnFCNL GrpDefPkt failed n goto Error if retn FCNL GrpDefPkt amp dcom WIND_DCOM 1 SIA SUCCESS OWAVECREST CORPORATION 2005 SECTION 3 GENERAL COMMAND REFERENCE 63 printf AnFCNL GrpDefPkt failed n goto Error You can nest multiple ascii commands but only the last should return data if retn FCNL GrpDefAsc ACQ FUNC FREQ ACQ COUN 1000 ACQ MEAS SIA SUCCESS printf nFCNL GrpDefAsc failed n goto Error Finalize the group definition for group 1 if retn FCNL GrpDefEnd ApiDevId 1 SIA SUCCESS printf AnFCNL GrpDefEnd failed n goto Error The definition doesn t acquire anything use WavGrpGetAll to acquire You can loop and re use the same definition over and over again for loop 0 loop lt 10 loop ST
247. ps n hist dNormSig lel2 STEP 8 Perform a dataCOM Acquisition This is an example of a dataCOM acquisition FCNL_RqstPkt retrieves the data and FCNL_RgstaAll returns all of the plot data For complete details on the dataCOM Tool and Structure see Section 2 20 if retn FCNL RqstPkt ApiDevId amp dcom WIND_ DCOM SIA SUCCESS printf nFCNL RqstPkt failed n goto Error if retn FCNL RqstAll ApiDevId amp dcom WIND_ DCOM SIA SUCCESS printf nFCNL RqstAll failed n goto Error OWAVECREST CORPORATION 2005 SECTION INTRODUCTION 7 STEP 9 Cleanup and Terminate Application Before terminating the application the supplied cleanup functions should be called FCNL_ClrHist and FCNL_ClrJitt frees any dynamic memory which may have been allocated and clears out the structure COMM_CloseDev closes the remote device driver After this cleanup has been performed the application may terminate normally Error Return an error message if we had a problem if retn printf Return Code i n retn Perform any cleanup and exit FCNL ClrHist amp hist FCNL ClrJitt amp jitt FCNL ClrDcom amp dcom COMM CloseDev ApiDevId Printf Strike ENTER to continue Fgets cmnd sizeof cmnd stdin return retn 1 8 WHERE TO GO FROM HERE This completes your introduction to the WAVECREST PAPI You should have installed the software
248. quantities one for each channel qDiff n Differential quantities one for each channel qComm n Common A B quantities one for each channel tXval Xaxis data to go with the voltage data tNorm n Normal channel voltage data one for each channel tComp n Complimentary channel voltage data one for each channel tDiff n Differential voltage data one for each channel tComm n Common A B voltage data one for each channel tHorz n Horizontal histogram data one for each channel tVert n Vertical histogram data one for each channel void __stdcall FCNL_DefScop SCOP scop This function is used to fill the Scop structure for the Scope tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the SCOP structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS scop Pointer to a SCOP structure Memory needs to be allocated by the caller OUTPUTS None OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 15 void __stdcall FCNL_ClrScop SCOP scop This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears
249. r LIM ERROR if this std error exceeded long 1PtnReps Patterns to sample across aif long lPad2 SPEC ISampCnt Sample size to use when acquiring data Valid Entries 1 to 10 000 000 Default 100 dMaxSerr Value of standard error which is tolerated used to identify wrong pattern or other setup error Valid Entries any integer greater than or equal to 0 Default 045 IPtnReps Patterns to sample across The larger this number is the more accurate the measurement will be with regards to absolute time measurements This is due to the effect of aver Valid Entries 1 Default rRatelnf 10 dDdjtInf 1 ARJpJint 1 IPadi IPad2 Internal parameters do not modify OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 7 2 8 DDJ DCD DATA STRUCTURE This output structure contains all of the measurement data used to calculate DDJ DCD in the Datacom Known Pattern With Marker Tool This tool contains a pointer to an array of DDJT structures with an element for each transition in the pattern typedef struct double dMean Average value for this span E double dVars Variance value for this span EJ double dMini Minimum value for this span double dMaxi Maximum value for this span double dDdjt Static displacement for this span UI double dFilt DDJT after LPF is applied UTI long 1Numb Number of measures in this span 7 long lPadl DDJT dMe
250. r of averages reduces the background noise associated with the algorithms The number of averages is calculated based on the equation AVERAGES 2 where n lAvgs Valid Entries any integer greater than or equal to 0 Default 0 indicating 2 averages 1 execution MASK Structure which holds mask definition See the definition above Defaults tMask dXwdUI 0 40 tMask dXf1UI 0 20 tMask dYiPct 0 60 tMask dV1Rel 0 20 14 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 tMask dAVORel 0 20 tMask dVmask 64e 3 tMask dTmask 700e 12 tMask dVlpas scop gt tMask dVmask 0 75 scop gt tMask dVOpas scop gt tMask dVmask 0 75 tMask dTflat scop gt tMask dTmask 3 0 7 0 dMargin Margin in percentage for Eye Mask 1 0 to 1 0 Default 0 dHistDly Histogram Box center horizontal location seconds Default 120e 9 dHistWid Histogram Box horizontal width seconds Default 160e 9 dHistvit Histogram Box center vertical location volts Default 0 0 dHistHgt Histogram Box vertical height volts Default 1 6 dAttn n Attenuation factor in dB this is provided to allow the results to be scaled to compensate for external attenuation from sources such as probes Default 0 IGood Flag indicates valid data in structure qNorm n Normal channel quantities one for each channel qComp n Complimentary channel
251. r to a INFI structure Memory needs to be allocated by the caller OUTPUTS None OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 8 void _ stdcall FCNL_ClrInfi INFI infi This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the infi structure INPUTS infi Pointer to a INFI structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static INFI iband declare iband to a structure of type INFI memset amp iband 0 sizeof INFI clear the memory for iband structure FCNL_DefInfi amp iband set iband structures to default values FCNL RqstPkt ApiDevId amp iband WIND _INFI execute the measurement FCNL RqstAll ApiDevld amp iband WIND _INFI get plot data including tEyeh FCNL_ClrInfi amp iband deallocate the structure 82 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES OWAVECREST CORPORATION 2005 2 29 LOCKTIME ANALYSIS TOOL The Locktime Analysis tool is used to analyze timing Trigger_7 measurement variation as a function of location in pattern Re e This is important when measuring periods pulse widths slew rates and propagation delay right after an event such as a INL AAN reset power up data bus read write chip enable ref clock Signal Tbk EI enable etc Common measurements include PLL lock time Per 1 gt lt l and cross talk sensitivity
252. re Set Bit0 to measure channel 1 Bitl to measure channel 2 etc OUTPUTS Returns SIA_SUCCESS upon successful completion or a specific error code negative value indicating what type of error occurred EXAMPLE static HIST hist 2 declare 2 window structures of type HIST memset amp hist 0 0 sizeof HIST clear the memory for first structure FCNL_DefHist amp hist 0 Set first structure to defaults hist 0 tParm 1FuncNum FUNC_PER declare measurement to be made hist 0 tParm 1StrtCnt 1 declare the start count of the measurement hist 0 tParm 1StopCnt 2 declare the stop count of the measurement FCNL MultPkt ApiDevId amp hist 0 WIND_HIST 0 3 execute the measurement on channel 1 and channel 2 Note that the nRefChn field is set to 0 since no Ref Channel used OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 12 PLOT DATA STRUCTURE This is an output structure used to hold the necessary information to construct a view of the measurement that was performed For example the histogram tool can return a histogram plot In order to optimize performance the plot data itself is returned in the measurement window structure only when FCNL_RggstAll is called The plot statistics are valid but the pointer dData will be invalid until FCNL_RgstAll transfers the plot data stores it locally and assigns the dData pointer to this local copy The PLTD structure can
253. reestablish initial conditions however this will impact test time Before calling this function zero out the TSER structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS tser Pointer to a TSER structure Memory needs to be allocated by the caller OUTPUTS None 132 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 void _ stdcall FCNL ClrTser TSER tser This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the tser structure INPUTS tser Pointer to a TSER structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE define TRUE 1 define FALSE 0 static TSER tiseries memset amp tseries 0 sizeof FCNL DefTser amp tseries tseries tParm 1ChanNum T3 tseries tParm lSampCnt 1000 tseries tParm lFuncNum FUNC_PER for I 0 1 lt 100 000 1 FCNL RqstPkt ApiDevId amp tseries WIND TSER plot_data tseries tPeak FCNL ClrTser amp tseries void plot_data PLTD plotstruc declare tseries to be a structure of type TSER clear the memory for tseries structure set tseries structure to default values NOTE tseries tparm are also set to defaults by this command Set ch 1 to be measured channel Set sample size to 1k per burst
254. rential voltage data Ry PLTD tComm POSS_CHNS Common A B voltage data E PLTD tHist POSS_CHNS Histogram of all acquires combined xo PLTD tShrt POSS CHNS Total Jitter for SHORT Cycles Ey PLTD tLong POSS_CHNS Total Jitter for LONG Cycles E PLTD tBoth POSS_CHNS Total Jitter for LONG SHORT Cycles EJ OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 35 36 CANL tParm IPassCnt IPcnt IHiRFmV ILoORFmV IMeas dAttn n IGood IHistCnt n dHistMin n dHistMax n dHistAvg n dHistSig n dPwPl n dPwMn n dFreq n dDuty n dPjit n dCorn n PLTD tF tN POSS CHNS Frequency plot data on 1 clock basis PLTD tSave POSS CHNS Average Frequency plot before scaling A structure of type PARM that contains acquisition parameter The PARM is discussed in full detail in Section 2 4 This parameter is a bi directional structure element that tracks the number of acquisitions since last reset This flag can be read after an execution or set prior to an execution Setting this parameter to 0 essentially resets this register It will be automatically incremented when a measurement is performed Valid Entries any integer greater than or equal to 0 Default 0 This field specifies the voltage thresholds to be used when calculating rise and fall times The voltage thresholds are assumed to be symmetrical about the 50 threshold an
255. resultant measurement should be ignored Valid Entries 0 do not estimat ffective jitter values 1 calculat ffective jitter values Default 0 IMinEftv IMaxEftv Defines the range of the bathtub curve that is to be used to calculate an effective jitter value Valid Entries 1 to 16 with l1MinEftv lt 1MaxEftv Default 4 for MaxEftv and 12 for MinEftv 78 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 lAutoFix IGood INormCnt dNormMin dNormAvg dNormSig AcumCnt dAcumMin dAcumAvg dAcumSig Flag indicating whether to perform a pulse find as required Setting this value to any integer greater than zero tells the measurement to perform a pulse find if needed The system will know if a measurement was recently performed and if a pulse find is necessary Valid Entries 0 no pulsefind prior to measurement 1 pulsefind if the measurement mode changed Default 0 Flag indicates valid output data in structure This parameter does not indicate success of TailFit measurement only whether a valid time measurement was performed and valid measurement data was placed in tNorm tAcum and tMaxi Number of measurements in tNorm plot array dNormMax Minimum and maximum values in tNorm plot array Average value of distribution in tNorm plot array Standard Deviation 1 Sigma 10 value of distribution in tNorm plot array Number of hits of distributio
256. rmed S nd of chapter for additional details See Section 2 3 for further details on TFIT structures OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 79 80 void _ stdcall FCNL DefHist HIST hist This function is used to fill the hist structure for the Histogram tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the HIST structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS hist Pointer to a HIST structure Memory needs to be allocated by the caller OUTPUTS None void _ stdcall FCNL_ClrHist HIST hist This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the hist structure INPUTS hist Pointer to a HIST structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE define TRUE 1 static HIST histogram FCNL DefHist amp histogram histogram tparm 1ChanNum 1 histogram tparm 1FuncNum FUNC_PER histogram tparm 1StrtCnt 1 histogram tparm 1StpCnt 2 histogram tparm 1SampCnt 10 000 histogram lPassCnt 0 histogram
257. rnally DO NOT ALTER dVdiffPP Pk pk differential voltage dVdRatio De emphaisis voltage ratio dOpnEyeT Eye opening dMedEyeT Median to max jitter dVcommonAc V x cm acp dVcommonDc v x cm dc dVcmDcActv V x cm dc active idle delta dVcmidleDc v x cm idle de dVcmDcLine v x cm dc line delta dVcmDcDpls_ v x cm dc d dVcmDcDmin v x cm dc d dVIdleDiff V x idle diffp qNorm Normal channel quantities qComp Complimentary channel quantities tNrmScop Normal channel voltage data tCmpScop Complimentary channel voltage data bTranEye ITranRsv bDbeemEye IDeemRsv Used internally DO NOT ALTER E 102 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 void __stdcall FCNL DefPcix PCIX pcix This function is used to fill the pcix structure for the PCI Express Compliance tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the PCIX structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS pcix Pointer to a PCIX structure Memory needs to be allocated by the caller OUTPUTS None void _ stdcall FCNL_ClrPcix PCIX pcix This function
258. ror long __stdcall COMM GetApiDevId char devname long ApiDevld INPUTS ApiDevid Integer pointer to location to return ApiDevld devname A pointer to an ASCII string containing a device name OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error SECTION 3 GENERAL COMMAND REFERENCE OWAVECREST CORPORATION 2005 long __stdcall COMM GetDevName long ApiDevId INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 The device must have been opened using COMM _InitDev devname A pointer to location to return device name OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error char devname long __stdcall COMM ReadFile long ApiDevIid const char srcFilename const char destFilename long 1FileSize Use this function to read back a file from the SIA3000 and save the contents in a specified file on the host INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 The device must have been opened using COMM _InitDev srcFilename A pointer to the name of the file to read data from This file is located on the SIA3000 hard drive destFilename A pointer to the location of the file the data will be saved to IFileSize The known size in bytes of the file being read in OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate err
259. roup involves the following steps 1 Issue the FCNL GrpDefBeg groupNumber command 2 Send down various measurement and configuration requests using FCNL GrpDefAsc command Syntax or FCNL GrpDefPkt toolWindow type GetPlots 3 When finished defining a group issue FCNL GrpDefEnd groupNumber Then issue FCNL GrpGetAll Then issue FCNL GrpGetAsc dataBuffer expectedLength or FCNL GrpGetPkt toolWindow type PlotsRetrieved in the same order the corresponding FCNL GrpDefAsc and FCNL GrpDefPkt were originally issued NOTE Nesting of groups is not allowed CAUTION DO NOT intersperse group definitions to multiple devices or call FCNL_ RqstPkt or FCNL MultPkt in the middle of a group definition Unpredictable results will occur long __stdcall FCNL GrpDefBeg long nNumb Define a group the group must be defined only once INPUTS nNumb Long Integer specifying the index of a group to be defined A maximum of 20 groups are allowed at present OUTPUTS Returns an integer 0 specifying a success or a negative value to indicate error long __stdcall FCNL_GrpDefAsc char sCmnd This function is for standard ASCII commands to be included in a group INPUTS sCmnd Pointer to a character array containing the ASCII command string to be used in the group For the list of commands not allowed in groups please consult the manual OUTPUTS Returns an integer 0 specifying a success or a negative value to indicate err
260. rrelate with SIA3000 results Valid Entries 0 disabl ffective jitter estimate 1 nabl ffective jitter estimate Default 0 IMinEftv IMaxEftv Defines the error rates at which the eye width calculation will be used in the estimating effective jitter components IMinEftv and IMaxEftv define points on the bathtub curve from which the extrapolated RJ curve is traced Then where this extrapolated curve intersects the 5 error probability the effective DJ is calculated Valid Entries 1 to 16 indicating 107 to 10 error rate Default 4 and 12 indicating 107 BER for IMaxEftv and 1072 BER for IMinEftv IFiltEnb Flag to enable IDLE character insertion filter When enabled any dge measurements that are not within 0 5 UI will be discarded This filter is used in systems which may insert an idle character from time to time to compensate for buffer under run overrun issues In those instances where an idle character was inserted during a measurement the edge selection may be off If this parameter is greater than or equal to one the filter is enabled and measurements that differ from the mean by 0 5 UI will be discarded Valid Entries 0 disable idle character filter 1 nable idle character filter Default 0 OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 5 IQckTjit Flag to indicate a fast total jitter calculation will be p
261. ructure set pll structures to default values execute the measurement get plot data deallocate the structure 108 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 2 38 RAMBUS DRCG TOOL The Rambus DRCG tool was developed specifically to test Rambus clock generator chips which have a compliance test that includes adjacent cycle jitter at 6 incremental accumulations for both period polarities This tool is a true compliance tool such that the specification as defined by Rambus Corporation has been incorporated into this tool to validate a DRCG s performance relative to the standard The measurement consists of accumulated adjacent cycle jitter measurements cycle to cycle for both rising edges and falling edges The measurement algorithm is depicted above Each measurement configuration is executed in 4 sweeps Each sweep is a burst of 4000 measurements For a given execution 4 sweeps of 4000 measurements for both rising and falling edges at 6 different amplitudes of accumulation results in 4x4000x2x6 192 000 measurements The results are placed in arrays which are organized by cumulative cycles and sweep number WAVECREST SIA3000 Rambus Compliant DRCG IC Accumulation of 2 peri
262. ry link library DLL are supplied for developing under Microsoft Windows You can link to the static stub library that relieves all the programming of the chores normally associated with linking to a DLL The DLL libraries must be available in the current directory or somewhere in the PATH in order to execute the application The define WIN32 must be supplied to enable options specific to Microsoft Windows platforms If you are developing within the Visual C environment this define is automatically supplied for you If you are using a command line compiler this define may be supplied as follows cl c DWIN32 sample c OWAVECREST CORPORATION 2005 SECTION 5 BUILD CONSIDERATIONS 73 ALL UNIX PLATFORMS The define WIN32 must NOT be defined when compiling under UNIX platforms This define enables options that are not suitable under UNIX platforms HP UX 9 05 HP UX 10 20 AND HP UX 11i The ANSI C compiler must be used ANSI compatibility is enabled from a command line by specifying the Aa option as follows cc cC Aa DHPUX DHP9X HP UX 9 05 cc cC Aa DHPUX HP UX 10 20 cc cC Aa DHPUX HP UX 11 1 Required HPIB support is supplied by linking to the Standard Instrument Control Library This library must already be installed per manufacturers documentation This library can be included by adding 1sicl to the link command The resulting link command including the Wavecrest API libraries takes the form cc Aa sample
263. ry space for dcom structure FCNL_DefDcom amp dcom set dcom structure to defaults FCNL Ptn amp dcom sPtnName 0 cjtpat ptn load cjtpat ptn file into dcom s pattern name element This command could be ceplaced with a sprintf command when programming in C long __stdcall FCNL_MarkerInit long ApiDevId long MarkerId PMKR tPmkr Use this function to initialize the specified PM50 This must be called before using a PM50 in any application INPUTS ApiDevid Contains the API Device ID of the device This value can be from 1 to 31 Markerld Which PM50 card in the system to initialize tPmkr Pointer to a PM50 PMKR measurement and control structure OUTPUTS Returns SIA SUCCESS upon successful completion or a specific error code negative value indicating what type of error occurred long __stdcall FCNL_MarkerReset long ApiDevId PMKR tPmkr Use this function to reset the state of the specified PM50 INPUTS ApiDevid Contains the API Device ID of the device This value can be from 1 to 31 tPmkr Pointer to a PMSO PMKR measurement and control structure OUTPUTS Returns SIA SUCCESS upon successful completion or a specific error code negative value indicating what type of error occurred 150 SECTION 3 GENERAL COMMAND REFERENCE OWAVECREST CORPORATION 2005 long __stdcall FCNL_MarkerConfig long ApiDevId PMKR tPmkr Use this function to change the configuration of the PM50 specified INPUTS
264. s amp _ at data 1 1000000000 0 000 amp ns amp _ at data 2 1000000000 0 000 amp ns vbCrLf out some of the statistics from the HIST and JITT tool structures lay Text mainDisplay Group Loop amp _ at Round 1 0 amp Histogram Mean amp _ at bHist dNormAvg 1000000000 0 000 amp ns amp _ Lf amp Group Loop amp _ at Round 1 0 amp Histogram Sdev amp _ at bHist dNormSig 1000000000000 0 000 amp ps amp _ Lf amp Group Loop amp _ at Round 1 0 amp 1Clock RJ amp _ at bJitt dRjit1C1k 1000000000000 0 000 ps amp _ Lf amp Group Loop amp _ at Round 1 0 amp NClock RJ amp _ at bJitt dRjitNC1k 1000000000000 0 000 ps amp vbCrLf the max of the FFT to show how data within a plot is accessed and the dataCOM tool DJ RJ values lay Text mainDisplay Group Loop amp _ at Round 1 0 dataCOM DJ amp _ at bDcom dDdjt 1000000000000 0 000 amp ps _ Lf amp Group Loop amp _ at Round 1 0 dataCOM RJ amp _ at bDcom dR3it 0 1000000000000 0 000 amp ps amp _ Lf amp Group Loop amp _ at Round 1 0 NClock Plot Max amp _ at FCNL GetYval bJitt tFftN bJitt tFftN 1YmaxIndx 1000000000000 0 000 rLf OWAVECREST CORPORATION 2005 APPENDIX B VBasic EXAMPLE 8
265. s HIST Dim bJitt As JITT Dim bDcom As DCOM Dim Dim Dim Dim ApiDevid As Long Round As Long retn As Long avg As Double APPENDIX B VBASIC EXAMPLE Dim data 299 Dim Dim Dim per As St pw As Str rise As S As Double ring ing tring Dim Dim AsciData 255 As Byte Ascileng As Long our structures bHist bJitt bDcom Initialize FCNL DefHist FCNL DefJitt FCNL DefDcom Bitfield of input channels to measure upper 16 bits Equivalent to 1 bHist tParm 1ChanNum bHist tParm 1StopCnt 1 bHist tParm lFuncNum CE CT st retn If retn lt gt SIA SUCCESS GoTo Error End If bDcom 1QckMode 1 bDcom tParm 1ChanNum 1 bDcom tParm lAutoArm ARM bDcom tParm lExtnArm N Initialize device ApiDevid If ApiDevid lt 1 GoTo Error End If Then 2 lt lt 16 131073 FCNL_PtnName bDcom sPtnName 0 Then COMM_InitDev GPIB_10 Channel 1 lower 16 bits Channel 2 in ANSI C FUNC_TPD PP clock ptn EXTRN dev5 OWAVECREST CORPORATION 2005 APPENDIX B VBASIC EXAMPLE 177 Turn on calibration source retn COMM TalkDev ApiDevid CAL SIG 10MSQ If retn lt gt SIA SUCCESS Then GoTo Error End If Go ahead and perform a pulsefind retn FCNL PulsFnd ApiDevid bHist tParm If retn lt gt SIA SUCCESS Then GoTo Error End If Perfor
266. s dFallMax i j printf n FCNL ClrDrcg amp rambus declare cyc2cyc to be a structure of type ACYC clear the memory for cyc2cyc set histogram structures to default values capture waveform on channel 1 Measure true duty cycle my measuring successive edges execute the measurement get plot data Display results for all sweeps and cycles deallocate the structure 2 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 2 39 SCOPE TOOL The Oscilloscope tool provides a quick and easy display of the signal to be analyzed The Oscilloscope has many different capabilities It can capture a waveform measure voltage parameters and create eye masks typedef struct Input parameters PARM tParm Contains acquisition parameters long 1Voff POSS CHNS Voltage offset mV per channel long 1Vdif POSS_CHNS Differential offset mV per channel long lVcom POSS_ CHNS Common offset mV per channel long lTper Time per division ps all channels long 1Tdel Delay time ps all channels long 1Pent Amount 50 to calc rise fall time long 1HiRFmvV Absolute rise fall voltage if lPcnt lt 0 long 1LORFmvV Absolute rise fall voltage if 1Pcnt lt O long lInps Input selection see defines above E long 1Meas
267. s provided to allow the results to be scaled to compensate for external attenuation from sources such as probes Default 0 tKpwm Known Pattern With Marker Tool which specifies most of the input and output parameters necessary for a data signal analysis The user will need to review all of the default parameters of the Known Pattern With Marker Tool and decide which to change IGood Flag indicates valid data in structure IPadi Used internally DO NOT ALTER dRiseRate Rising edge rate V ns dFallRate Falling edge rate V ns dDifMaxVin Differential Input High Voltage dDifMinVin Differential Input Low Voltage dPeriodPpm Average Clock Period Accuracy expressed in Parts Per Million dPeriodMin Absolute Period Minimum in seconds dPeriodMax Absolute Period Maximum in seconds dCycl2Cycl Cycle To Cycle Jitter in seconds dVmaxSingl Absolute Max Single Ended input voltage dVminSingl Absolute Min Single Ended input voltage dDutyCycle Duty Cycle expressed as a percentage dRFMatches Rising Rate to Falling Rate Matching expressed as a Percentage dMaxJittiM Maximum Pk Pk Jitter 10 6 BER qNorm Normal channel quantities qComp Complimentary channel quantities qDiff Differential IN IN channel quantities tNrmScop Normal channel voltage data tCmpScop Complimentary channel voltage data tDifScop Differential IN IN channel voltage data void __stdcall FCNL_DefPclk PCLK pclk This function is u
268. s tRcpm 7 7 FCNL ClrExpr expr deallocate the structure OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 97 2 34 PCI EXPRESS 1 1 CLOCK ANALYSIS TOOL The PCI Express 1 1 Clock Analysis Tool provides both timing and amplitude compliance measurements for PCI Express Reference Clocks using the SIA3000 This tool accurately determines device performance by quantifying both random and deterministic jitter components typedef struct Input parameters long 1Pent Amount 50 to calc rise fall time long 1HiRFmV Absolute rise fall voltage if lPcnt lt 0 long 1LoREmMV Absolute rise fall voltage if lPcnt lt 0 long 1Pad0 double dAttn Attenuation factor dB KPWM tKpwm Contains acquisition parameters ey Output parameters long 1Good Flag indicates valid data in structure long lPadl double dRiseRate Rising edge rate V ns double dFallRate Falling edge rate V ns Ej double dDifMaxVin Differential Input High Voltage El double dDifMinVin Differential Input Low Voltage double dPeriodPpm Average Clock Period Accuracy E double dPeriodMin Absolute Period Minimum double dPeriodMax Absolute Period Maximum double dCycl2Cycl Cycle to Cycle Jitter double dVmaxSingl Absolute Max input voltage ed double dVminSingl Absolute Min inpu
269. se bits or a negative value to indicate error long _ stdcall COMM ReqEsr long ApiDevId char esr This function sends a esr command and waits for the byte to return or SHORT_TIME 5 seconds If the function times out an error is returned INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 esr A character pointer to the location to store the esr byte OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error long __stdcall COMM DevChans long ApiDevld INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 The device must have been opened using COMM _InitDev OUTPUTS Returns the number of channels installed in the specified device or a negative number to indicate error long __stdcall COMM DevMarkers long ApiDevId INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 The device must have been opened using COMM _InitDev OUTPUTS Returns the number of pattern markers installed in the specified device or a negative number to indicate error char __stdcall COMM _DevIdn long ApiDevld INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 The device must have been opened using COMM _InitDev OUTPUTS Returns a pointer to the IDN of the specified device or NULL to indicate er
270. sed to fill the pclk structure for the PCI Express Compliance tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the PCLK structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS pclk Pointer to a PCLK structure Memory needs to be allocated by the caller OUTPUTS None OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 99 void _ stdcall FCNL_ClrPclk PCLK pclk This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the pclk structure INPUTS pclk Pointer to a PCLK structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE static PCLK pclk declare pclk to a structure of type PCLK memset amp pclk 0 sizeof PCLK clear the memory for pclk structure FCNL_DefPclk amp pclk set pclk structures to default values FCNL_RqstPkt ApiDevId amp pclk WIND PCLK FCNL RqstAll ApiDevId amp pclk WIND PCLK execute the measurement get plot data includes tRcpm 7 7 FCNL ClrPclk amp pclk deallocate the structure IOO
271. t This function is used to fill the jitt structure for the High Frequency Modulation tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the JITT structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior to using the structure INPUTS jitt Pointer to a JITT structure Memory needs to be allocated by the caller OUTPUTS None void _ stdcall FCNL_ClrJitt JITT 3itt This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the jitt structure INPUTS jitt Pointer to a JITT structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE define TRUE FCNL DefJitt hfm lAutoFix hfm dCornFrq FCNL RqstPkt FCNL RqstAll FCNL Clrditt q memset amp hfm hfm tparm 1ChanNum hfm tparm 1SampCnt static JITT hfm 0 sizeof JITT amp hfm 1 500 TRUE 2e6 ApiDevId amp hfm WIND_JITT ApiDevId amp hfm WIND_JITT 7 7 amp hfm declare hfm to be a structure of type JITT clear the memory for hfm structure set hfm structure to default values NO
272. t NE Beta 7O 2 26 HIGH FREQUENCY MODULATION ANALYSIS TOOL 0 cece cece ence n ene n nen enes 73 2 27 HISTOGRAM TOOL enose ae ck reget deg celedutie aa bee eb aa te dint Kaew eweee Cele 77 2 28 INFINIBAND TOOL accuses cs ptek o EINE Seas dd ia wate 8 2 29 SLOCKTIME ANALYSIS TOOL perier ei a id ah tld ee 83 2 30 Low FREQUENCY MODULATION ANALYSIS TOOL 0 cece cece eee conce 87 2 3 OSCILLOSCOPE TOOL roer inniit aas A didas SO 2 32 PCI EXPRESS WITH HARDWARE CLOCK RECOVERY TOOL cceceee eee nro 92 OWAVECREST CORPORATION 2005 TABLE OF CONTENTS CONT D 2 33 PCI EXPRESS WITH SOFTWARE CLOCK RECOVERY TOOL cece eee nees 95 2 34 PCI EXPRESS CLOCK ANALYSIS TOOL 0c cece ccc cece net n nen een ennene 98 2 30 PCI EXPRESS l ODA TOOD tits ii pais Moke facta tad IOI 2 30 PHASE NOISE TOOK sri Eea a te A E A a N 104 2 37 PRLE ANALYSIS TOOLS A safe tele Beis r O E AAEE olen TEND 106 2 38 RAMBUS DRCG TOOL te dehos trviantinhetomdadt diese tet tsabiloe lidia ies r ais 109 2 39 SCOPE TOOL Marked nase kad id ts dd 113 2 40 SERIAL ATA GEN21 amp GEN2M TOOL 1 cece cnn tne nen een etn ene en eens 117 2 41 SERIAL ATA GEN IX amp GEN2X TOOL 00ccococccccnccncncc crono 119 2 42 SERIAL ATA LOOK fsisc3 nites see had A eine bees 121 2 43 SPREAD SPECTRUM TOOL di dt ali tecdea E demande ees 123 2 44 STATISTICS TOOL Hi A tes A gee 127 2 45 STRIPCHART TOOG arin go a oE e RaT
273. t voltage double dDutyCycle Duty Cycle xy double dRFMatches Rising Rate to Falling Rate Matching double dMaxJitt1M Maximum Pk Pk Jitter 10 6 BER OTYS qNorm Normal channel quantities OTYS qComp Complimentary channel quantities 57 QTYS qDiff Differential channel quantities PLTD tNrmScop Normal channel voltage data Ef PLTD tCmpScop Complimentary channel voltage data PLTD tDifScop Differential channel voltage data Ef PCLK IPcnt This field specifies the voltage thresholds to be used when calculating rise and fall times The voltage thresholds are assumed to be symmetrical about the 50 threshold and this is the distance from the 50 threshold to the starting and ending thresholds For example if this field is equal to 30 then 20 and 80 thresholds are used If this field is equal to 40 then 10 and 90 thresholds are used The absolute voltage levels used are based on the previous pulsefind minimum and maximum voltages If this field is negative then the absolute rise and fall thresholds are taken from the following fields 1HiRFmV and l1LoRFmv Default 30 IHiRFmV Absolute rise fall voltage if 1Pcnt lt 0 in units of mV Default 250 ILoORFmV Absolute rise fall voltage if 1Pcnt lt 0 in units of mV Default 250 IPadO Used internally DO NOT ALTER 98 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 dAttn Attenuation factor in dB this i
274. tains all of the plot information for generating an DCD DDJ versus UI plot with the DCD DDJ Low Pass Filter enabled This plot is only valid in Pattern Marker Mode and dDdjtLpf is a non negative number For a discussion on the Low Pass Filter Function for DCD DDJ data see dDdjtLpf above See Section 2 3 for details concerning the PLTD structure and its elements Structure of type PLTD which contains all of the plot information for generating a Bathtub curve There is one structure and associated plot for each of the acquisition modes specified in lAcqMode See Section 2 3 for details concerning the PLTD structure and its elements Structure of type PLTD which contains all of the plot information for generating an Bathtub curve based on Effective Jitter if IFndEftv is set and a valid fit is obtained For a detailed description of Effective Jitter see IFndEftv above There is one structure and associated plot for each of the acquisition modes specified in lAcqMode See Section 2 3 for details concerning the PLTD structure and its elements tSigmNorm n Structure of type PLTD which contains all of the plot information tSigmTail n tFreqNorm n Structure of type PLTD which contains all of the plot tFregTail n for generating an 1 Sigma versus UI plot x axis can be converted to time from UI based on dBitRate value This plot describes the standard deviation for each accumulated time sample Th
275. te the distance from the 50 threshold to the starting and ending thresholds For example if this field is equal to 30 and 80 thresholds are used If this field is equal to 40 then 10 and 90 thresholds are used The absolute voltage levels used are based on the previous pulsefind minimum and maximum voltages If this field is negative then th rise and fall thresholds are taken from the following fields 1HiRFmV and l1LoRFmv Default 30 Absolute rise fall voltage if 1Pcnt lt 0 in units of mV Default 250 Absolute rise fall voltage if 1Pcnt lt 0 in units of mV Default 250 This flag is set by the system when an Idl The resul is succe subsequ ssfully made nt measurements Set the prev Idle measurement to be made using the command Before the common mode idle voltages a Default This par tracks t Mode measurement CS are this flag to zero to ious Idle Mode measu 0 ameter is a bi direc rement results and tional tions since he number of acquisi can be read after an execution or set prior to an Setting It will performe Valid En Default Attenuat results from sou Default Known Pa this paramete be automatically inc d tries any integer g 0 ion factor in dB to be scaled to comp rces such as probes 0 ttern With Ma rke remented when a measu then applied in invalidate force a new EXPR IDLE re applied once ag
276. ted spikes indicates array rack memo ternal use only lly direc for internal use only rack memo This ry to the nu ry allocation for IPeakData values DO NOT ALTER or Raw FFT output when averaging is enabled tly access by an applica DO NOT ALTER or try to use ry allocation for dFreqData values This value dRjpjData values value is for internal use only DO NOT ALTER or try to use Raw all measurements histogram data only valid when auto arming is used This structure is for internal use only DO NOT ALTER or try to use Used to track memory allocation for dMeasData values This value is for internal use only DO NOT ALTER or try to use Raw variance data used for the calculation of RJ and PJ This ALTER or try to This value use try to is enabled and successful in the tTfit st ructure being DO NOT This value try to use value is for use mber of values in This value try to use This structure is tion program This ternal use only DO NOT ALTER or try to use fit FFT output when tail fit and averaging are both This structure is not normally directly access by an on program This value is for internal use only DO or try to use Used to track memory allocation for dTailData values This value ternal use only DO NOT ALTER or try to use OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 55 void _ stdcall
277. the compilation changes required in order to utilize the SICL interface To execute the sample application issue the following from a command prompt sample NOTE Preceding the application name with ensures that the executable is launched even if the current directory is not included in the search path on UNIX If the sample application is successfully executed the program should produce an output similar to the following Single Histogram Mean 50 392295ns Single Histogram Sdev 2 185318ps Strike ENTER to continue Congratulations You have just built and ran your first application using the WAVECREST Production API SECTION INTRODUCTION OWAVECREST CORPORATION 2005 1 7 REVIEWING THE SAMPLE APPLICATION Let s examine the sample application in more detail STEP 1 STEP 2 STEP 3 Declare Required Include Files and Input Channels The WAVECREST PAPI utilizes a number of custom structures which are declared in the supplied include files In this example IN1 and IN2 on the SIA 3000 are declared as measurement inputs include lt stdio h gt include lt stdlib h gt include lt string h gt include wccomm h include wcfcnl h Uncomment for SUNOS define SUNOS 1 if WIN32 SUNOS SOLARIS2 LINUX define APIDEVTYPE GPIB 10 define DEVICENAME dev5 else if HPUX define APIDEVTYPE HPIB IO define DEVICENAME hpiby 5 endif endif Define
278. the algorithm The number of averages is calculated based on the equation AVERAGES 2 where n IFftAvgs Valid Entries any integer greater than or equal to 0 Default 0 indicating 2 averages 1 execution Standard used the following defines apply SSCA_USER SSCA SATA1 SSCA SATA2 SSCA PCIX Default SSCA_SATA1 Flag indicates valid data in structure Span across which max jitter is found Measured carrier frequency Apparent jitter modulation frequency Parts per million positive Parts per million negative Minimum value in measured normal data Maximum value in measured normal data value of measured normal data Averag 1 Sigma value of measured normal data Unit Interval of data signal Histogram of results for peak freq 1 Sigma data to find max jitter span OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 125 void _ stdcall FCNL DefSsca SSCA ssca This function is used to fill the ssca structure for the SSC tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to reestablish initial conditions however this will impact test time Before calling this function zero out the SSCA structure using the standard memset function to ensure that any information pertaining to dynamic memory allocation is cleaned out prior
279. then be used by a plotting utility to display the plot information The plot data may be manipulated directly from the PLTD structure or FCNL_GetXval and FCNL_GetYval may be called for simplicity See section 2 2 for more information about the FCNL_RgstAll command and section 2 1 for higher level Plot utility functions The data is organized by linear indexing of the x axis and assignment of one element of X for each element in the y axis data array The y coordinate is extracted from the dData array while the x coordinate may be calculated using the number of points in the array and the x axis extents This formula is used to calculate an X value for a given index 0 lt index lt plot INumb X plot dXmax plot dXmin double index double plot INumb 1 plot dXmin typedef struct double dData Pointer to y axis data array long 1Numb Number of valid data points es long 1Rsvd Used to track memory allocation 7 long lPadl double dXmin dXmax X axis values for ends of data array double dYmin dYmax Min Max values in y axis data array double dYavg dYstd Average 1 Sigma values for data array long 1XminIndx Used by histograms to indicate long 1XmaxIndx location of first and last valid bins long 1YminIndx Indicates the location where the EJ long 1YmaxIndx min max values occur in data array double dAltXmin dAltXmax Alternate X axis values
280. tion EL long 1Pad3 double dFreq Carrier frequency Ri JITT OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 73 tParm tFfts lIncStop IMaxStop lAutoFix dCornFrq dRjpjFmn dRjpjFmx IFftAvgs A structure of type PARM that contains acquisition parameter tParm is discussed in full detail in Section 2 4 A structure of type FFTS that contains the setup parameters for the FFT See Section 2 10 for further details on FFTS structures Timing resolution of Accumulated Time Analysis This value will define the highest frequency component that will be observed low pass filter function approximated by a brick wall Valid Entries tParm 1StopCnt to lMaxStop Default pi Maximum number of accumulated periods to acquire This value defines the low frequency cut off for this measurement The larger this number is the more lower frequency modulation content can be observed Furthermore the larger this number is the more data that is taken and the longer the test time Valid Entries tParm StopCnt to 10 000 000 Default 256 Flag to indicate whether to use dCornFrq or IMaxStop to indicate the low frequency cutoff If the value is of this parameter is greater than zero dCornFrq will be used to calculate the stop count If this parameter is equal to zero IMaxStop will be used Valid E ntries 0 no pulsefind prior to measurement 1 pulsefind if t
281. tive pulse width UNC_PW M Negative pulse width UNC_PER Period UNC_FREQ Frequency UNC_PER_M Period Minus UNC PER el Ay e A Xy ap x XI xy x7 a el KJ aA ay OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 13 1ChanNum Channel to measure the minimum value is 1 the maximum is based on the system configuration For two channel TPD measurements the lower 16 bits define the start channel and the upper 16 bits defines the stop channel In the Oscilloscope tool channels are designated by a bitfield implying that multiple channels can be measured at the same time example If 1ChanNum 3 channels 1 and 2 will be measured Default 1 1StrtCnt Channel start count the valid range is from 1 to 10 000 000 Default 1 1StopCnt Channel stop count the valid range is from 1 to 10 000 000 Default 2 1SampCnt Sample size the valid range is from 1 to 950 000 Default 300 dStrtvlt Start voltage sets the reference voltage used to initiate the time measurement The valid range is 2 0 volts Default 0 0 dStopVlt Stop voltage sets the reference voltage used to terminate the time measurement The valid range is 2 0 volts Default 0 0 LExt
282. to specific functionalities occurring Per 2 gt on the DUT The Locktime Analysis Tool makes several E Per3 gt lt measurements of the same event after a trigger and then can increment to the next event For example a period measurement could be made on the first clock pulse after a trigger occurs This measurement could be made hundreds of times Then this tool automatically will increment to the next clock period and measure that one hundred times This is repeated for as many sequential periods as desired The increment and the number of measurements is programmed by the user typedef struct Input parameters PARM tParm Contains acquisition parameters FFTS tFfts FFT window and analysis parameters long lIncStrt Increase start count by this value EN long 1MaxStrt Maximum start count to collect data ef long 1An1Mode Relationship of start and stop counts Use one of ANL FNC FIRST ANL FNC _PLUS1 Si E ANL_FNC_START at long lAutoFix If true calculate the above parameters long lSpanCnt The span across which to measure XJ long lDataPts The data points within span to measure Output parameters long 1Good Flag indicates valid data in structure long lPadl PLTD tTime Time domain plot data ep PLTD tDerv 1st derivative of time domain plot data PLTD EFECT Frequency domain plot data a PLTD tF tD Frequenc
283. to use AUTO In AUTO mode the tool first performs 3 tailfits maximum count minimum 64 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 count and middle count and checked to see if the deviation between adjacent RJ measurements is less than the percentage specified in lPent If the deviation is greater the instrument will perform two more TailFit measurements between the three already taken Again the instrument will check adjacent RJ estimates and decide whether to capture additional interstitial samples typedef struct Input parameters long 1Coun Count of tailfits see constants above long 1Pent Automode suceed see constants above DCOM tDcom DCOM structure holds most information Output parameters long 1Good Flag indicates valid data in structure long lPadl double dDjit Deterministic jitter value y double dRjit Random jitter value double dTjit Total jitter value X PLTD tSigmTail 1 Sigma plot using tail fits wy RAND ICoun This parameter selects the number TailFit iterations to be captured This number can be any of 3 5 9 or 17 In RAND AUTO mode the user can choose to have the instrument dynamically decide the number based on the deviation of adjacent RJ estimates The instrument will start with 3 TailFits and increase the count based on the value specified in IPent Valid Entries RA
284. ture of type PARM that contains acquisition parameter See Section 2 4 for further details concerning this structure tFfts A structure of type FFTS that contains setup parameters for the FFT window These parameters needs to be set if the user is interested in capturing the spectrum analysis on the waveform See Section 2 10 for further details concerning this structure IStrt Start time in picoseconds Valid Entries 24 000 to 100 000 000 Default 24 000 IStop Stop time in picoseconds Valid Entries 24 000 to 100 000 000 Default 100 000 lIncr Resolution of time base in picoseconds Maximum Resolution is equal to the window width 1Stop 1Strt such that only 2 data points would be captured Valid Entries 10 to window width Default 500 IGood Flag indicates waveform capture was successful and valid output data is in the structure tTime 11 A structure of type PLTD which contains the differential time domain plot of voltage data for channel n See Section 2 3 for further details on PLTD structures tFreq 7 A structure of type PLTD which contains the differential frequency domain plot of voltage data for channel n See Section 2 3 for further details on PLTD structures tNorm 77 A structure of type PLTD which contains the single ended time domain plot of the positive channel voltage information for channel n See Section 2 3 for further details on PLTD structures 90 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES
285. ult values NOTE rdataJit tdcom and all of the DCOM substructures including tparm are also set to defaults by this command RAND rdataJit tDcom tParm 1ChanNum 1 Set channel number to 1 rdataJit tDcom tParm 1SamCnt 500 Capture 500 measurements per pass rdataJit tDcom dCornFrq 637000 Set Corner Frequency to 637kHz rdataJit 1Coun RAND AUTO Set TailFit count to aotomatic mode rdataJit 1Pcnt RAND PCNT10 Set target deviation maximum to 10 FCNL RqstPkt ApiDevld amp rdataJit WIND_RAND execute the measurement FCNL RqstAll ApiDevId amp rdataJit WIND RAND get plot data Print Total Jitter Estimate If rdataJit lGood gt 0 FCNL ClrRand amp rdataJit printf nTJ Sd n rdataJit dTjit deallocate the structure OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 67 2 24 FIBRE CHANNEL COMPLIANCE TOOL The Fibre Channel Compliance Tool utilizes the Datacom Known Pattern with Marker Tool for the measurements In addition to the data signal to be analyzed this tool requires a pattern marker to be connected to the Arm Channel If your SIA 3000 is equipped with the PM 50 option the marker signal will be generated on the card and no additional input signals are required for making a measurement The Marker signal has an edge relative to the same bit of the pattern each time the marker occurs Since no bit clock is used analysis of jitt
286. ument and can normally be left alone However in the presence of large amounts of jitter it may be necessary to tweak this value slightly The offset is entered as a percentage of UI anda value in the range of 100 is valid Valid Entries 100 to 100 Default 0 IGood Flag indicates valid output data in structure IRiseCnt Number of hits in rising edge data IFaliCnt Number of hits in falling edge data dDataMin Minimum value relative to clock edge dDataMax Maximum value relative to clock edge dDataSig 1 Sigma of all values relative to clock dAvgSkew Average of all values relative to clock dUnitInt Measured Unit Interval this is based on the clock tRise Structure of type PLTD which contains all of the plot information to generate a Histogram of rising edge data to next reference clock measurements See Section 2 3 for details of the PLTD structure and its elements tFall Structure of type PLTD which contains all of the plot information to generate a Histogram of falling edge data to next reference clock measurements See Section 2 3 for details of the PLTD structure and its elements tRiseProb Structure of type PLTD which contains all of the plot information to generate a probability histogram of rising edge data to next reference clock measurements The amplitude of each point in the probability histogram is normalized to the probability of a given measurement occurring as opposed to the total nu
287. upplied in the PARM structure INPUTS ApiDevid Integer containing the API Device ID of the device This value can be from 1 to 31 tParm A pointer to the PARM structure OUTPUTS Returns SIA SUCCESS upon successful completion or a specific error code negative value indicating what type of error occurred OWAVECREST CORPORATION 2005 SECTION 3 GENERAL COMMAND REFERENCE 49 3 3 PATTERN AND PM50 FUNCTIONS The following functions are related to configuration of patterns The first function FCNL_ PtnName will set the pattern file name within a measurement window structure of any tool that requires it All other functions are related to the configuration of a PM5O0 to generate a pattern marker long __stdcall FCNL_PtnName char sPtnName char name This function is used to load the pattern file name into the required measurement structure This function is included to assist when programming in Microsoft Visual Basic When programming in C it is best to use a sprintf command to write a character string into the structure element associated with the pattern name INPUTS sPtnName Location where pattern name will be updated Memory needs to be allocated by the caller name Name of pattern file to load into measurement structure OUTPUTS Returns SIA_SUCCESS if operation is successful or a negative value to indicate error Error codes are defined in Appendix B EXAMPLE memset amp dcom 0 sizeof DCOM allocate memo
288. ure as an input long __stdcall FCNL_RqstPkt long ApiDevId void pData long nType Use this function to perform data acquisitions with a particular tool Histogram dataCOM etc Information on how to acquire the data is drawn from the tool structure and statistical output data resulting from the acquisition is returned in the tool structure Acquisition functions may be called repeatedly with the same tool structure When doing so the output results contained within the structure are overwritten and any previously allocated dynamic memory is re utilized Each measurement window structure is defined in Section 3 3 As shown in the example a measurement window structure is allocated in memory then modified for the given measurement and passed to the command for measurement execution The results are stored in the measurement window structure that was used by the FCNL_RqstPkt command To retrieve the structure s plot data use FCNL_RqstAll INPUTS ApiDevid Contains the API Device ID of the device This value can be from 1 to 31 pData Pointer to a particular tool structure like HIST DCOM etc to hold the input and output values nType Flag specifying the type of the request such as WIND_HIST WIND _JITT etc as described in section 3 1 in the column Tool Type OUTPUTS Returns SIA_SUCCESS upon successful completion or a specific error code negative value indicating what type of error occurred EXAMPLE memset amp hist
289. ure of type PLTD which contains all of the time values at which measurements were taken Use this structure in conjunction with tMini tMaxi tSdev said structures as a function of time details of the PLTD structure and its elements tPeak tMean to plot See Section 2 3 for tSdev Structure of type PLTD which contains all of the plot information to generate a diagram of 1 Sigma values of a given burst versus iteration number Use this in PLTD structure in conjunction with the structure time to generate a Maximum meas tPeak u the PLTD structure and its elements c structure and its elements rement versus time plot See Section 2 3 for details of S ture of type PLTD which contains all of the plot i mation to generate a diagram of peak to peak maximum measurement minimum measurement of a given burst versus i w v iteration number Use this in PLTD structure in conjunction ith the structure tlime to generate a Maximum measurement ersus time plot See Section 2 3 for details of the PLTD dSumm dTyme dSpan These values are all used internally DO NOT ALTER void _ stdcall FCNL DefTser TSER tser E This function is used to fill the tser structure for the Time Series tool with reasonable default values It is recommended that this function be called initially even if parameters within the structure are to be adjusted manually and may be called repeatedly to
290. urns SIA_SUCCESS upon completion or a negative value to indicate error long __stdcall FCNL_DefPathDutDeskew long path double value Use this function to set the external deskew value for the DUT path indicated INPUTS path Number of the path being defined This value can be from 0 to 511 value DUT Deskew value for this path OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error long __stdcall FCNL_DefPathFixDeskew long path double value Use this function to set the external deskew value for the fixture path indicated INPUTS path Number of the path being defined This value can be from 0 to 511 value Fixture Deskew value for this path OUTPUTS Returns SIA_SUCCESS upon completion or a negative value to indicate error 156 SECTION 3 GENERAL COMMAND REFERENCE OWAVECREST CORPORATION 2005 long __stdcall FCNL_GetPathDevName long path char DevName Use this function to retrieve the device name for the path indicated The path must have been defined previously using FCNL_DefPathMap INPUTS path Number of the path being defined This value can be from 0 to 511 DevName A pointer to an ASCII string containing a device name OUTPUTS Returns SI A_ SUCCESS upon completion or a negative value to indicate error long __stdcall FCNL_GetPathDevType long path long DevType Use this function to retrieve the device type for the path indicated The path must have been de
291. use for padding 0 5 4 Hz 100 0 Hz 10 0 Alpha factor when using Kaiser Bessel window 8 0 OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 2 11 QTYS STRUCTURE 20 QTYS is an output structure used to return scope results typedef struct double dMaxVolts double dMinVolts double dAvgVolts double dPkPkVolt double dRmsVolts double dTopVolts double dBtmVolts double dMidVolts double dAmplVolt double dOvrShoot double dUndShoot double dMaskFail double dMaskRgnl double dMaskRgn2 double dMaskRgn3 double dMaskTotl MEAS mRiseTime MEAS mFallTime OTYS dMaxVolts Vmax in Volts dMinVolts Vmin in Volts dAvgVolts Vavg in Volts dPkPkVolt Vpk pk Vmax Vmin in Volts dRmsVolts Vrms in Volts dTopVolts Vtop in Volts flat top dBtmVolts Vbase in Volts flat base dMidVolts Vmid Vtop Vbase 2 in Volts dAmplVolt Vtop Vbase in Volts dOvrShoot Vovershoot in Volts dUndShoot Vundershoot in Volts dMaskFail Total Mask violations dMaskRgni Mask Violations in Region 1 dMaskRgn2 Mask Violations in Region 2 dMaskRgn3 Mask Violations in Region 3 dMaskTotl Total Mask hits both In and Outside the Mask mRiseTime Structure holding Risetime information mFallTime Structure holding Falltime information SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 2 12 MEAS STRUCTURE MEAS is an
292. vious Idle Mode measurement results and force a new Idle measurement to be made using the command PCIM IDLE Before the common mode idle voltages are applied once again Default 0 Attenuation factor in dB this is provided to allow the results to be scaled to compensate for external attenuation from sources such as probes Default 0 Datacom With Bitclock and Marker Tool which specifies most of the input and output parameters necessary for a data signal analysis The user will need to review all of the default parameters of the Datacom With Bitclock and Marker Tool and decide which to change Flag indicates valid data in structure E w Pk pk differential voltage De emphaisis voltage ratio Eye opening at Bit Error rate 10e 12 Median to max jitter based on 1 million samples Eye opening at Bit Error rate 10e 6 Vpp for Transition Eye Vpp for De Emphasis Eye dVcommonAc V x cm acp dVcommonDc v x cm dc dVcmDcActv dVcmidleDc dVcmDcLine dVcmDcDpls dVcmDcDmin dVIdleDiff qNorm qComp tNrmScop tCmpScop V x cm dc active idle delta V x cm idle dc V x cm dc 1line delta V x cm dc d V x cm dc d V x idle diffp Normal channel quantities Complimentary channel quantities Normal channel voltage data Complimentary channel voltage data bTranEye TranRsv bDeemEye IDeemRsv Used internally DO NOT ALTER E OWAVECREST CORPORATION 2005 SECTION
293. y information pertaining to dynamic memory allocation is cleaned out prior to using the structure tdig Pointer to a TDIG structure Memory needs to be allocated by the caller OUTPUTS None SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WAVECREST CORPORATION 2005 void __stdcall FCNL ClrTdig TDIG tdig This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the tdig structure INPUTS tdig Pointer to a TDIG structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE define TRUE 1 static TDIG TimDig declare timDig to be a structure of type TDIG memset amp TimDig 0 sizeof TDIG clear the memory for timDig structure FCNL_ DefTdig amp TimDig set timDig structure to default values NOTE timDig tparm amp timDig tFfts are also set to defaults by this command TimDig tParm 1ChanNum 1 Set channel number to 1 TimDig tparm 1StrtCnt 1 Measure from 1st rising edge TimDig tParm 1StopCnt 10000 to 10 000th rising edge for each meas TimDig tParm 1SampCnt 100000 capture 100 000 measurements per pass TimDig 1FftAvgs 3 Perform 23 passes or 8 total passes with which to average data in FFT FCNL RqstPkt ApiDevId amp TimDig WIND _TDIG execute the measurement FCNL RqstAll ApiDevId amp TimDig WIND _TDIG get plot data FCNL_ClrTdig amp TimDig deallocate the structure
294. y domain of 1st derivative mf PLTD tSigm Contains the 1 Sigma plot array E PLTD tPeak Contains the max min plot array PLTD tMini Contains the Minimum plot array PLTD tMaxi Contains the Maximum plot array a7 double dSigmAvg Average 1 Sigma value E double dSigmMin Minimum 1 Sigma value Ef double dSigmMax Maximum 1 Sigma value is double dTimePos Maximum increase between time values double dTimeNeg Maximum decrease between time values long 1TimePosLoc Index to max increase between values long 1TimeNegLoc Index to max decrease between values 57 double dDervPos Maximum increase between lst deriv s a double dDervNeg Maximum decrease between lst deriv s long lDervPosLoc Index to max incr between lst deriv s long 1DervNegLoc Index to max decr between 1st deriv s double dFreq Carrier frequency e FUNC OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 83 84 tParm tFfts lIncStrt IMaxStrt lAnIMode lAutoFix 1SpanCnt IDataPts IGood tTime tDerv tFftT A structure of type PARM that contains acquisition parameter The PARM structure is discussed in full detail in Section 2 4 A structure of type FFTS for the FFT See Section structures Resolution of successiv that contains the setup parameters 2 10 for further details on FFTS defines the number edges measurements Increase s
295. y error messages or a SI A_ SUCCESS if measurement was completed successfully If the program is to be done in a production environment some attention needs to be paid to the memory handling In step 1 we allocated memory for the structure If this is done repeatedly without clearing the memory this will result in a memory overflow error during run time This can be avoided by either moving the memory declarations to a section of the program that is executed only once Be sure to execute an appropriate FCNL_C1rxxxx command when the structure is no longer needed This only needs to be done once at the end of the program Alternatively memory can be allocated and cleared on a per run basis although this will have a huge impact on test time OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 9 2 2 MEASUREMENT COMMANDS There are three basic commands used to execute a measurement FCNL_ RqstPkt FCNL RqstAll and FCNL MultPkt The FCNL RqstPkt command is used to perform a measurement where only the statistical result is desired The FCNL_RqstA11 command is used to perform a measurement where the plot data is desired The FCNL_MultPkt command is used when the same measurement is to be executed on multiple channels Again the process is to define the measurement window structure then pass it to one of these three commands for measurement execution Each of these three commands requires the device ID and the window struct
296. y needs to be allocated by the caller OUTPUTS None OWAVECREST CORPORATION 2005 SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES 85 86 void _ stdcall FCNL ClrFunc FUNC func This function frees any dynamic memory that may have been allocated during previous data acquisitions and clears out the func structure INPUTS func Pointer to a FUNC structure Memory needs to be allocated by the caller OUTPUTS None EXAMPLE define TRUE 1 static FUNC funcAnal memset amp funcAnal 0 sizeof FUNC FCNL DefFunc amp funcAnal 1 500 funcAnal tparm 1ChanNum funcAnal tparm lSampCnt funcAnal lIncStrt Ly funcAnal 1MaxStrt 1000 FCNL RqstPkt ApiDevId amp funcAnal WIND FUNC FCNL RqstAll ApiDevId amp funcAnal WIND FUNC FCNL_ClrFunc amp funcAnal declare funcAnal to be a structure of type FUNC clear the memory for funcAnal structure set funcAnal structure to default values NOTE funcAnal tparm funcAnal tFfts are also set to defaults by this command perform measurement on CH1 measure 500 different samples per offset from trigger set increment between successive period measurements to 1 Capture all period measurements after the trigger up to and including the period 1000 cycles after the trigger execute the measurement get plot data deallocate the structure SECTION 2 MEASUREMENT COMMANDS AND STRUCTURES WA
Download Pdf Manuals
Related Search
Related Contents
Multimètre analogique - GMC SigmaLink Workbench User Guide Afficher les expositions sous forme de liste User Manual ITA-1910 施工説明書 ANEXO No. 01 CARACTERÌSTICAS TÉCNICAS UNIFORMES 取扱説明書(Xp, Vista, 7 32bit) Manual Ford Focus Exe Copyright © All rights reserved.
Failed to retrieve file