+ f"{self.fract_width}, {self.log2_radix})"
@property
- def num_calculate_stages(self):
+ def n_stages(self):
""" Get the number of ``DivPipeCoreCalculateStage`` needed. """
return (self.bit_width + self.log2_radix - 1) // self.log2_radix
def __init__(self, core_config, stage_index):
""" Create a ``DivPipeCoreSetupStage`` instance. """
self.core_config = core_config
- assert stage_index in range(core_config.num_calculate_stages)
+ assert stage_index in range(core_config.n_stages)
self.stage_index = stage_index
self.i = self.ispec()
self.o = self.ospec()
self.setup_stage = DivPipeCoreSetupStage(core_config)
self.calculate_stages = [
DivPipeCoreCalculateStage(core_config, stage_index)
- for stage_index in range(core_config.num_calculate_stages)]
+ for stage_index in range(core_config.n_stages)]
self.final_stage = DivPipeCoreFinalStage(core_config)
self.interstage_signals = [
DivPipeCoreInterstageData(core_config, reset_less=True)
- for i in range(core_config.num_calculate_stages + 1)]
+ for i in range(core_config.n_stages + 1)]
self.i = DivPipeCoreInputData(core_config, reset_less=True)
self.o = DivPipeCoreOutputData(core_config, reset_less=True)
self.sync = sync
# sync with generator
if sync:
yield
- for _ in range(core_config.num_calculate_stages):
+ for _ in range(core_config.n_stages):
yield
yield