Sunteți pe pagina 1din 6

JOURNAL OF COMPUTING, VOLUME 2, ISSUE 10, OCTOBER 2010, ISSN 2151-9617

HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 103

Design of a LUT-Based Reversible Field


Programmable Gate Array
MD. Masbaul Alam Polash, Shamima Sultana

Abstract— Reversible logic plays an important role in the fields of low power computation, cryptography, communications, digital Signal
processing and the emerging field of quantum computing. On the other hand, Field Programmable Gate Arrays (FPGAs) architecture has a
dramatic effect on the quality of the final device’s speed performance, area efficiency and power consumption. This paper presents a novel
design of reversible architecture of FPGA based on look-up tables (LUT’s). We consider the generalize structure of the basic configurable
logic block (CLB) and the I/O pad of Xilinx FPGA; it includes devices such as LUT’s, sequential elements (flip-flops), multiplexers and control
circuitry. Each of the components which are required to design the reversible FPGA has been improved as compared to the existing ones in
terms of number of gates, garbage outputs and quantum cost.

Index Terms— Reversible logic, Field Programmable Gate Array, Look-up table

——————————  ——————————

1 INTRODUCTION

T HE advancement in higher-level integration and fabrica-


tion process has emerged in better logic circuits and energy
connector  and/or  switching  blocks  [5],  or  a  series  of  horizon‐

tal/vertical routing tracks. 
loss has also been dramatically reduced over the last decades. In this paper we have proposed the reversible implementation 
According to Landauer [1],[2] in logic computation every bit of
of  the  internal  architecture  of  CLB’s  and  I/O  block  of  LUT‐
information loss generates kTln2 joules of heat energy where k
based FPGA. We have proposed different components of CLB’s 
is Boltzmann’s constant of 1.38 × 10-23 J/K and T is the absolute
and  I/O  blocks  of  LUT‐based  FPGA  with  improvement  in 
temperature of the environment. At room temperature the dis-
terms  of  cost  comparing  with  the  existing  designs.  The  differ‐
sipating heat is around 2.9 x 10-21 J. Reversible circuits are fun-
ent components are 4 to 1 reversible MUX, a reversible D‐Latch 
damentally different from traditional irreversible ones. In re-
versible logic, no information is lost, i.e. the circuit that does and a reversible LUT. Our design requires less gates and quan‐

not lose information is reversible. Bennett [3] showed that zero tum  cost  than  designing  with  existing  gates.  Finally  we  have 

energy dissipation would be possible if the network consists of proposed the reversible architecture of CLB’s and I/O block of 

reversible gates only. Thus reversibility will be an essential LUT‐based FPGA, which will result less power dissipation and 


property for the future circuit design. will  improve  the  performance  of  different  application  of 
Field programmable gate arrays (FPGA’s) are widely used for  FPGAs like DSP, prototyping etc. 
rapid  prototyping  and  manufacturing  of  complex  digital  sys‐

tems, such as microprocessors and high‐speed telecommunica‐ 2 DIFFERENT REVERSIBLE GATES


tion chips [4]. Our prototypical FPGA is a two dimensional (2‐ In  this  section,  we  have  presented  the  basic  definitions  of  re‐

D) grid of CLB’s. The CLB’s can be programmed to implement  versible  logic,  and  an  overview  on  few  reversible  gates,  LUT‐

any  combinational  as  well  as  sequential  logic  functions  [4].  based FPGA which are relevant with this research work. 
 
CLB’s  are  separated  by  a  programmable  interconnection  net‐
Definition  2.1.a.  A  Reversible  Gate  is  a  k‐input,  k‐output  (de‐
work;  the  interconnection  consists  of  either  programmable 
noted  by  k  *  k)  circuit  that  produces  a  unique  output  pattern 

[5], [6] for each possible input pattern.  
————————————————
 
 M. M.A. Polash is with the University of Dhaka, Dhaka, Bangladesh.
 Shamima Sultana is with Dhaka City College, Dhaka, Bangladesh. Definition  2.1.b.  Reversible  Gates  are  circuits  in  which  the 

