Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Convolution

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 66

_______

Abstract

Many image processing operations such as scaling and rotation require re-sampling or
convolution filtering for each pixel in the image. Convolutions on digital images are important
since they represent operations that are more general than the operations that can be performed
on analog images. Convolution has many applications which have great significance in discrete
signal processing. It is usually difficult to deal with analog signals. Hence signals are converted
to digital state. Filtering of signals is very important in order to determine which one to accept
and which one to reject, and all of that is done by convolution.
This paper presents a direct method of reducing convolution processing time using
hardware computing and implementations of discrete linear convolution of two finite length
sequences (NXN). This implementation method is realized by simplifying the convolution
building blocks. The purpose of this research is to prove the feasibility of an FPGA that performs
a convolution on an acquired image in real time. The proposed implementation uses a modified
hierarchical design approach, which efficiently and accurately speeds up computation; reduces
power, hardware resources, and area significantly. The efficiency of the proposed convolution
circuit is tested by embedding it in a top level FPGA. In addition, the presented circuit uses less
power consumption and delay from input to output. It also provides the necessary modularity,
expandability, and regularity to form different convolutions for any number of bits.

CHAPTER 1
INTRODUCTION
1.1 Introduction
Convolution provides the mathematical framework for DSP. It is the single most important
technique in Digital Signal Processing. Convolution is a mathematical way of combining two
signals to form a third signal. Using the strategy of impulse decomposition, systems are
described by a signal called the impulse response. In signal processing, the impulse response, or
impulse response function (IRF), of a dynamic system is its output when presented with a brief
input signal, called an impulse. More generally, an impulse response refers to the reaction of any
dynamic system in response to some external change. It has applications that include statistics,
computer vision, image and signal processing, electrical engineering, and differential equations.

1.2 Introduction to Convolution


One of the most important concepts in Fourier theory, and in crystallography, is that of a
convolution. Convolutions arise in many guises, as will be shown below. Because of a
mathematical property of the Fourier transform, referred to as the convolution theorem, it is
convenient to carry out calculations involving convolutions.

1.2.1 Convolution Definition


The convolution of and g is written g, using an asterisk or star. It is defined as the integral
of the product of the two functions after one is reversed and shifted. As such, it is a particular
kind of integral transform:

While the symbol t is used above, it need not represent the time domain. But in that context, the
convolution formula can be described as a weighted average of the function () at the moment t
where the weighting is given by g() simply shifted by amount t. As t changes, the weighting
function emphasizes different parts of the input function.
More generally, if f and g are complex-valued functions on Rd, then their convolution may be
defined as the integral:

1.3 Types of Convolution


There are two types of convolution. They are:
Linear convolution
Circular convolution

1.3.1 Linear convolution


Convolution is an integral concatenation of two signals. It has many applications in numerous
areas of signal processing. The convolution described above is nothing but linear convolution.
The most popular application is the determination of the output signal of a linear time-invariant
system by convolving the input signal with the impulse response of the system. Convolving two
signals is equivalent to multiplying the Fourier transform of the two signals.
MathematicalFormula:
The linear convolution of two continuous time signals

and

is defined by

For discrete time signals x(n) and h(n) , the integration is replaced by a summation

1.3.2 Circular convolution


The circular convolution of two aperiodic functions occurs when one of them is convolved in the
normal way with a periodic summation of the other function. It occurs naturally in digital signal
processing when DTFTs and inverse DTFTs are replaced by DFTs and inverse DFTs.
Equivalently, the continuous frequency domain is replaced by a discrete one. (See Circular
convolution theorem.)
For a periodic function xT(t) , with period T, the convolution with another function, h(t), is also
periodic, and can be expressed in terms of integration over a finite interval as follows:

[1]

Where, to is an arbitrary parameter, and hT(t) is a periodic summation of h, defined by:

When xT(t) is expressed as the periodic summation of another function, x, this convolution is
sometimes referred to as a circular convolution of functions h and x.

1.4 Properties of convolution


This section describes the properties of convolution. The properties of convolution are:
Commutative
Associative
Distributive

1.4.1 Commutative property:


The commutative property for convolution is expressed in mathematical form:
a[n] * b[n] = b[n] * a[n]
In words, the order in which two signals are convolved makes no difference, the results are
identical.

1.4.2 Associative property:


The associative property describes the way to convolve more than two signals. Convolve two of the signals to
produce an intermediate signal, then convolve the intermediate signal with the third signal. The associative
property provides that the order of the convolutions doesn't matter. As an equation:

(a[n] * b[n] ) * c[n] = a[n] * ( b[n] * c[n] )

The associative property is used in system theory to describe how cascaded systems behave. Two or more
systems are said to be in a cascade if the output of one system is used as the input for the next system. From
the associative property, the order of the systems can be rearranged without changing the overall response of
the cascade. Further, any number of cascaded systems can be replaced with a single system. The impulse
response of the replacement system is found by convolving the impulse responses of all of the original
systems.

1.4.3 Distributive property:


In equation form, the distributive property is written as:

a[n] * b[n] + a[n] * c[n] = a[n] * (b[n] + c [n] )


The distributive property describes the operation of parallel systems with added outputs. Two or more
systems can share the same input, x[n] , and have their outputs added to produce y[n] . The distributive
property allows this combination of systems to be replaced with a single system, having an impulse response
equal to the sum of the impulse responses of the original systems.

1.5 Applications of Convolution


Convolution and related operations are found in many applications of engineering and
mathematics. The following are the areas where convolution is being applied .
In statistics, as noted above, a weighted moving average is a convolution.
In probability theory, the probability distribution of the sum of two independent random
variables is the convolution of their individual distributions.
In optics, many kinds of "blur" are described by convolutions. A shadow (e.g. the shadow on
the table when you hold your hand between the table and a light source) is the convolution of
the shape of the light source that is casting the shadow and the object whose shadow is being
cast. An out-of-focus photograph is the convolution of the sharp image with the shape of the
iris diaphragm. The photographic term for this is bokeh.
Similarly, in digital image processing, convolutional filtering plays an important role in many
important algorithms in edge detection and related processes.
In linear acoustics, an echo is the convolution of the original sound with a function
representing the various objects that are reflecting it.
In artificial reverberation (digital signal processing, pro audio), convolution is used to map
the impulse response of a real room on a digital audio signal (see previous and next point for
additional information).
In electrical engineering and other disciplines, the output (response) of a (stationary, or timeor space-invariant) linear system is the convolution of the input (excitation) with the system's
response to an impulse or Dirac delta function. See LTI system theory and digital signal
processing.
In time-resolved fluorescence spectroscopy, the excitation signal can be treated as a chain of
delta pulses, and the measured fluorescence is a sum of exponential decays from each delta
pulse.
In physics, wherever there is a linear system with a "superposition principle", a convolution
operation makes an appearance.

In digital signal processing, frequency filtering can be simplified by convolving two

