pub struct BackdoorTarget<'a> {
pub info: BackdoorTargetInfo,
/* private fields */
}Expand description
Handle for interacting with a given target via the backdoor loader.
Fields§
§info: BackdoorTargetInfoInformation about the target.
Implementations§
Source§impl<'a> BackdoorTarget<'a>
impl<'a> BackdoorTarget<'a>
Sourcepub fn write(
&mut self,
start: u32,
words: &[Word],
write_all: bool,
check_status: bool,
) -> Result<()>
pub fn write( &mut self, start: u32, words: &[Word], write_all: bool, check_status: bool, ) -> Result<()>
Write a sequence of words at a given offset (word index) in the target’s memory.
The write_all parameter is used to control whether writes can be optimized by
maintaining shadow CSRs to determine when register contents have genuinely changed.
The check_status parameter is used to control whether the status bit is polled
after all words are written, to check for any errors.
Sourcepub fn read(
&mut self,
start: u32,
count: u32,
check_status: bool,
) -> Result<Vec<Word>>
pub fn read( &mut self, start: u32, count: u32, check_status: bool, ) -> Result<Vec<Word>>
Read a sequence of words at a given offset (word index) from the target’s memory.
The check_status parameter is used to control whether the status bit is polled
after all words are read, to check for any errors.
Sourcepub fn write_word(
&mut self,
index: u32,
word: &Word,
check_status: bool,
) -> Result<()>
pub fn write_word( &mut self, index: u32, word: &Word, check_status: bool, ) -> Result<()>
Write a single word at a given word index in the target’s memory, without disturbing any
auto-increment cursor. See Backdoor::write_target_word.
Sourcepub fn read_word(&mut self, index: u32, check_status: bool) -> Result<Word>
pub fn read_word(&mut self, index: u32, check_status: bool) -> Result<Word>
Read a single word at a given word index from the target’s memory, without disturbing any
auto-increment cursor. See Backdoor::read_target_word.
Sourcepub fn clear(&mut self, word: &Word, check_status: bool) -> Result<()>
pub fn clear(&mut self, word: &Word, check_status: bool) -> Result<()>
Clear the entire memory of the target with a given word.
An optimized fast-path for clearing memories, primarily used to replicate existing
bitstream synthesis defaults. The check_status parameter is used to control
whether the status bit is polled after clearing, to check for any errors.
Sourcepub fn read_hash(&mut self) -> Result<u32>
pub fn read_hash(&mut self) -> Result<u32>
Read this target’s HASH_LAST_LOADED register: a non-resettable, software-managed
hash of the content that was last preloaded into this target, see
Backdoor::read_target_hash.
Sourcepub fn write_hash(&mut self, hash: u32) -> Result<()>
pub fn write_hash(&mut self, hash: u32) -> Result<()>
Write this target’s HASH_LAST_LOADED register, see Backdoor::write_target_hash.