Combine Multiple Data Files to Optimize INL/DNL Processing
The standard version of this HP system is usually equipped with a 64k maximum memory depth which allows only 65536 data points to be captured with a single test run. The data points that 64k memory captures are not at all adequate for generating accurate representations of INL/DNL graphs. In fact, for INL and DNL graphs, the logic analyzer should typically capture between 256k and 4M data points which are processed through MATLAB or another signal-processing software.
To use the 64k standard memory depth of the data-capture system described above and achieve precise INL/DNL characterization, multiple data records must be captured and combined into one file. If, for instance, 256k data points are required, then four sets of 64k data points must be captured and combined before processing with the MATLAB program (or similar source code) provided in the application note 2085, "Histogram Testing Determines DNL and INL Errors."
To combine multiple data records in one file large enough for INL/DNL processing, execute the following steps.
- Capture 64k data points with the high-speed state card (HP16517A).
- Remove all LA-specific lines within the code file which are not part of the code, and save the file.
- Assign a new variable to the contents of the file.
MATLAB command: a=load('inltest1');
- Capture another 64k data record with the high-speed state card.
- Again, remove the LA-specific lines within the code file which are not part of the code, and save the file.
- Assign another new variable to the contents of the new data file.
MATLAB command: b=load('inltest2');
- Combine both data records (A and B) and assign them to a new variable.
MATLAB command: c=vertcat(a,b);
- If you want to test the size of the combined data record, just type size(c); in MATLAB and you should receive a 132k data record.
- Save this new record as a .TXT or .DAT file, so that MATLAB can process the data for INL/DNL calculation.
MATLAB command: save inldata.txt c -ascii;
- The above command saves the file as an ASCII file in the predefined directory and makes it available to the INL/DNL test routine.
- The above process will work, if all steps were completed in one MATLAB session. This can also be repeated with files that have been previously combined. For that purposeIn that case, just load the file, in which the data is stored, and assign it a new variable.
MATLAB command: d=load('inldata.txt');
- Once this task is completed, a new set of data can be taken and added to the existing data. Just capture another 64k data record and assign its contents to yet another new matrix variable.
MATLAB command: e=load('inltest3');
- Combine the old text file (now assigned to variable d) with the new data in variable e.
MATLAB command: f=vertcat(d,e);
- Follow step 9 to save the new, extended contents of the matrix to an ASCII file.
To close the loop with the INL/DNL test program, simply call up the INL/DNL test routine in MATLAB. Run it, and load the concatenated data set into the program when asked. If you saved the combined data in a .TXT or .DAT file, do not forget to log the data path of the matrix file. When prompted by the program, you will have to provide the exact path and file name to be loaded into test routine. The program also asks for the number of data points (size of your concatenated matrix), the converter resolution, and its mid-code. Make sure that you have this information available before running the INL/DNL test program.
- Application note 283, "INL/DNL Measurements for High-Speed Analog-to-Digital Converters (ADCs)."
- Application note 2085, "Histogram Testing Determines DNL and INL Errors."