Exception handling code in the OR1200

Recently, I read the source code of OR1200. But I am a little confused about the Exception part.

When a exception occurs, the correct execution PC value is found and stored in the "epcr" register. And the "except_type" is set correctly. Then in the next clock, all the instructions in the pipeline are flushed. At the same time, the PC value is set to the exception handling address according to the different exception types in the or1200_genpc.v.

However, I don't understand why the FSM in the or1200_except.v almost set the "extend_flush" signal for 5 clocks. It seems not necessary.

Does anybody know the answer?

Reply to
IDDLife
Loading thread data ...

Does anybody knows why the exception handling should flush the whole pipeline for almost 5 clocks? Thanks a lot.

Reply to
IDDLife

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.