UPGRADE YOUR BROWSER

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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Advisor ronnywebers
Advisor
280 Views
Registered: ‎10-10-2014

why are there 'canonical definitions' in xparameters_ps.h and xparameters.h

I'm wondering what exactly is meant with a 'canonical definition', and why one uses it.

For example from xparameters_ps.h:

 

/* Canonical definitions for Interrupts  */
#define XPAR_XUARTPS_0_INTR		XPS_UART0_INT_ID
#define XPAR_XUARTPS_1_INTR		XPS_UART1_INT_ID

..

#define XPS_UART1_INT_ID		82U

why would one use 'XPAR_XUARTPS_1_INTR' and not just directly 'XPS_UART1_INT_ID'?

 

 

** kudo if the answer was helpful. Accept as solution if your question is answered **
0 Kudos
1 Reply
Xilinx Employee
Xilinx Employee
232 Views
Registered: ‎02-01-2008

Re: why are there 'canonical definitions' in xparameters_ps.h and xparameters.h

A canconical definition relies on the IP name for the xparameters entry where a non-canconical definition relies on the instantiated IP name. So if a hardware designer changes the instantiated IP's name, then the non-canconical name would change.

I'm not sure if it is still the case, but at one time the down fall of using a canconical definition, when two or more of the same IPs are in the design, is that the order can change.

For example, if your uarts are at base addresses 0x80000000 XUARTPS_0 and 0x90000000 for XUARTPS_1, some design changes could cause the canconical definition of XUARTPS_0 to be at 0x90000000. I doubt this ever occurs when using PS peripherals but there was a time when it could occur with multiple PL peripherals.

0 Kudos