functions (data with a filter) in the time domain, which is analogous to multiplying the data
with a filter in the frequency domain

CHAPTER 2
Literature Review
2.1 Introduction
The most important operation performed on signals is linear filtering, which can be
performed by convolution. The reason that linear filtering is so important to signal processing is
that it solves many problems and is relatively simple to describe mathematically. In this chapter
we will be looking at convolution. Convolution helps to determine the effect a system has on an
input signal. It can be shown that a linear, time-invariant system is completely characterized by
its impulse response. Using the sampling property of the delta function for continuous time
signals and the unit sample for discrete time signals we can decompose a signal into an infinite
sum / integral of scaled and shifted impulses. By knowing how a system affects a single
impulse, and by understanding the way a signal is comprised of scaled and summed impulses, it
seems reasonable that it should be possible to scale and sum the impulse responses of a system in
order to determine what output signal will results from a particular input. This is precisely what
convolution does - convolution determines the system's output from knowledge of the input and
the system's impulse response.

2.2Convolution - Discrete time


The idea of discrete-time convolution is exactly the same as that of continuous-time convolution.
For this reason, it may be useful to look at both versions to help your understanding of this
extremely important concept. Convolution is a very powerful tool in determining a system's
output from knowledge of an arbitrary input and the system's impulse response.
We know that any discrete-time signal can be represented by a summation of scaled and
shifted discrete-time impulses. Since we are assuming the system to be linear and time-invariant,

it would seem to reason that an input signal comprised of the sum of scaled and shifted impulses
would give rise to an output comprised of a sum of scaled and shifted impulse responses. This is
exactly what occurs in convolution.
For discrete time signals

and

, the convolution equation is given by:

Graphical Interpretation:

Reflection of

resulting in

Shifting of

Element-wise multiplication of the sequences

Summation of the product sequence

resulting in
and
resulting in the convolution value for

2.2.1 Graphical illustration of convolution properties (Discrete - time)


A quick graphical example may help in demonstrating why convolution works.

Fig 1: A single impulse input yields the system's impulse response.

Fig 2: A scaled impulse input yields a scaled response, due to the scaling property of the system's
linearity.

Fig 3: We now use the time-invariance property of the system to show that a delayed input
results in an output of the same shape, only delayed by the same amount as the input.

Fig 4: We now use the additively portion of the linearity property of the system to complete the
picture. Since any discrete-time signal is just a sum of scaled and shifted discrete-time impulses,
we can find the output from knowing the input and the impulse response.

2.3 Convolution Analog


In this module we examine convolution for continuous time signals. This will result in the
convolution integral and its properties. These concepts are very important in Engineering and
will make any engineer's life a lot easier if the time is spent now to truly understand what is
going on.

2.3.1 Derivation of the convolution integral


To begin this, it is necessary to state the assumptions we will be making. In this instance, the
only constraints on our system are that it be linear and time-invariant.
Brief Overview of Derivation Steps:
1. An impulse input leads to an impulse response output.
2. A shifted impulse input leads to a shifted impulse response output. This is due to the timeinvariance of the system.
3. We now scale the impulse input to get a scaled impulse output. This is using the scalar
multiplication property of linearity.
4. We can now "sum up" an infinite number of these scaled impulses to get a sum of an infinite
number of scaled impulse responses. This is using the additively attribute of linearity.
5. Now we recognize that this infinite sum is nothing more than an integral, so we convert both
sides into integrals.
6. Recognizing that the input is the function f(t), we also recognize that the output is exactly the
convolution integral.

Fig 1: We begin with a system defined by its impulse response, h(t).

Fig 2: We then consider a shifted version of the input impulse. Due to the time invariance of the
system, we obtain a shifted version of the output impulse response.

Fig 3: Now we use the scaling part of linearity by scaling the system by a value, f(), that is
constant with respect to the system variable, t.

Fig 4: We can now use the additively aspect of linearity to add an infinite number of these, one
for each possible . Since an infinite sum is exactly an integral, we end up with the integration
known as the Convolution Integral. Using the sampling property, we recognize the left-hand side
simply as the input f(t).

2.3.2 Convolution Integral


As mentioned above, the convolution integral provides an easy mathematical way to express the
output of an LTI system based on an arbitrary signal, x (t), and the system's impulse response,
h(t) . The convolution integral is expressed as

Convolution is such an important tool that it is represented by the symbol *, and can be written
as

y (t) = x(t) * h(t)

By making a simple change of variables into the convolution integral, = t, we can easily
show that convolution is commutative:

x (t) * h(t) = h(t) * x(t)


2.3.3 Implementation of Convolution
Taking a closer look at the convolution integral, we find that we are multiplying the input
signal by the time-reversed impulse response and integrating. This will give us the value of the
output at one given value of t. If we then shift the time-reversed impulse response by a small
amount, we get the output for another value of t. Repeating this for every possible value of t,
yields the total output function. While we would never actually do this computation by hand in
this fashion, it does provide us with some insight into what is actually happening. We find that
we are essentially reversing the impulse response function and sliding it across the input
function, integrating as we go. This method, referred to as the graphical method, provides us with
a much simpler way to solve for the output for simple (contrived) signals, while improving our
intuition for the more complex cases where we rely on computers. In fact Texas Instruments
develops Digital Signal Processors which have special instruction sets for computations such as
convolution.

2.4

Symmetric convolution

In mathematics, symmetric convolution is a special subset of convolution operations in which


the convolution kernel is symmetric across its zero point. Many common convolution-based
processes such as Gaussian blur and taking the derivative of a signal in frequency-space are
symmetric and this property can be exploited to make these convolutions easier to evaluate.
The convolution theorem states that a convolution in the real domain can be represented
as a point-wise multiplication across the frequency domain of a Fourier transform. Since sine and
cosine transforms are related transforms a modified version of the convolution theorem can be
applied, in which the concept of circular convolution is replaced with symmetric convolution.
Using these transforms to compute discrete symmetric convolutions is non-trivial since discrete

sine transforms (DSTs) and discrete cosine transforms (DCTs) can be counter-intuitively
incompatible for computing symmetric convolution, i.e. symmetric convolution can only be
computed between a fixed set of compatible transforms.

2.4.1 Advantages of symmetric convolutions


There are a number of advantages to computing symmetric convolutions in DSTs and
DCTs in comparison with the more common circular convolution with the Fourier transform.
Most notably the implicit symmetry of the transforms involved is such that only data unable to
be inferred through symmetry is required. For instance using a DCT-II, a symmetric signal need
only have the positive half DCT-II transformed, since the frequency domain will implicitly
construct the mirrored data comprising the other half. This enables larger convolution kernels to
be used with the same cost as smaller kernels circularly convolved on the DFT. Also the
boundary conditions implicit in DSTs and DCTs create edge effects that are often more in
keeping with neighboring data than the periodic effects introduced by using the Fourier
transform.

VHDL BASICS

Design entities and configurations


