Difference between revisions of "CSC270 Exercises on FSM"
(→Exercise #5) |
(→Exercise #5) |
||
Line 83: | Line 83: | ||
<br /> | <br /> | ||
<br /> | <br /> | ||
− | + | <onlydft> | |
<code><pre> | <code><pre> | ||
# flipflop.py | # flipflop.py | ||
Line 148: | Line 148: | ||
</pre></code> | </pre></code> | ||
− | + | </onlydft> | |
<br /> | <br /> | ||
Revision as of 10:45, 29 February 2012
--D. Thiebaut 15:24, 28 February 2011 (EST)
Exercise #1
- Implement a sequencer (FSM) which activates 3 Lights: a green light, a yellow light, and a red light. The behavior of the FSM is the following:
- the green light stays on for 30 seconds, then
- the yellow light comes on and stays on for 30 seconds, then
- the red light comes on and stays on for 30 seconds, then we repeat the pattern.
- There is only one light on at a given time.
- What is the frequency of your clock signal?
Exercise #2
- Same as Exercise 1, but this time the behavior is the following
- the green light comes on after the red light and stays on for 30 seconds,
- the yellow light comes on and stays on for the next for 15 seconds,
- the red light comes on after the yellow light for 30 seconds.
- What is the frequency of your clock signal?
Exercise #3
- Create a "true" frequency divider that divides by 4.
Exercise #4
- What is the state diagram of the 3-flip-flop circuit with the following equations:
D0 = Q0' D1 = Q0 XOR Q1 D2 = Q1 XOR Q2
Exercise #5
- Same question, but solve it with Python.