We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 45132

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:

#if XPAR_CPU_ID == 0 #define MY_CPU_ID 1 #else #define MY_CPU_ID XPAR_CPU_ID #endif 

This should be the only change necessary, and no other parameters should need any change.

AR# 45132
Date Created 01/23/2012
Last Updated 12/15/2012
Status Active
Type General Article
  • EDK - 12.3
  • EDK - 12.4
  • EDK - 13
  • More
  • EDK - 13.1
  • EDK - 13.2
  • EDK - 13.3
  • Less
  • Mailbox