Professional Documents
Culture Documents
Input [15:0]dividend,divisor;
Input start,clk; // start to switch on the system and do the
operations only if the inputs are valid
Output q,r;
Output ready; // ready to let us know one iteration is
finished and is ready to execute next iteration.
Reg [31:0]qr;
Reg [16:0]diff;
Wire [15:0] r = qr[31:16];
Wire [15:0]q = qr[15:0];
Reg [4:0]bit;
Wire ready = !bit;
Initial bit=0;