$29
The purpose of this project is for you to build a 16-bit unsigned division hardware and an 8-bit unsigned square root hardware.
Part I: 16-bit Unsigned Division Hardware (60 Points)
For this part, create a sub-circuit named 16-bit Unsigned Division. You are going to build a 16-bit unsigned division hardware in the same fashion as the 8-bit unsigned multiplication hardware that you did in Lab 10.
The division hardware that we discussed in class (modi ed to a 16-bit) is shown below:
Divisor
Shift right
32 bits
32−bit Adder
Quotient
Shift left
16 bits
Remainder
Control test
Write
32 bits
Again, the above hardware is for dividing two 16-bit numbers and produce a 16-bit quotient and 16-bit remainder. The owchart of this hardware is shown below:
1
Start
Subtract the Divisor register from the Remainder register and place the result in the Remainder register
Remainder = 0
Test
Remainder < 0
Remainder
2a. Shift the Quotient register to the left, setting the new least significant bit 1
2b. Restore the original value by adding
the Divisor register to the Remainder
register and placing the sum in the
Remainder register. Also shift the
Quotient register to the left, setting the
new least significant bit to 0
3. Shift the Divisor register right 1 bit
17rd No: < 17 repetitions
repetition?
Yes: 17 repetitions
Done
The design concept of this division circuit will be pretty much the same as in multiplication circuit in Lab 10 but each step is a little bit more complicate. For example, when the subtraction result is less than 0, you have to restore to its original value by adding it back. Another di erent is the quotient, sometime we shift it left and insert a 0 but sometime we insert a 1. Note that you need a 32-bit register for a remainder (loaded with dividend), a 32-bit register for a divisor, and a 16-bit register for a quotient. The counter for this hardware should count up to 18, one cycle to load, and 17 cycles to perform division.
Note that there are some restriction about this part:
Obviously, you are not allowed to use the pre-build divisor
You are not allowed to use a comparator. Use a subtractor and check the most signi cant bit.
Do not forget to put two 16-bit inputs, dividend and divisor. Also put two 16-bit output, quotient and remainder.
Part II: 8-bit Unsigned Square Root Hardware (40 Points)
To be able to build an 8-bit unsigned square root hardware, rst, you need to understand how to calculate a square root of a decimal number as well as a binary number. For this, please see squareRoot.pdf posted on the CourseWeb under this project. So, make sure you understand how to calculate a square root rst.
For this circuit, create a sub-circuit named 8-bit Square Root and build it there. You may notice that a square root hardware can be build in the same fashion as in multiplication and
2
division hardware. It requires to perform multiple clock cycles before a calculation is completed. You may also be able to see that for an 8-bit square root, you only need 5 clock cycles, one to load and four to calculate.
Unfortunately, you are not going to build it that way. You are going to create a hardware that can calculate a square root of an 8-bit unsigned number in just one clock cycle. In other words, your hardware do not need a clock as well as should not have any registers.
For this hardware, you are allowed to use any pre-build components but you are not allowed to use the circuit analysis or even a Karnaugh map. You must build the circuit in the same way as how a square root of binary number is calculated as shown in squareRoot.pdf. You may need a number of comparators, subtractors, and possibly a bunch of splitters. Do not forget to put one 8-bit input and one 4-bit output.
Submission
The due date of this project is stated in the CourseWeb under this project. Late submissions will not be accepted. You should submit the le project4 div sqrt.circ via CourseWeb.
3