number of outputs is equal to the number of inputs and there is 
JOURNAL OF COMPUTING, VOLUME 2, ISSUE 10, OCTOBER 2010, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 104

a one to one correspondence between the vector of inputs and  Definition 2.5. The input vector, Iv and output vector, Ov for 3 * 

outputs.  It  is  always  desirable  to  realize  a  circuit  with  mini‐ 3 Fredkin gate (FRG) [7] is defined as follows: Iv (A,B,C) = and Ov 

mum number of gates.  = (P =A , Q = A’B  AC, R=AB  A’C). The block diagram for 3 * 

Example2.1.  Let  the  input  vector  be  Iv,  output  vector  Ov  and  3 Fredkin gate is shown in Fig 2.3. 

they are defined as follows, Iv = (Ii, Ii+1, Ii+2 … Ik‐1, Ik,) and Ov =(Oi,   
A
 
  A
Oi+1, Oi+2 … Ok‐1, Ok). For each particular i, there exists the rela‐   FRG 
B A’B  AC
tionship Iv   Ov.   
C AB  A’C
Definition  2.2.  Unwanted  or  unused  output  of  a  reversible   

gate (or circuit) is known as Garbage Output.   Fig 2.3 Block diagram of a 3 * 3 Fredkin gate. 

Example2.2. If we wish to perform Exclusive‐OR between two  Definition 2.6. The input vector, Iv and output vector, Ov for 4 

inputs, we can use the Feynman gate [6], but in that case, one  *4 HNFG gate [10] is defined as follows: Iv = (A, B, C) and Ov = (P

extra  output  will  be  generated  as  well,  which  is  the  garbage  = A, Q = A  B, R = AB  C). The block diagram for 4 * 4 HNFG

output  in  this  regard.  The  garbage  output  of  Feynman  is  gate is shown in Fig 2.4
A A
shown in Fig. 2.1 with *.   
B AC
 

  HNFG 
A FG P=A*   C B
  B Q=A  B
  D BD
     Fig 2.1: Garbage Output 
           Fig 2.4: Block diagram of a 4 * 4 HNF Gate  
 

Definition 2.3. The input vector, Iv and output vector, Ov for 2 *  Definition 2.7. The input vector, Iv and output vector, Ov for 4 

2 Feynman Gate (FG) [7] is defined as follows: Iv = (A, B) and Ov  *4 Sayem gate (SG) [8] is defined as follows: Iv = (A, B, C) and Ov

= (P = A, Q = A   B).  = (P = A, Q = A  B, R = AB  C). The block diagram for 4 * 4

Example  2.3:  The  block  diagram  for  2  *  2  Feynman  gate  is  Sayem gate is shown in Fig 2.5.
  A A
shown in Fig 2.1. Feynman gate is also known as CNOT (Con‐  
B A’B  AC
 

 
trolled  Not)  gate.  The  two  key  reasons  to  use  this  gate  in  re‐   SG 
  C A’B  AC  D
versible circuit are:  
D AB  A’C  D
 
 Make the copy of an input (putting any of the input a 
Fig 2.5 Block diagram of a 4 * 4 Sayem Gate. 
constant 0) 
Definition2.8.  The  input  vector,  Iv  and  output  vector,  Ov  for  4 
 To invert an input bit (putting any of the input a con‐
*4 BSP gate [9] is defined as follows: Iv = (A, B, C) and Ov = (P =
stant 1) 
A, Q = A  B, R = AB  C). The block diagram for 4 * 4 BSP gate is
Definition 2.4. The input vector, Iv and output vector, Ov for 3 * 
shown in Fig 2.6
3 Toffoli gate (TG) [8] is defined as follows: Iv = (A, B, C) and Ov = 
A A
 
(P = A, Q = B, R = AB   C). The block diagram for 3 * 3 Toffoli   

B    BSP  B
gate is shown in Fig 2.2.  C AB  C
  A
 
  A   D ABC  D
TG 
  B B  
C AB  C
  Fig 2.6 Block diagram of a 4 * 4 BSP gate.

Fig 2.2 Block diagram of a 3 * 3 Fredkin gate. 
JOURNAL OF COMPUTING, VOLUME 2, ISSUE 10, OCTOBER 2010, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 105

