4c Batch Doc (1) (Repaired)
4c Batch Doc (1) (Repaired)
ADDITION
BACHELOR OF TECHNOLOGY
In
ELECTRONICS AND COMMUNICATION ENGINEERING
Submitted by
A.BHAVANA 21S15A0408
SHIVARATHRI VIKRANTH 21S15A0434
AYYANKI SRUJALA 21S15A0429
Mr.N.RAMESH
B. Tech, M. Tech,
Assistant Professor
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING
MALLA REDDY INSTITUTE OF TECHNOLOGY & SCIENCE
(Approved by AICTE New Delhi and Affiliated to JNTUH)
(Accredited by NBA & NAAC with “A” Grade)
An ISO 9001: 2015 Certified Institution
Maisammaguda, Medchal (M), Hyderabad-500100, T. S.
NOVEMBER 2023
DEPARTMENT OF ELECTRONICS & COMMUNICATION
ENGINEERING
MALLA REDDY INSTITUTE OF TECHNOLOGY & SCIENCE
(Approved by AICTE New Delhi and Affiliated to JNTUH)
(Accredited by NBA & NAAC with “A” Grade)
An ISO 9001: 2015 Certified Institution
Maisammaguda, Medchal (M), Hyderabad-500100, T. S.
NOVEMBER 2023
CERTIFICATE
External Examiner
ACKNOWLEDGEMENT
The Mini Project work carried out by our team in the Department of
Electronics and Communication Engineering, Malla Reddy Institute of
Technology and Science, Hyderabad. This work is original and has not
been submitted in part or full for any degree or diploma of any other
university.
A.BHAVANA 21S15A0408
SHIVARATHRI VIKRANTH 21S15A0434
AYYANKI SRUJALA 21S15A0429 _
ii
INDEX
Chapter Page No.
ABSTRACT v
LIST OF FIGURES vi
LIST OF TABLES vii
1. INTRODUCTION 1
1.1 INTRODUCTION 1
1.2 OBJECTIVES 2
1.3 CONTRIBUTIONS 2
2. LITERATURE SURVEY 4
2.1 IRREVERSIBILITY AND HEAT GENERATION IN THE COMPUTING
PROCESS 4
2.2 LOGIVAL IRREVERSIBILITY OF COMPUTATION 4
2.3 A COMPARATIVE STUDY OF REVERSIBLE LOGIC GATES 5
2.4 DESIGN OFA REVERSIBLE ALU BASED ON NOVEL PROGRAMMABLE
REVERSIBLE LOGIC GATE STRUCTURES 5
2.5 DESIGN OF A REVERSIBLE SINGLE PRECISION FLOATING POINT
MULTIPIER BASED ON OPERAND DECOMPOSITION 6
3. EXISTING SYSTEM 7
3.1 LOGIC COMPUTATION 7
3.1.1 TRADITIONAL LOGIC COMPUTATION 7
3.2.1 REVERSIBLE LOGIC COMPUTATION 10
3.2 LOGIC GATES 10
3.2.1 REVERSIBLE GATES 10
3.2.2 NOT GATES 11
3.2.3 CNOT GATES 11
3.2.4 TOFFOLI GATES 12
3.2.5 FREDKIN GATES 13
3.3 COST METRICS IN REVERSINBLE LOGIC 15
3.3.1 GATE COUNT(GC) 15
3.3.2 GARBAGE OUTPUT(GO) 15
iii
3.3.3 CONSTANT INPUT(CI) 16
3.3.4 QUANTUM COST(QC) 16
3.4 FAULT,FAILURES AND ERRORS 17
3.5 FAULT TOLERANCE IN REVERSIBLE LOGIC 18
3.5.1 FAULT DETECTION 18
3.5.2 FAULT LOCATION 18
3.5.3 FAULT RECOVERY 19
3.5.4 FAULT MASKING 19
3.6 BASIC ADDERS 19
4. PROPOSED SYSTEM 21
5. REVERSIBLE MAJORITY VOTER CIRCUITS 26
5.1 FAULT TOLERANT REVERSIBLR CIRCUITS 26
5.1.1 REVERSIBLE MAJORITY VOTER CIRCUITS LITERATURE 27
5.2 PROPOSED REVERSIBLE VOTER CIRCUITS 30
5.2.1 FAULT TOLERANT REVERSIBLE CIRCUIT DESIGN 32
6. SOFTWARE REQUIREMENT 34
6.1 MIGRATING PROJECTS FROM PREVIOUS ISE SOFTWARE
RELEASE 34
6.2 PROPERTIES 34
6.3 IP MODULES 34
6.4 OBSOLUTE SOURCE FILE TYPES 35
6.5 USING ISE EXAMPLE PROJECTS 35
6.6 CREATING A PROJECT 36
6.7 DESIGN PANEL 36
7. RESULTS 39
8. CONCLUSION & FUTURE SCOPE 42
9. APPENDIX 43
10. BIBLIOGRAPHY 45
11. YUKTHI INNOVATION CERTIFICATE
12. PAPER PUBLISHED FROM THIS WORK
iv
ABSTRACT
An exportable application-specific instruction-set elliptic curve cryptography processor based
on redundant signed digit representation is proposed. The processor employs extensive
pipelining techniques for Karatsuba–Of man method to achieve high throughput
multiplication. Furthermore, an efficient modular adder without comparison and a high
through put modular divider, which results in a short data path for maximized frequency, are
implemented. The processor supports the recommended NIST curve P256 and is based on an
extended NIST reduction scheme. The proposed processor performs single point
multiplication employing points in affine coordinates in 2.26 ms and runs at a maximum
frequency of 160 MHz in Xilinx Virtex 5 (XC5VLX110T) field-programmable gate array.
v
LIST OF FIGURES
vi
LIST OF TABLES
vii
CHAPTER 1: INTRODUCTION
1.1 INTRODUCTION
Reversible logic has presented itself as a prominent technology which plays an imperative role
in Quantum Computing. Quantum computing devices theoretically operate at ultrahigh speed and
consume infinitesimally less power. Research done in this paper aims to utilize the idea of
reversible logic to break the conventional speed-power trade-off, thereby getting a step closer to
realise Quantum computing devices. To authenticate this research, various combinational and
sequential circuits are implemented such as a 4-bit Ripple-carry Adder, (8- bit X 8-bit) Wallace
Tree Multiplier, and the Control Unit of an 8-bit GCD processor using Reversible gates. The
power and speed parameters for the circuits have been indicated, and compared with their
conventional non- reversible counterparts. The comparative statistical study proves that circuits
employing Reversible logic thus are faster and power efficient. The designs presented in this
paper were simulated using Xilinx 9.2 software.
Reversible logic is widely used in low power VLSI. Reversible circuits are capable of back-
computation and reduction in dissipated power, as there is no loss of information [1]. Basic
reversible gates are employed to achieve the required functionality of a reversible circuit. The
uniqueness of reversible logic is that, there is no loss of information since there is one-to-one
correspondence between inputs and outputs. This enables the system to run backwards and while
doing so, any intermediate design stage can be thoroughly examined. The fan-out of each block in
the circuit has to be one. This research paper focuses on implementation of reversible logic
circuits in which main aim is to optimize speed of the design. A Reversible adder is designed
using basic reversible gates. Using this adder, an 8-bit reversible ripple-carry adder is devised and
then compared with the conventional 8-bit adder in terms of speed, critical paths, hardware used.
Then using the same reversible adder, a Wallace tree multiplier has been implemented, and
compared with the conventional Wallace tree multiplier. With the known fact that sequential
circuits are the heart of digital designing, the design for the control unit of a reversible GCD
processor has been proposed using Reversible logic gates.
1
1.2 Objectives
This thesis explores the existing work on designing fault tolerant reversible circuits and
presents a passive hardware redundancy technique for achieving fault tolerance in reversible
logic. gates and proposed synthesis methods incorporating these gates. Fault detection within
reversible circuits is presented in The use of the parity preserving property is a commonly used
fault detection technique and is still an active area However, the parity preserving property in
reversible circuits can only detect the presence of a fault. Most of the literature on fault tolerance
offers fault detection features which do not correct or mask the faulty output. To be labeled as
fault tolerant, a circuit should either correct or mask the fault at the output. • Our proposed
hardware fault tolerance technique uses the concept of traditional triple modular redundancy
(TMR). The TMR technique requires a majority voter circuit (MVC) for fault masking purposes.
The basic function of a MVC is to mask the faults and provide corrected output. Designing
reversible fault tolerant circuits using the concept of TMR is one of the main objectives of this
thesis. We propose two new designs for a reversible majority voter circuit for fault masking in
reversible logic.
In reversible logic, a one-to-one mapping between the inputs and outputs must be
maintained. This requirement often introduces design complexity to a reversible circuit. Design
complexity of a reversible circuit is measured by commonly used cost metrics such as gate
count, quantum cost, number of constant inputs and garbage outputs. We analyze the design
complexity of our proposed voter circuits and present the macro gate level circuit
implementation
Fault tolerance improves reliability by keeping the circuit operational in the event of a
failure. Therefore, it is important to assess the reliability of a design and study a circuit’s failure
probabilities. In a voting based fault masking technique, achieving fault tolerance largely
depends on the voter circuit operation. One of the objectives of this thesis is to determine the
voter circuit’s failure probabilities based on its components (i.e. the comprising gate failure
probabilities).
1.3 Contributions
2
The contributions of this thesis are listed below:
3
In this thesis, we propose an approach to achieve fault tolerance in reversible logic circuits.
We offer a majority voting based TMR approach for masking faults that occur in the original
circuit.
TMR in reversible circuits requires the design of a reversible majority voter circuit. In our
work, we propose two new designs for a reversible majority voter circuit. We present a fault
tolerant design for a reversible full adder circuit and demonstrate how our proposed voter circuits
can be used to design any fault tolerant reversible circuits. We demonstrate the proposed
reversible majority voter circuit application for masking a single fault occurring in any of the
voter circuit’s inputs, i.e. before the voter circuit. A single fault assumption considers a situation
where at most one fault is present in a circuit. We present the fault masking capability of our
proposed voter circuits in the case of a single bit fault (SBF), a single gate fault (SGF), a
crosspoint fault and the family of missing gate fault. We propose a failure probability analysis of
the proposed majority voter circuits. We demonstrate that the methodology proposed in this thesis
can be used to determine a voter circuit’s failure probabilities based on the gate failure
probabilities.
4
CHAPTER 2:LITERATURE SURVEY
5
2.3 A comparative study of Reversible logic gates:
Reversible Logic is becoming more and more prominent technology having its
applications in Low Power CMOS, Quantum Computing, Nanotechnology, and Optical
Computing. Reversible logic has emerged as one of the most important approaches for the
power optimization with its application in low power VLSI design .In contrast to conventional
gates, reversible logic gates have the same number of inputs and outputs, each of their output
function is equal to 1 and their fan-out is always equal to 1. It is interesting to compare both
reversible and conventional gates. In this paper the authors presented the major VLSI
limitations like power consumption, delay and area of different reversible logic gates which are
simulated in Xilinx9.2 and by writing the code in VERILOG HDL and also compared reversible
gates to conventional gates.
2.4 Design of a Reversible ALU Based on Novel Programmable Reversible
Logic Gate Structures:
Programmable reversible logic is emerging as a prospective logic design style for
implementation in modern nanotechnology and quantum computing with minimal impact on
circuit heat generation. Recent advances in reversible logic using and quantum computer
algorithms allow for improved computer architecture and arithmetic logic unit designs. In this
paper, a 2*2 Swap gate which is a reduced implementation in terms of quantum cost and delay to
the previous Swap gate is presented. Next, a novel 3*3 programmable UPG gate capable of
calculating the fundamental logic calculations is presented and verified, and its advantages over
the Toffoli and Peres gates are discussed. The UPG is then implemented in a reduced design for
calculating n-bit AND, n-bit OR and n-bit ZERO calculations. Then, two 3*3 RMUX gates
capable of multiplexing two input values with reduced quantum cost and delay compared to the
previously existing Fredkin gate is presented and verified. Next, 4*4 reversible gate is presented
and verified which is capable of producing the calculations necessary for two-bit comparisons.
The UPG and RC are implemented in the design of novel sequential and tree-based comparators.
Then, two novel 4*4 reversible logic gates (MRG and PAOG) are proposed with minimal delay,
and may be configured to produce a variety of logical calculations on fixed output lines based on
programmable select input lines. A 5*5 structure (MG) is proposed that extends the capabilities
of both the MRG and PAOG. The comparator designs are verified and its advantages to previous
designs are discussed. Then, reversible implementations of ripple-carry, carry-select and Kogge-
Stone carry look-ahead adders vii are analyzed and compared. Next, implementations of the
6
Kogge-Stone adder with sparsity-4, 8 and 16 were designed, verified and compared. The
enhanced sparsity-4 Kogge-Stone adder with ripple-carry adders was selected as the best design,
and its implemented in the design of a 32-bit arithmetic logic unit is demonstrated. The proposed
ALU design is verified and its advantages over the only existing ALU design are quantitatively
analyzed.
Reversible logic is a promising field of research that finds applications in low power
computing, quantum computing, optical computing, and other emerging computing technologies.
Further, floating point multiplication is one of the major operations in image and digital signal
processing applications. The single precision floating-point multiplier requires the design of
efficient 24x24 bit integer multiplier. In this work, we propose a new reversible design of single
precision floating point multiplier based on operand decomposition approach. To design the
reversible 24x24 (AxB) bit multiplier (assume A and B are of 24 bits each), the operands are
decomposed into three partitions of 8 bits each. Thus, the 24x24 bit reversible multiplication is
performed through nine reversible 8x8 bit Wallace tree multipliers, whose outputs are then
summed. We propose a new reversible design of the 8x8 bit Wallace tree multiplier that has been
optimized in terms of quantum cost, delay, and number of garbage outputs. Wallace tree
multiplication consists of three conceptual stages: Partial product generation, partial product
compression using 4:2 compressors, full adders, and half adders, and then the final addition stage
to generate the product. In this work we perform optimization at each of these three stages. For
the first stage, we have proposed a new generalized reversible partial product generation
circuitry. For the second stage we have proposed a new reversible 4:2 compressor design for use
in the compression tree. Finally, for the summation stage we have carefully chosen and arranged
the reversible half adders and full adders in such a way to yield an efficient multiplier optimized
in terms of quantum cost, delay, and garbage output.
7
CHAPTER 3: EXISTING SYSTEM
INTRODUCTION
The structure of 32-piece Single Precision Floating Point Multiplier and Adder is reproduced
and introduced in this paper. The gliding point number can bolster wide scope of qualities. It is
spoken to utilizing three fields: sign, example and mantissa. In this paper gliding point expansion,
and increase calculations for IEEE-754 (single exactness) is displayed. The IEEE-754 converter is
utilized to change over decimal gliding point number into Binary drifting point organization and it
is additionally used to check the outcomes. A square graph of the primary information way bit of
the DSP square, two littler 18x18 multipliers, went before by discretionary info pre-adders, can be
utilized to execute free multipliers, totals of multipliers, or bigger 27x27 multipliers, utilizing the
multiplexers and blowers. The last CPA in the DSP square can be part in two on account of
individual multipliers. To help the entirety of the fixed-point modes and furthermore FP
augmentation, the last CPA was decayed into a lot of prefix structures lined up with both the fixed
and FP limits. The three FP multiplier steps post pressure: last sub-item decrease, standardization
and adjusting were consolidated into a solitary level CPA utilizing a hailed prefix approach. Our
hailed prefix approach, so as to help both fixed and FP estimations, utilizes a hailed prefix
structure, overlaid on the convey select structure, overlaid on a prefix snake structure.
In computing, logic operations are used to model the information flow through digital
circuits. A logic operation connects and verifies two or more units of information. Logic that
implements a Boolean function is also known as digital or traditional logic. Mod- ern digital
devices follow the principle of Boolean logic and define a problem in terms of Boolean
functions. A circuit element that performs a logic operation is called a logic gate. Due to the
limitations of existing physical components in traditional logic (e.g. heat dis- sipation)
researchers are showing more interest in reversible logic computation [5]. The following
subsections explain the concepts of traditional and reversible logic computation.
3.1.1 Traditional Logic Computation
In traditional logic, a function maps one or more inputs to one or more outputs in a
Boolean domain B, where B = {0, 1}.
8
In most cases, the number of outputs is less than the number of inputs (i.e. n < k). The input-
output relation of a traditional logic gate can be described by the associated truth table. A truth
table shows the mapping from the k input columns to the n output columns over 2k rows of any
Boolean logic function.
Table 3.1 Truth tables of traditional logic functions.
9
Table 3.2 Truth tables of reversible logic
functions.
A NOT (A) P Q X Y
0 1 0 0 0 0
1 0 0 1 0 1
1 0 1 1
1 1 1 0
1
0
3.1.2 Reversible Logic Computation
In reversible logic a one to one mapping exists between the input and output assign- ment.
Therefore, reversible logic gates are bijective requiring an equal number of inputs and outputs.
Thus, reversible gates do not erase any information during computation and the computation can
be undone to recover the input information . In the scope of this thesis, our research addresses
only Boolean reversible logic functions. The truth table for a reversible function of k variables
requires 2k rows and 2k columns. The bijective rela-tionship between the inputs and outputs of a
NOT, Controlled NOT, and full adder logic . An irreversible logic circuit can be transformed into
a reversible circuit by adding inputs and/or outputs. These additional inputs are called constant
inputs and the unused outputs are called garbage outputs. For example, the truth table of a
reversible full adder presented in Table 3.2c shows additional constant input and garbage outputs
as compared to the truth table of the irreversible full adder presented in Table 3.1c. In a full adder,
Carry and Sum are the two output bits of interest. In Table 3.2c, two outputs, Carryout and Sum,
represent the carry and sum bits of a full adder. The garbage outputs do not contribute to the
property of the sum or carry output bits. The additional input Constantin1 and the two outputs,
Garbageout1 and Garbageout2 are used to maintain the bijective relation between the inputs and the
outputs of this reversible full adder operation. Constant inputs and garbage outputs are often used
as cost metrics of reversible circuits. The cost metrics in reversible logic are discussed further in
section 3.3.
3.2 Logic Gates
Logic gates are used to perform logic operations. Gates are combined (cascaded) to implement
the desired logic functions. Therefore, logic gates are the key components of a circuit. This
section introduces the reversible logic gates that are used to design the fault tolerant reversible
circuits of this thesis.
3.2.1 Reversible Gates
All reversible gates are bijective and maintain one-to-one and onto relationships be- tween the
inputs and outputs. The two most popular families of gates are the NCT (NOT- CNOT-Toffoli)
gate family and the SF (SWAP-Fredkin) gate family . This thesis uses Controlled NOT (CNOT)
and Toffoli gates from the NCT family and Fredkin gates which belong to the SF gate family.
These
1
gates are introduced in the following subsections. In the following figures the • symbol represents
1
the control points and the ⊕ symbol indicates. the targets of the reversible gates. The targets (⊕) of
the reversible gates perform the EXOR operation. The first n − 1 bits are known as control the
control bits, and the last nth bit is the target bit. The reversible gate passes the input values at controls
directly
to the correspond- ing outputs without any change and inverts the target bit if and only if all input
values at controls are 1. The NOT gate is a special case of a Toffoli gate with no controls. Negative
control points are shown as ◦ and inverts the target bit if and only if all input values at controls are
0.
One of the simplest reversible logic gates is a NOT gate. A reversible NOT gate oper-ation
shown in Table 3.2a is identical to the traditional NOT gate operation in Table 3.1a. A NOT
gate in traditional logic is the only logic gate that provides a one-to-one and onto relationship
between the inputs and outputs. Thus, the logical NOT operation is reversible. The truth table
for a logical NOT operation is presented in Table 3.2a.
The controlled-NOT (CNOT) gate belongs to the NCT gate family. A CNOT gate con-
sists of a control input and a target input. A specified value at the control input inverts the
target input value. If the control input value of 1 inverts the target input, the gate is referred to
as a positive-controlled gate. Figure 3.1b shows a positive controlled CNOT gate along with the
logic
1
function. The as- sociated truth table. A CNOT gate is also known as the Feynman gate .
3.2.4 Toffoli Gates
A Toffoli gate is a form of CNOT gate with multiple control points . The reversible NOT gate is a
special case of a Toffoli gate with n = 1 and no control values. When n = 2, the Toffoli gate is
also known as the CNOT or Feynman gate. It is possible to implement the three basic logic
operations (i.e. the NOT, AND and OR operations) using only Toffoli gates . Thus, a Toffoli gate
is considered to be a universal gate.
1
Table 3.3 Truth table of a 3 × 3 positive-controlled Toffoli gate.
input output
a1 a2 a3 x1 x2 x3
0 0 0 0 0 0
0 0 1 0 0 1
0 1 0 0 1 0
0 1 1 0 1 1
1 0 0 1 0 0
1 0 1 1 0 1
1 1 0 1 1 1
1 1 1 1 1 0
For example in Figure 2.2a, for the inputs (a1, a2, a3) ≡ (1, 1, 1), the output of the Toffoli
gate is (x1, x2, x3) ≡ (1, 1, 0). The truth table of a 3 × 3 positive-control Toffoli gate is shown
in Table 3.3.
Based on the value of the control points, a Toffoli gate can also be positive or negative
controlled (shown in Figure 3.2a and Figure 3.2b). The difference between a positive- controlled
and a negative-controlled Toffoli gate lies in the gate operation. A positive- controlled Toffoli
gate inverts the target when the control value is 1 while the negative- controlled Toffoli gate
inverts the target when the control value is 0. A negative-controlled Toffoli gate may have one or
more negative controls. In that case, this gate inverts the target when all the negative control
values are 0. A Toffoli gate can also have multiple control points in which case it is referred to
as an n-bit Toffoli gate
(where n − 1 is the number of controls and the nth bit is the target) or a multiple-controlled Toffoli
(MCT) gate. A MCT gate with different control points inverts the value of the target point when
all
of the positive controls are at 1 and the negative controls are at 0. An example of this is shown in
Figure 3.2c.
1
A Fredkin gate is also a universal reversible gate that performs a logic operation con- trolled
1
by one or more control points . Unlike the gates in the NCT family, the target lines of a Fredkin
gate interchange their values depending on the value at the control points. A positive-controlled
Fredkin gate interchanges the target lines if the control point value is 1, otherwise the target lines
remain unchanged. Similarly, a negative-controlled Fredkin gate performs the logic operation
when
the control value is 0. Figure 3.3 shows different Fredkin gates. The truth table for a 3 × 3
A SWAP gate.
1
has multiple control points then the gate is called an n-bit Fredkin gate or Multiple Control
Fredkin (MCF) gate. In a MCF, the gate passes the control bits to the outputs unchanged and
interchanges the target bit values if all the positive control point values are 1 and all the negative
control points are 0.
Gate count is one of the measures used to compare and evaluate different logic circuits. Gate count
refers to the number of logic gates used to implement a traditional or reversible circuit. However,
gate count does not evaluate the complexity of logic circuits. For example, let us consider two
reversible circuits where the first circuit consists of three 3-bit Toffoli gates and the second circuit
consists of two 6-bit Toffoli gates. In this case, the gate count measurement will indicate that the
second circuit uses fewer gates and therefore, is preferable compared to the first circuit. However,
as discussed in Section 2.3.4 a 6-bit Toffoli gate is more complex than a 2-bit Toffoli gate. Since
the gates have a different number of input bits, a simple gate count measure fails to fully evaluate
the complexity of the circuits. Gate count can be useful to compare different circuits consisting of
similar types of gates.
Garbage output is another measure for comparing and evaluating reversible circuits. As
demonstrated in Section 2.1, it is sometimes necessary to add extra outputs in order to main- tain
reversibility.. For example, in Table 3.1c Garbageout1 and Garbageout2 are the garbage outputs.
However, adding garbage outputs adds extra lines and, therefore increases the circuit width.
According to Maslov , reducing the garbage outputs is more important than reducing the gate
count.
1
3.3.3 Constant Input (CI)
The number of constant inputs is another metric used to evaluate and compare imple- mentations.
Constant inputs are also known as ancilla inputs . Constant inputs are the input lines that are
added to a function to make it reversible. The relationship between garbage outputs and constant
inputs is given by the following equation:
Quantum cost is an important measure to evaluate and compare the cost of reversible circuits.
quantum
gates required to design a circuit. It is assumed that all reversible gates will be implemented at the
quantum level by basic 1 × 1 or 2 × 2 quantum gates . The quantum costs of the reversible gates
used for the examples and in designing the fault tolerant reversible circuits in this thesis are
shown
in Table 3.5.
1
and t = xn is the target line. For n = 1, n = 2, and n = 3 the gates are called NOT , CNOT , and
C2NOT or Toffoli, respectively. A Cn−1NOT gate has an exponential cost of 2n − 3 only if the gate
has zero garbage lines with all positive controls.
• The quantum cost of an n − 1 negative-control Toffoli gate with at least one positive-
control is the same as the cost of an n − 1 positive-control Toffoli gate.
• If all the controls of a Toffoli gate are negative an extra cost of 2 is added if zero or
(n − 3) garbage lines are used.
According to , a size n Fredkin gate can be simulated efficiently by a size n Toffoli gate and 2
CNOT gates. Thus, the cost of a size n Fredkin gate is calculated by the QC of a size n Toffoli
gate + 2. The quantum cost for different sizes of Toffoli and Fredkin gates is determined from the
gate implementation technique. In our calculations, the quantum cost of the generalized Toffoli
and Fredkin gates is taken from . However, the quantum cost for any of the gates, as given in ,
may change in the future as new technologies are developed.
1
digital logic circuit can be considered to be a hard fault. Soft faults can occur due to temporary
changes in the properties of logic cir-cuits. External influences such as electromagnetic
interference, noise in the power supply, or improper functioning of a circuit may result in soft
faults within a system.
An error is a manifestation of a fault. In a digital system, if the logical state of an element differs
from the intended value this indicates an error. It can be stated that a failure is the result of an
error, caused by a fault. This could be illustrated as:
A fault detection process identifies the occurrences of faults within a circuit. To ensure proper
functioning of the circuit, faults must be detected as early as possible .
Fault recovery is the process of keeping the circuit operational or restoring circuit oper- ation
after a fault has occured. A fault recovery process may require some reconfiguration of the circuit
.
Fault masking is the process of preventing faults from introducing errors into the system.
Common approaches to fault masking include majority voting techniques for structural
redundancy or error correcting memories for correcting memory before a circuit uses the data .
1
Fig 3.4 Critical path of 4-bit reversible adder and irreversible adder.
Furthermore, various parameters of reversible and non reversible adders were observed and
compared and are tabulated in Table 3.6.
Table 3.6 Comparsion of reversible and irreversible RCA.
2
CHAPTER 4: PROPOSED SYSTEM
Here, we center around HUB groups. Center Fixed-point organizations were utilized to
improve DSP usage, since they permit better word-length advancement. The ASIC execution of
HUB-FP units has been read for binary16 (half), binary32 (single), and binary64 (twofold), and
significant enhancements have been accomplished. In this short correspondence, we stretch out
this examination to FPGAs over a wide scope of sizes. Contrasted with past articles, we give: An
exploratory blunder examination of the execution of FIR channels, which shows that the HUB
approach gives comparable measurable parameters to those of standard FP usage, including the
SNR. The consequences of FPGA usage of an essential FP snake and multiplier for a wide scope
of example and mantissa bit-widths under HUB and ordinary methodologies and their
examination. In the majority of the cases examined, the HUB arrangement lessens asset use and
expands the speed of these FP units. Besides, because of its effortlessness, any current delicate or
hard Core could be effectively upgraded by utilizing the proposed methodology. Subsequently, in
light of essential designs, our point is to urge scientists to improve their upgraded FP centers or
DSP
As the number of control inputs increases the quantum cost for the reversible gates also increases.
For example, a 3-bit positive control Toffoli gate has a quantum cost of 5, whereas a 6-bit Toffoli
gate has a cost of 61 . The quantum cost calculation of an n-bit Toffoli gate is presented in.
According to Arabzadeh et al. :
• A multiple control Toffoli gate with n − 1 controls and the nth bit as the target can be
written as Cn−1NOT (c;t), where c = {x1 ,...,xn−1} ⊂ X is the set of control lines.
22
an essential operation in ECC. Two main approaches may be employed. The first is known as
interleaved modular multiplication using Montgomery’s method. Montgomery multiplication is
widely used in implementations where arbitrary curves are desired. Another approach is known as
multiply-then-reduce and is used in elliptic curves built over finite fields of Messene primes.
Messene primes are the special type of primes which allow for efficient modular reduction
through series of additions and subtractions. In order to optimize the multiplication process, some
ECC processors use the divide and conquer approach of Karatsuba–Of man multiplications, where
others use embedded multipliers and DSP blocks within FPGA fabrics.
External data enter the processor through the external bus to the 256 RSD digits input bus. Data
are sent in binary format and a binary to RSD converter stuffs zeros in between the binary bits in
order to create the RSD representation. Hence, 256-bits binary represented integers are converted
to 512- bits RSD represented integers. To convert RSD digits to binary format, one needs to
subtract the negative component from the positive component of the RSD digit.
23
Fig 4.3 Modular addition subtraction block diagram
In order to overcome the problem of overflow introduced in the adder proposed in, a new
adder is proposed based on the work proposed in. The proposed adder consists of two layers,
where layer 1 generates the carry and the interim sum, and layer 2 generates the sum, as shown in
Fig. 3. Table I shows the addition rules that are performed by layer 1 of the RSD adder, where
RSD digits 0, +1, and −1 are represented by Z, P, and N, respectively. It works by assuring that
layer 2 does not generate overflow through the use of previous digits in layer 1. The proposed
adder is used as the main block in the modular addition component to take advantage of the
reduced overflow feature. However, overflow is not an issue in both the multiplier and the divider
when an RSD adder is used as an internal block. Hence, the reduced area is taken as an advantage
in instantiating adders within the multiplier and the divider. The n-digits modular addition is
performed by three levels of RSD addition. Level 1 performs the basic addition of the operands
which produces n+1 digits as a result. If the most significant digit (MSD) of level 1 output has a
value of 1/−1, then level 2 adds/subtracts the modulo P256 from the level 1 output
correspondingly. The result of level 2 RSD addition has n+2 digits; however, only the n+1th digit
may have a value of 1/−1. This assertion is backed up by the fact that the operation of level 2 is
a reversed operation with the modulo P256, and most
24
importantly, the proposed adder assures that no unnecessary overflow is produced. If the n+1th
digit of level 2 result has a value 1 or −1, then level 3 is used to reduce the output to the n-digit
range. Algorithm 3 shows the sequence of operations performed by the modular addition block.
Notice that one modular addition is performed within one, two, or three clock cycles.
The proposed processor was implemented in Xilinx Virtex 5-XC5VLX110T FPGA and a
single point multiplication for P256 is achieved within 2.26 ms. Detailed implementation results
of individual blocks are listed in Table V. Such detailed results are useful in understanding the
main block contributors to the overall hardware resources. It can be noted that the modular
multiplier is the largest block within the design due to the three recursively built Karatsuba blocks,
which operate in parallel. With the extensive pipelining techniques that are applied to the
Karatsuba blocks, the CPD is shortened down to 6.24 ns. Such CPD figure allows the processor to
operate at 160 MHz, which is the fastest achieved in the literature in FPGA devices without
embedded blocks. Detailed timing performance of operations performed by the processor that is
operating at 160 MHz on Virtex 5 device are listed in Table VI. Table VII lists a comparison of
our modular divider implementation results against other FPGA-based designs. Our modular
divider performs the fastest timing of prime field dividers and competitive to binary field GF2233
modular divider. The performance enhancement is due to the usage of RSD, which leads to short
data path and high operating frequency. Efficient architecture that is based on implementing
complex operations through simple shifting single bit checking is another factor that gives our
divider such enhancement. Finally, the modular divider operates on higher radix which results in
improved throughput. The exportability feature of the processor comes from the fact that none of
the macros or embedded blocks within the FPGA fabric is utilized in the proposed processor.
Such feature gives our processor the freedom to be implemented in different FPGA devices from
different vendors and, eventually, as an application-specified integrated circuit (ASIC).
25
CHAPTER 5:REVERSIBLE MAJORITY VOTER CIRCUITS
This chapter proposes a passive hardware fault tolerance technique and two new designs for a
majority voter circuit (MVC). A comparison of the proposed and existing designs is presented. In
addition, the performance of the proposed designs is presented as well as the overall costs in
terms of the cost metrics used in reversible logic.
26
5.1.1 Reversible Majority Voter Circuits in the Literature
There are only three works in the literature that propose reversible majority voter cir-cuits.
Boykin and Roychowdhury describe a reversible fault tolerant design using the concept of a
traditional 3-bit repetition code. Their technique introduces a multiplexing scheme and a voting
mechanism. A reversible MVC is used to generate the majority value of the input bits. The
proposed voter consists of two CNOT gates and one Toffoli gate as shown in Figure 5.1. This
voter provides the majority bit at the output line x. For example, if the input bits abc have the
values 100 then the value at line x is 0, which is the value of the majority of the input bits.
The reversible multiplexing scheme proposed in introduces an error recovery circuit as shown
in Figure 5.2. The error recovery circuit uses six blocks of the majority voter circuit of Figure 5.1
for a total of eight operations. Functionality of the error recovery circuit is described using two
phases: encoding and decoding.
If an input bit has a logical value of 0 or 1, the encoding blocks map the bit to an expanded value
of 000 or 111. In other words, the MVC−1 blocks triplicate each input bit. The MVC blocks in
Figure
5.2 perform decoding and generate the majority value at each of the three designated output lines.
If there are no errors, the outputs of Figure 5.2 should match the inputs. In case of a fault, at most
one bit in each of the MVC outputs is altered and indicates an error. Since the MVCs in Figure 5.2
return the majority bit values of the encoded bits, a single error will not affect the majority bit
values at the outputs. In practical use, this error recovery cycle would be placed strategically
throughout the circuit interspersed with computations.
27
Figure 5.2 Reversible fault tolerant multiplexing scheme .
The MVC in Figure 5.1 uses three reversible gates and therefore, the gate count for this circuit
is 3. Since the design does not require any additional inputs the number of constant inputs for this
voter is zero. The design of this MVC produces 2 garbage outputs. The MVC consists of two
positive-controlled CNOT gates and one positive-controlled 3-bit Toffoli gate. Thus, the total QC
of
this design is (1 + 1 + 5) = 7.
A 3-bit reversible majority voter circuit is proposed in [43]. Researchers in this study designate
a specific output line to carry the majority value. The proposed design is shown in Figure 5.3.
For example, let us consider an input bit combination abc = 011. For this combination the control
28
bit value of the first gate is 0. This passes the bits to the second gate without any changes. The
second gate has its control bit at 1 and swaps the first and second input bits. This provides the
majority value of 1 at the output (on line p). The MVC presented in Figure 5.3 consists of a 2-
CNOT and a 3- bit Fredkin gate and does not require any constant input. The gate count of this
MVC is 2 with a QC of (1 + 5) = 6.
Another MVC proposed in [61] takes three input bits from three identical modules and provides
the majority line on all three outputs. In other words, the majority value is replicated on three
output
lines. In order to maintain reversibility, two control lines (C1 = 1, C2 = 0) are added at the voter
input and two garbage lines (G1, G2) are added with the voter outputs. Voting is done on the data
inputs
(a, b and c), and the goal is to produce all 0s or 101 and the control lines are set to C1 = 1, C2 =
0, this generates the value 111 at the data outputs xyz as shown in Figure 5.5. The number of
constant input and garbage output for the voter presented in Figure 5.4 is 2 and 2, respectively. The
circuit in Figure 5.4 uses 4 reversible gates which results in a gate count of 4. The QC of the
circuit
29
Figure 5.5 Example of input assignments
30
Table 5.1 Truth table of the majority voter with two reversible
gates.
The reversible MVC shown in Figure 5.6 consists of a negative control CNOT and a positive
control Fredkin gate. The output of interest is a2 which gives the majority of input bits (shown in
Table 5.1). The other two output lines are not used and are considered to be garbage lines. To
demonstrate the behaviour of this circuit, let us consider an input combination of abc = 100. As we
can see from Figure 5.6, the control of the Fredkin gate is (c ⊕ b). When c = b, (c ⊕ b) = 0 and the
Fredkin gate does not swap the values of a and c at the output. However, when c /= b then (c ⊕ b)
= 1, and the Fredkin gate operates and swaps the values of a and c at the output. Thus, the gate
count for this circuit is 2 and the design does not require any constant input. The QC of a negative-
controlled CNOT gate and a positive-controlled Fredkin gate is 3 and 5 respectively . Thus, the
The second MVC we propose consists of three reversible gates: a positive control Tof- foli, a
negative control CNOT and a positive control Fredkin gate. For this circuit the output of interest is a3
and the rest are garbage outputs. The truth table shown in Table 5.2 demon- strates the bit
combinations at each gate output. This 3×3 reversible majority voter circuit provides the same
output as our design proposed in Figure 5.6. However, the MVCs pre- sented in Figure 5.6 and
Figure 5.7 differ in their fault tolerance mechanism. The functional difference of the proposed
voters is described in Section 3.5.
31
The gate count for this circuit is 3 and the design does not require any constant in- put. The
QC of a positive-controlled Toffoli gate, a negative-controlled CNOT gate and a positive-
controlled
Fredkin gate is 3, 5, and 5 respectively . Thus, the QC of the circuit in Figure 3.7 is (5 + 3 + 5) =
13. 13.
Our proposed voter circuits can be used with TMR to achieve fault tolerance for any
reversible circuit. For example, let us consider a 3×3 reversible logic circuit consisting of a 2-bit
Toffoli and
a CNOT gate. This circuit is shown in Figure 3.8a where x is the output of interest and y and z are
garbage outputs. In accordance with the basic principles of TMR we need three versions of the
circuit in Figure 3.8a for designing a fault tolerant reversible circuit.
(a) A reversible circuit. (b) Fault tolerant design of the circuit using TMR.
In this case, let us consider the two-gate voter circuit shown in Figure 5.6. If any one of the
modules is faulty, the majority voter masks the fault and sends the corrected output on line u. A
fault tolerant design of the circuit in Figure 5.8a is shown in Figure 5.8b. A full adder circuit is
considered to be a fundamental building block of many computational logic units. Figure 5.9
shows a fault tolerant full adder design using two majority voter circuits. For a full adder circuit
32
we have two functional outputs: Sum and Carry.
33
Output lines carrying the Sum from the triplicated modules are connected to the majority
voter 1 and the Carry output lines are connected to the majority voter 2. To assure fault tolerance,
the circuit needs to mask the fault at both of these two output lines. Corrected Sum and Carry bits
are generated at Corrected Sum and Corrected Carry output lines as shown in Figure 5.9. Figure
5.9 also demonstrates the use of both of our proposed voter circuits in this example, although we
note that any voter circuit could be used in either place.
34
CHAPTER 6: SOFTWARE REQURIMENT
To Migrate a Project
6.2 Properties:
For information on properties that have changed in the ISE 12 software, see ISE 11 to ISE 12
Properties Conversion.
6.3 IP Modules:
35
If your design includes IP modules that were created using CORE Generator™ software or
Xilinx® Platform Studio (XPS) and you need to modify these modules, you may be required to
update the core. However, if the core netlist is present and you do not need to modify the core,
updates are not required and the existing netlist is used during implementation.
The ISE 12 software supports all of the source types that were supported in the ISE 11
software.
If you are working with projects from previous releases, state diagram source files (.dia),
ABEL source files (.abl), and test bench waveform source files (.tbw) are no longer supported.
For state diagram and ABEL source files, the software finds an associated HDL file and adds it to
the project, if possible. For test bench waveform files, the software automatically converts the
TBW file to an HDL test bench and adds it to the project. To convert a TBW file after project
migration, see Converting a TBW File to an HDL Test Bench.
To help familiarize you with the ISE® software and with FPGA and CPLD designs, a set
of example designs is provided with Project Navigator. The examples show different design
techniques and source types, such as VHDL, Verilog, schematic, or EDIF, and include different
constraints and IP.
To Open an Example
36
The example project is extracted to the directory you specified in the Destination Directory
field and is automatically opened in Project Navigator. You can then run processes on the
example project and save any changes.
Note If you modified an example project and want to overwrite it with the original
example project, select File > Open Example, select the Sample Project Name, and specify the
same Destination Directory you originally used. In the dialog box that appears, select Overwrite
the existing project and click OK.
To Create a Project
1. Select File > New Project to launch the New Project Wizard.
2. In the Create New Project page, set the name, location, and project type, and click Next.
3. For EDIF or NGC/NGO projects only: In the Import EDIF/NGC Project page, select the
input and constraint file for the project, and click Next.
4. In the Project Settings page, set the device and project properties, and click Next.
5. In the Project Summary page, review the information, and click Finish to create the project
Project Navigator creates the project file (project_name.xise) in the directory you specified.
After you add source files to the project, the files appear in the Hierarchy pane.
37
It organizes all the parts of your design and keeps track of the processes necessary to move the
design from design entry through implementation to programming the targeted Xilinx® device.
Note For information on changing design properties, see Changing Design Properties.
You can now perform any of the following:
VERILOG
The designers of Verilog wanted a language with syntax similar to the C programming
language, which was already widely used in engineering software development. Verilog is case-
sensitive, has a basic preprocessor (though less sophisticated than that of ANSI C/C++), and
equivalent control flow keywords (if/else, for, while, case, etc.), and compatible operator
precedence. Syntactic differences include variable declaration (Verilog requires bit-widths on
38
net/regtypes), demarcation of procedural blocks (begin/end instead of curly braces {}), and many
other minor differences.
A Verilog design consists of a hierarchy of modules. Modules encapsulate design hierarchy, and
communicate with other modules through a set of declared input, output, and bidirectional ports.
Internally, a module can contain any combination of the following: net/variable declarations
(wire, reg, integer, etc.), concurrent and sequential statement blocks, and instances of other
modules (sub- hierarchies). Sequential statements are placed inside a begin/end block and
executed in sequential order within the block. But the blocks themselves are executed
concurrently, qualifying Verilog.
39
CHAPTER 7 :RESULT
40
41
42
CHAPTER 8: CONCLUSION & FUTURE SCOPE
CONCLUSION
In conclusion, unbiased rounding for hub floating point addition offers numerous advantages,
such as fairness, accuracy, and consistency in calculations. It helps minimize bias and rounding
errors, ensuring more precise and reliable results. However, it's important to consider potential
disadvantages, such as increased computational complexity and resource requirements. The
decision to implement unbiased rounding should be based on the specific needs and trade-offs of
each application. By carefully evaluating these factors, we can determine whether the benefits of
unbiased rounding outweigh the potential drawbacks.
FUTURE SCOPE
Future scope of unbiased rounding for hub floating point addition, there are a few potential
areas of development. One area is the exploration of more advanced algorithms and techniques
that can further minimize bias and rounding errors. Researchers and developers can continue to
refine and optimize existing methods, as well as propose new approaches to enhance the
accuracy and precision of floating point addition. Additionally, there is room for improvement in
terms of performance and efficiency. As technology advances, hardware and software
optimizations can be implemented to reduce the computational overhead associated with
unbiased rounding. This can lead to faster and more efficient calculations without compromising
on accuracy. Overall, the future looks promising for unbiased rounding in hub floating point
addition, with ongoing research and advancements aimed at improving its effectiveness and
practicality.
43
CHAPTER 9: APPENDIX
SOURCE CODE
module d3_8bit_top;
// Inputs
reg [7:0] a;
reg [7:0] b;
reg ci;
reg ctrl;
// Outputs
revesable_rca_8bit_d3 uut (
.a(a),
.b(b),
.ci(ci),
.ctrl(ctrl),
.s_d(s_d)
);
initial begin
// Initialize Inputs
a = 10;
b = 10;
44
ci = 1;
ctrl = 0;
#100;
a = 10;
b = 5;
ci = 1;
ctrl = 1;
#100;
a = 13;
b = 6;
ci = 0;
ctrl = 1;
#100;
a = 15;
b = 7;
ci = 1;
ctrl = 0;
#100 $finish;
end
endmodule
45
CHAPTER 10: BIBLIOGRAPHY
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
CHAPTER 10 BIBLIOGRAPHY
61
[15] H. Hilton, “Bias-free rounding in digital signal processing,” Apr. 22 2004, US Patent
App. 10/277,419.
[16] J. Villalba-Moreno, “Digit recurrence floatingpoint division under HUB format,” 23rd
IEEE Symposium on Computer Arithmetic, Silicom Valley (California, USA), July 2016.
[17] M. D. Ercegovac and T. Lang, Digital Arithmetic. Morgan Kaufmann, San Francisco, 2004.
62
63
63