Professional Documents
Culture Documents
Jorge Crichigno
2/16/09
Half-adder
2/16/09
Half-adder Testbench
2/16/09
10 ns
testbench
ha
2/16/09
x_signal
y_signal
s
c
s_signal
c_signal
Full-adder
2/16/09
Full-adder Testbench
2/16/09
testbench
fa
x_signal
y_signal
z_signal
2/16/09
s
c
s_signal
c_signal
2/16/09
2/16/09
2/16/09
Sensitivity list
2/16/09
Note:
Process not
activated on B
change
2/16/09
0
0
1
1
00
00
00
00
11
00
2/16/09
S1
C
undefined
2/16/09
0
0
0
1
1
0
1
1
1
U
0
U
1
U
2/16/09
Note:
Easy to understand, but not clear hardware
mapping!
Use signal always you can; rely on variables
only for the characteristics that cannot be
described by signals
0
A
Conceptual
implementation
2/16/09
tmp
B
C
Case Statement
Syntax:
2/16/09
Example:
Introduction to Multiplexers
Truth Table
2/16/09
I0
I1
ENTITY mux4x1 IS
PORT (
BEGIN
CASE S IS
D0 : IN STD_LOGIC;
Y <= D0;
D1 : IN STD_LOGIC;
Y <= D1;
D2 : IN STD_LOGIC;
Y <= D2;
D3 : IN STD_LOGIC;
Y : OUT STD_LOGIC
);
END mux4x1;
2/16/09
END CASE;
END PROCESS;
END multiplexor4x1;