Download X-Series Signal Generators Programming Guide

Transcript
Creating and Downloading Waveform Files
Understanding Waveform Data
2’s Complement Data Format
The signal generator requires signed values for the input data. For binary data,
two’s complement is a way to represent positive and negative values. The most
significant bit (MSB) determines the sign.
— 0 equals a positive value (01011011 = 91 decimal)
— 1 equals a negative value (10100101 = –91 decimal)
Like decimal values, if you sum the binary positive and negative values, you get
zero. The one difference with binary values is that you have a carry, which is
ignored. The following shows how to calculate the two’s complement using
16–bits. The process is the same for both positive and negative values.
Convert the decimal value to binary.
23710 = 01011100 10011110
Notice that 15 bits (0–14) determine the value and bit 16 (MSB) indicates a positive value.
Invert the bits (1 becomes 0 and 0 becomes 1).
10100011 01100001
Add one to the inverted bits. Adding one makes it a two’s complement of the original binary value.
10100011 01100001
+ 00000000 00000001
10100011 01100010
The MSB of the resultant is one, indicating a negative value (–23710).
Test the results by summing the binary positive and negative values; when correct, they produce zero.
01011100 10011110
+ 10100011 01100010
00000000 00000000
I and Q Interleaving
When you create the waveform data, the I and Q data points typically reside in
separate arrays or files. The signal generator requires a single I/Q file for
waveform data playback. The process of interleaving creates a single array with
alternating I and Q data points, with the Q data following the I data. This array
is then downloaded to the signal generator as a binary file. The interleaved file
comprises the waveform data points where each set of data points, one I data
point and one Q data point, represents one I/Q waveform point.
214
Keysight EXG and MXG X-Series Signal Generators Programming Guide