The current or1200 implementation allows any value to be written to r0, which is supposed to always be 0. The following patch basically ignores all writes to r0.
Index: or1200_rf.v =================================================================== --- or1200_rf.v (revision 672) +++ or1200_rf.v (working copy) @@ -186,7 +186,7 @@ // // RF write data is either from SPRS or normal from CPU datapath // -assign rf_dataw = (spr_valid & spr_write) ? spr_dat_i : dataw; + assign rf_dataw = (rf_addrw == 0) ? 32'b0 : (spr_valid & spr_write) ? spr_dat_i : dataw; // // RF write enable is either from SPRS or normal from CPU control ---Matthew Hicks
_______________________________________________ OpenRISC mailing list [email protected] http://lists.openrisc.net/listinfo/openrisc
