Hallo Jeremy:

> It is a good idea to run the tests with a range of starting
> conditions, but remember that slows Or1ksim (you have
> to initialize the memory), so the tests will take longer.
> IIRC Or1ksim by default doesn't actively
> initialize memory to zero, it just uses whatever is there.

Currently, the default memory type in or1ksim is "unknown", which, like you said, uses whatever is there. This introduces a random factor in the simulations (I think you used the term "Heisenbugs" before), which are indeed undesirable.

I haven't looked closely, but I have a feeling that the memory actually ends up filled with zeroes, which would also not be ideal, since that could mask any errors or omissions when clearing the BSS section during start-up.

That's why I think that we should change the default memory type to "exitnops", please see the attached patch. I don't think the time it takes for or1ksim to initialise the memory is important for our simulations.

Best regards,
  Ruben


Index: doc/or1ksim.texi
===================================================================
--- doc/or1ksim.texi    (revision 787)
+++ doc/or1ksim.texi    (working copy)
@@ -1938,7 +1938,7 @@
 @item type=random|pattern|unknown|zero|exitnops
 @cindex @code{type} (memory configuration)
 Specifies the values to which memory should be initialized.  The
-default value is @code{unknown}.
+default value is @code{exitnops}.
 
 @table @code
 
Index: peripheral/memory.c
===================================================================
--- peripheral/memory.c (revision 787)
+++ peripheral/memory.c (working copy)
@@ -387,7 +387,7 @@
       exit (-1);
     }
 
-  mem->type = MT_UNKNOWN;
+  mem->type = MT_EXITNOPS;
   mem->random_seed = -1;
   mem->pattern = 0;
   mem->baseaddr = 0;


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

Reply via email to