3 OPTIMIZATION PARAMETERS This  optimized  design  of  2  to  1  MUX  using  Fredkin  gate  pro‐
The main challenge of designing reversible circuits is to optim‐ duces 2 garbage bits. 
ize the different parameters which result the design costly. The    g1
S
most important parameters which have dominant contribution   
A    FRG  AS’  BS
   

in designing reversible circuits are     B        g2
Garbage Output:    
Fig 3.1: A reversible 2 to 1 MUX 
Garbage outputs are the unwanted outputs of a reversible cir‐  
cuit which is described in the previous section.  
4.2 REVERSIBLE 4 TO 1 MUX
Number of gates:  
 
The total number of gates used in a circuit. Minimum possible  We have proposed a 4 to 1 reversible MUX. An optimized de‐
number of gates must be used in a circuit.  sign using BSP gate without any decoder along with less num‐
Quantum Cost:   ber  of  gates  and  garbage  outputs  is  shown  in  Figure  5.2.  A 
This  refers  to  the  cost  of  the  circuit  in  terms  of  the  cost  of  a  comparative result is shown in Table 5.2. The equation of a 4 to 
primitive  gate.  It  is  calculated  knowing  the  number  of  primi‐ 1 MUX can be written as O =I0 S´0S´1 + I1 S0S´1 + I2S´0S1 + I3S0S1. 
tive  reversible  logic  gates  (1*1  or  2*2)  required  to  realize  the  To  generate  the  complement  of  the  input  bits  we  have  used 
circuit.  HNF gate instead of Feymann gate, which has reduced the to‐
Delay:   tal no. of the gates used in the MUX. We can design any 4n to n 
Delay is one of the most important parameter while designing  reversible  MUX  with  our  proposed  design  approach.  We  will 
reversible  circuits.  Many  researchers  suggested  different  defi‐ need n similar levels to design the 4n to n reversible MUX.  
nition of Delay for reversible circuits. According to [10] delay is   
defined as follows: 

The delay of a logic circuit is the maximum number of gates in 

a path from any input line to any output line. This definition is 

based on the following assumptions:  

 Each gate performs computation in one unit time. 

 All  inputs  to  the  circuit  are  available  before  the  com‐

putation begins. 
The delay of the circuit of Fig 2.1 is obviously 1 as it is the only
gate in any path from input to output. In this paper in every
calculation we use the definition of delay of [10].  
Fig 4.1: Design of the proposed 4 to 1 reversible MUX 
4 DESIGN OF DIFFERENT COMPONENTS OF A FPGA TABLE I: COMPARISON OF DIFFERENT 4 TO 1 MUX 

Reversible   No. of  Garbage  Delay 


4.1 REVERSIBLE 2 TO 1 MUX
4 to 1 MUX  gates  outputs 
 
A reversible 2 to 1 MUX has been designed using one Fredkin  This work  7  11  7 

gate. The equation for the 2 to 1 MUX can be written as, Out‐ Existing   9  11  11 

put=S’A+SB, where S is the select bit and A, B works as input.  design[9] 
JOURNAL OF COMPUTING, VOLUME 2, ISSUE 10, OCTOBER 2010, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 106

Lemma 4.1: TABLE II: TRUTH TABLE 


A 4n-to-n MUX can be realized by at least 7n reversible gates.  
A  B  C  D  Output 
Proof:
0  0  0  0  0 
According to Fig 4.1 a 4 to 1 (n=1) MUX can be realized by
0  0  0  1  1 
7(7*1) reversible gates (1 FG, 2 HNFGs and 4 BSP gates). Simi-
0  0  1  0  1 
larly an 8 to 2 (n=2) MUX requires 14 reversible gates and so
0  0  1  1  1 
on. Hence a 4n to n MUX can be realized by at least 7n reversi-
ble gates. 0  1  0  0  0 

0  1  0  1  1 
Lemma 4.2:
A 4n-to-n MUX generates at least 11n garbage outputs. 0  1  1  0  1 

