You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/224690392

Single chip FPGA based realization of arbitrary waveform generator using


rademacher and walsh functions

Conference Paper · December 2006


DOI: 10.1109/ICET.2006.336022 · Source: IEEE Xplore

CITATIONS READS

8 1,442

2 authors, including:

Syed Manzoor Qasim


Independent Consulting
104 PUBLICATIONS   615 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

EARN project View project

Optimized Hardware Realization of Computationally Intensive Algorithms using Reconfigurable Hardware View project

All content following this page was uploaded by Syed Manzoor Qasim on 01 June 2014.

The user has requested enhancement of the downloaded file.


IEEE—ICET 2006
2nd International Conference on Emerging Technologies
Peshawar, Pakistan 13-14 November 2006

Single Chip FPGA Based Realization of Arbitrary


Waveform Generator using Rademacher and
Walsh Functions
Syed Manzoor Qasim and Shuja Ahmad Abbasi
Department of Electrical Engineering, VLSI Research Lab
King Saud University, Riyadh, Saudi Arabia 11421
{smanzoor, abbasi}@ksu.edu.s

Abstract: Arbitrary waveform generators (AWGs) are signal processing and have wide applications in
becoming increasingly important for test and digital communication, digital image processing,
measurement applications. This paper describes a statistical analysis and waveform generation [3].
new approach for generating arbitrary waveforms
using FPGA and a set of Rademacher and Walsh
Since Walsh functions are binary related,
Functions. Utilizing these orthogonal functions, any they are easy to generate and control using
periodic waveform can be realized. Recent relatively simple hardware and readily lend itself
advancements in Field Programmable Gate Array for real-time waveform generation ideal for the
(FPGA) technology have made waveform generation synthesis of different waveforms.
very easy and cost-effective. For demonstration With the recent advancement in Field
purpose we used a custom defined arbitrary Programmable Gate Array (FPGA) technology,
waveform that is a concatenation of trapezoidal,
sinusoidal and triangular waveforms. Simulation
it is now possible to realize high performance
results for the proposed AWG are presented. Top- Arbitrary Waveform Generator (AWG) in a
down approach has been adopted to realize the single chip. This will drastically reduce the
waveform generator in Spartan-3 FPGA. The system cost and thus avoid the dependency on
maximum clock frequency for this design is 24.944 external function generators to generate arbitrary
MHz with a power consumption of 62 mW. waveforms. These waveforms can be easily
Keywords: Arbitrary Waveform Generation, Field- generated on-chip. Being dynamically recon-
Programmable Gate Array (FPGA), Rademacher, figurable, the same FPGA can be used for
Walsh Functions, VHDL different applications [6].
The objective of this paper is to realize a
1. INTRODUCTION single-chip low cost approach for arbitrary
waveform generation. To achieve this we used
The ability to generate arbitrary waveform is FPGA architecture for high-speed generation of
of importance for many commercial and military arbitrary waveforms. In this paper, we have used
applications. By using arbitrary waveforms, a set of Rademacher and Walsh functions for the
engineers and scientists are able to generate generation of digital arbitrary waveform in
unique waveform signals that are specific to FPGA.
their applications. Most often, arbitrary The rest of the paper is organized as follows.
waveforms are designed to simulate real world Orthogonal functions such as Rademacher and
signals. A number of techniques utilizing both Walsh functions are defined and the methods
analog and digital approaches are available for used for their generation are discussed in section
the generation of arbitrary waveforms. However, 2. Section 3 gives a brief overview of the
digital methods, based on high-level design Spartan-3 FPGA architecture and the top-down
methodology offer better flexibility at the cost of design methodology adopted in this work is
increased complexity. described in section 4. In section 5, techniques
for the generation of arbitrary waveform using
Orthogonal functions such as Rademacher Rademacher-Walsh functions is described.
and Walsh functions are a set of discrete valued Section 6 summarizes the FPGA implementation
functions [1]í[5]. These functions and their results and finally section 7 gives some
transforms are important analytical tools for concluding remarks.

