|
Lab 5 Tips

Lab 5 deals with creating an LFSR and then a state
machine. Before you created a state machine with us giving you the
next state logic and the amount of FD flipflops needed. In this
case, we will be giving you specs on what the state machine should
do, but not exactly how to build it. That is up for you to decide
on how it should be designed. This is a short exposure to what you
will be experiencing when on the project.
KEY: Learn to build an entire system out of scratch
with just a certain baseline of requirements.
Click here
for a TXT version of the notes.
[BACK]
- The lab handout posted on the website is very
outdated and has yet to be changed. Follow the revisions below to
make your lab easier. Besides, some of the stuff do not exist anymore.
- The counter stated in the lab handout: rather
use the CC8RE counter. Ignore the CEO line.
- When they say attach the Lab5.sch file, the
file does not exist anymore. Instead, attach the lab5lib like you
have with all the other labs and use the IO macro block that we
have provided. The connections are all ready for you.
- Again you can find these librarys in \\fileservice\cs150
and they will be in the Lab5 folder. There are 2 folders,
us the one that says Lab5 and nothing else.
- The lab handout also states that when you are
done with MODE 1, then introduce an error into the ROM and
do MODE 1 and MODE 0. However, we have provided a macro block called
ROM_ERR that already has an error. Just replace the ROM
block with ROM_ERR.
- When designing your LFSR, you will need FD flipflops
that can reset and that take in an enable signal that either disables
or enables the flipflop to read the next new value on the next clock
edge. I would suggest using an FDRE flipflop.
- MODE: This is an important one. The way
mode is changed by the SPARE button. However SPARE is a debounced
signal which will only hold high for a clock cycle. MODE on the
other hand is a signal that either stays high or stays low by using
the SPARE button. So in fact, SPARE toggles the value of
mode.
- If you wire up MODE straight to the SPARE output
on the IO block, MODE will only go high for a single clock cycle.
It will never stay high. You need to fix this problem. Find a way
to toggle the value of MODE and keep it's state after toggling.
- If you are actually reading this, the solution
is at the bottom of the tips.
- Also questions have been asked why there is
a MODE input into the IO block. The reason for it is that the block
provides an indicator, CR-3 (the dot LED), as an indicator of what
mode you're in, or else it would be hard to determine. When the
LED is on, then MODE=1, and when the LED is off then MODE=0.
- When designing your LFSR or your state machine,
before downloading on the board it might be useful to simulate your
logic block just to know that the logic is functioning correctly
and state's are transitioning and outputs are going high or low
when they should.
- Another tip, try to make your state machine
a moore machine, which means the output is dependent on the current
state it is in.
- The solution
to the toggle system for MODE. Click here.
[BACK]
|