smaller sequences, of q bit each, using the same
principle, bit 0 up to bit q-1, bit 1 up to bit q, and so on.
In this manner, the PRGB provides the GA with
many random numbers (values: 0 to 2
- 1) at each
iteration.
2.3 Implementation Parameters
The hardware implementation of the algorithm on
any specific FPGA device requires the user to define
some hardware parameters, such as:
• the size of the population members (n)
• the number of bits of each population
individual
• the size of the immigration population - the
number of the best members (p)
• the size of the PRNG (2k+1)
• the maximum number of generations (gn)
• the precision used in fitness estimation
• the number of bits of the crossover
• the number of bits and the probability of the
mutation
Careful and precise definitions of the above
mentioned parameters will provide us with a flexible
implementation. The above hardware parameters
depend, of course, on the nature of the problem
needing a solution, and are restricted by the specific
FPGA chip characteristics.
2.4 Extended Solution
The presented algorithm, based on a pipelined
system working with “subpopulations” of the entire
populations, can be adapted to any s-stages Genetic
Algorithm (working, for example, with memory and
transfer as separate phases and also with crossover
and mutation as separate phases) by dividing the
initial population to s subpopulations.
The flip-flop array of the PRNG could easily be
expanded if the amount of random numbers supplied
to GA is not enough to make all the necessary
calculations during a single iteration. Also, the
PRNG component can be defined and implemented
by using other algorithms, for example LFSR -
linear feedback shift registers (Nedjah, 2007).
Another option is using a predefined component.
As it is usually the case with genetic algorithm
implementations, there are no guarantees that using
these methods will provide a better solution in the
next generation. A simple comparator unit can be
added to detect and store the best solution found to a
specific point in time, and after gn generations the
user may use this best solution, if a chromosome that
solves the main problem wasn’t found.
3 CONCLUSIONS
The above portrayed method provides a flexible and
compact implementation of a given problem, using a
genetic algorithm and an FPGA device.
The method allows us to work with a large size
population by using a small amount of resources. It
does so by dividing the initial population into
“subpopulations”. The “transfer” step provides the
necessary interconnection between the members of
the entire population.
The presented pipeline organization permits an
implementation of a four stages algorithm. For a five
or more stages algorithm the pipeline must be
reconsidered and adapted to usage as a five or more
stages pipeline.
As it is often the case with genetic algorithm
implementations, the runtime can’t be exactly
calculated. However, it is certain that the time
needed to accomplish a single iteration using a
pipeline procedure is longer that without pipeline,
but a considerable increase of the throughput will be
obtained.
To provide a flexible implementation, some
hardware parameters should be defined prior to the
FPGA implementation. Also, external defined
components (as PRBG) can be used.
REFERENCES
M. Affenzeller A. O., 2009. Genetic Algorithms and
Genetic Programming – Modern Concepts and
Practical Applications, CRC Press, USA.
N. Nedjah, L. M. Mourelle, 2007. An efficient problem-
independent hardware implementation of genetic
algorithms., Neurocomputing 71, p.88-94.
Mao F. So, Angus Wu, 1999. FPGA Implementation of
Four –Step Genetic Search Algorithm., Electronics,
Circuits and Systems, Proc. of ICECS '99, vol.2 p.11
43-1146.
Tatshuito Tachibana A. O., 2006. Flexible Implementation
of Genetic Algorithms on FPGA, Proc. of the
ACM/SIGDA 14th International Symposium on Field
Programmable Gate Arrays, FPGA, USA, February
22-24, 2006, 9 pages
Tiago Carvalho Oliveira, Valfredo Pilla Jr, 2004. An
Implementation of Compact Genetic Algorithm on
FPGA for extrinsic evolvable Hardware, IEEE Tran-
sactions on Evolutionary Computation, p.1143-1146.
Godkin Andrey, Nonel Thirer, 2010. A FPGA
Implementation of Hardware Based Accelerator for a
Genetic Algorithm, Proc. of IEEE 26-th Conv. of
Electrical and Electronics Engineers in Israel, p.578-
580.
A PIPELINED BASED FPGA IMPLEMENTATION OF A GENETIC ALGORITHM
345