ecg: Emulator Code Geneator