Forum Discussion
Altera_Forum
Honored Contributor
13 years agoThat wouldn't work at all for instructions that take a variable number of cycles.
I'd actually check that 'clk_en' isn't actually used when the processor needs to stall the custom instruction unit because of a pipeline stall somewhere. In which case 'done' would only be actioned when 'clk_en' was valid. I've only written combinatorial instructions though. If something is a 'bit too slow' for a single cycle combinatorial instruction it might be worth using 2 instrcutions and cycling a 32bit intermediate through a cpu register. That would give a 2 cycle instruction with no result delay.