The design entity is the primary hardware abstraction in VHDL. It represents
a portion of a hardware designthat has well-defined inputs and outputs and performs a
well-defined function. A design entity may representan entire system, a subsystem, a
board, a chip, a macro-cell, a logic gate, or any level of abstraction in between.A
configuration can be used to describe how design entities are put together to form a
complete design.
A design entity may be described in terms of a hierarchy of blocks, each of which
represents a portion of the whole design. The top-level block in such a hierarchy is the
design entity itself; such a block is an external block that resides in a library and may be
used as a component of other designs. Nested blocks in the hierarchy are internal blocks,
defined by block statements
1.1Entity declarations:

An entity declaration defines the interface between a given design entity and the
environment in which it issued. It may also specify declarations and statements that are
part of the design entity. A given entity declaration may be shared by many design
entities, each of which has a different architecture. Thus, an entity declaration can
potentially represent a class of design entities, each with the same interface.
entity_declaration ::=
entity identifier is
entity_header
entity_declarative_part
[ begin
entity_statement_part ]
end [ entity ] [ entity_simple_name ] ;
1.1.1Generics:

Generics provide a channel for static information to be communicated to a block from its
environment. The following applies to both external blocks defined by design entities and
to internal blocks defined by block
statements.
generic_list ::= generic_interface_list
The generics of a block are defined by a generic interface list. Each interface element in
such a generic interface list declares a formal generic.

1.1.2 Ports:
Ports provide channels for dynamic communication between a block and its environment.
port_list ::= port_interface_list
1.2 Architecture bodies:
An architecture body defines the body of a design entity. It specifies the
relationships between the inputs and outputs of a design entity and may be expressed in
terms of structure, dataflow, or behavior. Such specifications may be partial or complete.
architecture_body ::=
architecture identifier of entity_name is
architecture_declarative_part
begin
architecture_statement_part
end [ architecture ] [ architecture_simple_name ] ;
1.3 Subprograms And Packages
1.3.1 Subprogram declarations:
A subprogram declaration declares a procedure or a function, as indicated by the
appropriate reserved word.
subprogram_declaration ::=
subprogram_specification ;
subprogram_specification ::=
procedure designator [ ( formal_parameter_list ) ]
| [ pure | impure ] function designator [ ( formal_parameter_list ) ]
return type_mark
The specification of a procedure specifies its designator and its formal parameters
(if any). The specification of a function specifies its designator, its formal parameters (if
any), the subtype of the returned value (the result subtype), and whether or not the
function is pure. A function is impure if its specification contains the reserved word
impure; otherwise, it is said to be pure. A procedure designator is always an identifier. A
function designator is either an identifier or an operator symbol

1.3.2 Subprogram bodies:


A subprogram body specifies the execution of a subprogram.

subprogram_body ::=
subprogram_specification is
subprogram_declarative_part
begin
subprogram_statement_part
end [ subprogram_kind ] [ designator ] ;
1.3.3 Package declarations:
A package declaration defines the interface to a package. The scope of a
declaration within a package can be extended to other design units.
package_declaration ::=
package identifier is
package_declarative_part
end [ package ] [ package_simple_name ] ;
1.3.4 Package bodies
A package body defines the bodies of subprograms and the values of deferred
constants declared in the interface to the package.
package_body ::=
package body package_simple_name is
package_body_declarative_part
end [ package body ] [ package_simple_name ] ;
1.4 Data Types:
1.4.1 Scalar Types:
Scalar type can be classified into four types.they are
-- Enumeration
-- Integer
-- Physical
-- Floating Point
1.4.1.1 Enumeration types:
An enumeration type definition defines an enumeration type.
enumeration_type_definition ::=
( enumeration_literal { , enumeration_literal } )
enumeration_literal ::= identifier | character_literal
1.4.1.2 Integer types:

An integer type definition defines an integer type whose set of values includes
those of the specified range.
integer_type_definition ::= range_constraint.
1.4.1.3 Physical types:
Values of a physical type represent measurements of some quantity. Any value of
a physical type is an integral multiple of the primary unit of measurement for that type.
physical_type_definition ::=
range_constraint
units
primary_unit_declaration
{ secondary_unit_declaration }
end units [ physical_type_simple_name ]
1.4.1.4 Floating point types:
Floating point types provide approximations to the real numbers. Floating point
types are useful for models in which the precise characterization of a floating point
calculation is not important or not determined.
floating_type_definition ::= range_constraint
1.4.2 Composite types:
Composite types are used to define collections of values. These include both
arrays of values (collections of values of a homogeneous type) and records of values
(collections of values of potentially heterogeneous types).
1.4.2.1 Array types
An array object is a composite object consisting of elements that have the same
subtype. The name for an element of an array uses one or more index values belonging to
specified discrete types. The value of an array object is a composite value consisting of
the values of its elements
unconstrained_array_definition ::=
array ( index_subtype_definition { , index_subtype_definition } )
of element_subtype_indication
constrained_array_definition ::=
array index_constraint of element_subtype_indication

1.4.2.2 Record types:

A record type is a composite type, objects of which consist of named elements.


The value of a record object is a composite value consisting of the values of its elements.
record_type_definition ::=
record
element_declaration
{ element_declaration }
end record [ record_type_simple_name ]
1.4.3 Access types:
An object declared by an object declaration is created by the elaboration of the
object declaration and is denoted by a simple name or by some other form of name. In
contrast, objects that are created by the evaluation of allocators (see 7.3.6) have no simple
name. Access to such an object is achieved by an access value returned by an allocator;
the access value is said to designate the object.
access_type_definition ::= access subtype_indication

1.4.4 File types


A file type definition defines a file type. File types are used to define objects
representing files in the hostsystem environment. The value of a file object is the
sequence of values contained in the host system file.
file_type_definition ::= file of type_mark
1.5 Data Objects:
1.5.1 Object declarations
An object declaration declares an object of a specified type. Such an object is
called an explicitly declared object.
1.5.1.1 Constant declarations
A constant declaration declares a constant of the specified type. Such a constant is
an explicitly declared constant.
constant_declaration ::=
constant identifier_list : subtype_indication [ := expression ] ;
If the assignment symbol ":=" followed by an expression is present in a constant
declaration, the expression specifies the value of the constant; the type of the expression
must be that of the constant. The value of a constant cannot be modified after the
declaration is elaborated.

1.5.1.2 Signal declarations


