Sei sulla pagina 1di 3

Using FPGA to Implement a N-channel Arbitrary Waveform Generator

with Various Add-on Functions

Jen-Wei Hsieh, Guo-Ruey Tsai, Min-Chum Lin


Deparfmenf ofEIecfronic Engineering, KunShan University of Technology
949, Tar-wan Rd., Yun-Kan City, 710 Taiwan, R.O.C.
nkif@ms9.url. coin.hu

Abstract desired functions with smaller memory table size. We


can implement all the necessary digital logic circuits
This paper is a prototype design example to and the look-up memory in the same FPGA chip so
demonstrate the mothod to implement a that a better performance can he acheved by avoiding
PCFPGA-based n-channel arbitrary waveform interchip connections[2][3]. This paper will propose a
generatoflA W 9 with add-on functions. Any full FMiA-based AWG in hardware. To generate the
arbitrary waveforms described by mathematical required analog signals, commercial d i g i t a h -
equations or piecouise-tinear functions from the PC analog converters(DAC) can he arbitrarily chosen and
plarform can be generated by FPGADDS technique. interfaced. Low pass filters(LPF) are required to filter
Wth USB interface, we can provide flerible out high frequency noise.
n-channel waveform outputs. Add-on functions can
be added by implementing specifEd control codes. Here, we propose a low-cost, flexible approach to a
Adopting SOMHz clock frequency and 32-b phase PC-based n-channel AWG At first, we utilize
accumulator word length, we have a O.OIIMHz friendly PC platform to edit arbitrary waveforms
frequency resolution. described by specfied mathematical equations or
piecewiselinear functions. Xilinx XC2S200 FPGA
1. Introduction c h p provides 56k-b reconfigurable block SRAh4
which can be programmable to tit ROM size needed
Dmct Digital Synthesizer (DDS) is the most by arbitrary waveforms [4]. The standard USB

-
popular technique to synthesize AC signals for interface makes a plug-and-play n-channel signals
instrumentation, measurement incentive, and digital output possible. Integrating FC, USB interface, FPGA
communications[l]. Generating Synthesized and DACLPF, we canhuils up a n-channel AWG
waveforms by DDS technique have the following
benefits: high frequency resolution, precise frequency 2. System Architecture
control, and low complexity. Fig.1 shows the
simplified DDS block diagram [l]. The instrument includes a PC platform, USB
interface, FPGA waveform synthesizer, and DACLPF.
Fig.2 shows the instrument archtecture used in this
paper. The first part, the PC platform, is responsible
clock for arbitrary function waveform editing, previewing,
encoding, look-up data downloading, and the d i n g
analog and decoding of USB commands. The multiple
converter operation windows and GUI application programs are
coded by Visual Basic language.
Fig. 1 Simpliiied block diagram a f t h e
direct digital synthesizer

Current FPGAs have rch on-chip S W - b l o c k


RAM and distributed RAM. Utilizing conventional
fully table-lookup algorithm for DDS, we need not
generate bath sine and cosine functions and can realize

- 296
shill
satisfied with the waveform, he can directly download
and output the waveform. Otherwise, he can return to
the preview window and re-entq the equation again.
chPn
Most specified and commonly used waveforms, such
as AM, FM, ASK, FSK, PSK and others, can be edited
... and stored into the waveform banks in advance. You
lOdun lbkW
can choose anyone you like from the waveform banks,
and freely output to any desired channel. The
Fig. 2 The system architecture of the n-channel instrument also provide piecewise linear function
arbitrary waveform generator.
output with ten data points periodically. The number
The second part, USB controlleS will handle the of the data points can be increased as you wish.
message interchange between PC platform and FPGA Choosing FPGA with more larger on-chip SFL4M for
chip, The Cypress EZ-USB controller is utilized to look-up table usage, we can flexibly expand the output
communicate PC with FPGA. It provides some DLL channel numbers or improve the waveform resolution
files which can he called and linked by Usual Basic, dependent of your requirement. With the
Visual C languages and/or LabVIEW programs in the programmability in the PC platform, we can output the
PC platform, and simplify the design for both message waveforms to individual channel independently, or
interchange and transmission control of GUI windows. output a mixed waveform which is a linear
Exce t the parallel interface, we also can use the SPI combination among several other channels.
P
or 1 C techniques to communicate between USB Furthermore, we can produce a s r i e s of =channel
controller and FPGA to save the pins resource of the waveforms which show some group-related functions
FPGA. for special application purposes. The standard USB
interface enables an up-to 12khannels expandability
The k r d part is FPGA function waveform aflerre-configuring the FPGA. Fig.3 shows the typical
synthesizer. We adopt Xilinx SpartanIl F'PGA output results of the instrument Fig.4 shows two
XC2S2OOPQ208 which affords on-cbip hue single clear frequency spectrums for lKHz sinusoidal
port block synchronous RAM. The total available waveforms produced by k s instrument and Agilent
memory size is 56k-h. This part dominates nkhannels 33120A signal generator individually. We have the
arbitrary function waveform synthesis. The FPGA chip nearly same waveform quality.
is divided into main four parts: hand-shaking
controller between USB and FPGA, SRAM(h1ock
RAM), SRAM controller and remaining control logic.
The block RAM is utilized for both built-in and
downloadable look-up tables. The built-in lookup table
can be reserved for specified waveforms output
directly without PC or built-ir-self-test purpose for the
instrument itself. Togethcr with n DACs, we can
re-configure the SRAM resources into n p a t s for
n-channel analog signal outputs. In this case, we have
up to 56 channel outputs using Ik-b per charmel. On
the PC platform, you can download each channel
waveform one by one. Adopting 50MHz clock Fig.3 Typical output waveforms displayed
frequency and 32-h phase accumulator word length, by Agilent 54622D oscilloscope.
we have a 0.01 164Hz frequency resolution[5].

