Exception handling code in the OR1200

Aug 08, 2007 1 Replies

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?



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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required