A signal declaration declares a signal of the specified type. Such a signal is an explicitly
declared signal.
signal_declaration ::=
signal identifier_list : subtype_indication [ signal_kind ] [ := expression ] ;
signal_kind ::= register | bus
1.5.1.3 Variable declarations
A variable declaration declares a variable of the specified type. Such a variable is
an explicitly declared variable.
variable_declaration ::=
[ shared ] variable identifier_list : subtype_indication [ := expression ] ;
1.5.1.4 File declarations
A file declaration declares a file of the specified type. Such a file is an explicitly declared
file.
file_declaration ::=
file identifier_list : subtype_indication [ file_open_information ] ;
1.6 Operators:
1.6.1.Logical Operators:
The logical operators and, or, nand, nor, xor, xnor, and not are defined for
predefined types BIT and BOOLEAN. They are also defined for any one-dimensional
array type whose element type is BIT or BOOLEAN. For the binary operators and, or,
nand, nor, xor, and xnor, the operands must be of the same base type. Moreover, for the
binary operators and, or, nand, nor, xor, and xnor defined on one-dimensional array
types, the operands must be arrays of the same length, the operation is performed on
matching elements of the arrays, and the result is an array with the same index range as
the left operand.
1.6.2.Relational Operators.
Relational operators include tests for equality, inequality, and ordering of
operands. The operands of each relational operator must be of the same type. The result
type of each relational operator is the predefined type BOOLEAN.

Operator
Operation
=
/=
<
<=
>
>=

Operand
Type
Equality
Any Type
Inequality
Any Type
Less Than
Any ScalarType or
Descrete type
Less Than or Equal Any ScalarType or
Descrete type
Any ScalarType or
GreaterThan
Descrete type
Greater Than or
Any ScalarType or
Equal
Descrete type

Result Type
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean

1.6.3.Shift Operators.
The shift operators sll, srl, sla, sra, rol, and ror are defined for any one-dimensional
array type whose element type is either of the predefined types BIT or BOOLEAN.
Operator
Operation
sll

Shift lef
logical

srl

Shift right
logical

sla
sra

Shift left
arithmetic
Shift right
arithmetic

rol

Rotate left
logical

ror

Rotate right
logical

Left operand
type
Any one-dimensional
array type whose element
type is BIT or BOOLEAN
Any one-dimensional
array type whose element
type is BIT or BOOLEAN
Any one-dimensional
array type whose element
type is BIT or BOOLEAN
Any one-dimensional
array type whose element
type is BIT or BOOLEAN
Any one-dimensional
array type whose element
type is BIT or BOOLEAN
Any one-dimensional
array type whose element
type is BIT or BOOLEAN

Right operand
Type

Result
type

INTEGER

Same as left

INTEGER

Same as left

INTEGER

Same as left

INTEGER
Same as left
INTEGER
Same as left
INTEGER

sSame as
left

1.6.4.Adding Operators.
The adding operators + and are predefined for any numeric type and have their
conventional mathematical meaning. The concatenation operator & is predefined for any
one-dimensional array type.

Operator

Operation

Addition

Subtraction

Left operand
type

Any numeric
type
Any numeric
type
Any array type

&
Concatenation

Any array
type
The element
type
The element
type

Right operand
Type

Result
Type

Same type
Same type
Same type
Same type
Same array type
Same element
type
Any array type
Any element
type

Same array
type
Same array
type
Same array
type
Any array
type

1.6.5. Multiplying Operators:


The operators * and / are predefined for any integer and any floating point type and
have their conventional mathematical meaning; the operators mod and rem are
predefined for any integer type. For each of these operators, the operands and the result
are of the same type.

Operator

Operation

Multiplication

Division

mod
rem

Modulus
Remainde

Left operand
type

Any integertype
Any floating point
type
Any integer type
Any floating point
type
Any integer type
Any integer type

Right
operand
Type

Result
Type

Same type
Same type

Same type
Same type

Same type
Same type

Same type
Same type

Same type
Same type

Same type
Same type

1.6.6. Miscellaneous operators:


The unary operator abs is predefined for any numeric type.
Operator

Operation

abs

Absolute value

Operand type

Any numeric type

Result type

Same numeric type

The exponentiating operator ** is predefined for each integer type and for each floating
point type. In either case the right operand, called the exponent, is of the predefined type
INTEGER.
Operator

**

Operation

Exponentiation

Left operand
type

Right operand
Type

Result
Type

Any integer type


Any floating
point type

INTEGER
INTEGER

Same as left
Same as left

In VHDL mainly there are three types modeling styles.These are


1.Behaviorial Modeling.
2. Data Flow Modeling.
3. Structural Modeling.
1.7 Behaviorial Modeling:
1.7 .1 Process statement
A process statement defines an independent sequential process representing the
behavior of some portion of thedesign.
process_statement ::=
[ process_label : ]
[ postponed ] process [ ( sensitivity_list ) ] [ is ]
process_declarative_part
begin
process_statement_part
end [ postponed ] process [ process_label ] ;

where the sensitivity list of the wait statement is that following the reserved word
process. Such a process statement must not contain an explicit wait statement. Similarly,
if such a process statement is a parent of a procedure, then that procedure may not
contain a wait statement.
1.7.2 Sequential statements:
The various forms of sequential statements are described in this section. Sequential
statements are used to define algorithms for the execution of a subprogram or process;
they execute in the order in which they appear.
1.7.2.1 Wait statement
The wait statement causes the suspension of a process statement or a procedure.
wait_statement ::=
[ label : ] wait [ sensitivity_clause ] [ condition_clause ] [ timeout_clause ] ;

sensitivity_clause ::= on sensitivity_list


sensitivity_list ::= signal_name { , signal_name }
condition_clause ::= until condition
condition ::= boolean_expression
timeout_clause ::= for time_expression
1.7.2.2 Assertion statement:
An assertion statement checks that a specified condition is true and reports an
error if it is not.
assertion_statement ::= [ label : ] assertion ;
assertion ::=
assert condition
[ report expression ]
[ severity expression ]
1.7.2.3 Report statement:
A report statement displays a message.
report_statement ::=
[ label : ]
report expression
[ severity expression ] ;
1.7.2.4 If statement:
An if statement selects for execution one or none of the enclosed sequences of
statements, depending on the value of one or more corresponding conditions.
if_statement ::=
[ if_label : ]
if condition then
sequence_of_statements
{ elsif condition then
sequence_of_statements }
[ else
sequence_of_statements ]
end if [ if_label ] ;
If a label appears at the end of an if statement, it must repeat the if label.

For the execution of an if statement, the condition specified after if, and any
conditions specified after elsif, are evaluated in succession (treating a final else as elsif
TRUE then) until one evaluates to TRUE or all conditions are evaluated and yield
FALSE. If one condition evaluates to TRUE, then the corresponding sequence of
statements is executed; otherwise, none of the sequences of statements is executed.
1.7.2.5 Case statement:
A case statement selects for execution one of a number of alternative sequences of
statements; the chosen alternative is defined by the value of an expression.
case_statement ::=
[ case_label : ]
case expression is
case_statement_alternative
{ case_statement_alternative }
end case [ case_label ] ;
case_statement_alternative ::=
when choices =>
sequence_of_statements
The expression must be of a discrete type, or of a one-dimensional array type
whose element base type is a character type. This type must be determinable
independently of the context in which the expression occurs, but using the fact that the
expression must be of a discrete type or a one-dimensional character array type. Each
choice in a case statement alternative must be of the same type as the expression; the list
of choices specifies for which values of the expression the alternative is chosen.
1.7.2.6 Loop statement:
A loop statement includes a sequence of statements that is to be executed
repeatedly, zero or more times.
loop_statement ::=
[ loop_label : ]
[ iteration_scheme ] loop
sequence_of_statements
end loop [ loop_label ] ;
iteration_scheme ::=
while condition
| for loop_parameter_specification

