CPLD turned out to be cause of problems. Internal oscillator can be a range of 18 MHz to 26 MHz depending on factory process-not programibility. Moved project to DE0-Nano and works perfectly