]> Joshua Wise's Git repositories - firearm.git/blobdiff - Memory.v
Memory: Add some debugging.
[firearm.git] / Memory.v
index c735ed92af16303a5b5c75e3d1c60d716c5d16ca..696b1a4090d8882ec609a8fcbc00a2c03e7f7d7f 100644 (file)
--- a/Memory.v
+++ b/Memory.v
@@ -325,17 +325,21 @@ module Memory(
                        if (insn[20] == 0 /* store to coprocessor */)
                                cp_write = op0;
                        else begin
-                               next_write_reg = 1'b1;
-                               next_write_num = insn[15:12];
-                               next_write_data = cp_read;
+                               if (insn[15:12] != 4'hF /* Fuck you ARM */) begin
+                                       next_write_reg = 1'b1;
+                                       next_write_num = insn[15:12];
+                                       next_write_data = cp_read;
+                               end else
+                                       next_outcpsr = {cp_read[31:28], cpsr[27:0]};
                        end
                        if (cp_busy) begin
                                outstall = 1;
                                next_outbubble = 1;
                        end
                        if (!cp_ack) begin
-                               $display("WARNING: Possible MRCMCR undefined instruction");
+                               $display("WARNING: Possible MRCMCR undefined instruction: cp_ack %d, cp_busy %d",cp_ack, cp_busy);
                        end
+                       $display("MRCMCR: ack %d, busy %d", cp_ack, cp_busy);
                end
                default: begin end
                endcase
This page took 0.021415 seconds and 4 git commands to generate.