Lab 5 - Counters and Shift Registers
The purpose of this lab is to build a FSM that can control a counter. So, you do not
need to understand why the LFSR can detect errors or how the parity bit works. Galois
theory is beyond the scope of this class.
- As always, read the lab before starting anything.
- You need to have the schematics entered into ViewDraw before you come to lab
to get the 10% prelab points.
- Simulate your FSM controller using ViewSim to make sure it works the way you think
it should work.
- Look at the TA input/output schematics and try to understand how the clock divider works
and why MODE is not debounced.
- If you get the error that INIT is not high when you download to the Xilinx, make sure
that all switches except 7 are open on SW4 and make sure the XChecker cable in plugged in
correctly.
- Your FSM is only supposed to have two states. One will enable the counter, the other disables
the counter. MODE is just an input to your FSM, so don't confuse it with the FSM's STATE.
- Make sure you have the present state of your FSM in next state decoder, or you may
get an FSM that enables the counter forever.
- If you get FF after running in mode 1, then you probably have your Mealey and
Moore state machine operations around the wrong way (i.e. it's operating in Mealey
mode and enable is going low 1 clock cycle too soon).
- After you download the design, this is what you need to do to find the parity bits:
- Set all switches on SW5 to open.
- Hold down the RESET and SPARE buttons.
- Start the clock and let go of RESET and keep SPARE held down.
- The two digit LED should cycle from 00 - FF and then stop on 00. If it doesn't stop cycling,
then you messed up your controller. :)
- The display on the 8 LEDs will display the parity bits. Set these bits on
SW5 and reset the design and hold down SPARE. The LED should cycle through the values again and
should stop on 00. Now the 8 LEDs should not display anything.
- For the second part with an error in the ROM, here's what you need to do to find the errors:
- Set the parity bits from the last part on SW5.
- Hit RESET while holding SPARE, so it cycles through the ROM. When it stops,
there should be a new sequence of bits on the 8 LEDs. Input these bits onto
the switches on SW5. Now hit RESET without holding down SPARE and when
it stops, the 2 digit LED should display the bit with the error.
Back to main page