openrisc / or1ksim

The OpenRISC 1000 architectural simulator
GNU General Public License v3.0
69 stars 43 forks source link

Set 32MB RAM as default #9

Open olofk opened 7 years ago

olofk commented 7 years ago

or1ksim can be launched without a config file, in which case it uses built-in default values. The default value for RAM size is 8MB, but most apps are built for 32MB RAM, and Linux in particular will not work with less. We should change or1ksim to use 32MB as default to avoid having to always load a config file

jeremybennett commented 7 years ago

I think this was related to the typical FPGAs of a bygone era. I'm happy for the default to be whatever people think is appropriate.

Linux has got bloated - it used to run in 2MB!

stffrdhrn commented 4 years ago

I started to work on this, but it seems it will require a bit of an overhaul of how peripheral defaults are configured.

  1. During Startup peripherals all register config handlers (i.e. memory is a peripheral)
  2. When config is parsed configured peripherals setup reset handlers + defaults for non configured parameters

The problem is that if there is to config file defaults are not set and reset handlers are not configured. To me it looks like right now the memory is not even initialized if there is no sim.cfg.

Unless you are just saying the default in sim.cfg