2018-11-30 11:08:08 +01:00
|
|
|
# PySysC-SC
|
|
|
|
|
|
|
|
A simple C++/SystemC/CMake project to test pysysc
|
|
|
|
|
|
|
|
# How to build
|
|
|
|
|
2024-11-22 15:44:08 +01:00
|
|
|
> Currently only Linux and MacOS are tested.
|
2018-11-30 11:08:08 +01:00
|
|
|
|
2024-11-22 15:44:08 +01:00
|
|
|
The install instruction below assume using bash.
|
2018-11-30 11:08:08 +01:00
|
|
|
|
2024-11-22 16:46:52 +01:00
|
|
|
```sh
|
|
|
|
# clone the PySysC-SC repository
|
2024-11-22 15:44:08 +01:00
|
|
|
git clone --recursive -b develop https://git.minres.com/SystemC/PySysC-SC.git
|
2018-11-30 11:08:08 +01:00
|
|
|
cd PySysC-SC
|
2024-11-22 16:46:52 +01:00
|
|
|
# install conan 1.x into virtual environment
|
2024-11-22 15:44:08 +01:00
|
|
|
python3 -mvenv .venv
|
|
|
|
. .venv/bin/activate
|
|
|
|
pip install "conan<2.0"
|
2024-11-22 16:46:52 +01:00
|
|
|
# build the SystemC libraries needed
|
2024-11-22 15:44:08 +01:00
|
|
|
cmake -S . -B build -DBUILD_SHARED_LIBS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
|
|
|
cmake --build build -j24
|
2024-11-22 16:46:52 +01:00
|
|
|
# install cppyy and PySysC
|
2024-11-22 15:44:08 +01:00
|
|
|
export SYSTEMC_HOME=$(grep -A1 rootpath_systemc\] build/conanbuildinfo.txt | tail -1)
|
|
|
|
export STDCXX=17
|
|
|
|
pip install "cppyy<3.0"
|
|
|
|
pip install https://github.com/Minres/PySysC/tarball/master
|
|
|
|
pip install scc/contrib/pysysc/
|
2024-11-22 16:46:52 +01:00
|
|
|
# run the exampoes
|
2024-11-22 15:44:08 +01:00
|
|
|
python3 router_example.py
|
|
|
|
python3 router_example2.py
|
|
|
|
python3 modules.py
|
2018-11-30 11:08:08 +01:00
|
|
|
```
|