Clock Numberin Start Count Overflow 5 5 1 5 5 5 5 5 X 0 1 2 2 FF 0 1 0 X
Clock Numberin Start Count Overflow 5 5 1 5 5 5 5 5 X 0 1 2 2 FF 0 1 0 X
Homework 0
The purpose of this REQUIRED homework and associated Moodle quiz is to evaluate
your preparation for this course. If you feel you need to review material to do this
homework, there are several good basic digital logic texts in the library (see the last page
of this homework). Turn in the solutions with your name on it on-line or in class.
Question 1
This is a design question. Please design a counter that counts the number of times the
number “5” appears in an 4-bit input stream. The I/O are as follows:
This is NOT A VERILOG question; I want to see a gate level schematic. Design this
functional unit down to the logic (gate) level. An adder is required – you can represent
this as a “+” unit – no need to design its detail. There is no need to optimize the design.
The only flip-flop you can use is a D flip-flop, and its clock input can only be connected
to “clock”. You can NOT use a flip-flop with preset or clear. Muxes and adders can be
drawn as single blocks, you do not have to design their internal structure.
An exemplar timing diagram can be found below (x=unknown). Note the following:
- Count and Overflow are changing just after the rising edges of the clock
- Overflow stays high until the clock cycle after start goes back to one
clock …
NumberIn 5 5 1 5… 5 5 5 5
Start
Count X 0 1 2 2 … FF 0 1 0
Overflow x
1
Revision Notes
If any of these topics are NOT familiar to you, I suggest reviewing your undergraduate
logic course or logic course text. If that is not available to you, there are many suitable
texts in the library. Authors include Katz, Wakerley, Mano, but there are many others.