I have a bunch of instructions that I want to trace. I wanted to separate them by
for(int i=0;i<100;i++) asm(“nop”);
to detect the traces of each instruction (with naked eye). Is there a better method to do that?
Also I noticed that “nop” do not always have the same traces they ma be delayed sometimes…
Is there an instruction that outputs very low power consumption (or 0), so that I use it to separate my instructions?
That for loop will have associated instructions for the actual loop (incrementing i and branches until the loop is done). Not sure if you’re going for just nop’s here, but if you want that I think you have to copy out asm("nop") 100 times instead.
If you’re running on an Arm target, the processor might just skip the nop instruction.
I don’t think you’ll be able to get much better than a simple single cycle instruction like and or or.