Simulations-Digital Logic Design-Solution Manual, Exercises of Digital Logic Design and Programming

This is solution manual for Digital Logic Design course. It was helpful for assignment Dr. Archan Singh gave us at Punjab Engineering College. It includes: Present, state, Xilinx, Foundation, Series, software, HDL, IEEE, Logic, Architecture

Typology: Exercises

2011/2012

Uploaded on 07/20/2012

annapurna
annapurna 🇮🇳

4.4

(21)

91 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
2
Problem Solutions – Chapter 5
5-24.
5-26.
TQ8 =(Q
1Q8 + Q1Q2Q4)E
TQ4 =Q
1Q2E
TQ2 =Q
1Q8E
TQ1 =E
Y=Q
1Q8
T
C
T
C
T
C
T
C
E
Y
Q8
Q1
Q2
Q4
Clock
Present state Next state FF Inputs
A B C ABC J
AKAJBKBJCKC
0
0
1
0
1
1
0
1
0
1
0
0
0
1
X
X
X
1
1
X
0
X
1
X
0
0
0
0
1
1
0
0
1
1
0
0
0
1
0
1
0
1
0
0
0
1
1
0
0
1
1
0
0
0
1
0
1
0
1
0
0
0
0
1
X
X
X
X
X
X
0
1
0
1
X
X
0
0
X
X
0
1
X
X
1
X
1
X
1
X
X
1
X
1
X
1
JC = B
KB = C
a) b)
JB = C
KC = 1
JA = BC
KA = C
JC = 1
KB = C
JB = AC
KC = 1
docsity.com
pf3
pf4

Partial preview of the text

Download Simulations-Digital Logic Design-Solution Manual and more Exercises Digital Logic Design and Programming in PDF only on Docsity!

5-24.

5-26.

T Q8 = (Q 1 Q 8 + Q 1 Q 2 Q 4 )E

T Q4 = Q 1 Q 2 E

T Q2 = Q 1 Q 8 E

T Q1 = E

Y = Q 1 Q 8

T

C

T C T C T C

E

Y

Q (^8)

Q (^1)

Q (^2)

Q (^4)

Clock

Present state Next state FF Inputs

A B C A B C JA K A J B K B JC K C

X

X

X

X

X 1 X 0 0 0 0 1 1

0 0 0 1 X X

X X X X 0 1

0 1 X X 0 0

X X 0 1 X X

1 X 1 X 1 X

X 1 X 1 X 1

JC = B

K B = C

a) J B = C b)

K C = 1

JA = BC

K A = C

JC = 1

K B = C

JB = AC

K C = 1

5-29. (All simulations performed using Xilinx Foundation Series software.)

5-33.

library IEEE; use IEEE.std_logic_1164.all;

entity reg_4_bit is port ( CLEAR, CLK: in STD_LOGIC; D: in STD_LOGIC_VECTOR (3 downto 0); Q: out STD_LOGIC_VECTOR (3 downto 0) ); end reg_4_bit;

architecture reg_4_bit_arch of reg_4_bit is begin

process (CLK, CLEAR) begin if CLEAR ='0' then --asynchronous RESET active Low Q <= "0000"; elsif (CLK'event and CLK='1') then --CLK rising edge Q <= D; end if; end process;

end reg_4_bit_arch;

library IEEE; use IEEE.std_logic_1164.all;

entity ripple_1_bit is port ( RESET, CLK, J, K: in STD_LOGIC; Q: out STD_LOGIC ); end ripple_1_bit;

architecture ripple_arch of ripple_1_bit is signal Q_out: std_logic; begin process (CLK, RESET) begin if RESET ='1' then -- asynchronous RESET active Low Q_out <= '0'; elsif (CLK'event and CLK='0') then --CLK falling edge if (J = '1' and K = '1') then Q_out <= not Q_out; elsif(J = '1' and K = '0') then Q_out <= '1'; elsif (J = '0' and K = '1') then Q_out <= '0'; end if; end if; end process; Q <= Q_out;

end ripple_arch;

-- (Continued in next column)

library IEEE; use IEEE.std_logic_1164.all;

entity ripple_4_bit is port ( RESET, CLK: in STD_LOGIC; Q: out STD_LOGIC_VECTOR (3 downto 0) ); end ripple_4_bit;

architecture ripple_4_bit_arch of ripple_4_bit is

component ripple_1_bit port ( RESET, CLK, J, K: in STD_LOGIC; Q: out STD_LOGIC ); end component ; signal logic_1: std_logic; signal Q_out: std_logic_vector(3 downto 0); begin bit0: ripple_1_bit port map(RESET, CLK, logic_1, logic_1, Q_out(0)); bit1: ripple_1_bit port map(RESET, Q_out(0), logic_1, logic_1, Q_out(1)); bit2: ripple_1_bit port map(RESET, Q_out(1), logic_1, logic_1, Q_out(2)); bit3: ripple_1_bit port map(RESET, Q_out(2), logic_1, logic_1, Q_out(3));

logic_1 <= '1'; Q <= Q_out;

end ripple_4_bit_arch;