The mailbox features can be used for both input and output, and would need to
be specified for all s_axilite I/Os of an HLS design.
It is enabled with a global option for the interfaces using the Vitis HLS
config_interface command:
config_interface -s_axilite_mailbox both
config_interface -s_axilite_auto_restart_counter 1
After setting up the config_interface
option, the mailbox implements a pair of registers called HW
copy and SW copy. The input mailbox and
output mailbox has an independent pair of registers as shown in the below figure.
Communication from the software application with the HLS design includes:
- Input Mailbox
-
- The application writes some or all elements to the
SW copyregister of the mailbox. - The application notifies the mailbox that
SW copyis updated. - When the HLS design restarts, the
SW copyregister is copied to theHW copyregister. - The application is notified that the
HW copyhas been updated, and can change theSW copyregister again as needed.Tip: Multiple reads by the HLS design can occur without an update from the software application.
- The application writes some or all elements to the
- Output Mailbox
-
- The application notifies the mailbox that it wants to read an updated
copy of the mailbox. The HLS design writes some or all the elements to
the
HW copyregister of the mailbox at the end of the current execution. - When the design is done,
HW copyis copied to theSW copyregister. - The application is notified that
SW copyis updated and can read it at any time.Tip: Multiple writes by the hardware can occur without any software request to update.
- The application notifies the mailbox that it wants to read an updated
copy of the mailbox. The HLS design writes some or all the elements to
the