Lecture 3-ECSE 222
Lecture 3-ECSE 222
Boris Vaisband
Agenda
• Canonical forms of Boolean functions
• VHDL
2𝑛 −1 2𝑛 −1
𝑚𝑖 = ෑ 𝑀𝑖
𝑖=0 𝑖=0
Timing simulation
Synthesis
No Timing
requirements
Functional simulation
met?
No Yes Yes
Design correct? Chip configuration
(implementation)
ECSE 222 – Digital Logic
(Fall 2022) B. Vaisband 8
Before We Move Forward
• VHDL syntax is also covered in the first tutorial
• The book provides many good examples
• Google is your friend
begin
MODULE1: HALFADDER
Instantiation port map(A, B, W_SUM, W_CARRY1);
…
ECSE 222 – Digital Logic
(Fall 2022) B. Vaisband 14
Port Association
• Two methods of port association are possible
▪ Positional port association
• E.g., port map(A,B,C,open,E);
• Order is critical
▪ Named port association
• E.g., port map(Sum=>S, Carry=>open, IN1=>X, IN2=>Y);
• Left side: formals – port names from component declaration
• Right side: actual – architecture signals
▪ Independent of order in component declaration
entity compare is
port(A,B: in std_logic_vector(7 downto 0);
EQ: out std_logic);
end compare;
x1 0
s f
f 0 x1
1 x2
x2 1
s
x2
sig1
x1 ARCHITECTURE LogicFunc OF MUX21 IS
SIGNAL sig1, sig2 : STD_LOGIC;
BEGIN
f sig1 <= x1 AND (NOT s);
sig2 <= s AND x2;
s f <= sig1 OR sig2;
x2 END LogicFunc;
sig2
𝑥1 𝑦1 = 𝑥1
𝑠
𝑥2 𝑦2 = 𝑥2
𝑥1 𝑦1
𝑥2 𝑦2
If 𝑠 = 1 then 𝑦1 = 𝑥2 and 𝑦2 = 𝑥1
𝑠=1
𝑥1 𝑦1 = 𝑥2
𝑥2 𝑦2 = 𝑥1
x(0) y(0)
s
x(1) y(1)
x(1)
M2 y(1)
x(0) y(0)
s
x(1) y(1)
x(1)
M2 y(1)
x(0) y(0)
x(1) y(1)