Enum rsim::processor::isa_mods::vector::Lmul [−][src]
pub enum Lmul { eEighth, eQuarter, eHalf, e1, e2, e4, e8, }
Length-Mul enum
RISC-V V allows programs to group vector registers together for greater theoretical parallelism. For example, configuring LMUL=8 means that subsequent vector instructions will operate on 8 vector registers worth of elements.
This requires care if you are resizing elements. An example program in v1.0 of the specification (section 6.4, p28) sets LMUL=4, vtype=16-bit for initial operations. This will operate on LMUL * VLEN / SEW = 4 * VLEN / 16 = VLEN/4 elements.
It then widens the elements to 32-bit using a widening vector multiply. To ensure the following instructions operate on the same number of elements, they reconfigure with doubled LMUL. LMUL = 8, vtype = 32-bit => LMUL * VLEN / SEW = 8 * VLEN / 32 = VLEN/4 elements, same as before.
Variants
Implementations
impl Lmul
[src]
impl Lmul
[src]pub fn num_registers_consumed(&self) -> u8
[src]
Returns the number of vector registers a group actually consumes with this Lmul.