Struct rvsim::SimpleClock [−][src]
A simple implementation of the Clock
trait.
This implementation only counts instructions. The CSRs cycle
, time
, and instret
all
return the same counter to create a very basic simulation of time.
With the serialize
crate feature, this structure is serializable using Serde.
Fields
instret: u64
Instruction counter CSR.
Implementations
impl SimpleClock
[src]
Trait Implementations
impl Clock for SimpleClock
[src]
fn read_cycle(&self) -> u64
[src]
fn read_time(&self) -> u64
[src]
fn read_instret(&self) -> u64
[src]
fn progress(&mut self, _op: &Op)
[src]
fn check_quota(&self) -> bool
[src]
impl Clone for SimpleClock
[src]
fn clone(&self) -> SimpleClock
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for SimpleClock
[src]
impl Debug for SimpleClock
[src]
impl<'de> Deserialize<'de> for SimpleClock
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for SimpleClock
[src]
Auto Trait Implementations
impl RefUnwindSafe for SimpleClock
impl Send for SimpleClock
impl Sync for SimpleClock
impl Unpin for SimpleClock
impl UnwindSafe for SimpleClock
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,