[IEEE 2006 International Semiconductor Conference - Sinaia, Romania (2006.09.27-2006.09.29)] 2006...
Transcript of [IEEE 2006 International Semiconductor Conference - Sinaia, Romania (2006.09.27-2006.09.29)] 2006...
FPGA IMPLEMENTATIONS OF CELLULAR AUTOMATA FORPSEUDO-RANDOM NUMBER GENERATION
Petre Anghelescu, Emil Sofron, Silviu Ionita, Laurentiu Ionescu
Department of Electronics and Computers, University of PitestiStreet Targu din Vale, No. 1, 110040, Pitesti, Arges, Romania
petre.anghelescugupit.ro, petreangelescugyahoo.com
Abstract- This paper present a hardware implementation ina FPGA circuit of an efficient pseudo-random numbergenerator based on Cellular Automata. We demonstrate inthis paper how microscopic (local) interactions influencethe overall macroscopic (global) behavior of the wholesystem. We highlight the possibility to build the evolutionarysystems on such a simple mathematical model as a CellularAutomata space by introducing the rules of evolution ofindividuals, their interaction, and their robustness tovariations ofthe model. A regular, modular, and cascadablehardware implementation of the generator has beenimplemented, which is efficient in terms of VLSI technology.The design has been specified in VHDL targeted on aXC3S400 based FPGA and verified for functionalcorrectness by software simulation.Keywords: Cellular Automata, FPGA, BIST
1. INTRODUCTION
Pseudo-random number sequences can befound in a large number of applications thatinclude cryptography, communications,computer-based gaming, VLSI (Very LargeScale Integration) chip testing (BIST - Built inSelf Test) and imitating stochastic naturalprocesses. Good pseudorandom numbergenerators are required to provide true source ofrandomness in applications where one has tomodel a physical process or in testing of theVLSI circuits.
In this paper we study the possibility toconstruct a pseudo-random number generatorbased on Cellular Automata (CA) that can beimplemented on a FPGA (Field ProgrammableGate Array) circuit using simple logic blocks andhave a satisfactory performance for BIST,simulation of wireless communication systemsand cryptography, where the smallest detectablebiases are unacceptable.A wide variety of ingenious methods have
been designed to generate random numbers.Most generators are software based and generallyfall into one of these five categories [1]: LinearCongruential Generator, Lagged FibonacciGenerator, Linear Feedback Shift RegisterGenerator (LFSR), Physical devices.1-4244-0109-7/06/$20.00 © 2006 IEEE
In general one considers a sequence of numbersrandom if no general pattern can be discerned, noprediction can be made about it, and nodescription can be found [2]. However, on acomputer, random numbers are generated by thesuccessive iteration of a definite transformation.
2. CELLULAR AUTOMATACONCEPTS
From the days of Von Neumann and StanislavUlam who first proposed the concept of cellularautomata (CA) - cellular spaces [3], to the recentbook of Stephen Wolfram "A New Kind ofScience" [4], the simple structure of CA hasattracted researchers from various disciplines.CA are a particular class of dynamical systems
that enable to described the evolution of acomplex systems with simple rules, without usingpartial differential equations[5].A CA evolves in discrete steps, with the next
value of one site determined by its previous valueand that of a set of sites called the neighbor sites.The extent of the neighborhood can vary,depending among other factors upon thedimensionality of the cellular automaton underconsideration.The state of each cell is updated simultaneously
at discrete time steps, based on the states in itsneighborhood at the preceding time step. Thealgorithm used to compute the next cell state isreferred to as the CA local rule. Usually the samelocal rule is applied to all cells of the CA.We can regard these cellular automata as a
metaphor of a universe whose physics is reducedto some fundamental simple laws.
3. CELLULAR AUTOMATA ASPSEUDO-RANDOM NUMBER
GENERATORSRandom number sequences are generated either
by a deterministic rule on a computer (pseudo-random numbers) or by sampling certain random
371
natural properties (like noise in a room, etc) [1].Recent studies have shown that CA is a
promising technique for generating uniform(pseudo)random numbers. This generator has theadvantage of being highly parallel and thuseasily scalable at relatively very little hardwarecost. S. Wolfram proposed for the first time thepossibility to use cellular automata for pseudo-random number generators [2], [6]. The modelproposed is a uniform binary linear cellularautomaton that works in concordance with therule named 30, rule presented in table 1. Thenext state of a cell i can be 1 or 0 in concordancewith the current state of the cell i and the state ofthe two neighbors i+1, i-i. The interactionneighborhood is a collection of nearby cellswhich the update function interrogates for stateinformation. As the CA evolves, the updatefunction will determine how microscopic (orlocal) interactions influence the overallmacroscopic (or global) behavior of the entiresystem.Hortensius et al. [7], in 1989, described the use
of the CA30 as a random number generator in aVLSI implementation of a two-dimensional Isingcomputer. Hortensius et al., described theapplication of CA-based RNGs to built-in self-test of VLSI chips. By using a hybrid cellularautomata, a combination of CA90 and CA150 atvarious cell sites they were able to generateresults superior to the CA30. The rules 30, 90and 150 are presented in table 1.
Table 1. Rules that update the next state of the cells
Rules 7 6 5 4 3 2 1 0Rules 111 110 101 100 01 010 001 00030 0 0 0 1 1 1 1 090 0 1 0 1 1 0 1 0150 1 0 0 1 0 1 1 0
27 26 25 24 23 22 21 20
As logical expression, the 30 rules can be writtenin the following way:
ai (t + 1) = ai-I (t) @) (ai (t) + aj+j (t)) (1)
The frontier conditions are the following:aN_l (t + 1)= aN-1 (t)® aN (t)aN (t + 1)= aN (t); ao (t + 1) = ao (t) (2)
a, (t + 1) = a, (t) ® ao (t)
The frontier conditions in situation in which thecellular automata is circular - the last row of thecell is neighbor with the first row of the cell - is:
ao (t + 1) = aN (t) ® (ao (t) + a, (t))
aN (t + 1) = aN-1 (t) ® (aN (t) + ao (t))
(3)
4. HARDWARE IMPLEMENTATIONThe pseudo-random number generator cellular
automaton chosen for this study and hardwareimplementation is a hybrid cellular automatonthat combines in some arrangement the rules 90and 150 presented in the table 1. The correct wayto combine the 90 and 150 rules is presented intable 2 [8].
Table 2. Hybrid constructions necessary to achieve acellular automaton with maximal cycle length (2N_ 1)
Length Construction Cycle LengthN4 90 150 90 150 155 150 150 90 90 150 31
6 901509015090 631507 150 150 9015090 127
150 90__
8 150 150 90 150 90 150 90 255~1
As logical expression, the two rules, 90 and150, can be writes in the following way:
ai (t + 1) = ai,I (t) ® aj+j (t) rule 90 (4)
ai (t + 1) = ai-I (t) (S ai (t) @) aj+j (t) rule 150
The frontier conditions are the following:aN (t + 1)= aN(t) = 0 (5)ao (t + 1) = ao (t) = 0
where N is the length of the cellular automaton.To obtain the maximal pseudo-random binarysequence we must find the ordering in which therules, 90 and 150, can be applied, similar to theinvolved in determining the polynomial for amaximal length LFSR. As an example, for 5 cellswe must have the combination presented in table2 or in Fig. 1 of the two rules, 90 and 150, toobtain maximal cycle length (25- 1).
Fig. 1. Hybrid cellular automaton with 5 cells.
Each random number-generating cell i can thenbe connected with i-1, i and i+J other outputcells. One way to connect the random number
372
generating cell is to use the XOR gates and flip- connecting the cells are possible.flop type D as shown in Fig. 2. Other ways of
Fig_<><c_M..2.. Hrwe shMe of a 5_-bit .pseudo-randoXm numbe generaXtor. Th oupt at th boto ca be
8j 1- = = re M}-S4
burn* mS!
Fig. .2. Hardware scheme of a 5-bit pseudo-random number generator. The outputs at the bottom can beconnected to a bus either serially or in parallel (parallel being more efficient in terms of hardware cost),depending on the application for which the pseudo-random number generator is needed.
For this implementation we use the VHDL language and the wave forms obtained arepresented in Fig. 3.
ie. 3... sLl
1g ri z~ 2 1
*~ " t~~~mm.
ioeto.W. i°0
Fig. 3. Wave forms for a 5-bit pseudo-random number generator.
Farther we implement the VHDL resulted codein a FPGA Spartan 3 XC3S400 and on a 7-segments display we see the functioning of thepseudo-random number generator. For this
U1il 4 temporl7are~
butonM buton
ciki fclk PFRESOP. E..S.PRES; 2EPRESIPHRES2SIFRES4l
clkpresO|presi-pres2-pres3-pres4
reason, the finally hardware scheme contains two7-segments decoders and a push button thatenable us to view on display the sequencegenerated at each step, as shown in Fig. 4.
iesireOiesirelOut Iiesire2 out 1(2)
iesire3 out 1(3)* re Iutiito)iesire4 O~
.Ucod in(3 O)
cod 7 out(6 D)
deEod7segDut (3:0O)
IJ3
, 7
cod in(3 O)cod_ 7out(6 0)
-ut i~io30- decod7seg
lldigO(}6 O)
>di .-O
.... I i.............
oAt ii u) out`iL(3)GNp ND GNp
Fig. 4. 5-bit pseudo-random number generator - final scheme.
The numbers presented as wave formsobtained in VHDL, presented in Fig. 3, are
identically with the numbers obtained in C#language across software simulation (Fig. 5). In
this case, as we show in the Fig. 5 and 3, we
obtained the maximal pseudo-random sequences:25 1 = 31. Ifwe continue to increase the numberof the cell of the cellular automaton and applied
373
resl
res2res3res4
m
the rules in concordance with the dates presentedin the table 2, observe that obtain the maximalcycle length 2N_ 1 distinct combination.
Fig. 5. The response of the hybrid cellular automatonwith 5 cells with rules 90 and 150.
The hybrid cellular automaton analysed was
found to be highly efficient, requiring only 1% ofLUTs (look up tables) and 2% of the availableSlices, as shown in table 3.
Table 3. Area utilization of hybrid cellular automatonon FPGA Spartan 3 XC3 S400
4. CONCLUSIONSThis study has tried to demonstrate the
efficiency of the hardware implementation for a
pseudo-random number generator withapplication in cryptography. The methodinvolved was to compare the results obtained bya FPGA implementation of CA with the PCsoftware simulation. A primary encouragingresult was the perfect concordance betweenrandomly generated sequences by hardware on a
FPGA and the software simulation. Generalaccepted expectations were confirmed regardingthe following aspects:- the properties of the pseudo-random binary
sequence generated depend of the initial stateof the cellular automaton and the cell that willbe the output of the generator.
- maximal length of a sequence generateddepends by the length of the cellularautomaton, for example for 5 cells the maximallength is 31 (Fig. 5 and 3).In terms of the hardware efficiency we consider
the valuable results in this work as follows:* the implementation requires small area of
silicon because of the low number of gatesinvolved in cryptography application,
* the presented solution has proved a high speedof information processing in terms of randomnumber generating,
* this approach creates large possibilities toimplement most efficient BIST,The general conclusion of this work is to show
that it is possible to construct evolutionarysystems based on a simple mathematical modelspecific of CA by introducing the localinteraction between cells, local rules, and theirrobustness to variations of the model. Thisimplies that, in the future, we will be able tocreate extraordinary large-scale evolutionarysystems in a fine-grained super parallel machineenvironment by using the very simple algorithms.
References[1] Mustapha Abdulai, "Inexpensive Parallel Random
Number Generator for Configurable Hardware",Summer Undergraduate Program in EngineeringResearch at Berkley (SUPERB), 2003.
[2] S. Wolfram, "Random Sequence Generation by CellularAutomata", Advances in Applied Mathematics, pp 123-169, 1986.
[3] J. Von Neumann, "Theory of Self-ReproducingAutomata", University ofIllinois, Urbana, 1966.
[4] S. Wolfram, "A New Kind ofScience", Wolfram MediaInc, 2002.
[5] Niloy Ganguly, Biplab Sikdar, Andreas Deutsch,Geofrey Canright, Pal Chaudhuri, "A Survey on
Cellular Automata", Project BISON, IST-2001-38923[6] Stephen Wolfram, www.stephenwolfram.com[7] P. D. Hortensius, R. D. McLeod, and H. C. Card:
Parallel number generation for VLSI systems usingcellular automata", IEEE Transactions on Computers,vol. 38, no. 10, pp. 1466-1473, October 1989.
[8] P.D. Hortensius, R.D. McLeod, "Cellular AutomataCircuits for Built-in Self-test", IBM J. RES.DEVELOP., Vol. 34, No.2/3, pp. 389-405, 1990.
374
Logic UtilizationNumber of Slice Flip Flops: 82 out of 7,168
100
Number of 4 input LUTs: 69 out of 7,168100
Logic Distribution82 outof 3,584Number of occupied Slices: 2oo
Total Number 4 input LUTs: 140outof 7,168
Number of GCLKs: 2 out of 8 25%Total equivalent gate count for 1,537
design:Peak Memory Usage: 109 MB