- def __init__(self, lidx, n_inputs, output_width, n_parts, partition_points,
+ def __init__(self, pspec, lidx, n_inputs, partition_points,
raise ValueError("partition_points doesn't fit in output_width")
self.groups = AddReduceSingle.full_adder_groups(n_inputs)
self.n_terms = AddReduceSingle.calc_n_inputs(n_inputs, self.groups)
raise ValueError("partition_points doesn't fit in output_width")
self.groups = AddReduceSingle.full_adder_groups(n_inputs)
self.n_terms = AddReduceSingle.calc_n_inputs(n_inputs, self.groups)
return AddReduceData(self.partition_points, self.n_terms,
self.output_width, self.n_parts)
return AddReduceData(self.partition_points, self.n_terms,
self.output_width, self.n_parts)
- def __init__(self, i, output_width, partition_step=1):
+ def __init__(self, i, pspec, partition_step=1):
- next_level = AddReduceSingle(lidx, ilen, self.output_width, n_parts,
+ next_level = AddReduceSingle(self.pspec, lidx, ilen,
- self.pspec = PipelineSpec(128, self.id_wid, self.op_wid, n_ops=3)
- self.pspec.n_inputs = 64 + 4
+ self.pspec = PipelineSpec(64, self.id_wid, self.op_wid, n_ops=3)
- n_inputs = self.pspec.n_inputs
- output_width = self.pspec.width
- t = AllTerms(self.pspec)
+ n_inputs = 64 + 4
+ output_width = self.pspec.width * 2
+ t = AllTerms(self.pspec, n_inputs)