pub trait VectorRegistersExt<Reg, CustomError = CustomErrorPlaceholder>where
Self: Csrs<Reg, CustomError> + VectorRegisters<CustomError>,
[(); { _ }]:,
Reg: Register,
CustomError: Debug,{
// Provided methods
fn initialize_vector_state(&mut self) { ... }
fn vstart(&self) -> u16 { ... }
fn set_vstart(&mut self, vstart: u16) { ... }
fn reset_vstart(&mut self) { ... }
fn vxrm(&self) -> Vxrm { ... }
fn set_vxrm(&mut self, vxrm: Vxrm) { ... }
fn vxsat(&self) -> bool { ... }
fn set_vxsat(&mut self, vxsat: bool) { ... }
}Expand description
Derived convenience accessors for vector CSRs that are simple read/write fields (vstart, vxrm, vxsat, vcsr).
Intended for types that implement both VectorRegisters and Csrs.
Provided Methods§
Sourcefn initialize_vector_state(&mut self)
fn initialize_vector_state(&mut self)
Initialize the vector state to the recommended default configuration.
Per spec: vtype.vill = 1, remaining vtype bits = 0, vl = 0.
vstart, vxrm, vxsat may have arbitrary values at reset but are zeroed here for
deterministic behavior.
Sourcefn set_vstart(&mut self, vstart: u16)
fn set_vstart(&mut self, vstart: u16)
Set vstart
Sourcefn reset_vstart(&mut self)
fn reset_vstart(&mut self)
Reset vstart to zero.
Per spec, all vector instructions reset vstart to zero at the end of execution.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.