pub struct ECP5 { /* private fields */ }
Expand description
ECP5 FPGA manager
Implementations
sourceimpl ECP5
impl ECP5
pub fn new(tap: JTAGTAP, idcode: ECP5IDCODE) -> Self
pub fn idcode(&self) -> ECP5IDCODE
sourcepub fn program(&mut self, data: &[u8]) -> Result<()>
pub fn program(&mut self, data: &[u8]) -> Result<()>
Program the ECP5 configuration SRAM with the bitstream in data
.
The ECP5 will be reset and start configuration after programming completion.
sourcepub fn program_progress(&mut self, data: &[u8]) -> Result<()>
pub fn program_progress(&mut self, data: &[u8]) -> Result<()>
Program the ECP5 configuration SRAM with the bitstream in data
.
The ECP5 will be reset and start configuration after programming completion.
A progress bar is drawn to the terminal during programming.
sourcepub fn program_cb<F: Fn(usize)>(&mut self, data: &[u8], cb: F) -> Result<()>
pub fn program_cb<F: Fn(usize)>(&mut self, data: &[u8], cb: F) -> Result<()>
Program the ECP5 configuration SRAM with the bitstream in data
.
The ECP5 will be reset and start configuration after programming completion.
The callback cb
is called with the number of bytes programmed so far.
sourcepub fn refresh(&mut self) -> Result<()>
pub fn refresh(&mut self) -> Result<()>
Send the LSC_REFRESH command, triggering a reload of configuration.
This is equivalent to toggling the PROGRAMN pin.
sourcepub fn into_flash(self) -> Result<ECP5Flash>
pub fn into_flash(self) -> Result<ECP5Flash>
Place ECP5 into flash pass-through mode. The current SRAM contents are cleared.