{"id":31815773,"url":"https://github.com/xilinx/systemctlm-cosim-demo","last_synced_at":"2025-10-11T09:24:02.663Z","repository":{"id":12650514,"uuid":"72154711","full_name":"Xilinx/systemctlm-cosim-demo","owner":"Xilinx","description":"QEMU libsystemctlm-soc co-simulation demos.","archived":false,"fork":false,"pushed_at":"2025-05-21T12:14:47.000Z","size":138,"stargazers_count":146,"open_issues_count":22,"forks_count":53,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-21T13:37:17.018Z","etag":null,"topics":["co-simulation","qemu","systemc","tlm2"],"latest_commit_sha":null,"homepage":"https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/862421112/Co-simulation","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xilinx.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-27T22:55:06.000Z","updated_at":"2025-05-21T12:14:51.000Z","dependencies_parsed_at":"2024-01-17T13:13:26.421Z","dependency_job_id":"2519ad1e-2b1a-4d84-9ed7-85fce42446ec","html_url":"https://github.com/Xilinx/systemctlm-cosim-demo","commit_stats":{"total_commits":120,"total_committers":14,"mean_commits":8.571428571428571,"dds":0.5333333333333333,"last_synced_commit":"3b1501c21487d265c3275a45d468a65b5d4f1989"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Xilinx/systemctlm-cosim-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xilinx%2Fsystemctlm-cosim-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xilinx%2Fsystemctlm-cosim-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xilinx%2Fsystemctlm-cosim-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xilinx%2Fsystemctlm-cosim-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xilinx","download_url":"https://codeload.github.com/Xilinx/systemctlm-cosim-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xilinx%2Fsystemctlm-cosim-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006756,"owners_count":26084178,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["co-simulation","qemu","systemc","tlm2"],"created_at":"2025-10-11T09:24:01.402Z","updated_at":"2025-10-11T09:24:02.648Z","avatar_url":"https://github.com/Xilinx.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"TLM-COSIM-DEMO\n---------------------------------------\nThis contains a small SystemC/TLM-2.0 based subsystem for demo purposes.\nIt has an interconnect connecting a remote-port attached QEMU\ninstance, a demo/debug-device, a small DMA and if verilator is available\na timer. Note that the remote-port instance connecting to QEMU\ncan serve multiple QEMU instances. In fact, this demo can run\nconnected to the ZynqMP platform with 2 external QEMU instances\n(APU/RPU and PMU). All of these instances can access the\nTLM world.\n\nThe demo/debug-device is used to read out System-C time, output\ndebug trace/events and to end the simulation.\n\nThe DMA is used to demonstrate the bus mastering capabilities of the\nTLM world back into QEMU via remote-port.\n\nThe timer is a minimalistic APB connected timer written in\nverilog. If verilator is available, this timer can be hooked\ninto the simulation.\nFor TLM to be able to talk to the APB timer, a TLM-2-APB bridge\nwas written in System-C.\n\nBUILD\n---------------------------------------\nBefore building you will need to ensure that you have SystemC and SCML\navailable.\n\nThe demo was prepared assuming the following versions:\n    SystemC: 2.3.2\n\nThe Makefile assumes that both are installed in the directories below:\n    SystemC: /usr/local/systemc-2.3.2/\n\nIf you have them installed in different directories point the Makefile to the\ncorrect directory by setting the variables SYSTEMC.\n\nYou will also need to clone the libremote-port submodule, by running:\n    $ git submodule update --init libsystemctlm-soc\n\nAlso make sure to have the \u003clinux/pci_regs.h\u003e header in the default search\ndirectory list for your version of CPP (the header is required by the\npcie-model submodule). On a Ubuntu LTS system the header can be installed\nthrough the `linux-libc-dev` packages.\n    $ sudo apt-get install linux-libc-dev\n\nOnce everything is installed you can just run make. If SystemC is in\na different directory then mentioned about you will need to specify the\ndirectory by setting the variables mentioned above.\n\nYou can also configure the build by creating a .config.mk file.\nThere are other options that can be set, e.g:\n    HAVE_VERILOG=n\n    HAVE_VERILOG_VERILATOR=n\n    HAVE_VERILOG_VCS=n\n\nRUN\n---------------------------------------\nWhen running you will need to make sure the program can link to your\nSystemC/TLM libraries. You will also need to give arguments to the application.\nThe first argument points to the QEMU machine-path to use. The second argument\nis the icount value to use. The arguments should line up with the QEMU command\nline arguments.\n\nA Versal example:\nIn one terminal, in the demo directory\nLD_LIBRARY_PATH=/usr/local/systemc-2.3.2/lib-linux64/ ./versal_demo \\\n    unix:/tmp/qemu/qemu-rport-_amba@0_cosim@0 10000\n\nA ZynqMP example:\nIn one terminal, in the demo directory\nLD_LIBRARY_PATH=/usr/local/systemc-2.3.2/lib-linux64/ ./zynqmp_demo \\\n    unix:./qemu-tmp/qemu-rport-_amba@0_cosim@0 10000\n\nA Zynq-7000 example:\nLD_LIBRARY_PATH=/usr/local/systemc-2.3.2/lib-linux64/ ./zynq_demo \\\n    unix:./qemu-tmp/qemu-rport-_cosim@0 1000000\n\nIn another terminal you will need to start up the PS. In this case we are going\nto start up a PetaLinux QEMU session and use the Linux kernel to probe the\nSystemC side. You could also start up your own kernel with the required drivers\nor a baremetal application.\n\nSee here for instructions on how to start the PetaLinux QEMU session:\nhttp://www.wiki.xilinx.com/Co-simulation\n\nIP-XACT DEMO\n---------------------------------------\nThis repository also contains a demo where a QEMU / SystemC co-simulation\nis automatically generated from an IP-XACT description. More information\nabout this demo and instructions for how to launch it manually can be\nfound inside the 'zynqmp_lmac2_ipxact_demo.txt' file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxilinx%2Fsystemctlm-cosim-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxilinx%2Fsystemctlm-cosim-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxilinx%2Fsystemctlm-cosim-demo/lists"}