[−][src]Struct rysk_core::system::Core
A single RISCV core Includes a single program counter and 32 registers Const generics will allow support of the E extensions for 16 registers
Fields
pc: R
Implementations
impl<R: Register + Default + Copy + Clone> Core<R>
[src]
pub fn new(address: R::Unsigned) -> Self
[src]
Creates a new core starting execution at the given address address must be aligned to 4 bytes else a panic will occur during execution
pub fn step(&mut self)
[src]
Increments the program counter by the instruction size of 4 bytes
pub fn get(&self, index: usize) -> R
[src]
pub fn set(&mut self, index: usize, register: R)
[src]
pub fn execute(
&mut self,
instruction: [u8; 4],
mmu: &mut dyn Mmu<R>
) -> Result<(), DecodeError>
[src]
&mut self,
instruction: [u8; 4],
mmu: &mut dyn Mmu<R>
) -> Result<(), DecodeError>
Decode and execute an instruction
Auto Trait Implementations
impl<R> RefUnwindSafe for Core<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<R> Send for Core<R> where
R: Send,
R: Send,
impl<R> Sync for Core<R> where
R: Sync,
R: Sync,
impl<R> Unpin for Core<R> where
R: Unpin,
R: Unpin,
impl<R> UnwindSafe for Core<R> where
R: UnwindSafe,
R: UnwindSafe,
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>,