beautypg.com

Agilent Technologies N5183A MXG User Manual

Page 227

background image

Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide

217

Creating and Downloading Waveform Files

Creating Waveform Data

21–29

the I and Q data), and interleave the I and Q data.

shift the data pointer right 8 bits to the beginning of the high byte (ivalue >> 8)

AND (boolean) the high I byte with 0xFF to make the high I byte the value to store in the IQ
array—(ivalue >> 8) & 0xFF

AND (boolean) the low I byte with 0xFF (ivalue & 0xFF) to make the low I byte the value to store
in the I/Q array location just after the high byte [index * 4 + 1]

Swap the Q byte order within the same loop. Notice that the I and Q data interleave with each loop
cycle. This is due to the I/Q array shifting by one location for each I and Q operation [index * 4 +
n].

Line

Code Description—Interleaving and Byte Swapping for Little Endian Order

1 0 1 1 0 1 1 1

15 14 13 12 11 10 9

8

Data

Bit Position

Little Endian Order

1 1 1 0 1 0 0 1

7 6 5 4

3

2

1

0

Hex values = E9 B7

Data pointer

Data pointer shifted 8 bits

1 0 1 1 0 1 1 1

15 14 13 12 11 10 9

8

Hex value =B7

1 1 1 1 1 1 1 1

Hex value =FF

1 0 1 1 0 1 1 1

Hex value =B7

1 0 1 1 0 1

1 1

15 14 13 12 11 10 9

8

Data

Bit Position

I Data in I/Q Array after Byte Swap (Big Endian Order)

1 1 1 0 1 0 0 1

7 6 5 4

3

2

1

0

Hex value = B7 E9

1 0 1 1 0 1 1 1

15...................... 8

Data

Bit Position

Interleaved I/Q Array in Big Endian Order

1 1 1 0 1 0 0 1

7.................... 0

1 1 1 0 0 1 0 1

15...................... 8

0 1 1 0 1 0 1 1

7.................... 0

I Data

Q Data

This manual is related to the following products: