AR# 45132: 13.3 EDK - LibGen swaps XPAR_CPU_IDs in dual MicroBlaze system
13.3 EDK - LibGen swaps XPAR_CPU_IDs in dual MicroBlaze system
In a two MicroBlaze design, a mailbox (LogiCORE IP Mailbox) is used to communicate between microblaze_0 and microblaze_1.
The mailbox driver (mbox_v3_01_a) uses parameter "XPAR_CPU_ID" (found in xparameters.h) to know the identity of the processor. It appears that this parameter is always backwards.For example, when generating a BSP for microblaze_1, the parameter XPAR_CPU_ID gets the value 0. The BSP for microblaze_0 has a value 1 assigned to XPAR_CPU_ID.
How can I work around this, and are there other things to consider with this swap?
In all of the examples found in the $XILINX_EDK\sw\XilinxProcessorIPLib\driver\mbox_vx_xx_x\examples, you see that we translate what Libgen crates as the XPAR_CPU_ID, into a local CPU_ID, similar to below: