source code from XAPP058 for CPLD programming from the microcontroller