1 VHDL
1 VHDL
COLLEGE OF ENGINEERING
Karvenagar, Pune
Accredited with ‘A’ Grade by NAAC
Presentation
On
Topic: HDL Design
Unit I: HDL
Mrs.H. N. Burande
Department of Electronics & Telecommunication Engineering
1
Unit-1: Design with HDL
Session-1/38
HDL Design
Reference Books:
VHSIC Hardware
Description Language
--------------------------------------
VHSIC --
Very High Speed Integrated Circuits
A Brief History Of VHDL
• Goal
– most ‘reliable’ design process, with minimum cost and
time
– avoid design errors!
Basic VHDL Concepts
• Interfaces -- i.e. ports
• Behavior
• Structure
• Test Benches
• Analysis, simulation
• Synthesis
VHDL CAPABILITIES
• VHDL is a programming language that allows one
to model and develop complex digital systems in
a dynamic environment.
Librarie
s
Design Units
Statements
Expressions
Objects
Types
Design Units and Libraries (cont.)
• VHDL model part that can be independently
analyzed (error checked) is a design unit
– Primary Design Units
• Entity Declaration
• Package Declaration
• Configuration Declaration
– Secondary Design Units
• Architectural Body
• Package Body
– Primary units analyzed before secondary units
Design Units and Libraries (cont.)
• Two predefined libraries in VHDL
– STD - contains predefined VHDL constructs such as
types, objects, etc.
– WORK - the working library
• Many other libraries may exist as part of
development environment
– IEEE library - standard types and operators needed for
simulation and implementation
– User-defined libraries - designs for reuse
– Implementation specific libraries - logic families
VHDL design units
1. Entity Description: It describes external
(interface) view of design.
2. Architecture Body : It consists of internal
description of design.
3. Configuration Description : It specifies the
binding of one architecture body from the many
architecture bodies associated with entity.
4. Package Declaration: It declares type, subtype,
subprogram etc.
5. Package Body: It contains definitions of
subprograms declared in package declaration.
Entity
• It is the design’s interface to the external
circuitry
• Equivalent to pinout /package of an IC
• VHDL design must include one and only
one entity per module
• It can be used as a component in other
entities after being compiled into a library
Entity syntax
entity entity_name is
port ( port_name : signal_mode signal_type ;
port_name : signal_mode signal_type ;
port_name : signal_mode signal_type );
end entity_name ;
Port Definition
• Port declarations are identified by the keyword
‘port’
– Define design entity input/output signals
– Declaration must specify:
• The name (identifier)
• The direction, defined by keywords in, out,
inout, buffer
The information type; predefined types are
available
– BIT is predefined Boolean type with
values of 0 & 1
– INTEGER is a signed type
Port Definitions (cont.)
• The port statement has the form of
PORT ( signal definition clause(s) );
– where the I/O signal definitions are
enclosed by parenthesis and followed by
a semicolon
– Multiple signal definitions are allowed
• Definitions are separated by a
semicolon
• There is no semicolon after the last
definition
Modes
Entity
• Dataflow
• Behavioral
• Structural
• Mixed
Modeling the Dataflow way
entity reg4 is
port ( d0, d1, d2 : in bit
d3, en, clk : in bit;
q0, q1, q2, q3 : out bit );
end reg4;
• Structural architecture
– implements the module as a
composition of subsystems
– contains
• signal declarations, for internal
interconnections
– the entity ports are also treated as signals
• component instances
– instances of previously declared
entity/architecture pairs
• port maps in component instances
– connect signals to component ports
Structural way -- EX.1
Structural way cont..
• First declare D-latch & and-gate entities and architectures
...
begin
bit0 : d_latch port map ( d0, int_clk,
q0 );
bit1 : d_latch port map ( d1, int_clk,
q1 );
bit2 : d_latch port map ( d2, int_clk,
q2 );
bit3 : d_latch port map ( d3, int_clk,
q3 );
gate : and2 port map ( en, clk, int_clk );
end struct;
• Component instantiation is a
concurrent statements. Therefore the
order of statement is not important.
• The architecture body is composed of
two parts:
1.The declarative part i.e. before the
keyword ‘begin’.
2.The statement part i.e. after the
keyword ‘begin’.
Mixed Behavior and Structure
• An architecture can contain both behavioral and
structural parts
– process statements and component instances
• collectively called concurrent statements
– processes can read and assign to signals
• Example: register-transfer-level (RTL) Model
– data path described structurally
– control section described behaviorally
Mixed Example
Mixed Example
entity multiplier is
port ( clk, reset : in bit;
multiplicand, multiplier : in integer;
product : out integer );
end multiplier;
VHDL Syntax
Is VHDL Case sensitive?
Is VHDL Concurrent/Sequential language?
Assignment for next session