01 Module1.0 Introduction To HDL
01 Module1.0 Introduction To HDL
INTRODUCTION TO HDL
Module 1
Styles/Types of
Data Types
Description
HARDWARE DESCRIPTION LANGUAGE
HDL D E F I N I T I O N
Hardware
Description
Language
1 2
HDL
HDL
Verilog VHDL
Input Output
a b S C
0 0 0 0
1 0 1 0
0 1 1 0
1 1 0 1
Half-Adder
Logic Symbol Logic Diagram
Structure of the VHDL Module
Two major constructs:
- Entity
- Architecture
ENTITY
- declares the input and output signals of the
system to be described.
ARCHITECTURE
- describes the relationship between the inputs
and outputs of the system.
Entity and Architecture
-Name or Identifier
note: VHDL is case INSENSITIVE.
- should start with a letter
- can include the special character
underscore(_)
Entity
entity Half_adder is port(a: in bit;
b : in bit;
S : out bit;
C : out bit);
end half_adder;
entity (predefined keyword) – begins the entity part of the module followed by
the name of the entity.
Name (user defined) – does not convey any information about the system; just
an identifier.
is (predefined keyword) – must be written after the name of the entity
port (predefined keyword) – starts the input/s and output/s declarations.
in (predefined) – instantiates the mode of the port as an input.
out (predefined) – instantiates the mode of the port as an output.
bit (predefined) – determines the allowed values that signals a , b can take and
S, C outputs.
semicolon (;) - separator
Architecture
Example of Entity Architecture
-Name or Identifier
note: Verilog is case SENSITIVE.
- should start with a letter
- can include the special character
underscore(_)
Example of a Verilog Module
module Half_adder (a, b, S, C);
//declarations
input a, b;
output S, C;
//blank lines are allowed
//body
assign S = a ^ b; //statement 1
assign C = a & b; //statement 2
endmodule
STYLES (TYPES) OF DESCRIPTION
Types of Description
• Data Flow
• Behavioral
• Structural
• Switch Level
• Mixed Type
• Mixed Language
Data Flow Description
MODES
MODES
1 VHDL
• in: The port is only an input
2 Verilog HDL