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# 24052

Description

When I use the mfdcr macro, the program works. When I use the XIo_DcrIn function, an illegal instruction exception occurs.

When running the XIo_Dcr functions from OCM, the "XPAR_XIO_DCR_TEXT_SPACE" flag needs to be set in the compiler's command line. The system appears to have DOCM and IOCM. If this true, when the project is compiled, there needs to be a flag defined on the compiler command line for the libraries. The flag is "XPAR_XIO_DCR_TEXT_SPACE". By default, the driver constructs the function table in the data area of the code image. Defining the above flag forces the compiler to construct the function table in text space and since the memory space is split in the OCM system, this flag is required.

Solution

In EDK, you can add extra compiler flags. In the "Software Platform Settings", you can select "extra_compiler_flags". Usually only "-g" is selected; you can add the flag by adding "DXPAR_XIO_DCR_TEXT_SPACE". After adding the flag, clean and rebuild the libraries.