simbricks / simbricks

Main Repository for the SimBricks Modular Full-System Simulation Framework.
https://simbricks.io
MIT License
128 stars 24 forks source link

License requirement for Tofino simulator #66

Open drobinkent opened 1 year ago

drobinkent commented 1 year ago

Do I need to get a license for the tofino simulator ?

FreakyPenguin commented 1 year ago

Hi @drobinkent!

Yes, you will need a license for the Tofino SDE with the simulator and P4 compiler. All we provide is an adapter to Integrate this simulator with others in SimBricks.

(@JLin-Li has been working on also integrating the open source bmv2 simulator as a component into SimBricks. This should provide an open source P4 switch but obviously misses the Tofino hardware details. But this is still a work in progress last time we chatted.)

drobinkent commented 11 months ago

Any update on this?

JLin-Li commented 11 months ago

Sorry for the very late reply. We are in the process of merging SimBricks bmv2 support to the main branch. For now, you can try the bmv2 branch. A new bmv2 (fork from the open source bmv2 repo) submodule is included in the branch, and we have integrated bmv2 switch to SimBricks. A simple bmv2 experiment to try would be experiments/pyexps/qemu_udp_single.py

drobinkent commented 10 months ago

Can you please give me the command for building that branch?

jonas-kaufmann commented 5 months ago

Let me quickly jump in here. External simulators are located under the path sims/external/. From our root directory, you run make sims/external/bmv2/ready to build bmv2. You can see what concretely this Makefile target does here. Our other external simulators are built in a similar fashion.

From glancing at the experiment script experiments/pyexps/qemu_udp_single.py that @JLin-Li mentioned, you'll have to also build QEMU and the base SimBricks library. Overall, these should be the commands you'd have to run:

$ make -j`nproc`
$ make -j`nproc` sims/external/qemu/ready
$ make -j`nproc` build-images-min
$ make sims/external/bmv2/ready

This should clone the submodules for our external simulators. If not, then delete the empty directories under sims/external.

I didn't try building the bmv2 simulator myself but I'm going to monitor this issue in case you have follow-up questions or run into issues.