Question
Design a programmable counter that outputs BCD and has a range of 0-99. The counter must count from zero to a user-input value. The valid
Design a programmable counter that outputs BCD and has a range of 0-99. The counter must count from zero to a user-input value. The valid input range is 0-99; if a higher number is input, the counter must not output beyond 99 (decimal). The output from your design should be in binary-coded decimal. You will need to design a binary counter that counts at least to 99dec, and a module which converts the binary output to two-digit BCD. A single-bit input, called run, determines the operation of the counter. When run is `0', the counter is set to zero and does not count. The user can set the maximum value here, using an input called max count. When run is set to `1', the counter starts counting from zero, and stops when it reaches the maximum. Any changes to max count are ignored when run is set to `1'. Your design will have two 4-bit outputs; digit 1 and digit 2. Each is used to output one BCD digit. Digit 2 is the tens digit, digit 1 is the ones digit.
Design Constraints: The design must properly function given the following constraints: The input for the max count value is called max count and is 7 bits wide. The input for the clock is named clk and is 1 bit wide. A 1-bit input called run determines if the counter is running. The two outputs are each 4 bits wide, and are called digit 1 and digit 2, and are used to display the BCD output. The input clock must be 100MHz. You will have to program this in the testbench. The absolute maximum value for the counter is 99. You must design at least two sub-modules: a programmable counter, and a BCD converter. How you construct these modules is up to you.
max count Programmable BCD Counterdigit 1 7 4 run 4 Figure 1: Counter Top-Level Block DiagramStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started