ECALL and EBREAK are basically just illegal instructions with fancy
names. If you've got illegal instruction support working, you can
support ECALL and EBREAK by changing the mecause value.
Async interrupts are handled in Rocket by injecting an illegal
instruction in the instruction fetch unit.
Synchronous faults (which, as described, encompass the other
categories) are handled in the writeback stage by updating the various
control registers and then generating a kill signal which invalidates
the instructions already in the pipeline (so instructions after the
ECALL, trap, or interrupt will be fetched and executed, but their
register and memory writes are ignored).
-s