{"id":13773151,"url":"https://github.com/accellera-official/PySysC","last_synced_at":"2025-05-11T05:34:24.716Z","repository":{"id":53015379,"uuid":"247143263","full_name":"accellera-official/PySysC","owner":"accellera-official","description":"Public repository for PySysC, (From SC Common Practices Subgroup)","archived":false,"fork":false,"pushed_at":"2023-12-26T11:55:40.000Z","size":91,"stargazers_count":48,"open_issues_count":3,"forks_count":6,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-17T08:44:18.015Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/accellera-official.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-03-13T19:03:40.000Z","updated_at":"2024-08-29T02:16:51.000Z","dependencies_parsed_at":"2024-01-17T07:02:07.805Z","dependency_job_id":"effc197f-3b6e-471a-b4a6-d0e915eec893","html_url":"https://github.com/accellera-official/PySysC","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/accellera-official%2FPySysC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/accellera-official%2FPySysC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/accellera-official%2FPySysC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/accellera-official%2FPySysC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/accellera-official","download_url":"https://codeload.github.com/accellera-official/PySysC/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253523690,"owners_count":21921815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T17:01:12.041Z","updated_at":"2025-05-11T05:34:24.453Z","avatar_url":"https://github.com/accellera-official.png","language":"Python","funding_links":[],"categories":["Circuit Compilers"],"sub_categories":[],"readme":"# PySysC\n\nA Python package to make SystemC usable from Python. It supports composition of a SystemC/TLM model as well as running the simulation. As of version 0.2 it also allows to run Python functions as part of an SC_THREAD.\n\n## How to setup the environment\n\nThe installation for PySysC is as follows (using bash shell). The process has\nbeen tested under CentOS7 and Ubuntu 20.04. Make sure a newer version of gcc \nis in your path (tested with gcc-6.3.0). Also the SystemC installation has to\nbe reference with the environment variable SYSTEMC_HOME.\n\nIf you get an error complaining about \nmissing Python.h, you need to install Python development headers. See the \narticel under https://blog.ducthinh.net/gcc-no-such-file-python-h.\n\n```\n# create virtual environment\npython3 -m venv pysysc-env\n# and avtivate it\n. pysysc-env/bin/activate\n# update pip to mekae sure we have the newest version\npython3 -m pip install --upgrade pip\n# install wheel package\npython3 -m pip install wheel\n# install cppyy, C++ std version needs to match the version used when building the SystemC library\nSTDCXX=11 python3 -m pip install cppyy\n# clone of PySysC\ngit clone https://git.minres.com/SystemC/PySysC.git\n# install PySysC, for development PySysC use 'python3 -m pip install -e`\nSYSTEMC_HOME=\u003cpath to SystemC\u003e python3 -m pip install PySysC\n```\n\n## Running the example\n\nTo run the example you need to clone and build the PySysC-SC repo. It contains the code and libraries being used in the example. This project uses [Conan.io](https://conan.io/) as package manager so it should be installed (see down below).\nTo deactivate conan and use a SystemC installation just comment out the line `setup_conan()` in CMakeLists.txt and set the environment variable SYSTEMC_HOME.\n\n### Run the router_eample.py\n\n```\n# get the PySysC-SC repo\ngit clone --recursive https://git.minres.com/SystemC/PySysC-SC.git\n# build the project libraries as shared libs\ncd PySysC-SC\nmkdir -p build/Debug\ncd build/Debug\ncmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON ../..\nmake -j components\ncd ../..\n# now we are ready to run the example\npython3 router_eample.py\n\n```\n\n### Installing conan separately\n\nTo install conan being used during cmake and build the example project without\nPySysC you need to execute the following steps:\n\n```\n# install conan into our virtual environment pysysc-env\npython3 -m pip install conan\n# create the default profile\nconan profile new default --detect\n# add the repo for SystemC packages used in the project\nconan remote add minres https://api.bintray.com/conan/minres/conan-repo\n```\n\n## TODO\n\n* pythonize `sc_module` with iteration protocol (`__next__` and `StopIteration`  exception)\n* add support for SC_METHOD\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccellera-official%2FPySysC","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faccellera-official%2FPySysC","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccellera-official%2FPySysC/lists"}