The or1ksim simulator should not initialise the CPU general purpose
registers with zero values, because that's not what happens on the real
or1200 core, and even if it did, there is no such guarantee in the
OpenRISC architecture specification.

I would set them all to random values when simulating a CPU reset
(especially R0), thus encouraging everybody to initialise all necessary
registers properly on start-up.

It would be best for Or1ksim to provide this as a configuration option,
just as it does for memory initialization. Or1ksim is intended to model
multiple architectural variants and implementations, so this gives the
user greatest flexibility.


I cannot think of a good reason why we should invest our (little) time implementing a configuration setting that no-one should be using.

I think we should change or1ksim's behaviour to initialise all general purpose registers with random values and let all broken tests fail from now on. or1ksim's default settings should encourage writing good tests that run everywhere as per the architecture specification.

Fixing such broken test cases is straightforward and usually worthwhile. If anybody has such a huge test suite that it's not worth fixing (who would that be?), then let he write a patch for or1ksim to add such a configuration setting.

I'll be posting here patches to fix or1ksim's test suite in this respect.

Best regards,
  R. Diez
_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc

Reply via email to