|
Objective
In this lab, we will learn how to build different types of finite state
machine circuits.
Part 1. 15-second time bomb
Design a counter that starts at 15 and count to 0.
There are several input to this circuit:
- [start] : start the counter
- [stop] : stop the counter
- [reset] : reset back to 15
seconds
The output should include:
- [counter index] (in binary
is OK)
- [blow_up] indicator when the
sequence reaches 0000.
You should use a D-FF that allows your to
initialize value to 1111 as counter start. Note, figure out which D-FF you
want to use & understand how it works before you connect all the wires
together. Once you figure out how the D-FF works, you may need to add a few
logics so that the time bomb does not blow up when you set start=1 initially.
Simulate with start=0 first, then switch start=1. The counter should be at
1111 & the blow_up indicator should be 0 until the counter becomes 0000.
Also, simulate the case that when start=1 but you realize at 5 second before
blowing up, you need to stop it & reset it back to 15 seconds again.
Build and simulate the circuit using Xilinx and ModelSim.
Part 2. Freeway Traffic Control
Around 4pm in the afternoon when much of the traffic starts to enter the
freeway, a set of GREEN/RED signal are used to prevent highway jams. Here is
how the traffic signal works.
- There will be 2 lanes to
enter the freeway: 1 carpool lane and 1 regular lane. Each lane will
have a GREE/RED signal.
- When both lanes have cars
waiting, each lane will take turns to go (GREEN will rotate between 2
lanes).
- When both lanes have no
cars, both signal will be RED
- When 1 lane has cars, only
that lane will be GREEN. The other lane will always be RED.
Build and simulate the circuit using
Xilinx and ModelSim.
Part 3. Vending Machine
Design a circuit that will be used in a coffe dispensing machine. This
machine will dispense coffee when $0.35 (or more) is received. No change will
be given if more than $0.35 is received. The machine can only take nickels,
dimes, and quarters.
Build and simulate the circuit using Xilinx and ModelSim.
Grading
Grading:
Show your circuit design & demonstrate your simulation result to the TA
or professor at office hours during week 7.
Points breakdown
|