parameter_specification ::=
identifier in discrete_range
1.7.2.7 Next statement:
A next statement is used to complete the execution of one of the iterations of an
enclosing loop statement (called loop in the following text). The completion is
conditional if the statement includes a condition.
next_statement ::=
[ label : ] next [ loop_label ] [ when condition ] ;
1.7.2.8 Exit statement:
An exit statement is used to complete the execution of an enclosing loop
statement (called loop in the following text). The completion is conditional if the
statement includes a condition.
exit_statement ::=
[ label : ] exit [ loop_label ] [ when condition ] ;
1.7.2.9 Return statement
A return statement is used to complete the execution of the innermost enclosing
function or procedure body
.return_statement ::=
[ label : ] return [ expression ] ;
1.7.2.10 Null statement
A null statement performs no action.
null_statement ::=
[ label : ] null ;
1.8 Data Flow Modeling:
The various forms of concurrent statements are described in this section.
Concurrent statements are used to define interconnected blocks and processes that jointly
describe the overall behavior or structure of a design. Concurrent statements execute
asynchronously with respect to each other.
1.8.1 Block statement:
A block statement defines an internal block representing a portion of a design.
Blocks may be hierarchically nested to support design decomposition.

block_statement ::=
block_label :
block [ ( guard_expression ) ] [ is ]
block_header
block_declarative_part
begin
block_statement_part
end block [ block_label ] ;
If a guard expression appears after the reserved word block, then a signal with the
simple name GUARD of predefined type BOOLEAN is implicitly declared at the
beginning of the declarative part of the block, and the guard expression defines the value
of that signal at any given time (see 12.6.4). The type of the guard expression must be
type BOOLEAN. Signal GUARD may be used to control the operation of certain
statements within the block (see 9.5).
1.8.2 Concurrent procedure call statements:
A concurrent procedure call statement represents a process containing the
corresponding sequential procedure call statement.
concurrent_procedure_call_statement ::=
[ label : ] [ postponed ] procedure_call ;
For any concurrent procedure call statement, there is an equivalent process
statement. The equivalent process statement is a postponed process if and only if the
concurrent procedure call statement includes the reserved word postponed.
1.8.3 Concurrent assertion statements:
A concurrent assertion statement represents a passive process statement
containing the specified assertion statement.
concurrent_assertion_statement ::=
[ label : ] [ postponed ] assertion ;
1.8.4 Concurrent signal assignment statements
A concurrent signal assignment statement represents an equivalent process
statement that assigns values to signals.
concurrent_signal_assignment_statement ::=
[ label : ] [ postponed ] conditional_signal_assignment
| [ label : ] [ postponed ] selected_signal_assignment

1.8.5 Conditional signal assignments:


The conditional signal assignment represents a process statement in which the
signal transform is an if statement.
target <= options waveform1 when condition1 else
waveform2 when condition2 else
waveform3 when condition3 else
---------------------------waveformN-1 when condition-1 else
waveformN when conditionN;
1.8.6 Selected signal assignments:
The selected signal assignment represents a process statement in which the signal
transform is a case statement.
with expression select
target <= options waveform1 when choice_list1 ,
waveform2 when choice_list2 ,
waveform3 when choice_list3,
---------------------------waveformN-1 when choice_listN-1,
waveformN when choice_listN ;
1.9 .Structural Modeling:
1.9.1 Component declarations:
A component declaration declares a virtual design entity interface that may be
used in a component instantiation statement. A component configuration or a
configuration specification can be used to associate a component instance with a design
entity that resides in a library.
component_declaration ::=
component identifier [ is ]
[ local_generic_clause ]
[ local_port_clause ]
end component [ component_simple_name ] ;
Each interface object in the local generic clause declares a local generic. Each
interface object in the local port clause declares a local port.If a simple name appears at

the end of a component declaration, it must repeat the identifier of the component
declaration.
1.9.2 Component instantiation statements:
A component instantiation statement defines a subcomponent of the design entity
in which it appears, associates signals or values with the ports of that subcomponent, and
associates values with generics of that subcomponent. This subcomponent is one instance
of a class of components defined by a corresponding component declaration, design
entity, or configuration declaration.
component_instantiation_statement ::=
instantiation_label :
instantiated_unit
[ generic_map_aspect ]
[ port_map_aspect ] ;
instantiated_unit ::=
[ component ] component_name
| entity entity_name [ ( architecture_identifier ) ]
| configuration configuration_name

CHAPTER 3
Design of Hardware Model

3.1 Convolution
Convolution is an important tool in data processing, in particular in digital signal and image
processing. Many image processing operations such as scaling and rotation require re-sampling
or convolution filtering for each pixel in the image Digital images can be modified (through
convolution) by neighborhood operations; these operations go beyond point wise operations, and
include smoothing, sharpening, and edge detection. Convolution has many applications which
have great significance in discrete signal processing. It is usually difficult to deal with analog
signals. Hence signals are converted to digital state. Many approaches have been attempted to
reduce the convolution processing time using hardware and software algorithms but they are
restricted to specific applications. The main problem in implementing and computing
convolution is speed, area and power which affect any DSP system. Speeding up convolution
using a Hardware Description Language for design entry not only increases (improves) the
level of abstraction, but also opens new possibilities for using programmable devices. Today,
most DSPs suffer from limitations in available address space, or the ability to interface with
surrounding systems. The use of high speed field programmable gate arrays i.e. FPGAs, together
with DSPs, can often increase the system bandwidth, by providing additional functionality to the
general purpose DSPs .In this project, a novel method for computing the linear convolution of
two finite length sequences is presented. A 4x4 convolution circuit can be instantiated for larger
ones. This method is similar to the multiplication of two decimal numbers, this similarity that
makes this method easy to learn and quick to computes.

3.2 Convolution in time domain


When two signals convolution is carried out in time domain it is referred to as convolution in
time domain. We are dealing with convolution in time domain in this project. In time domain
also the convolution can be continuous or discrete. When the convolution is in time domain is
discrete then it is called as convolution in discrete time and when the convolution is performed
with respect to continuous time it is called as convolution as convolution in continuous time.
Convolution in discrete and continuous time are described in previous chapter.

3.3 Convolution in frequency domain


When two signals are convolved in frequency domain then it is called as convolution in
frequency domain. It is proved that the convolution in time domain is equivalent to
multiplication in frequency domain.
Proof:
Let f, g belong to L1 (Rn). Let F be the Fourier transform of f and G be the Fourier transform of g:

Where the dot between x and indicates the inner product of Rn . Let h be the convolution of f
and g

