Upgate#
- group drv_upgate
FPGA bitstream update library.
- Author
Alexandre Abadie alexandre.abadie@inria.fr
- Copyright
Inria, 2024-present
Defines
-
DB_UPGATE_CHUNK_SIZE#
Size of an FPGA bitstream chunk.
-
DB_UPGATE_SHA256_LENGTH#
-
DB_UPGATE_SIGNATURE_LENGTH#
-
DB_UPGATE_COMPRESSION_NONE#
-
DB_UPGATE_COMPRESSION_GZIP#
-
DB_UPGATE_COMPRESSION_LZ4#
FPGA bitstream update configuration.
Typedefs
-
typedef void (*db_upgate_reply_t)(const uint8_t*, size_t)#
Transport agnostic function used to reply to the flasher script.
Compression modes
Enums
-
enum db_upgate_message_type_t#
Values:
-
enumerator DB_UPGATE_MESSAGE_TYPE_START#
-
enumerator DB_UPGATE_MESSAGE_TYPE_START_ACK#
-
enumerator DB_UPGATE_MESSAGE_TYPE_PACKET#
-
enumerator DB_UPGATE_MESSAGE_TYPE_PACKET_ACK#
-
enumerator DB_UPGATE_MESSAGE_TYPE_FINALIZE#
-
enumerator DB_UPGATE_MESSAGE_TYPE_FINALIZE_ACK#
-
enumerator DB_UPGATE_MESSAGE_TYPE_START#
Functions
-
void db_upgate_init(const db_upgate_conf_t *config)#
Initialize the upgate FPGA bitstream update.
- Parameters:
config – [in] Pointer to the upgate configuration
-
void db_upgate_start(void)#
Start the upgate process.
-
void db_upgate_finish(void)#
Finalize the upgate process.
-
void db_upgate_handle_packet(const db_upgate_pkt_t *pkt)#
Handle a received bitstream packet.
- Parameters:
pkt – [in] Pointer to the upgate packet
-
void db_upgate_handle_message(const uint8_t *message)#
Handle received upgate message.
- Parameters:
message – [in] The message to handle
-
struct db_upgate_conf_t#
Public Members
-
db_upgate_reply_t reply#
Pointer to the function used to reply to the upgate script.
-
const n25q128_conf_t *n25q128_conf#
-
db_upgate_reply_t reply#
-
struct db_upgate_start_notification_t#
-
struct db_upgate_pkt_t#
Public Members
-
uint32_t chunk_index#
Index of the chunk.
-
uint32_t packet_token#
Random token of the packet.
-
uint16_t original_size#
Original size.
-
uint8_t packet_index#
Index of the packet in the chunk.
-
uint8_t packet_count#
Number of packet composing the chunk.
-
uint8_t packet_size#
Size of the packet.
-
uint8_t data[DB_UPGATE_CHUNK_SIZE]#
Bytes array containing the chunk data.
-
uint32_t chunk_index#