Draw an SM chart for the BCD to binary converter of Problem 4.13.
Problem 4.13
This problem involves the design of a BCD to binary converter. Initially a three-digit BCD number is placed in the A register. When a St signal is received, conversion to binary takes place, and the resulting binary number is stored in the B register. At each step of the conversion, the entire BCD number (along with the binary number) is shifted one place to the right. If the result in a given decade is greater than or equal 1000, the correction circuit subtracts 0011 from that decade. (If the result is less than 1000, the correction circuit leaves the contents of the decade unchanged.) A shift counter is provided to count the number of shifts. When conversion is complete, the maximum value of B will be 999 (in binary). Note: B is 10 bits.
(a) Illustrate the algorithm starting with the BCD number 857, showing A and B at each step.
(b) Draw the block diagram of the BCD-to-binary converter.
(c) Draw a state diagram of the control circuit (three states). Use the following control signals: St: start conversion; Sh: shift right; Co: subtract correction if necessary; and C9: counter is in state 9, or C10: counter is in state 10. (Use either C9 or C10 but not both.)
(d) Write a VHDL description of the system.