apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Enhance error message on bitstream mismatch

Open NetSpida opened this issue 2 years ago • 1 comments

In case of a bitstream for a wrong FPGA I get the error message OSError: Configuration failed: part ID mismatch / (04a00e10) It seems to be generated here

The message could be a little more clear:

  • Why is this an OSError?
  • what mismatched (part IDs of the FPGA and the bitstream?)
  • add human readable representation of the part IDs
  • which part ID is actually shown? the ID in the bitstream or of the installed FPGA?

I would suggest an error message similar to the following: configuration failed: trying to load a bitstream generated for FPGA Lattice ECP5 LFE5U-12 partid 04a00e10 onto an incompatible FPGA Lattice ECP5 LFE5U-25 partid 0x41111043

NetSpida avatar Feb 22 '23 12:02 NetSpida

To clarify, 04a00e10 is not either of the part IDs - it's a status code returned to the host.

We'll need to rearrange the code a bit to display a better error message, since we don't have the necessary context in _validate_status and we may need to send additional requests to the board.

martinling avatar Feb 22 '23 12:02 martinling