This winter working at iitm was gr8. Especially when people see you working with a 87×16 matrix the whole screen looks filled with numbers. And you will be sitting and counting the number of 1s 2s 0s -1s and -2s you have inserted. Very tedious work.
This is very good example of how division is performed in pentium machine using SRT algorithm. (which is nothing but usual division method with little diiference which makes it constant length)
Thank God “openoffice calc” made it easy for generating the matrix. [:)]…
After generation we started working on the C code (which was useless). Since we have 4 bytes for int so we were able to simulate only a 32 bit division algo in it. Better if we would have straight away started off with bluespec or verilog itself (Bit manipulations is easy in HDL than in C).
Another tool which came a long way throughout the work was “gcalctool”. This work would have been a much bigger head ache but for this tool. The “Show Bit Editor” option was great. (This is one of the reasons why i like gcalctool more than windows calc).
Finally Bluespec in which we worked is great and has made things very easy as well as us lazy
.
Here is the C code which imitates the SRT division.(Less accurate)
Also here is the bluespec code for 64 bit division.(more accurate)
I cannot upload the verilog code generated since it is more than 2MB
Here is the standard input to the C code for 5506153/29491.
And here is a standard testbench for division64 bluespec code.

