

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 three sheets of handwritten notes and the VHDL Quick Reference Card and a calculator are allowed. Do not make any marks on the supplied handout sheets. Read the problems CAREFULLY. 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. Start each problem's work on a new page. Follow the specified class formats. Clearly label all work with the problem number and part letter.
a. Give all the reasons why some big logic circuits might not fit into an Altera Max7000 CPLD device, such as the EPM7128S used in this course. This discussion is related to the logic circuit requirements and the PLD facilities available, NOT to anything that is VHDL-specific. See the Max 7000S block diagram handout. b. Why is it important to have the ability to analyze and compare features and diagrams of various programmable logic devices, as we did in this course?
LIBRARY ieee ; USE ieee.std_logic_1164.all ;
ENTITY mygen IS PORT (g, h : IN STD_LOGIC_VECTOR(3 DOWNTO 0); m, n : OUT STD_LOGIC_VECTOR(3 DOWNTO 0) ); END mygen ;
-- Your code goes here
Assume that the component “fun” has already been written elsewhere, with the following entity part:
ENTITY fun IS PORT (c : IN STD_LOGIC_VECTOR(1 DOWNTO 0); d : OUT STD_LOGIC_VECTOR(1 DOWNT0 0) ); END fun;
| A B |
| S | 00 01 10 11 |
|---|---|
| Start | Start,00 Start,00 Do1,00 Do1,00 |
| Do1 | Et,01 Do1,01 Et,10 Start,01 |
| Et | Do1,11 Start,10 Et,11 Start,10 |
S*, X Y
a. Draw an accurate timing diagram that illustrates the operation of this FSM, with all delays clearly visible. Show the signals in this order: CLK, A, B, State, X, Y. As always, assume the inputs change at the middle of the clock cycle. Start immediately after power-up, before the first clock edge, and apply this sequence of input values, one pair of bits per clock cycle: A B = 11, 10, 01. Since this only needs to show 4 clock periods, draw it BIG to make it easy to write and read. b. Concisely write the ARCHITECTURE portion of a VHDL file for this FSM that has the following ENTITY portion. Use the One Process FSM style. It should use the default state assignment provided by Quartus. Implement the FSM output logic with behavioral VHDL (not dataflow or structural). States must change on the positive edge of the clock. Follow our standard VHDL style for names, keywords, and indentation.
LIBRARY ieee ; USE ieee.std_logic_1164.all ;
ENTITY myFSM IS PORT (a, b, clk : IN STD_LOGIC ; x, y : OUT STD_LOGIC ) ; END myFSM ;
-- Your code goes here
FOR EXTRA CREDIT [10 pts] : Modify the schematic to make the initial value upon power-up = 4, assuming the existence of a PWRUP_L signal that pulses true for a short time during system power up.