1-4244-0502-5/06/$20.00©2006 IEEE 205


2. GENERATION OF RADEMACHER The same functions generated using
AND WALSH FUNCTIONS MATLAB for the purpose of verification are
shown in Fig.2.
The Rademacher functions constitute an
incomplete and orthogonal set of periodic square
waveforms of amplitude +1 and í1.
Mathematically, kth order Rademacher function
is defined by the relation [4]

I (k+1, x) = sgn {sin (2ʌ2k x)}, k =


(1)
0,1,2,....
where I (0, x) = 1 and
­  1, xt0
sgn x ® (2)
¯ 1 , x0
Fig. 2. First four Rademacher functions generated using
Fig. 1 depicts the first four Rademacher MATLAB
functions.
A simple digital counter circuit is used for the
generation of Rademacher functions.
The Walsh functions form a complete and
orthogonal set of functions of rectangular
waveforms taking only two amplitudes +1 and
í1. We denote the Walsh function by \ n, x
defined on the interval [0,1) such that [5]
\ 0, x 1 , 0 d x 1 (3)
and
N
\ n,x 3>I i 1, x @ ni ^0,1`
ni
, (4)
Fig. 1. First four Rademacher Functions i 0

The Rademacher functions are generated as where the integer n is represented by [5]
follows [4]:
ƒ Let I (0, x) be the function with the N
(5)
value 1 for the entire interval of duration n ¦2 n i
i
T = 1 i.e., I (0, x) = 1. i 0

ƒ To obtain I (1, x), divide the interval Fig. 3 shows the first eight continuous Walsh
functions. All the eight functions take on the
(0,1) in half, and let the value of I (1, x) values {+1,í1}. Every function starts with the
in the first half interval be +1 and in the value +1.
second half of the interval í1.
ƒ To obtain I (2, x), divide each of the The same functions generated using
MATLAB for verification purpose are shown in
intervals (0,1/2) and (1/2,1) in half and
Fig.4. The Walsh functions can be generated by
let the value of the function in the first
many methods [4]. One way to compute the
half of each interval be +1 and in the
Walsh functions are by using Rademacher
second half of the interval í1.
functions. The Walsh functions are generated
The process is repeated until each interval is a using products of the Rademacher functions.
single-pulse element. The Walsh functions are developed as products

206
ƶ (0 ,x )
1
0 x
level logic blocks such as block RAMs
1

1
ƶ (1 ,x ) (BRAMs), 18-bit multipliers, digital clock
0 x
-1
ƶ (2 ,x )
½ 1
managers (DCMs) and even CPUs [6].
1
0 x
½ 1
-1

1
ƶ (3 ,x ) 4. DESIGN FLOW
0 x
½ 1
- 1
1
ƶ (4 ,x ) An FPGA design flow is the process of
0 x
½ 1
-1

1
ƶ (5 ,x )
turning an FPGA design into a correctly timed
0
-1
½ 1
x
bitstream file used to program the FPGA. In
ƶ ( 6 ,x )
1
0 ½ 1
x order to realize any algorithm on an FPGA it
-1

1
ƶ (7 ,x ) must be programmed (configured) first. To
0 x
-1
½ 1
achieve this, a design methodology is adopted.
Fig. 3. First eight continuous Walsh functions Usually, design entry is done using hardware
description language (HDL) such as Very High
Speed Integrated Circuit Hardware Description
Language (VHDL) or Verilog. In this paper, the
design entry is done in VHDL.
The objective is to make the system
description independent of the physical
hardware such that it can be used on other
FPGAs and even on Application Specific
Integrated Circuits (ASICs). Once a design has
been completed it is simulated to verify the
correct operation. A netlist is generated from the
design and is mapped onto the FPGA using
Fig. 4. MATLAB generated First Eight Walsh functions synthesis, place and route and optimizing tools.
of the Rademacher functions, based on the gray Mapping produces a bit-stream file that is used
code conversion of the Walsh function index to program the FPGA [7].
sequence. If we convert the ±1 amplitudes of the 5. GENERATION OF ARBITRARY
Walsh functions to a binary logic {0,1} WAVEFORM USING WALSH
representation with the conversions +1 ĺ “0” FUNCTIONS
and í1 ĺ “1”, then multiplication of
Rademacher functions is equivalent to Generating arbitrary waveforms using Walsh
Exclusive-OR operation. functions consists of three stages:

3. SPARTAN-3 FPGA 1) Generation of the Rademacher functions


ARCHITECTURE 2) Generation of the Walsh functions using
Rademacher functions, and
The Spartan-3 FPGA architecture consists of
an array of Configurable Logic Blocks (CLBs), 3) Adjustment of the coefficients of each
which are the basic elements that can be Walsh function.
programmed to perform various logic functions. Generation of periodic arbitrary waveform
Each CLB is coupled with a programmable involves weighted addition of different Walsh
interconnect switch matrix that connects the functions. The addition of more Walsh functions
CLB to adjacent and nearby CLBs [6]. would produce a smoother approximation of a
Each CLB contains four logic slices, where particular waveform, of course at the cost of
each logic slice usually consists of two four- more computational complexity. The
input Look Up Tables (LUTs), two configurable functionality of the arbitrary waveform
flip-flops, some muxes, and other control logic. generator is written in VHDL and synthesized
In addition to the CLBs and the switch matrices, into a configuration file that is downloaded into
the Spartan-3 FPGA have a number of higher– the Spartan-3 FPGA [6]. This is done using

207
Xilinx ISE 7.1i software. By using a single, For validation of results, MATLAB was
appropriately sized FPGA, digital arbitrary used. Fairly smooth arbitrary waveform was
waveform as defined by f x can be obtained through MATLAB simulation as
synthesized thus avoiding the use of any analog shown in Fig. 6.
to digital converter and hence minimizing the
area and cost of hardware. TABLE 1
Since Walsh functions constitute a complete WALSH FUNCTION COEFFICIENTS

set, any arbitrary function f x can be Walsh coefficients (n = 64)

expressed as follows [2]: A0 0.4591 A23 -0.0669 A46 -0.0023


f A1 0 A24 -0.0214 A47 -0.0040
f x ¦ An \ n, x A2 -0.0083 A25 0.0084 A48 -0.0024
n 0 (6)
A3 -0.0008 A26 0.0083 A49 0

where, An are the coefficients of the expansion A4 0.0166 A27 0.0048 A50 0

and can be obtained by [2] A5 -0.1758 A28 -0.0084 A51 0.0031


A6 0.0008 A29 0.0214 A52 0
1
An ³ f x \ n, x dx
0 (7)
A7
A8
0.0085
0
A30
A31
-0.0048
-0.0081
A53
A54
0.0028
-0.0031
A9 -0.0658 A32 -0.0006 A55 0
The arbitrary waveform defined by (8) is shown A10 -0.0048 A33 -0.0159 A56 0
in fig. 5. A11 -0.0043 A34 -0.0022 A57 0.0013
­ 4.8 x 0 d x  0.125
f x = ° 0.6 0. 125 d x  0.25
A12 0.0658 A35 -0.0009 A58 0.0012
° A13 0 A36 0.0159 A59 0
°° 4.8 x  1.8 0.25 d x  0.375
®
°sin( 4S ( x  0.375) 0.375 d x  0.625 A14 -0.0040 A37 0 A60 -0.0013
°  2.667  4.267 x 0.625 d x  0.8125
(8)
° A15 -0.1369 A38 -0.0012 A61 0
¯°  4.267 x  4.267 0.8125 d x d 1
A16 -0.0006 A39 -0.0333 A62 0
A17 -0.0318 A40 -0.0107 A63 0.0009
The sixty four expansion coefficients required
for the generation of arbitrary waveform as A18 -0.0039 A41 0.0043
defined by (8) are listed in Table 1. Some of the A19 -0.0019 A42 0.0042
coefficients turn out to be zero. A20 0.0318 A43 0.0023

As shown in Table 1, approximations to the A21 0 A44 -0.0043


arbitrary waveform can be obtained by using 64 A22 -0.0022 A45 0.0107
Walsh functions.

Fig. 5. Custom-defined arbitrary waveform Fig. 6. MATLAB generated arbitrary waveform

208
6. FPGA IMPLEMENTATION functions (R1íR6), Walsh functions (W1íW63)
RESULTS and 16-bit digital arbitrary waveforms (P0íP15).
Based on the given architecture, design and As shown in fig. 7, clk is the clock signal,
simulation of the AWG has been performed reset is the reset signal. The estimated
using VHDL. The design is synthesized and power consumption of the architecture
placed and routed into Xilinx Spartan-3 FPGA was obtained with Xilinx XPower
(XC3S200-4ft256) using Xilinx ISE 7.1i [8]. software using a clock frequency of
The hardware resource utilization is reported for 24.944 MHz.
an XC3S200-4ft256 Spartan-3 FPGA device and 7. CONCLUSION
the results are summarized in Table 2. A new technique for high-speed arbitrary
Modelsim is used for both pre-synthesis and waveform generation using FPGA and a set of
post-synthesis simulation. Fig. 7 represents the Rademacher and Walsh functions has been
snapshot of simulation results of Rademacher presented. Rademacher and Walsh are

Fig. 7. Snapshot of Simulation of Rademacher, Walsh and arbitrary waveform.

209
orthogonal functions widely used in engineering The chip was thoroughly tested after
applications such as waveform generation. implementation. The maximum clock frequency
Xilinx spartan-3 (XC3S200-4FT) FPGA chip is obtained after place and route of the design is
used. FPGA implementation results have been 24.944 MHz consuming only 62 mW of power.
presented which shows that the proposed design
is very compact utilizing just 17% of total FPGA
REFERENCES
slices, so there is a possibility of implementing [1] J. L. Walsh, “A closed set of normal orthogonal
more parallel processors on the same FPGA. functions,” Amer. J. of Math, vol. 55, pp. 5-24, 1923.
[2] K. G. Beauchamp, Walsh functions and their
TABLE 2 applications, Academic Press: New York, 1975.
HARDWARE RESOURCE UTILIZATION FOR XC3S200 SPARTAN-3
FPGA [3] H. F. Harmuth, “Applications of Walsh functions in
communications,” IEEE Spectrum, vol.6, pp.82-91,
Number of Slices 340 out of 1,920 17% Nov. 1969.

Number 4 input LUTs [4] J. S. Lee and L. E. Miller, CDMA Systems


540 out of 3,840 14% Engineering Handbook, Artech House: Boston, 1998.
Number of bonded IOBs 87 out of 173 50% [5] B. Golubov, A. Efimov and V. Skvortsov, Walsh
Number of GCLKs 1 out of 8 12% series and transforms: Theory and applications,
Maximum Frequency (After Place and Route) : 24.944 Kluwer Academic Publishers: Dordrecht 1991.
MHz
[6] T. Tuan, S. Kao, A. Rahman, S. Das, and S.
Total estimated power consumption : 62 mW Trimberger, “ A 90 nm low-power FPGA for battery-
powered applications,” in Proc. of 14th ACM/SIGDA
Int. Symp. on FPGAs, Feb. 2006, pp. 3-11.
The proposed design being digital can be [7] J-P. Deschamps, G. J. A. Bioul, and G. D. Sutter,
easily integrated as an IP Core for on-chip Synthesis of Arithmetic Circuits: FPGA, ASIC and
Embedded systems, John Wiley & Sons: New Jersey,
waveform generation. AWG works correctly as 2006.
shown by the simulation results and validated by
MATLAB. [8] ISE 7.1i Manual, Xilinx Inc, 2005.
http://www.xilinx.com

210

View publication stats

You might also like