ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-378: Computer Hardware Design Winter 2016 Homework 3 (Due date: March 10th @ 5:30 pm) Presentation and clarity are very important! Show your procedure! PROBLEM 1 (25 PTS) a) Complete the timing diagram of the circuit shown below. (5 pts) resetn clock T T Q resetn T Q clock Q b) Complete the timing diagram of the circuit whose VHDL description is shown below: (5 pts) library ieee; use ieee.std_logic_1164.all; entity circ is port ( prn, x, clk: in std_logic; q: out std_logic); end circ; elsif (clk’event and clk = ‘0’) then if x = ‘1’ then qt <= not(qt); end if; end if; end process; q <= qt; end a; architecture a of circ is clk signal qt: std_logic; prn begin process (prn, clk, x) begin if prn = ‘0’ then qt <= ‘1’; x Q c) Complete the timing diagram of the circuits shown below: (15 pts) resetn clk d D Q Q clk resetn d a a Q resetn D clk D Q Q resetn clk D Latch D Q E Q QL Q QL 1 Instructor: Daniel Llamocca ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-378: Computer Hardware Design Winter 2016 PROBLEM 2 (15 PTS) ο§ Complete the timing diagram of the circuit shown below: (8 pts) Full Adder a b x y cin FA clk s s cout D Q Q resetn a clk Q b Q resetn s ο§ Complete the VHDL description of the synchronous sequential circuit whose truth table is shown below: (7 pts) library ieee; use ieee.std_logic_1164.all; prn entity my_ff is port ( a, b, c: in std_logic; prn, clk: in std_logic; q: out std_logic); end my_ff; architecture a of my_ff is begin -- ??? end a; clk A B Qt+1 1 0 0 Qt 1 0 1 Qt 1 1 0 B 1 1 1 C X X 1 0 X PROBLEM 3 (20 PTS) Given the following circuit, complete the timing diagram (signals π·π and π·π΄ππ΄). The LUT 6-to-6 implements the following function: ππΏππ = ⌈πΌπΏππ 0.95 ⌉. For example πΌπΏππ = 35 (1000112 ) → ππΏππ = ⌈350.95 ⌉ = 30 (0111102 ) DI 6 clk D Q E 6 LUT 6-to-6 OLUT resetn ILUT ο§ 6 DO 6 DATA OE clk resetn OE DATA 111011 011011 001000 100000 DI DO 2 Instructor: Daniel Llamocca ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-378: Computer Hardware Design Winter 2016 PROBLEM 4 (30 PTS) ο§ The following circuit is a 4-bit parallel/serial load shift register with enable input. Shifting operation: s_l=0. Parallel load: s_l=1. Note that π = π3 π2 π1 π0 . π· = π·3 π·2 π·1 π·0 οΌ Write a structural VHDL code. You MUST create a file for: i) flip flop, ii) MUX 2-to-1, and iii) top file (where you will interconnect the flip flops and MUXes). Provide a printout. (10 pts) οΌ Write a VHDL testbench according to the timing diagram shown below. Complete the timing diagram by simulating your circuit (Timing Simulation). The clock frequency must be 50 MHz with 50% duty cycle. Provide a printout. (20 pts) Q0 Q1 Q2 Q3 resetn D E Q D E Q D E Q D E Q E clk 0 1 din D0 0 s_l 1 0 D1 1 0 1 D2 D3 clk resetn E s_l din D 1001 1100 0011 1101 0101 Q 0000 PROBLEM 5 (10 PTS) ο§ Attach a printout of your Initial Project Report (no more than a page). This report should contain the project title, the project description, and the current status of the project. Use the provided template (Final Project – Report Template.docx). 3 Instructor: Daniel Llamocca