The Lattice CPLD are programmable with Lattice Diamond Programmer, that can go from 20EUr, for an old parallel port device:
https://www.ebay.de/i/183473944026or Chinese clone:
https://www.ebay.de/itm/USB-Download-Cable-Jtag-SPI-Programmer-for-LATTICE-FPGA-CPLD-HW-USBN-2A/223492562126up to 250EUR for a "real" Lattice device, fortunately the software to program it is free.
The problem is that CPLD has an internal flash where the bitstream is loaded AND a security bit that is 100% set and will prevent reading it back, even form an working board.
On the other hand, compatible boards are allover on EBAY, China and local:
https://www.ebay.de/i/313147834467https://www.ebay.com/itm/Generic-Roland-SP-300-SP-300V-SP-540-SP-540V-Servo-Board-7840605600-/263561789967so if you don't have a copy of the bitstream or a donor CPLD, your best option is to buy one of these boards.
Also check the power supply voltages around, or if you have some motor controller board, in my experience Lattice devices are rock solid if not too complex and to have one fail by itself is pretty rare.
Good luck,
DC1MC