extractRow method
- int row
Convert a row to a Logic bitvector
Implementation
Logic extractRow(int row) {
final width = pp.maxWidth();
final rowBits = <Logic>[];
for (var col = columns.length - 1; col >= 0; col--) {
final colList = columns[col].toList();
if (row < colList.length) {
final value = colList[row].logic;
rowBits.add(
clk != null ? flop(clk!, value, reset: reset, en: enable) : value);
}
}
rowBits.addAll(List.filled(pp.rowShift[row], Const(0)));
if (width > rowBits.length) {
return rowBits.swizzle().zeroExtend(width);
}
return rowBits.swizzle().getRange(0, width);
}