infmod and clock simulator code