On Sat, May 19, 2012 at 11:24 PM, Matthew Hicks <[email protected]> wrote:
> From my experiences with hardware that can handle illegal instruction
> exceptions occuring every 3 instructions:
>
> epcr <= ex_dslot ? wb_pc : delayed_ex_dslot ? dl_pc : ex_pc;
>

Yes, that is exactly what I needed in the end.

I've got a test for the appropriate behaviour of the range exception
on arithmetic operations including in delay slot. The following patch
to or1200_except was what is needed:

@@ -571,26 +585,30 @@
                       except_type <=  `OR1200_EXCEPT_RANGE;
                       epcr <=  ex_dslot ?
                               wb_pc : delayed1_ex_dslot ?
-                              id_pc : delayed2_ex_dslot ?
-                              id_pc : id_pc;
+                              dl_pc : delayed2_ex_dslot ?
+                              id_pc : ex_pc;


I'm not sure if we really need that delayed2_ex_dslot stuff. I didn't
see it asserted during any of the tests I ran.

Cheers

Julius
_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc

Reply via email to