Problem 10-24
A strategy that will reduce the simulation activity of remainder is to make remainder a
registered output and update remainder when the process of forming quotient is
complete. Making Error a registered output does not affect simulation activity because
Modifications to Divider_STG_0 are shown below.
module Divider_STG_0 #(parameter L_divn = 8, L_divr = 4)(
output [L_divn -1: 0] quotient,
/* Includes checks for a divide by zero, subtracts the divisor from the dividend until the dividend is
less than the divisor, and counts the number of subtractions performed. The length of divisor
must not exceed the length of dividend .
*/
Control_Unit M0 (Ready, Error, Load_words, Subtract, Start, GTE, w1_is_0, w2_is_0, clock,
reset);
Datapath_Unit M1 (quotient, remainder, GTE, w1_is_0, w2_is_0, word1, word2, Load_words,
Subtract, clock, reset);
endmodule