

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


NOTES: Closed book, except one sheet of handwritten notes and the VHDL Quick Reference Card are allowed. Show ALL your work for full credit. Please draw and write NEATLY (If I cannot read it, I must mark it WRONG). Do all work in pencil and put all answers on your engineering paper, with one problem per page. Clearly label all answers with the problem number. Follow all the specified class formats, including VHDL.
ENTITY thisone IS PORT ( a, b, s : IN STD_LOGIC_VECTOR(1 DOWNTO 0) ; c, d : IN STD_LOGIC ; f : OUT STD_LOGIC ; g : OUT STD_LOGIC_VECTOR(1 DOWNTO 0) ) ; END thisone;
ARCHITECTURE behav OF thisone IS BEGIN PROCESS (s, a, b) BEGIN CASE s IS WHEN "00" | "10" => f <= '1'; g <= a AND b ; WHEN "01" => f <= c; g <= NOT a(0) & a(1) ; WHEN OTHERS => f <= '0'; g <= "11" ; END CASE ; IF b(0) = '1' THEN f <= c OR d; ELSE f <= 'Z'; END IF; END PROCESS ; END behav ;
ENTITY prob3 IS PORT ( a, b : IN STD_LOGIC ; f, g : BUFFER STD_LOGIC ; j : BUFFER STD_LOGIC_VECTOR(1 DOWNTO 0) ) ; END prob3 ;
Truth Table 1: Truth Table 2:
a b | f a b | j ----|-- ----|--- 0 0 | 1 x 0 | 11 0 1 | x 0 1 | 01 1 x | 0 1 1 | 00