pub struct RiscvCommunicationInterface { /* private fields */ }
Expand description
A interface that implements controls for RISC-V cores.
Implementations§
source§impl RiscvCommunicationInterface
impl RiscvCommunicationInterface
sourcepub fn new(
probe: Box<dyn JTAGAccess>
) -> Result<Self, (Box<dyn JTAGAccess>, RiscvError)>
pub fn new( probe: Box<dyn JTAGAccess> ) -> Result<Self, (Box<dyn JTAGAccess>, RiscvError)>
Creates a new RISC-V communication interface with a given probe driver.
sourcepub fn target_reset_deassert(&mut self) -> Result<(), DebugProbeError>
pub fn target_reset_deassert(&mut self) -> Result<(), DebugProbeError>
Deassert the target reset.
sourcepub fn read_idcode(&mut self) -> Result<u32, DebugProbeError>
pub fn read_idcode(&mut self) -> Result<u32, DebugProbeError>
Read the targets IDCODE.
sourcepub fn read_csr_progbuf(&mut self, address: u16) -> Result<u32, RiscvError>
pub fn read_csr_progbuf(&mut self, address: u16) -> Result<u32, RiscvError>
Read the CSR progbuf register.
sourcepub fn write_csr_progbuf(
&mut self,
address: u16,
value: u32
) -> Result<(), RiscvError>
pub fn write_csr_progbuf( &mut self, address: u16, value: u32 ) -> Result<(), RiscvError>
Write the CSR progbuf register.
Trait Implementations§
source§impl Debug for RiscvCommunicationInterface
impl Debug for RiscvCommunicationInterface
source§impl MemoryInterface for RiscvCommunicationInterface
impl MemoryInterface for RiscvCommunicationInterface
source§fn supports_native_64bit_access(&mut self) -> bool
fn supports_native_64bit_access(&mut self) -> bool
Does this interface support native 64-bit wide accesses Read more
source§fn read_word_64(&mut self, address: u64) -> Result<u64, Error>
fn read_word_64(&mut self, address: u64) -> Result<u64, Error>
Read a 64bit word of at
address
. Read moresource§fn read_word_32(&mut self, address: u64) -> Result<u32, Error>
fn read_word_32(&mut self, address: u64) -> Result<u32, Error>
Read a 32bit word of at
address
. Read moresource§fn read_64(&mut self, address: u64, data: &mut [u64]) -> Result<(), Error>
fn read_64(&mut self, address: u64, data: &mut [u64]) -> Result<(), Error>
Read a block of 64bit words at
address
. Read moresource§fn read_32(&mut self, address: u64, data: &mut [u32]) -> Result<(), Error>
fn read_32(&mut self, address: u64, data: &mut [u32]) -> Result<(), Error>
Read a block of 32bit words at
address
. Read moresource§fn read_8(&mut self, address: u64, data: &mut [u8]) -> Result<(), Error>
fn read_8(&mut self, address: u64, data: &mut [u8]) -> Result<(), Error>
Read a block of 8bit words at
address
.source§fn read(&mut self, address: u64, data: &mut [u8]) -> Result<(), Error>
fn read(&mut self, address: u64, data: &mut [u8]) -> Result<(), Error>
Read data from
address
. Read moresource§fn write_word_64(&mut self, address: u64, data: u64) -> Result<(), Error>
fn write_word_64(&mut self, address: u64, data: u64) -> Result<(), Error>
Write a 64bit word at
address
. Read moresource§fn write_word_32(&mut self, address: u64, data: u32) -> Result<(), Error>
fn write_word_32(&mut self, address: u64, data: u32) -> Result<(), Error>
Write a 32bit word at
address
. Read moresource§fn write_word_8(&mut self, address: u64, data: u8) -> Result<(), Error>
fn write_word_8(&mut self, address: u64, data: u8) -> Result<(), Error>
Write an 8bit word at
address
.source§fn write_64(&mut self, address: u64, data: &[u64]) -> Result<(), Error>
fn write_64(&mut self, address: u64, data: &[u64]) -> Result<(), Error>
Write a block of 64bit words at
address
. Read moresource§fn write_32(&mut self, address: u64, data: &[u32]) -> Result<(), Error>
fn write_32(&mut self, address: u64, data: &[u32]) -> Result<(), Error>
Write a block of 32bit words at
address
. Read moresource§fn write_8(&mut self, address: u64, data: &[u8]) -> Result<(), Error>
fn write_8(&mut self, address: u64, data: &[u8]) -> Result<(), Error>
Write a block of 8bit words at
address
.source§fn write(&mut self, address: u64, data: &[u8]) -> Result<(), Error>
fn write(&mut self, address: u64, data: &[u8]) -> Result<(), Error>
Write a block of 8bit words at
address
. May use 64 bit memory access,
so should only be used if reading memory locations that don’t have side
effects. Generally faster than MemoryInterface::write_8
. Read moresource§fn supports_8bit_transfers(&self) -> Result<bool, Error>
fn supports_8bit_transfers(&self) -> Result<bool, Error>
Returns whether the current platform supports native 8bit transfers.
source§fn read_mem_64bit(&mut self, address: u64, data: &mut [u8]) -> Result<(), Error>
fn read_mem_64bit(&mut self, address: u64, data: &mut [u8]) -> Result<(), Error>
Reads bytes using 64 bit memory access. Address must be 64 bit aligned
and data must be an exact multiple of 8.
source§fn read_mem_32bit(&mut self, address: u64, data: &mut [u8]) -> Result<(), Error>
fn read_mem_32bit(&mut self, address: u64, data: &mut [u8]) -> Result<(), Error>
Reads bytes using 32 bit memory access. Address must be 32 bit aligned
and data must be an exact multiple of 4.