Additional Notes:
There have been quite some questions about the clocking part in the office hour. First of all, I’d like to stress again that you should build two separate circuits! And to make your assignment more clear we will restrict it a bit, and only accept specific solutions. The textbook just forbids the generation of partial clock outputs. We will go for something stricter, namely that you decide once which clock pulses are allowable and then stick to your decision.
First, look at your reference Clock as an input. In the
diagram below it is denoted by the red waveform. Now your output clock should
operate with half the frequency of the reference clock. The green waveform
shows you the allowable transitions for the output clock (half of the
reference clock’s frequency, same duty cycle, edges aligned). We
won’t take all of them, since the output clock might either be turned of
(
The blue lines give a valid example for the step button. The first blue waveform might be an example of how the button gets presses. Now you have to decide which policy you’d like to implement. The upper waveform (Clk_out_3) shows you how your output clock should behave if you generate a clock pulse upon detection of the button press. The lower line (Clk_out_2) shows you how you would generate it, if you have a clock pulse as soon as you detect that the button was released.
Be careful, that you always stay consistent with your “green line”. In above diagram the rising edge of the generated clock can only be at ((odd number) x 100ns). So you shouldn’t generate a clock pulse that starts at e.g. 200ns once you detect that the button is pressed. (Of course in this picture you can take the opposite decision as well and have only clock pulses that start at ((even number) x 100ns). But then you should consistently stick to this. This decision would be represented by shifting your green waveform 100ns to the left or right.)
Notes: (apply for 7.19 as well)
In these questions you’re asked to count a number of thing. Usually when you’re drawing a state diagram you can have arrows that work for multiple inputs. So you label them either “00, 01” or maybe “0X” or “0-” if you don’t care for the second input variable. For this question an arrow with such a label would count as two arrows, since you could expand it to an arrow for the input “00” and one for the input “01”.