Now notice that

Hence by Fubini's theorem we have that


the integral formula

so its Fourier transform H is defined by

Observe that
we may apply Fubini's theorem again:

and hence by the argument above

Substitute y = z x; then dy = dz, so:

These two integrals are the definitions of F() and G(), so:

Hence, it is proved that the convolution in time domain is equivalent to multiplication in


frequency domain.

3.4 GENERAL IMPLEMENTATION FLOW


The generalized implementation flow diagram of the project is represented as follows.

Figure 3.5 General Implementation Flow Diagram

Initially the market research should be carried out which covers the previous version of the
design and the current requirements on the design. Based on this survey, the specification and the
architecture must be identified. Then the RTL modelling should be carried out in VERILOG
HDL with respect to the identified architecture. Once the RTL modelling is done, it should be
simulated and verified for all the cases. The functional verification should meet the intended
architecture and should pass all the test cases.
Once the functional verification is clear, the RTL model will be taken to the synthesis
process. Three operations will be carried out in the synthesis process such as
Translate
Map
Place and Route
The developed RTL model will be translated to the mathematical equation format which
will be in the understandable format of the tool. These translated equations will be then mapped
to the library that is, mapped to the hardware. Once the mapping is done, the gates were placed
and routed. Before these processes, the constraints can be given in order to optimize the design.
Finally the BIT MAP file will be generated that has the design information in the binary format
which will be dumped in the FPGA board.

3.5 Implementation
In this project the implementation is carried out by first designed the individual blocks and then
these are combined to the final architecture. The individual blocks are shown in block diagram
given below:

3.5.1 Block diagram


The block diagram of the proposed architecture is shown below:

3.5.1.1 Multiplexer 4*1 and 8*1:


A multiplexer, sometimes referred to as a "multiplexor" or simply "mux", is a device that selects
between a number of input signals. In its simplest form, a multiplexer will have two signal
inputs, one control input, and one output.
A multiplexer is a device which selects any one of the inputs from 2n inputs and directed
to output depending on n-select lines.

Fig : 4*1 multiplexer

Fig. Mutiplexer 8*1


The higher order multiplexers can be implemented using the lower order multiplexers. The 4*1
multiplexer can be implemented using two 2*1 multiplexers and so on. Similarly an 8*1
multiplexer can be implemented using two 4*1 multiplexers.

3.5.1.2 Serial in parallel out block:


A serial-in/parallel-out shift register is similar to the serial-in/ serial-out shift register in
that it shifts data into internal storage elements and shifts data out at the serial-out, data-out, pin .
It is different in that it makes all the internal stages available as outputs. Therefore, a serial
in/parallel-out shift register converts data from serial format to parallel format. If four data bits
are shifted in by four clock pulses via a single wire at data-in, below, the data becomes available
simultaneously on the four Outputs QA to QD after the fourth clock pulse.

The practical application of the serial-in/parallel-out shift register is to convert data from serial
format on a single wire to parallel format on multiple wires. Perhaps, we will illuminate four
LEDs (Light Emitting Diodes) with the four outputs (QA QB QC QD ).

The above details of the serial-in/parallel-out shift register are fairly simple. It looks like a serialin/ serial-out shift register with taps added to each stage output. Serial data shifts in at SI (Serial
Input). After a number of clocks equal to the number of stages, the first data bit in appears at SO

(QD) in the above figure. In general, there is no SO pin. The last stage (QD above) serves as SO
and is cascaded to the next package if it exists.

The shift register has been cleared prior to any data by CLR', an active low signal, which clears
all type D Flip-Flops within the shift register. Note the serial data 1011 pattern presented at the
SI input. This data is synchronized with the clock CLK. This would be the case if it is being
shifted in from something like another shift register, for example, a parallel-in/ serial-out shift
register (not shown here). On the first clock at t1, the data 1 at SI is shifted from D to Q of the
first shift register stage. After t2 this first data bit is at QB. After t3 it is at QC. After t4 it is at QD.
Four clock pulses have shifted the first data bit all the way to the last stage QD. The second data
bit a 0 is at QC after the 4th clock. The third data bit a 1 is at QB. The fourth data bit another 1 is
at QA. Thus, the serial data input pattern 1011 is contained in (QD QC QB QA). It is now available
on the four outputs.
It will available on the four outputs from just after clock t4 to just before t5. This parallel
data must be used or stored between these two times, or it will be lost due to shifting out the QD
stage on following clocks t5 to t8 as shown above.

3.5.1.3 Binary multiplier:


The binary multiplier used here is a 4-bit multiplier which takes two four bit inputs and
gives an 8-bit output.

Fig : Binary multiplier

The binary multiplier which is employed in convolution here in the present


project has a special characteristic that the internal carry will not be forwarded to next stage. So
the number of outputs obtained here is seven only because in binary multiplier the MSB part is
nothing but the carry obtained from the second MSB so as carry is not forwarded only seven bits
will be obtained as output.

3.5.1.4 Register:
A circuit with flip-flops is considered a sequential circuit even in the absence of Combinational
logic. Circuits that include flip-flops are usually classified by the function they perform. Two
such circuits are registers and counters.
A Register is a group of flip-flops. Its basic function is to hold information
within a digital system so as to make it available to the logic units during the computing

process. However, a register may also have additional capabilities associated with it. It may
have combinational gates that perform certain data-processing tasks.

Fig : a 8-bit register

Various types of registers are available on the market. A simple 4-bit register is shown
below. The common clock input triggers all flip-flops and the binary data available at the four
inputs are transferred into the register. The clear input is useful for clearing the register to all
0s output.
Registers capable of shifting their binary contents in one or both directions. A
unidirectional 4-bit shift register that uses only flip-flops is as follows:

Fig : Shift register

CHAPTER 4
Results and Discussions
4.1Introduction to Model Simulator:
4.1.1 Basic Simulation Flow
The following diagram shows the basic steps for simulating a design in ModelSim.

Figure -4.1. Basic Simulation Flow - Overview Lab


In ModelSim, all designs are compiled into a library. You typically start a new simulation in ModelSim by
creating a working library called "work". "Work" is the library name used by the compiler as the default
destination for compiled design units.
Compiling Your Design
After creating the working library, you compile your design units into it. The ModelSim library format is
compatible across all supported platforms. You can simulate your design on any platform without having
to recompile your design.
Loading the Simulator with Your Design and Running the Simulation With the design compiled, you
load the simulator with your design by invoking the simulator on a top-level module (Verilog) or a
configuration or entity/architecture pair (VHDL). Assuming the design loads successfully, the simulation
time is set to zero, and you enter

a run command to begin simulation.


Debugging Your Results
If you dont get the results you expect, you can use ModelSims robust debugging
environment to track down the cause of the problem.
4.1.2 Project Flow
A project is a collection mechanism for an HDL design under specification or test. Even though
you dont have to use projects in ModelSim, they may ease interaction with the tool and are
useful for organizing files and specifying simulation settings.
The following diagram shows the basic steps for simulating a design within a ModelSim project.