0  1  1  1  1 
Proof:
According to Fig 4.1 a 4 to 1 (n=1) MUX generates 11 garbage 1  0  0  0  0 
outputs. Similarly an 8 to 2 (n=2) MUX generates 22 garbage 1  0  0  1  1 
outputs and so on. Hence a 4n to n MUX generates at least 11n
1  0  1  0  1 
garbage outputs.
1  0  1  1  1 

1  1  0  0  0 
4.3 D-LATCH
1  1  0  1  0 
In  this  paper  we  have  used  the  optimized  reversible  D‐Latch 

proposed  in[11].  The  characteristics  equation  of  a  D‐latch  is  1  1  1  0  0 

Q=DE+E’Q.  This  design  requires  one  Sayem  gate  to  produce  1  1  1  1  0 

the output (Q) of the D‐latch and one Feynmann gate to gener‐  

ate the complement of the output (Q+).   Output=AB. (C+D)…………….eq. (1) 

  The  reversible  circuit  implementation  of  the  above  truth  table 


E g1
 
 
Q in a LUT will be as follows: 
 SG  FG
D Q+  
A
1
0 TG
g2   B
1 TG
 C
Fig 4.2: Proposed design of D-Latch with output Q and Q+  HNFG
0
 D TG
 
11
  1
4.4 LOOK UP TABLE Fig: Implementating of eq. (1) in the LUT. 
A look up table (LUT) is a memory with a one‐bit output that 

essentially implements a truth table where each input combina‐

tion generates a certain logic output. The input combination is 

referred to as an address. The HDL sythe sizer implements an  5 DESIGN OF A PROPOSED REVERSIBLE FPGA


In  this  section  a  reversible  design  of  CLB,  I/O  pad  of  an  LUT 
AND gate or other simple logic func tion by programming the 
based  FPGA  is  proposed.  On  the  highest  level,  an  FPGA  con‐
stored elements in a LUT. LUT can be used to implement any 
sists  of  programmable  CLBs,  I/O  pads  and  programmable 
combinational logic. For example, consider the following truth 
routing resources used to interconnect the CLBs.  
table. 
JOURNAL OF COMPUTING, VOLUME 2, ISSUE 10, OCTOBER 2010, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 107

Proof: 

A  reversible  CLB  of  LUT‐based  FPGA  consists  of  a  4  to  1  re‐

versible MUX which requires at least 7 reversible gates accord‐

ing to Lemma 4.1 so gtm>=7, a reversible  latch which requires at 

least  1  reversible  gates[11].  So,  gtd>=1.  So,  as  a  result  the  total 

number of gates for reversible logic block of LUT‐based FPGA 

is gtf >= gtm+ gtd +gtr, where gtm>=7, gtd>=1. 

Theorem 5.2: 
 
Let  gf  be  the  number  of  garbage  outputs  generated  by  a  reversible 
Fig 5.1: Proposed reversible design of I/O pad 
CLB of LUT‐based FPGA, gm be the number of garbage outputs gen‐
The  CLBs  implement  the  combinational  and  sequential  logic 
erated by a reversible 4 to 1 MUX, gd be the number of garbage out‐
functions  the  user  wants  to  implement  in  the  FPGA,  and  the 
puts generated by a reversible Dlatch and gr be the number of garbage 
routing resources interconnect CLBs to implement the desired 
outputs generated by a LUT, then  
function. We have proposed the reversible design for the CLBs 
gf >= gm + gd + gr, where gm>= 11, gd >=2. 
of  LUT  based  FPGA.  Here  the  proposed  design  of  LUT‐based 
Proof: 
FPGA  has  been  realized  using  our  proposed  reversible  MUX, 
A reversible CLB of LUT‐based FPGA consists of a reversible 4 
reversible Dlatch and a reversible LUT.  
to  1  reversible  MUX  which  generates  at  least  11  garbage  bits 

according to Lemma 4.2, So gm>=11 , a reversible D‐latch which 

generates at least 2 garbage bits[11] So, gtd>=2. So, as a result the 

total  number  of  garbage  bits  generated  by  a  reversible  logic 

block of LUT‐based FPGA is  

gf >= gm + gd + gr, where gm>= 11, gd >=2. 

CONCLUSION
  This paper presents a novel design of the LUT based reversible 

