blob: c6c713650e87d727730ab9f641e92c1fdcfd5691 (
plain) (
tree)
|
|
# sysc-playground
This repository serves as a playground for [SystemC/TLM2][sysc-home] and allows
to quickly start hacking on SystemC/TLM2 simulations.
The [Makefile](Makefile) documents how to configure and build the simulations
as well as run the tests contained in the repository.
```sh
# Build SystemC, all simulations and tests.
make build
# Run all tests.
make test
# Run all simulations in src/.
make run
# Run only the lt_bus simulation.
make run/lt_bus
```
New simulations can be added by creating a new file in `src/` and adding the
file name (w/o extension) to the `simulations` list in
[CMakeLists.txt](CMakeLists.txt).
Happy hacking.
## SystemC build
The SystemC simulator is automatically built as dependency in cmake. Currently
two different build scripts are available (mainly because of own experiments).
- [CMakeLists-sysc-fetch.txt](cmake/CMakeLists-sysc-fetch.txt) use
[`FetchContent`][cmake-fetch] to make SystemC available, this will treat
SystemC as source dependency and make all build targets available.
- [CMakeLists-sysc-external.txt](cmake/CMakeLists-sysc-external.txt) use
[`ExternalProject`][cmake-external] to make SystemC available, this will
treat SystemC as external dependency and therefore needs to provide targets
manually.
## License
This project is licensed under the [MIT](LICENSE) license.
[sysc-home]: https://www.accellera.org/downloads/standards/systemc
[cmake-fetch]: https://cmake.org/cmake/help/latest/module/FetchContent.html
[cmake-external]: https://cmake.org/cmake/help/latest/module/ExternalProject.html
|