Figure -4.2 Project design flow


As you can see, the flow is similar to the basic simulation flow. However, there are two
important differences:
You do not have to create a working library in the project flow; it is done for you

automatically.
Projects are persistent. In other words, they will open every time you invoke ModelSim
unless you specifically close them.
4.1.3 Multiple Library Flow
ModelSim uses libraries in two ways: 1) as a local working library that contains the compiled
version of your design; 2) as a resource library. The contents of your working library will
change as you update your design and recompile. A resource library is typically static and
serves as a parts source for your design. You can create your own resource libraries, or they
may be supplied by another design team or a third party (e.g., a silicon vendor).
You specify which resource libraries will be used when the design is compiled, and there are
rules to specify in which order they are searched. A common example of using both a working
library and a resource library is one where your gate-level design and testbench are compiled
into the working library, and the design references gate-level models in a separate resource
library.
The diagram below shows the basic steps for simulating with multiple libraries.

Figure 4-3. Multiple Library Flow

Debugging Tools
ModelSim offers numerous tools for debugging and analyzing your design. Several of these
tools are covered in subsequent lessons, including:
Using projects
Working with multiple libraries
Setting breakpoints and stepping through the source code
Viewing waveforms and measuring time
Viewing and initializing memories
Creating stimulus with the Waveform Editor

Automating simulation

4.1.4 Basic Simulation


Figure 4-4. Basic Simulation Flow - Simulation Lab

Design Files for this Lesson


The sample design for this lesson is a simple 8-bit, binary up-counter with an associated
testbench. The pathnames are as follows:
Verilog <install_dir>/examples/tutorials/verilog/basicSimulation/counter.v and tcounter.v
VHDL <install_dir>/examples/tutorials/vhdl/basicSimulation/counter.vhd and tcounter.vhd
This lesson uses the Verilog files counter.v and tcounter.v. If you have a VHDL license, use
counter.vhd and tcounter.vhd instead. Or, if you have a mixed license, feel free to use the
Verilog testbench with the VHDL counter or vice versa.
4.1.5 Create the Working Design Library

Before you can simulate a design, you must first create a library and compile the source code into that
library.
1. Create a new directory and copy the design files for this lesson into it.
Start by creating a new directory for this exercise (in case other users will be working with these lessons).
Verilog: Copy counter.v and tcounter.v files from
/<install_dir>/examples/tutorials/verilog/basicSimulation to the new directory.
VHDL: Copy counter.vhd and tcounter.vhd files from
/<install_dir>/examples/tutorials/vhdl/basicSimulation to the new directory.
2. Start ModelSim if necessary.
a. Type vsim at a UNIX shell prompt or use the ModelSim icon in Windows. Upon opening ModelSim
for the first time, you will see the Welcome to ModelSim dialog. Click Close.
b. Select File > Change Directory and change to the directory you created in step 1.
3. Create the working library.
a. Select File > New > Library.
This opens a dialog where you specify physical and logical names for the library (Figure 3-2). You can
create a new library or map to an existing library. Well be doing the former.

Figure 4.5. The Create a New Library Dialog

b. Type work in the Library Name field (if it isnt already entered automatically).
c. Click OK.
ModelSim creates a directory called work and writes a specially-formatted file named _info into that
directory. The _info file must remain in the directory to distinguish it as a ModelSim library. Do not edit
the folder contents from your operating system; all changes should be made from within ModelSim.
ModelSim also adds the library to the list in the Workspace (Figure 3-3) and records the library mapping
for future reference in the ModelSim initialization file (modelsim.ini).

Figure 4-6. work Library in the Workspace

When you pressed OK in step 3c above, the following was printed to the Transcript:
vlib work
vmap work work
These two lines are the command-line equivalents of the menu selections you made. Many
command-line equivalents will echo their menu-driven functions in this fashion.
4.1.6 Compile the Design
With the working library created, you are ready to compile your source files.
You can compile by using the menus and dialogs of the graphic interface, as in the Verilog
example below, or by entering a command at the ModelSim> prompt.
1. Compile counter.v and tcounter.v.
a. Select Compile > Compile. This opens the Compile Source Files dialog (Figure 3-4).
If the Compile menu option is not available, you probably have a project open. If so, close the project by
making the Workspace pane active and selecting File > Close from the menus.
b. Select both counter.v and tcounter.v modules from the Compile Source Files dialog and click Compile.
The files are compiled into the work library. c. When compile is finished, click Done.

Figure 4-7 Compile Source Files Dialog

2. View the compiled design units.


a. On the Library tab, click the + icon next to the work library and you will see two design units (Figure
3-5). You can also see their types (Modules, Entities, etc.) and the path to the underlying source files
(scroll to the right if necessary).
b. Double-click test_counter to load the design.
You can also load the design by selecting Simulate > Start Simulation in the menu bar. This opens the
Start Simulation dialog. With the Design tab selected, click the + sign next to the work library to see the
counter and test_counter modules. Select
the test_counter module and click OK (Figure 4.8).

Figure 4-8. Loading Design with Start Simulation Dialog

When the design is loaded, you will see a new tab in the Workspace named sim that displays the
hierarchical structure of the design (Figure 4-8). You can navigate within the hierarchy by clicking on any
line with a + (expand) or - (contract) icon. You will also see a tab named Files that displays all files
included in the design.

Figure 4-8. VHDL Modules Compiled into work Library


4.1.7 Load the Design
1. Load the test_counter module into the simulator.
a. In the Workspace, click the + sign next to the work library to show the files contained there.

Figure 4-9. Workspace sim Tab Displays Design Hierarchy

2. View design objects in the Objects pane.


a. Open the View menu and select Objects. The command line equivalent is: view objects
The Objects pane (Figure 3-8) shows the names and current values of data objects in the current region
(selected in the Workspace). Data objects include signals, nets, registers, constants and variables not
declared in a process, generics, parameters.
Figure 4-10. Object Pane Displays Design Objects

You may open other windows and panes with the View menu or with the view command. See Navigating
the Interface.
4.1.8 Run the Simulation

Now you will open the Wave window, add signals to it, then run the simulation.
1. Open the Wave debugging window.
a. Enter view wave at the command line
You can also use the View > Wave menu selection to open a Wave window.
The Wave window is one of several windows available for debugging. To see a list
of the other debugging windows, select the View menu. You may need to move or
resize the windows to your liking. Window panes within the Main window can be
zoomed to occupy the entire Main window or undocked to stand alone. For details,
see Navigating the Interface.
2. Add signals to the Wave window.
a. In the Workspace pane, select the sim tab.
b. Right-click test_counter to open a popup context menu.
c. Select Add > To Wave > All items in region (Figure 3-9).
All signals in the design are added to the Wave window.
Figure 4-11. Using the Popup Menu to Add Signals to Wave Window

3. Run the simulation.


