CC317-Spring 22-Lec 09
CC317-Spring 22-Lec 09
Spring 2022
Lecture 9
http://www.free-powerpoint-templates-design.com
Agenda 01 Introduction
02 Entity
03 Library
04 Architecture
Introduction
Overview
Designing with Boolean Equations
Boolean equations are impractical for large design containing hundreds of flip flops because it could
result in a huge number of logical equations.
B
D Q A 0 0 1 0
x
A 0 1 1 0
Q x
y DA (A, B, x) = A x + B x
DB (A, B, x) = A x + B’ x
D Q B
y (A, B, x) = A B
CLK Q
Overview
Schematic based design
-Simulation
to test the logic design using simulation models
-Synthesis
to convert codes to hardware
VHDL Modules
VHDL Statement Terminator
• Each VHDL Statements is terminated using a semicolon ;
BIT STD_LOGIC
0 1 0 1 H L U
Default X W Z - Default
value value
BIT_VECTOR : STD_LOGIC_VECTOR :
1D-array each element of the BIT type 1D-array each element of the STD_LOGIC type
Example: Example:
a : in BIT; a : in STD_LOGIC;
b : in BIT_VECTOR (3 downto 0); b : in STD_LOGIC_VECTOR(3 downto 0);
c : in BIT_VECTOR (0 to 3); c : in STD_LOGIC_VECTOR(0 to 3);
VHDL Details : Types
Basic data types
X Z 0 1 U
W - H L
Note that:
Last port has no semicolon ;
Comma , can separate ports with the same type and mode
Example
Write the entity that describes the shown circuit
Library
Libraries
• STD The standard IEEE library that holds many predefined types such as BIT.
Many of these types are used almost like a reserved word because they are already
predefined in the STD library.
•WORK This is the working library, where we store our currently analysed design
entities
Standard Libraries
• Include library ieee; before entity declaration.
q
“<=” is used for a signal assignment
which describes how the data on the right
nq hand side of the operator to the left hand
s
side.
VHDL Details : Types
•VHDL has concurrent statements and sequential statements
•Concurrent statements are executed in parallel w.r.t each other.
With – select
When – else
Process statement
Assign statement
•Sequential statements are executed in sequence w.r.t each other.
If statement
loop statement
Case statement
Wait and Null statement
Concurrent Statements
33
VHDL Modules
my EXOR gate
Library : Collection of design
library IEEE; elements, type declarations,sub
use IEEE.std_logic_1164.all; programs, etc.