Byte Swapping - Keysight Technologies X-Series Programming Manual

Signal generators
Hide thumbs Also See for X-Series:
Table of Contents

Advertisement

Creating and Downloading Waveform Files
Understanding Waveform Data
For I/Q data downloads, Keysight signal generators require big-endian
order.
For each I/Q data point, the signal generator uses four bytes (two integer
values), two bytes for the I point and two bytes for the Q point.
The byte order, little-endian or big-endian, depends on the type of processor
used with your development platform. Intel© processors and its clones use
little endian. Sun™ and Motorola processors use big endian. The Apple
PowerPC processor, while big-endian oriented, also supports the little-endian
order. Always refer to the processor's manufacturer to determine the order they
use for bytes and if they support both, to understand how to ensure that you
are using the correct byte order.
Development platforms include any product that creates and saves waveform
data to a file. This includes Keysight Technologies Advanced Design System
EDA software, C++, MATLAB, and so forth.
The byte order describes how the system processor stores integer values as
binary data in memory. If you output data from a little-endian system to a text
file (ASCII text), the values are the same as viewed from a big endian system.
The order only becomes important when you use the data in binary format, as
is done when downloading data to the signal generator.

Byte Swapping

While the processor for the development platform determines the byte order,
the recipient of the data may require the bytes in the reverse order. In this
situation, you must reverse the byte order before downloading the data. This is
commonly referred to as byte swapping. You can swap bytes either
programmatically or by using the Signal Studio Toolkit 2 software. For the
signal generator, byte swapping is the method to change the byte order of little
endian to big endian. For more information on little endian and big endian
order, see
The following figure shows the concept of byte swapping for the signal
generator. Remember that we can represent data in hex format (4 bits per hex
value), so each byte (8 bits) in the figure shows two example hex values.
Little Endian
Big Endian
208
"Little Endian and Big Endian (Byte Order)" on page
0
1
2
3
E9 B7 53
2A
53
B7
2A
E9
0
1
2
3
I
Q
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
16–bit integer values (2 bytes = 1 integer value)
I data = bytes 0 and 1
Q data = bytes 2 and 3
207.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents