[−][src]Struct riscv_emu_rust::device::clint::Clint
Emulates CLINT known as Timer. Refer to the specification for the detail.
Implementations
impl Clint
[src]
pub fn new() -> Self
[src]
Creates a new Clint
pub fn tick(&mut self, mip: &mut u64)
[src]
Runs one cycle. Clint
can raise interrupt. If it does it rises a certain bit
depending on interrupt type of CPU mip
register.
Arguments
mip
CPUmip
register. It can be updated if interrupt occurs.
pub fn load(&self, address: u64) -> u8
[src]
pub fn store(&mut self, address: u64, value: u8)
[src]
pub fn read_mtime(&self) -> u64
[src]
Reads mtime
register content
pub fn write_mtime(&mut self, value: u64)
[src]
Writes to mtime
register content
Auto Trait Implementations
impl RefUnwindSafe for Clint
impl Send for Clint
impl Sync for Clint
impl Unpin for Clint
impl UnwindSafe for Clint
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,