KnCMiner ASIC helper code