ControlBase.__init__(self)
pipechain = []
- max_n_comb_stages = 2 # TODO (depends on how many RS's we want)
+ max_n_comb_stages = 3 # TODO (depends on how many RS's we want)
# to which the answer: "as few as possible"
# is required. too many ReservationStations
# means "big problems".
def roundup(x, mod):
return x if x % mod == 0 else x + mod - x % mod
+
class FPDIVMuxInOut(ReservationStations):
""" Reservation-Station version of FPDIV pipeline.
then be used to change the behaviour of the pipeline.
"""
- def __init__(self, width, num_rows, op_wid=0):
+ def __init__(self, width, num_rows, op_wid=1):
self.id_wid = num_bits(width)
self.pspec = PipelineSpec(width, self.id_wid, op_wid)
# get the standard mantissa width, store in the pspec HOWEVER...
fmt = FPFormat.standard(width)
log2_radix = 2
- # ...4 extra bits on the mantissa: MSB is zero, MSB-1 is 1
- # then there is guard and round at the LSB end.
+ # ...5 extra bits on the mantissa: MSB is zero, MSB-1 is 1
+ # then there is guard, round and sticky at the LSB end.
# also: round up to nearest radix
- fmt.m_width = roundup(fmt.m_width + 4, log2_radix)
+ fmt.m_width = roundup(fmt.m_width + 5, log2_radix)
cfg = DivPipeCoreConfig(fmt.m_width, fmt.fraction_width, log2_radix)