Convolution
Convolution
Convolution
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.
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:
and
is defined by
For discrete time signals x(n) and h(n) , the integration is replaced by a summation
[1]
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.
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.
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.
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
Graphical Interpretation:
Reflection of
resulting in
Shifting of
resulting in
and
resulting in the convolution value for
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.
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).
Convolution is such an important tool that it is represented by the symbol *, and can be written
as
By making a simple change of variables into the convolution integral, = t, we can easily
show that convolution is commutative:
2.4
Symmetric convolution
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.
VHDL BASICS
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
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
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
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
Operation
abs
Absolute value
Operand type
Result 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
INTEGER
INTEGER
Same as left
Same as left
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 ] ;
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
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.
Where the dot between x and indicates the inner product of Rn . Let h be the convolution of f
and g
Observe that
we may apply Fubini's theorem again:
These two integrals are the definitions of F() and G(), so:
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:
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.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.
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:
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.
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.
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
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.
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).
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.
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.
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
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).
c. Click the Run -All icon on the Main or Wave window toolbar.
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.4.2 SIPOs:
4.4.5 Register:
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.
Write the assembly code in notepad or write pad and generate the verilog or vhdl module by making
use of assembler.
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.
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.
CHAPTER 5
Conclusion and Future Work
5.1 Conclusion