pub struct Bitstream { /* private fields */ }
Expand description

ECP5 bitstream in-memory.

Can be loaded from a path or file, and modified as required to change IDCODE checks and SPI mode and frequency.

Implementations

Open a bitstream from the provided path.

Open a bitstream from the provided open File.

Load a bitstream from the provided raw bitstream data.

Load a bitstream directly from a Vec<u8>.

Get the underlying bitstream data.

Check the provided IDCODE matches the IDCODE check in the bitstream.

If the bitstream does not contain an IDCODE check, no action is taken.

If the bitstream contains a compatible but different IDCODE, and fix is true, a warning is logged and the bitstream is patched to idcode.

If the bitstream contains an incompatible IDCODE, an error is logged and this method returns an error.

See ECP5IDCODE::compatible.

Replace the VERIFY_ID command, if any, with NOOPs.

If the bitstream does not contain an IDCODE check, no action is taken.

Replace the SPI_MODE command, if any, with NOOPs.

If the bitstream metadata parsing was not successful or no SPI_MODE command was found, no action is taken.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.