pub struct BaseHart<B, C> {
pub bus: B,
pub pc: u64,
pub next: u64,
pub gpr: [u64; 32],
pub csr: C,
/* private fields */
}
Expand description
A simple implementation of a processor that implements only machine mode.
Fields§
§bus: B
The system bus for reading and writing physical memory addresses.
pc: u64
The address of the currently-executing instruction, if one is being executed.
next: u64
The address of the next instruction.
gpr: [u64; 32]
The general-purpose registers x0 through x31.
csr: C
The state of all control and status registers.
Implementations§
Source§impl<B, C> BaseHart<B, C>
impl<B, C> BaseHart<B, C>
Sourcepub fn new(bus: B, csr: C) -> BaseHart<B, C>
pub fn new(bus: B, csr: C) -> BaseHart<B, C>
Creates a new Hart
that connects to bus
for memory accesses.
Auto Trait Implementations§
impl<B, C> Freeze for BaseHart<B, C>
impl<B, C> RefUnwindSafe for BaseHart<B, C>where
B: RefUnwindSafe,
C: RefUnwindSafe,
impl<B, C> Send for BaseHart<B, C>
impl<B, C> Sync for BaseHart<B, C>
impl<B, C> Unpin for BaseHart<B, C>
impl<B, C> UnwindSafe for BaseHart<B, C>where
B: UnwindSafe,
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more