Skip to main content

var_sra_blocks

Function var_sra_blocks 

Source
pub fn var_sra_blocks(
    b: &CircuitBuilder,
    x: Wire,
    shift: Wire,
    shift_bits: usize,
    block_bits: usize,
) -> Wire
Expand description

Variable-amount arithmetic right shift by blocks of 2^block_bits bits.

Returns x SAR (shift * 2^block_bits) (sign-extending), where the low shift_bits bits of shift are the block count.

ยงPanics

Panics if shift_bits + block_bits > 6.