Fig 5.2: Proposed reversible design of CLB.  FPGA.  We  have  also  improved  the  sequential  circuits,  which 

The efficiency of the proposed design has already been shown  are used to realize the FPGA. Efficiency of proposed circuits is 

in the previous sections by comparing it’s components with the  clearly  highlighted  by  using  comparison  here.  Moreover,  the 

existing ones.  lower bounds on the number of gates, number of garbage out‐

Theorem 5.1:  puts and until have been established for the proposed FPGA. 

Let gtf be the number of gates required to realize a reversible CLB of 
ACKNOWLEDGMENT
LUT‐based  FPGA,  gtm  be  the  number  of  gates  required  to  realize  a 
Authors would like to thank the University of Dhaka, Dhaka,
reversible 4 to 1MUX, gtd be the number of gates required to realize a 
Bangladesh for supporting the research program. We are grate-
reversible Dlatch, gtr be the number of gates required to realize a LUT  ful to the faculty members of Dhaka City College for their co-
then   operation to complete the research program.
gtf >= gtm+ gtd+ gtr where, gtm>=7, gtd>=1. 
JOURNAL OF COMPUTING, VOLUME 2, ISSUE 10, OCTOBER 2010, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 108

REFERENCES
[1] Keyes R, Landauer R. Minimal Energy Dissipation in Logic. IBM
Journal of Research and Development 1970; 14: 153-7.
[2] Landauer R. Irreversibility and heat generation in the computa-
tional process’s. IBM Journal of Research Development 1961; 5:
183-91.
[3] Bennett C.H. Logical reversibility of computation. IBM Journal of
Research and Development 1973; 17: 525-32.
[4] S. Brown, R. J. Francis, J. Rose, and Z. G. Vranesic, Field Pro-
grammable Gate Arrays. Boston, MA: Kluwer Academic, 1992.
[5] Programmable Gate Array Data Book, Xilinx, Inc., San Jose, CA,
1991.
[6] R. Feynman, Quantum Mechanical Computers, Optical News
1985; 11‐20.
[7] E. Fredkin and E. Toffoli “Conservative Logic”, International
Journal of Theoretical Physics, 1983; 21: 219‐53.
[8] A. Peres. “Reversible Logic and Quantum Computers”, Physical
Review, 1985; 3266‐76.
[9] A.S.M. Sayem,M.M.A. Polash,H.M.H. Babu,”Design of a reversi-
ble logic block of FPGA”, proceedings of silver Jubilee Confe-
rence on Communication Technologies and VLSI design
(CommV’09), VIT University, Vellore, India.Oct. 8‐10, 2009, pp:
501‐502.
[10] A. K. Biswas, M. M. Hasan, A.R. Chowdhury and H. M. H. Babu,
Efficient Algorithms for Implementing Reversible Binary Coded
Decimal Adders, Microelectron. J, 39(12):1693–1703, 2008.
[11] A.S.M. Sayem, Masashi Ueda, “Optimization of reversible se-
quential circuits”, JOURNAL OF COMPUTING, VOLUME 2, IS-
SUE 6, JUNE 2010, ISSN 2151-9617

M.M.A. Polash received his B.Sc. degree in Computer Science


& Engineering from University of Dhaka, Bangladesh in 2009.
He is perusing his M.Sc.in Computer Science & Engineering
from Univesity of Dhaka, Bangladesh. He is currently a faculty
member of Dhaka City college, Dhaka, Bangladesh. He was
awarded IEEE Computer Society best student paper award in
the “ silver Jubilee Conference on Communication Technolo-
gies and VLSI design (CommV’09), VIT University, Vellore,
India.Oct. 8-10, 2009.” His research interest includes reversible
logic design, Low power VLSI, DNA computing and finite lan-
guages.

Shamima Sultana has been acting as a faculty member in CSE


department in Dhaka City College. She obtained her B.Sc and
M.Sc. degree in computer science from National University,
Banglasdesh. She has a conference paper on cryptography in
ICCIT, 2009. Her interest of research includes cryptography, e-
commerce, network security, key distribution protocol, DNA
computing etc.

S-ar putea să vă placă și