VHDL - Introduction: ELEC 2200: Digital Logic Circuits Nitin Yogi
VHDL - Introduction: ELEC 2200: Digital Logic Circuits Nitin Yogi
VHDL - Introduction
Y: out bit);
Fall 08, Oct 29 end
ELEC2200-002 Lecture 7 my_ckt ; 4
(updated)
VHDL entity
entity my_ckt is Datatypes:
Name of the circuit
In-built
port ( User-defined
User-defined
A: in bit; Filename same as circuit
A name recommended
B: in bit; Example.
Example: X
S: in bit; B Circuit name: my_ckt
my_ckt
X: out bit; Filename: my_ckt.vhd
Y
Y: out bit S
); Direction of port
3 main types:
end my_ckt; in: Input
Port names out: Output
Note the absence of semicolon
or end
“;” at the Bidirectional
of the
inout: last signal
Signal names and the presence at the end of
the closing bracket
Fall 08, Oct 29 ELEC2200-002 Lecture 7 5
(updated)
Built-in Datatypes
Scalar (single valued) signal types:
bit
boolean
integer
Examples:
A: in bit;
G: out boolean;
K: out integer range -2**4 to 2**4-1;
Aggregate (collection) signal types:
bit_vector: array of bits representing binary numbers
signed: array of bits representing signed binary numbers
Examples:
D: in bit_vector(0 to 7);
E: in bit_vector(7 downto 0);
M: in signed (4 downto 0);
--signed 5 bit_vector binary number
begin
X <= Xtmp;
end ;
if (S=‘0’) then
0+d 0 1 0 0 0 0 ‘X’
Xtmp <= A; 0+2d 0 1 0 0 1 0 0
else
Xtmp <= B; 1 0 1 1 0 1 0 0
end if;
1+d 0 1 1 1 0 0 0
if ((Xtmp = ‘0’) and (S = ‘0’)) then
Y <= ‘1’; 1+2d 0 1 1 1 0 0 1
else
Y <= ‘0’;
end if; Scheduled
Scheduled events
events Scheduled
Assignments
events
executed:
executed:
list: list:
XtmpVar = ‘X’
X <= Xtmp;
XtmpVar := Xtmp;
Xtmp = 0= (0,0+d)
Xtmp Xtmp = (0,0+2d)
(empty)
end process p1; Y =Y10= (0,0+d) Y = (1,0+2d)
end;
X =X0‘X’
= (‘X’,0+d) X = (‘0’,0+2d)
Assignments executed:
Fall 08, Oct 29 ELEC2200-002 Lecture 7 15
XtmpVar = 0
(updated)
Synthesis
Synthesis:
Conversion of behavioral level description
to structural level netlist
Abstract behavioral description maps to concrete
logic-level implementation
For ex. Integers at behavioral level mapped to
bits at structural level
Structural level netlist
Implementation of behavioral description
Describes interconnection of gates
Synthesis tool we shall use:
Leonardo Spectrum