Would it be much effort to implement a simplified version, i.e. ignoring
pipelining, just counting a fixed number of cycles per instruction?

Is it not just a case of ensuring that calls to tick() with appropriate argument value are implemented in the right places? Specifically, all the inst_*() functions in inst.cc.

Unless I am being naive, I think the only difficulty would be with what to do for DIV/DIVW, which take a variable number of cycles that depends on their operands. Also, special attention would need to be paid to the cases where instructions are utilising indirect addressing (e.g. "ld a, [0x1234]"), which typically take an extra 3 cycles compared to the common case.

Regards,
Basil


_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to