Hi Theo,
I'd really like this feature to get upstreamed! Glad to see you've already made a bunch of progress. Here are my thoughts on your questions:
--
> - Configure FireSim to use Verilator instead of the FPGA. Should this
be in a parameter in `config.ini` or a topology class in
`user_topology.py`?
I would say add some parameters in config_runtime.ini. E.g. add:
[software-metasimulation-mode]
# enable software metasimulation mode
software_metasimulation_only={no|yes}
# let user specify a host instance type
metasimulation_host_instance_type=c5.4xlarge
# launch N of these instances
metasimulation_host_instance_count=1
# map up to 10 simulations per instance
metasimulation_host_max_sims_per_host=10
# add other metasim-specific params here
When using metasimulation mode in the manager, defaulthwconfig should refer to an entry from config_build_recipes.ini rather than config_hwdb.ini.
> - Specify the instance type to use for
Verilator. Currently, FireSim knows that it should allocate FPGA
instance slots to any available F1 instance types. FPGAs are only
available some types of instances. Verilator, on the other hand, can run
on any instance type. How should FireSim detect which instances should
be used for Verilator?
I think we can leave this open-ended for now (see above) and give a reasonable default, e.g. a c5.4xlarge.
> - Specify path to Verilator sim binary. I
have hard coded the path to
`/home/centos/chipyard/sims/firesim/sim/generated-src/f1/FireSim-DDR3..._BaseF1Config/VFireSim`.
Where would this be configured, in the `config.ini` possibly?
We should be able to re-use the infrastructure the manager uses to figure out where the software driver comes from for real fpga-based firesim sims. The path can be determined using the config triplet you get from the config_build_recipe.ini that defaulthwconfig points to.
--
If you don't have the bandwidth to work on this now, I'd be happy to
take care of finishing things up and upstreaming your code if you share it
(privately with me is fine too). It'll also probably be easier to work
out the exact user API once there's a public PR.
Thanks!
Sagar