Evolutionary Design and FPGA Implementation of Digital Filters
Evolutionary Design and FPGA Implementation of Digital Filters
of Digital Filters
Antonia Azzinia , Matteo Bettonia , Valentino Liberalia ,
Roberto Rossib , and Andrea Tettamanzia
a Dept. of Information Technologies, University of Milano, 26013 Crema, Italy
b Dept. of Electronics, University of Pavia, 27100 Pavia, Italy
ABSTRACT
This paper discusses the use of evolutionary algorithms to design digital circuits. It is shown that evolutionary
design can be fully compliant with the existing design methodologies. Moreover, the evolutionary design is
capable to perform a better exploration of the design space, and therefore it can nd solutions having dierent
features with respect to conventional design. In some cases, evolved circuits can have better performances,
or they can be optimized with respect to dierent parameters. An example on design of a multi-rate digital
lter with reduced power consumption is presented and discussed. FPGA implementation demonstrates that
evolutionary design can lead to both area and power saving with respect to conventional design.
Keywords: digital lters, low-power design, evolutionary design, VLSI CAD tools, FPGA
1. INTRODUCTION
Electronics design automation must cope with technological trend in silicon integration. Nowadays, the possibility
of integrating millions of transistors onto a single silicon chip is demanding for new CAD tools, to bridge the gap
between technology and design. As integration technology enables the development of deep submicron CMOS
circuits for digital signal processing (DSP) in an ever and ever increasing variety of applications, designers have
to face new problems which require new design methodologies and tools.
The increasing gap between technology capability and designer productivity is demanding for new design
methodologies and innovative CAD tools, as in previous stages of the design crisis.1 Following the intro-
duction of electronics design automation tools for physical design (partitioning, placement and routing) and,
more recently, for digital circuit synthesis from behavioral description (hardware description languages), now a
remarkable eort is being spent, aiming at the automatic synthesis starting from functional specications rather
than from behavioral representation.
Therefore, new branches in computer aided design are expected to emerge in the next future: among them,
evolutionary algorithms seem to be very promising, due to their capability to provide solutions to hard design
problems. Evolutionary algorithms are a broad class of optimization methods, built on the key concept of
Darwinian evolution in biology.2 Now bio-inspired electronic design methods are being considered in a variety
of circumstances.3, 4 Evolutionary algorithms for circuit synthesis are a powerful technique, which could provide
innovative solutions to several design problems, also when classical decomposition methods may fail.5
This paper presents an evolutionary approach to the design of digital lters. Starting from frequency specica-
tions, the VHDL code of the digital lter is generated automatically. The proposed method has been successfully
applied to the design of a decimation lter for a analog-to-digital converter. The evolutionary design has
been implemented on a Xilinx FPGA, demonstrating that circuit designed through evolutionary algorithms can
be easily optimized by FPGA tools for synthesis, placement and routing, thus resulting in smaller area and better
timing and power performance.
The paper is organized as follows. Sect. 2 describes the evolutionary design methodology. Sect. 3 illustrates
the proposed representation of digital lters, suitable for the evolutionary algorithm described in Sect. 4. Finally,
Sect. 5 presents a design implementation on FPGA and discusses the advantages of the proposed methodology.
Send correspondence to V.Liberali:
E-mail: liberali@dti.unimi.it, Telephone: +39 0250330071, Address: Department of Information Technologies, University
of Milano, Via Bramante 65, 26013 Crema, Italy
Conventional approach
Filter Specs
Coefficients
Genetic Programming
Behavioral
VHDL domain
Logic synthesis
2. EVOLUTIONARY DESIGN
Evolutionary algorithms have been proven to be able to produce designs which are more ecient than structured
conventional approaches in the design of combinational circuits.6
Genetic approaches have been also applied to the design of sequential circuits, especially for digital lters.
However, in most approaches described in literature, the genetic algorithm is just applied to optimize the coef-
cients of a digital lter obtained in a conventional manner.7, 8 A completely dierent design style consists in
having the whole design performed by an evolutionary algorithm.9 Indeed, a digital lter can be represented as
a sequence of elementary operations, which can easily be encoded to be handled by a genetic algorithm. Such a
representation is closer to the low-level lter structure, and gives us the opportunity to explore the design space
in a more complete way. In particular, it is possible to evaluate directly the power consumption through the
switching activity of digital nodes, therefore aiming at low-power design.
Moreover, the proposed design approach is fully compliant with the well-consolidated digital design method-
ology: the genetic algorithm is used just to produce the synthesizable VHDL code, which is translated into
structural and physical domains by means of other tools commonly used in electronic design automation. Fig. 1
represents a diagram of the digital design tools used for the design of a digital lter. Conventional approach,
illustrated by the dashed line, would consist in the design of an ideal lter (with innite precision coecients),
and then in the approximation with nite word arithmetic. Automatic generation of VHDL code through a
genetic algorithm is more straightforward, and allows the designer to move at a higher design entry level.
0 y(k)
+ + + + +
<<
3
<<
2
x y
+ +
Such a denition guarantees that circuits complying with specications have a larger tness than circuits with
a response outside the frequency mask.
4.2. Selection
Dierent selection strategies have been implemented:
1. an aging rule, which assigns a life expectation to every individual at its birth, according to its ranking:
life expectation linearly decreases from 100 to 1 generation as the ranking goes from best to worst;
2. tness-proportionate selection, whereby each individual has a survival probability equal to its normalized
tness;
3. linear ranking selection with elitism, whereby the best two individuals survive with probability Ps = 1, and
i
the individual of rank i has a probability Ps = 1 2n of surviving, where n is a parameter of the algorithm
aecting the average population size;
4. selection
based on normalized tness and ranking, whereby each individual has a survival probability
Ps = fi ri where fi and ri are the normalized tness and rank;
5. histogram-based selection, whereby the selection aims at a uniform distribution of the tness.
Experimental evidence shows that each selection strategy performs better in a particular stage of the evolution.
In the examples presented below, all strategies have been used in parallel.
Server 1 Server 2 Server 3 Server 4
MPI
socket
user interface
Server 0
The client window, depicted in Fig. 7, shows a number of processes running in parallel on dierent CPUs.
Each process implements the genetic algorithm, using dierent selection rules. The best solution of each process
can be displayed on the user console, as illustrated in Fig. 8.
5. A DESIGN EXAMPLE
The proposed design method has been applied to the design of a multi-stage digital lter to be used for decimation
in a analog-to-digital converter. Table 2 summarizes the specications of the lter. The decimation factor
is 16 and the maximum data rate (at the input) is 80 MHz.
1st stage 2nd stage 3rd stage
(sinc) (sinc equalizer) (generic FIR)
8 16 16 16
bits bits bits bits
@ @ @ @
80 MHz 20 MHz 10 MHz 5 MHz
Figure 10. Block diagram of the first stage used in the filter.
6. CONCLUSION
This paper has described an evolutionary approach to digital design, illustrating how digital lters can be
obtained from scratch by using a genetic algorithm. Genetic encoding of lter primitives has a ne granularity
which is exploited by the evolutionary algorithm during its random search. The encoding is also a straightforward
representation of the time-domain response of the lter, thus allowing a direct evaluation of transition activity of
Table 3. Number of configurable logic blocks required (after placement and routing).
Table 4. Interconnection delay (average value for 10 worst interconnections, after placement and routing).
entity Filter is
port(
y:out std_logic_vector(30 downto 0);
clk16: in std_logic;
clk:in std_logic;
rst:in std_logic;
x:in std_logic_vector(15 downto 0)
);
end entity;
begin
y <= y35;
gene00: ClockDomainInterface_gen generic map(Bits => xlength, FF1 => 0, FFInv => 1, FF2 => 0)
port map(x => x, y => yclock, clk1 => clk16, clk2 => clk, rst => rst);
gene0: init_gen generic map(Bits => xlength)
port map(x => yclock, y => y0, clk => clk, rst => rst);
gene1: adder_gen generic map(Bits_x1 => y0length, Bits_x2 => xlength, Bits_y => y1length)
port map(x1 => y0, x2 => x, y => y1, clk => clk, rst => rst);
gene2: change_s_gen generic map(Bits => y2length)
port map(x => y1, y => y2, clk => clk, rst => rst);
gene3: subtr_gen generic map(Bits_x1 => y2length, Bits_x2 => y1length, Bits_y => y3length)
port map(x1 => y2, x2 => y1, y => y3, clk => clk, rst => rst);
gene4: delay_gen generic map(Bits => y4length)
port map(x => y3, y => y4, clk => clk, rst => rst);
...
gene35: subtr_gen generic map(Bits_x1 => y34length, Bits_x2 => y33length, Bits_y => y35length)
port map(x1 => y34, x2 => y33, y => y35, clk => clk, rst => rst);
end architecture;
100
50
-50
-100
-150
0 0.5 1 1.5 2 2.5 3 3.5
4
x 10
digital blocks, and, hence, of power consumption. The best result produced by the algorithm is automatically
translated into VHDL code, which is directly synthesized into a circuit according to the standard digital design
methodology.
The results obtained with the simulated evolution show that minimization of transition activity leads to a
dramatic reduction of the hardware with respect to the conventional design methodology, while maintaining the
same performance.
Implementation of a decimation lter on a Xilinx FPGA shows a reduction from 43% to 61% in the number
of congurable logic blocks used (the actual gure depending on the specic FPGA device). Area reduction
leads to improvements in both power consumption and circuit speed.
REFERENCES
1. K. Wakabayashi and T. Okamoto, C-based SoC design ow and EDA tools: An ASIC and system vendor
perspective, IEEE Trans. Computer-Aided Design of Integr. Circ. and Syst. 19, pp. 15071522, Dec. 2000.
2. T. Back, Evolutionary Algorithms in Theory and Practice, Oxford University Press, Oxford, UK, 1996.
3. R. Drechsler, Evolutionary Algorithms for VLSI CAD, Kluwer Academic Publishers, Dordrecht, The Nether-
lands, 1998.
4. R. S. Zebulum, M. A. C. Pacheco, and M. M. B. R. Vellasco, Evolutionary Electronics, CRC Press, Boca
Raton, FL, USA, 2002.
5. A. Thompson, P. Layzell, and R. S. Zebulum, Explorations in design space: Unconventional electronics
design through articial evolution, IEEE Trans. Evolutionary Computation 3, pp. 167196, Sept. 1999.
6. J. F. Miller, D. Job, and V. K. Vassilev, Principles in the evolutionary design of digital circuits Part I,
Genetic Programming and Evolvable Machines 1, pp. 735, Apr. 2000.
7. S. P. Harris and E. C. Ifeachor, Automatic design of frequency sampling lters by hybrid genetic algorithm
techniques, IEEE Trans. Signal Processing 46, pp. 33043314, Dec. 1998.
8. A. Lee, M. Ahmadi, G. A. Jullien, R. S. Lashkari, and W. C. Miller, Design of 1-D FIR lters with genetic
algorithm, in Proc. IEEE Int. Symp. on Circ. and Syst. (ISCAS), III, pp. 295298, (Orlando, FL, USA),
1999.
9. M. Erba, R. Rossi, V. Liberali, and A. G. B. Tettamanzi, An evolutionary approach to automatic generation
of VHDL code for low-power digital lters, in Genetic Programming Proc. 4th European Conference
(EuroGP2001), pp. 3650, (Como, Italy), Apr. 2001.
10. L. B. Jackson, Signals, Systems, and Transforms, Addison-Wesley, Reading, MA, USA, 1991.
11. Q. Zhao and Y. Tadokoro, A simple design of FIR lters with power-of-two coecients, IEEE Trans.
Circ. and Syst. 35, pp. 556570, May 1988.
12. P. Pirsch, Architectures for Digital Signal Processing, John Wiley & Sons, Chichester, UK, 1998.
13. J. R. Koza, Genetic Programming: on the Programming of Computers by Means of Natural Selection, The
MIT Press, Cambridge, MA, USA, 1993.
14. J. F. Miller and P. Thomson, Cartesian genetic programming, in Genetic Programming Proc. 3rd
European Conference (EuroGP 2000), R. Poli et al., eds., Lecture Notes in Computer Science 1802, pp. 121
132, Springer-Verlag, (Berlin, Germany), Apr. 2000.
15. C.-Y. Tsui, J. Monteiro, M. Pedram, S. Devadas, A. M. Despain, and B. Lin, Power estimation methods
for sequential logic circuits, IEEE Trans. VLSI Systems 3, pp. 404416, Sept. 1995.
16. M. Pedram, Power minimization in IC design: Principles and applications, ACM Trans. on Design Au-
tomation of Electronic Systems 1, pp. 356, Jan. 1996.
17. P. Pacheco, Parallel Programming with MPI, Morgan Kaufmann Publishers, San Mateo, CA, USA, 1997.
18. M. Snir, S. Otto, S. Huss-Lederman, D. Walker, and J. Dongarra, MPI The Complete Reference: Vol. 1,
The MPI Core, MIT Press, Cambridge, MA, USA, 1998.
19. R. E. Crochiere and L. R. Rabiner, Multirate Digital Signal Processing, Prentice-Hall, Englewood Clis, NJ,
USA, 1983.
20. M. Brambilla, D. Guidi, and V. Liberali, High speed FIR lters for digital decimation, in Proc. XII
Brazilian Symposium on Integrated Circuit Design, pp. 124127, (Natal, Brazil), 1999.
21. A. V. Oppenheim and A. S. Willsky, Signals & Systems (2nd ed.), Prentice-Hall, Upper Saddle River, NJ,
USA, 1997.
22. E. B. Hogenauer, An economical class of digital lters for decimation and interpolation, IEEE Trans.
Acoust., Speech and Sign. Proc. 29, pp. 155162, Apr. 1981.
23. J. C. Candy, Decimation for sigma delta modulation, IEEE Trans. Communications 34, pp. 7276, Jan.
1986.
24. S. Chu and C. S. Burrus, Multirate lters designs using comb lters, IEEE Trans. Circ. and Syst. 31,
pp. 913924, Nov. 1984.
25. The Mathworks, Inc., Signal Processing Toolbox. Natick, MA, USA, 1983.
26. V. Liberali, R. Rossi, and G. Torelli, A multiplierless decimation lter for A/D conversion, in Proc.
Int. Conf. on Electronics, Circuits and Systems (ICECS), pp. 303306, (Dubrovnik, Croatia), Sept. 2002.
27. Xilinx, Inc., San Jose, CA, USA, FPGA Device Families Data Sheets. http://www.xilinx.com.