[][src]Struct rysk_core::csr::Csr

pub struct Csr<R: Register> {
    pub mhartid: R,
    pub mtvec: R,
    pub medeleg: R,
    pub mideleg: R,
    pub mie: R,
    pub mip: R,
    pub mcycle: Register64,
    pub mcounteren: Register32,
    pub mscratch: R,
    pub mepc: R,
    pub mcause: R,
    pub mtval: R,
}

The Control Status Registers (CSR) a single HART must provide storage for to comply with the privileged ISA Other CSR's may not need storage and as such are not a part of this struct

Fields

mhartid: R

The ID of this hart

mtvec: R

The address of a potentially vectorised interupt handler

medeleg: R

Delegation of exceptions to lower modes

mideleg: R

Delegation of interrupts to lower modes

mie: R

Sets if interrupts are enabled

mip: R

States if an interrupt is pending

mcycle: Register64

Counts the number of cycles the hart has executed. As there is no speculative execution or other operations minstret is the same as this value

mcounteren: Register32

Determine if counters are accessible in lower privilege modes

mscratch: R

Scratch register dedicated to machine-mode usage

mepc: R

The virtual address of an interrupted or excepted instruction in machine-mode

mcause: R

The cause of an interrupt or exception

mtval: R

An implementation-defined value set during a trap

Implementations

impl<R: Register> Csr<R>[src]

pub fn new(hart: R::Unsigned, trap_address: R::Unsigned) -> Self[src]

Auto Trait Implementations

impl<R> RefUnwindSafe for Csr<R> where
    R: RefUnwindSafe

impl<R> Send for Csr<R> where
    R: Send

impl<R> Sync for Csr<R> where
    R: Sync

impl<R> Unpin for Csr<R> where
    R: Unpin

impl<R> UnwindSafe for Csr<R> where
    R: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.