Chapter 6: Appendix B, 23 (page 500)
B.23 [20] <§§B3, B.4, B.5> Repeat Exercise B.22, but for an unsigned divider rather than a multiplier.
Short Answer
The Verilog implementation for the specified unit:
Module_divisor (s, clock, clear, Bin,Qin ,W, Y, Z, B) //the parameters are s, clock, clear, Bin ,Qin ,W, Y, Z, B
Input s, clock, clear Input [4:0] Qin, Bin; //Qin, Binare two inputs
Output [4:0] Y,Z; Output [2:0] B;
System registers reg C;
reg [4:0] Y, Z, B;
reg [2:0] B;
reg [2:0] stateP, stateN ;
// combinational circuit wire z;
// state register process for controller
Always begin
assign z=|B;
if stateP<= T0;
else stateP<= stateN
end