This is the comparison divider from EE480.

It takes a N bit divisor and an N-bit dividend.

It produces an N bit quotient and an N bit remainder.

If you want to get a decimal number, simply take the remainder,

multiply it by 100 -> if you want two decimals,

and then divide again.

The divider loads the two numbers on a reset and when it is done

the division it sets the done_div signal high.

An N-bit divisor requires at most 3N clock cycles to get a valid answer.

Division by zero causes a strange result -> don't do it.

 

divider.txt

 

Author : Neil Fraser 252885

 

Co-Authors : Edmund Quan 244667

Patrick Chan 364305

Srilata Kammila 253698