a. Click the Run icon in the Main or Wave window toolbar.

The simulation runs for 100 ns (the default simulation length) and waves are
drawn in the Wave window.
b. Enter run 500 at the VSIM> prompt in the Main window.
The simulation advances another 500 ns for a total of 600 ns (Figure 3-10).

Figure 4-11. Waves Drawn in Wave Window

c. Click the Run -All icon on the Main or Wave window toolbar.

The simulation continues running until you execute a break command or it


hits a statement in your code (e.g., a Verilog $stop statement) that halts the
simulation.

d. Click the Break icon.

The simulation stops running.

4.2 Introduction
The Convolution process and the developed architecture for the required functionality
were discussed in the previous chapters. Now this chapter deals with the simulation and
synthesis results of the Convolution process. Here Modelsim tool is used in order to simulate the
design and checks the functionality of the design. Once the functional verification is done, the
design will be taken to the Xilinx tool for Synthesis process and the netlist generation.
The Appropriate test cases have been identified in order to test this modelled Convolution
process architecture. Based on the identified values, the simulation results which describes the

operation of the process has been achieved. This proves that the modelled design works properly
as per its functionality.

4.3 Simulation Results:


4.3.1Convolution toplevel:

4.4 Individual Modules:


4.4.1 Multiplexers:

4.4.2 SIPOs:

4.4.3 Binary Multiplier:

4.4.4 Multiplexer 8*1:

4.4.5 Register:

4.5 Introduction to FPGA:


FPGA stands for Field Programmable Gate Array which has the array of logic module,
I /O module and routing tracks (programmable interconnect). FPGA can be configured by end
user to implement specific circuitry. Speed is up to 100 MHz but at present speed is in GHz.
Main applications are DSP, FPGA based computers, logic emulation, ASIC and ASSP.
FPGA can be programmed mainly on SRAM (Static Random Access Memory). It is Volatile and
main advantage of using SRAM programming technology is re-configurability. Issues in FPGA
technology are complexity of logic element, clock support, IO support and interconnections
(Routing).
In this work, design of a DWT and IDWT is made using Verilog HDL and is synthesized
on FPGA family of Spartan 3E through XILINX ISE Tool. This process includes following:
Translate
Map
Place and Route
4.5.1 FPGA Flow
The basic implementation of design on FPGA has the following steps.
Design Entry
Logic Optimization
Technology Mapping
Placement
Routing
Programming Unit
Configured FPGA

Above shows the basic steps involved in implementation. The initial design entry of may
be Verilog HDL, schematic or Boolean expression. The optimization of the Boolean expression
will be carried out by considering area or speed.

Figure 4.8 Logic Block

In technology mapping, the transformation of optimized Boolean expression to FPGA


logic blocks, that is said to be as Slices. Here area and delay optimization will be taken place.
During placement the algorithms are used to place each block in FPGA array. Assigning the
FPGA wire segments, which are programmable, to establish connections among FPGA blocks
through routing. The configuration of final chip is made in programming unit.

4.6 Xilinx design flow


The first step involved in implementation of a design on FPGA involves System Specifications.
Specifications refer to kind of inputs and kind of outputs and the range of values that the kit can take in
based on these Specifications. After the first step system specifications the next step is the Architecture.
Architecture describes the interconnections between all the blocks involved in our design. Each and every
block in the Architecture along with their interconnections is modeled in either VHDL or Verilog
depending on the ease. All these blocks are then simulated and the outputs are verified for correct
functioning.

Figure 4-12 Xilinx Implementation Design Flow-Chart.


After the simulation step the next steps i.e., Synthesis. This is a very important step in knowing
whether our design can be implemented on a FPGA kit or not. Synthesis converts our VHDL code into its
functional components which are vendor specific. After performing synthesis RTL schematic, Technology
Schematic and generated and the timing delays are generated. The timing delays will be present in the
FPGA if the design is implemented on it. Place & Route is the next step in which the tool places all the
components on a FPGA die for optimum performance both in terms of areas and speed. We also see the
interconnections which will be made in this part of the implementation flow.
In post place and route simulation step the delays which will be involved on the FPGA kit are
considered by the tool and simulation is performed taking into consideration these delays which will be
present in the implementations on the kit. Delays here mean electrical loading effect, wiring delays, stray
capacitances.
After post place and route, comes generating the bit-map file, which means converting the VHDL
code into bit streams which is useful to configure the FPGA kit. A bit file is generated this step is
performed. After this comes final step of downloading the bit map file on to the FPGA board which is
done by connecting the computer to FPGA board with the help of JTAG cable (Joint Test Action Group)
which is an IEEE standard. The bit map file consist the whole design which is placed on the FPGA die,
the outputs can now be observed from the FPGA LEDs. This step completes the whole process of
implementing our design on an FPGA.

4.7Xilinx ISE 10.1 software


4.7.1 Introduction
Xilinx ISE (Integrated Software Environment) 9.2i software is from XILINX company, which is
used to design any digital circuit and implement onto a Spartan-3E FPGA device. XILINX ISE 9.2i
software is used to design the application, verify the functionality and finally download the design on to a
Spartan-3E FPGA device.

4.7.2 Xilinx ISE 10.1 software tools

SIMULATION : ISE (Integrated Software Environment) Simulator

SYNTHESIS, PLACE & POUTE : XST (Xilinx Synthesis Technology) Synthesizer

4.7.3 Design steps using Xilinx ISE 10.1


1

Create an ISE PROJECT for particular embedded system application.

Write the assembly code in notepad or write pad and generate the verilog or vhdl module by making
use of assembler.

Check syntax for the design.

Create verilog test fixture of the design.

Simulate the test bench waveform (BEHAVIORAL SIMULATION) for functional verification of the
design using ISE simulator.

Synthesize and implement the top level module using XST synthesizer.

4.8 Synthesis Result


The developed convolution project is simulated and verified their functionality. Once the
functional verification is done, the RTL model is taken to the synthesis process using the Xilinx ISE tool.
In synthesis process, the RTL model will be converted to the gate level net-list mapped to a specific

technology library. Here in this Spartan 3E family, many different devices were available in the Xilinx
ISE tool.The target device is SPARTAN 2 FPGA kit.In order to synthesis this design the device named as
XC3S100E has been chosen and the package as TQ144 with the device speed such as 5.

4.4 Synthesis Result


The developed convolution project is simulated and verified their functionality. Once the
functional verification is done, the RTL model is taken to the synthesis process using the Xilinx
ISE tool. In synthesis process, the RTL model will be converted to the gate level netlist mapped
to a specific technology library. Here in this Spartan 3E family, many different devices were
available in the Xilinx ISE tool. In order to synthesis this design the device named as
XC3S500E has been chosen and the package as FG320 with the device speed such as -4.
This design is synthesized and its results were analyzed as follows.

CHAPTER 5
Conclusion and Future Work

5.1 Conclusion

5.2 Future scope of the Work

You might also like