The final part includes %bit D A G from Analog


Device. Without any low-pass kilter, we can generate
arbitrary waveforms with wideband frequency. If we
distribute a 256-word memory depth per channel
output, a maximum 28 output channels can he
achieved.

3. System performance
After integrating all the interfacing software,
f m w a r e and hardware, the instrument can afford
typical fundamental waveforms output, such as
sinusoidal, square and triangle functions. We can edit
any mathematical equations in the edit window. The
(a) lKHz sinusoidal spectrum produced
PC platform processes the function calculation, and by Agilent 33120A.
previews it on the graphic window. If the user is

-297-
code can directly generate the designed FSK signal
waveform by pure FPGA.

4. Conclusion
Here we have proposed a vety lowcost AWG
composed of a PC platform, USB interface controller,
FPGA function synthesizer and external DACILPFs.
Arbitrary waveforms produced by any mathematical
equations or piece-wise linear functions can be sent to
n-channel outputs. The USBs plug-and-play feature
and reconfigurability of the FPGA chip enable the
output channel numbers flexibility. The waveform
outputs on the n channels can be mutually independent,
or functionally-related for specific grouping testing
application.

5. Reference
(b)lKHz sinusoidal spectrum produced
by this instrument. [I]. J. Tiemey, C.M. Rad- and B. Gold “A digital
frequency synthesizer,” IEEE Transaction on Audio and
Electroacoustics,~01.19,pp48-57, Mar., 1971.
Fig.4 Spectrum comparison between this
instrument and Agilent simal generator. [2]. M. Cummings, S. Hmyama, “FPOA in the sofhvare
The spectrum is displayed by Agilent 5462233. radio,” IEEE Communications Magzine, pp 108-112, Feb.,
1999.
The instrument can provide more advanced
waveforms generation. Taking a custommade FSK [3]. C. Dick, F.J. Hanis. “Configurable logjc for digital
signal generator as an example, you can input or edit a communications: Some signal processing perspectives,”
modulation bitstream on the PC-platform, and IEEE Communications Magzine, Aug., 1999.
download it to SRAM in FPGA chip. Processed by a
designed FSK control code, we can combine both the [4].Xilinx Inc., “The programmable logic data book,”
bitstream channel and sine wave channel to generate 2002.
the desired FSK signal. Fig.5 shows the custommade
FSK signal generation flow. [SI.Jauko Vankka, Mikko Waltari, Marko Kosunen, Kari
A.I. Halonm,” A DDS with an %-Chip D/A-Convetter,”
FPGA pp.218-237,Vo1.33,No.2,Feb., 1998.

(This study was sponsored by National Science Council,


Administration Yuan,ROC with #NSC91-2215-E006-029)

FSK control

Fig9 shows the custom-made FSK signal


generation flow

The algorithm receives the data from both sine


wave and piecewice linear generators, and respectively
decides the frequency for ‘1’ and ‘0’ which can control
the accumulator phase increment generator and
construct the designed FSK signal. AM-ASK control
code can be coded to generate the designed AM-ASK
signal by the same method. Without the PC platform,
this instnunent also provide an input port to feed into
the modulation bitstream. The extemal FSK control

-298-

Potrebbero piacerti anche