Professional Documents
Culture Documents
REPORT
DIGITAL DESIGN USING VHDL
Topic : Huffman Decoder using verilog
Instructor : Prof. Dr. Ngo Vu Duc
Group : 9
Members : Vu Tung Lam - 20176648
Tran Duc Dung - 20176638
Table of Contents
INTRODUCTION.................................................................................................3
CHAPTER1:METHODOLOGY.........................................................................4
1.1.Xilinx ISE.....................................................................................................4
1.2.Huffman coding................................................................................................5
1.2.1.Definition...................................................................................................5
1.2.2.Huffman Tree.............................................................................................5
1.3.Lookup Table...............................................................................................6
CHAPTER2:ALGORITHM.................................................................................7
2.1Block Diagram..............................................................................................7
2.2 Input...............................................................................................................7
2.3 Lookup Table (LUT)..................................................................................9
2.4 FSM ( Finite state machine ).................................................................10
CHAPTER3:SIMULATION RESULT...........................................................12
CONCLUSION....................................................................................................13
REFERENCES.....................................................................................................14
INTRODUCTION
Compression is a necessity in the current world of technology, which is
centered on speed and efficiency. Consequently, large and bulky pieces of
information are abandoned for smaller bits of data, which can be shared between
peers at faster rates. Data can be broken into smaller pieces or forcefully
compressed by programs that are powered by algorithms. The two major types of
compression In algorithms are lossless compression and lossy compression.
Lossless compression is used for applications that require an exact reconstruction
of the original data, while lossy compression is used when the user can tolerate
some differences between the original and reconstructed representations of the
data. Lossy compression techniques involve some loss of information and data are
compressed usinglossy techniques generally cannot be recovered or reconstructed
exactly return for accepting this distortion in the reconstruction, we can generally
obtain much higher compression ratios than is possible with lossless compression.
Various lossless data compression algorithms have been proposed and used.
Huffman Coding, Arithmetic Coding, Shannon Fano Algorithm, Run Length
Encoding Algorithm are some of the techniques in use. Huffman codes are prefix
codes and are optimum for a set of probabilities. The Huffman code is based on
two observations. First, in an optimum code, symbols that occur more frequently
(have a higher probability of occurrence) have shorter codewords than symbols
that occur less frequently. Second, in an optimum code, the two symbols that occur
least frequently have the same length. The Huffman procedure is obtained by
adding a simple requirement to these two observations. This requirement is that the
codewords corresponding to the two lowest probability symbols differ only in the
last bit.
CHAPTER1:METHODOLOGY
1.1.Xilinx ISE
Xilinx ISE (Integrated Synthesis Environment) is a discontinued software tool
from Xilinx for synthesis and analysis of HDL designs, which primarily targets
development of embedded firmware for Xilinx FPGA and CPLD integrated circuit
(IC) product families. Use of the last released edition from October 2013 continues
for in-system programming of legacy hardware designs containing older FPGAs
and CPLDs otherwise orphaned by the replacement design tool, Vivado Design
Suite.
ISE enables the developer to synthesize ("compile") their designs, perform timing
analysis, examine RTL diagrams, simulate a design's reaction to different stimuli,
and configure the target device with the programmer. Other components shipped
with the Xilinx ISE include the Embedded Development Kit (EDK), a Software
Development Kit (SDK) and ChipScope Pro. The Xilinx ISE is primarily used for
circuit synthesis and design, while ISIM or the ModelSim logic simulator is used
for system-level testing.
The primary user interface of the ISE is the Project Navigator, which includes the
design hierarchy (Sources), a source code editor (Workplace), an output console
(Transcript), and a processes tree (Processes).
The Design hierarchy consists of design files (modules), whose dependencies are
interpreted by the ISE and displayed as a tree structure. For single-chip designs
there may be one main module, with other modules included by the main module,
similar to the main() subroutine in C++ programs. Design constraints are specified
in modules, which include pin configuration and mapping.
The Processes hierarchy describes the operations that the ISE will perform on the
currently active module. The hierarchy includes compilation functions, their
dependency functions, and other utilities. The window also denotes issues or errors
that arise with each function.
The Transcript window provides status of currently running operations, and
informs engineers on design issues. Such issues may be filtered to show Warnings,
Errors, or both.
In this project we use Xilinx ISE 14.7 for coding and simulating
1.2.Huffman coding
1.2.1.Definition
Huffman coding is a lossless data encoding algorithm. The process behind its
scheme includes sorting numerical values from a set in order of their frequency.
The least frequent numbers are gradually eliminated via the Huffman tree, which
adds the two lowest frequencies from the sorted list in every new “branch.” The
sum is then positioned above the two eliminated lower frequency values, and
replaces them in the new sorted list. Each time a new branch is created, it moves
the general direction of the tree either to the right (for higher values) or the left (for
lower values). When the sorted list is exhausted and the tree is complete, the final
value is zero if the tree ended on a left number, or it is one if it ended on the right.
This is a method of reducing complex code into simpler sequences
1.2.2.Huffman Tree
Huffman tree or Huffman coding tree defines as a full binary tree in which each
leaf of the tree corresponds to a letter in the given alphabet.
The Huffman tree is treated as the binary tree associated with minimum external
path weight that means, the one associated with the minimum sum of weighted
path lengths for the given set of leaves. So the goal is to construct a tree with the
minimum external path weight.
The fig 2.1 shows the block diagram for the decoder in which the inputdata is first
loaded into the register which is then compared with codes stored in the LUT and
finally the decoded data.
We use the Finite state machine ( FSM ) because It is an abstract machine that can
be in exactly one of a finite number of states at any given time. The FSM can
change from one state to another in response to some inputs
2.2 Input
Fig2.2: Huffman tree
https://academickids.com/encyclopedia/index.php/L
ookup_table
https://www.techopedia.com/definition/7627/huffm
an-coding
https://github.com
https://inpressco.com/wp-
content/uploads/2015/06/Paper962032-2035.pdf