


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!



Lab 5 : Due Thurs., March 19
The purpose of this lab is to: (1) familiarize yourself with VHDL behavioral descriptions and especially such descriptions of sequential circuits (i.e., finite state machines or FSMs); (2) Describe a clocked system, i.e., a circuit that operate in synchrony with a clock. You will achieve these by behaviorally describing an FSM that is triggered on the positive edge of a clock.
You need to design a Moore FSM for a vending machine with the following specifications:
Note that the “last-coin-return” strategy is independent of the choice made (in fact, it should occur before the choice is made). For example, if the customer inserts the following sequence of coins: Q, Q, D, the last dime is to be returned right away (why?). However, if he/she inserts the sequence Q, D, Q, there is no last coin return involved (why?).
Provide your design as follows:
showing: (a) all inputs to the system (properly labeled indicating what they are for); (b) all system outputs (properly labeled indicating what they are for); (c) all timers; (d) all FSM modules, and the various outputs of the output module (properly labeled indicating what they are for); (e) the display module(s); (f) any other modules needed.
of the state (also, be sure to label the reset state as such). Separately provide a description of the
inputs; when there is no time between two inputs, it means that they occur simultaneously. E.g., ”Q, 5 sec, D, 4 sec, D, 7 sec, C” is a symbolic sequence which means a customer inserts a quarter waits for 5 secs, inserts a dime, and so forth and finally presses the C selection button. There will be multiple such symbolic sequences provided to you, and for each, one complete simulation of your design needs to be performed. The TB needs to feed the appropriate input bit vector to your system based on the symbolic inputs given by the TA; consecutive bit input vectors need to be separated by the amount of time given in the current symbolic input sequence being simulated. So for a ”Q, 5 sec, D,... ” sequence, your TB will need to
Also, each bit vector needs to be provided to your system by the TB at every negative edge of the clock. Note that by feeding the input to the FSM every negative edge, we ensure that the FSM will be able to reliably sample it at the clock’s positive edge. Provide the timing graphics of the inputs and the outputs corresponding to the sequence of symbolic inputs provided to you. 400.