Sorry for my poor english :/ I want to divide unsigned binary integers using non-restoring division! I have found te algorithm here:
I have implemented the algorithm on verilog.But for some reason the module does not work correct! The module code: I have comented where i think the mistake is! module divider( output reg[7:0] q, output reg[7:0] r, input [7:0] a, b); reg[7:0] A; reg[7:0] B; reg[7:0] Q; reg[7:0] M; reg[7:0] N; always @(*) begin A=8'b00000000; Q=a; M=b; N=8; while(N > 0)begin if( A < 0 ) begin A=A