[][src]Struct wishbone_tool::riscv::RiscvCpu

pub struct RiscvCpu { /* fields omitted */ }

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]

pub fn remove_breakpoint(
    &self,
    bridge: &Bridge,
    addr: u32
) -> Result<(), RiscvCpuError>
[src]

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]

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]

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]

pub fn write_memory(
    &self,
    bridge: &Bridge,
    addr: u32,
    sz: u32,
    value: u32
) -> Result<(), RiscvCpuError>
[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.