Skip to content

Commit

Permalink
fixup! peepopt: Add 'bmux' and 'wshift' modes for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
povik committed Aug 7, 2023
1 parent 69a0a74 commit 7212397
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion passes/pmgen/peepopt_shiftmul_right.pmg
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@ code
int validbits = std::min(GetSize(out),
GetSize(shift_vector) - i * shift_stride);
bmux_vector.append(shift_vector.extract(i * shift_stride, validbits));
bmux_vector.append(SigSpec(padbit, GetSize(out) - validbits));
}

// Prep the select signal
SigSpec bmux_sel = mul_din;
bmux_sel.extend_u0(ceil_log2(GetSize(bmux_vector)));
bmux_sel.extend_u0(ceil_log2((GetSize(bmux_vector) + GetSize(out) - 1) / GetSize(out)));

// Pad the vector
int vector_targetlen = GetSize(out) << GetSize(bmux_sel);
Expand Down

0 comments on commit 7212397

Please sign in to comment.