ColumnCompressor constructor
- PartialProductArray pp, {
- Logic? clk,
- Logic? reset,
- Logic? enable,
Initialize a ColumnCompressor for a set of partial products
If clk
is not null then a set of flops are used to latch the output
after compression (see extractRow). reset
and enable
are optional
inputs to control these flops when clk
is provided. If clk
is null,
the ColumnCompressor is built as a combinational tree of compressors.
Implementation
ColumnCompressor(this.pp, {this.clk, this.reset, this.enable}) {
columns = List.generate(pp.maxWidth(), (i) => ColumnQueue());
for (var row = 0; row < pp.rows; row++) {
for (var col = 0; col < pp.partialProducts[row].length; col++) {
final trueColumn = pp.rowShift[row] + col;
final term = CompressTerm(CompressTermType.pp,
pp.partialProducts[row][col], [], row, trueColumn);
columns[trueColumn].add(term);
}
}
}