[−][src]Struct wishbone_tool::riscv::RiscvCpu
Implementations
impl RiscvCpu
[src]
pub fn new(bridge: &Bridge, offset: u32) -> Result<RiscvCpu, RiscvCpuError>
[src]
pub fn get_feature(&self, name: &str) -> Result<Vec<u8>, RiscvCpuError>
[src]
pub fn get_threads(&self) -> Result<Vec<u8>, RiscvCpuError>
[src]
pub fn explain(&self, bridge: &Bridge) -> Result<String, RiscvCpuError>
[src]
Print information about why the CPU got into its current state
pub fn add_breakpoint(
&self,
bridge: &Bridge,
addr: u32
) -> Result<(), RiscvCpuError>
[src]
&self,
bridge: &Bridge,
addr: u32
) -> Result<(), RiscvCpuError>
pub fn remove_breakpoint(
&self,
bridge: &Bridge,
addr: u32
) -> Result<(), RiscvCpuError>
[src]
&self,
bridge: &Bridge,
addr: u32
) -> Result<(), RiscvCpuError>
pub fn halt(&self, bridge: &Bridge) -> Result<(), RiscvCpuError>
[src]
pub fn reset(&self, bridge: &Bridge) -> Result<(), RiscvCpuError>
[src]
Reset the target CPU, restore any breakpoints, and leave it in the "halted" state.
pub fn resume(&self, bridge: &Bridge) -> Result<Option<String>, RiscvCpuError>
[src]
Restore the CPU state and continue execution.
pub fn step(&self, bridge: &Bridge) -> Result<Option<String>, RiscvCpuError>
[src]
Step the CPU forward by one instruction.
pub fn read_register(
&self,
bridge: &Bridge,
gdb_idx: u32
) -> Result<u32, RiscvCpuError>
[src]
&self,
bridge: &Bridge,
gdb_idx: u32
) -> Result<u32, RiscvCpuError>
Read the specified register and return its value.
The gdb_idx
is the GDB index, and may include both CPU registers
and CSR-index registers, which are offset by an index.
pub fn all_cpu_registers(&self) -> Vec<u32>
[src]
Return a vec containing all valid CPU registers.
pub fn write_register(
&self,
bridge: &Bridge,
gdb_idx: u32,
value: u32
) -> Result<(), RiscvCpuError>
[src]
&self,
bridge: &Bridge,
gdb_idx: u32,
value: u32
) -> Result<(), RiscvCpuError>
Write a register on the device.
For general-purpose registers, simply place the new value in the cache, to be updated when we resume the CPU.
For CSRs, initiate the write immediately.
pub fn read_memory(
&self,
bridge: &Bridge,
addr: u32,
sz: u32
) -> Result<u32, RiscvCpuError>
[src]
&self,
bridge: &Bridge,
addr: u32,
sz: u32
) -> Result<u32, RiscvCpuError>
pub fn write_memory(
&self,
bridge: &Bridge,
addr: u32,
sz: u32,
value: u32
) -> Result<(), RiscvCpuError>
[src]
&self,
bridge: &Bridge,
addr: u32,
sz: u32,
value: u32
) -> Result<(), RiscvCpuError>
pub fn get_controller(&self) -> RiscvCpuController
[src]
pub fn flush_cache(&self, bridge: &Bridge) -> Result<(), RiscvCpuError>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for RiscvCpu
impl Send for RiscvCpu
impl !Sync for RiscvCpu
impl Unpin for RiscvCpu
impl UnwindSafe for RiscvCpu
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>,