{"id":42943570,"url":"https://github.com/cms-l1-globaltrigger/tm-vhdlproducer","last_synced_at":"2026-01-30T20:12:07.617Z","repository":{"id":45541514,"uuid":"168318053","full_name":"cms-l1-globaltrigger/tm-vhdlproducer","owner":"cms-l1-globaltrigger","description":"L1 Trigger menu VHDL producer","archived":false,"fork":false,"pushed_at":"2025-05-29T09:48:37.000Z","size":1166,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-29T11:07:53.769Z","etag":null,"topics":["cern","cern-cms","lhc","scientific-computing","vhdl-producer"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cms-l1-globaltrigger.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-01-30T09:44:57.000Z","updated_at":"2025-05-16T10:16:29.000Z","dependencies_parsed_at":"2023-01-28T23:01:00.443Z","dependency_job_id":"283a571c-1122-4fda-860f-c620bf74cb06","html_url":"https://github.com/cms-l1-globaltrigger/tm-vhdlproducer","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"purl":"pkg:github/cms-l1-globaltrigger/tm-vhdlproducer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cms-l1-globaltrigger%2Ftm-vhdlproducer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cms-l1-globaltrigger%2Ftm-vhdlproducer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cms-l1-globaltrigger%2Ftm-vhdlproducer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cms-l1-globaltrigger%2Ftm-vhdlproducer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cms-l1-globaltrigger","download_url":"https://codeload.github.com/cms-l1-globaltrigger/tm-vhdlproducer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cms-l1-globaltrigger%2Ftm-vhdlproducer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28918235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T19:10:10.838Z","status":"ssl_error","status_checked_at":"2026-01-30T19:06:40.573Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cern","cern-cms","lhc","scientific-computing","vhdl-producer"],"created_at":"2026-01-30T20:12:06.957Z","updated_at":"2026-01-30T20:12:07.608Z","avatar_url":"https://github.com/cms-l1-globaltrigger.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"VHDL Producer\n=============\n\n## Install\n\n```bash\npip install --extra-index-url https://globaltrigger.web.cern.ch/pypi tm-vhdlproducer\n```\n\n## Build from source\n\nBasic development instructions.\n\n```bash\ngit clone https://github.com/cms-l1-globaltrigger/tm-vhdlproducer.git\ncd tm-vhdlproducer\ngit checkout master\n```\nCreate virtual environment.\n```bash\npython3 -m venv env\n. env/bin/activate\n```\n\nInstall package for local development.\n```bash\npip install --upgrade pip\npip install --editable .\n```\n\n## Basic usage\n\nGenerate VHDL output from XML trigger menu.\n\n```\ntm-vhdlproducer --modules \u003cn\u003e -d|--dist \u003cn\u003e [--ratio \u003cf\u003e]\n               [--sorting asc|desc] [--constraint \u003ctype:modules\u003e]\n               [--dryrun] \u003cmenu\u003e\n```\n\n### Distribute to multiple modules\n\nExample for distributing on two modules:\n\n```bash\ntm-vhdlproducer L1Menu_sample.xml --modules 2 --dist 1\n```\n\nThis will create a directory `L1Menu_sample-d1/` in the current directory.\n\n### Specifying distribution number\n\nTo specify the distribution number use the `--dist` flag. For example\n\n```bash\ntm-vhdlproducer L1Menu_sample.xml --modules 2 --dist 2  # set distribution number to 2\n```\n\nwill write the output to /tmp/L1Menu_sample-d2/.\n\n### Specify sort order for algorithm distribution\n\nExample for reversing algorithm distribution descending order (default ascending):\n\n```bash\ntm-vhdlproducer L1Menu_sample.xml --modules 2 --dist 1 --sorting desc\n```\n\nThis will distribute algorithms from high to low payload weight.\n\n### Specifying output location\n\nTo specify a different output location use the `--output` flag. For example\n\n```bash\ntm-vhdlproducer L1Menu_sample.xml --modules 2 --dist 1 --output /tmp\n```\n\nwill write the output to /tmp/L1Menu_sample-d1/.\n\n## Optimizations\n\n### Shadow ratio\n\nAdjust the shadow ratio to optimize the distribution of algorithms. A good\nstarting point is a ratio between 0.0 and 0.25, although it depends heavily on\nthe individual menu's content.\n\nThe shadow ratio controls what algorithms will be packed together in a module.\nUsing a ratio of 0.5 means that all algorithms that contain at least 50 % of\nthe same condition instances will be placed on the same module. Practical tests\nshowed that this approach does not guarantee the most efficient distribution\nand should be used carefully (consider it as experimental). It is advised to\nstart with a ratio of 0.0 and verify if higher ratios (up to 0.25) improve the\nchip resource usage.\n\n```bash\ntm-vhdlproducer L1Menu_sample.xml --modules 2 --dist 1 --ratio .25  # set ratio to 0.25\n```\n\n### Condition constraints\n\nTo limit certain condition types to a subset of modules (or just a single\nmodule) use the `--constraint` argument. Limit a condition type to a single module\n\n```bash\ntm-vhdlproducer L1Menu_sample.xml --modules 2 --dist 1 --constraint ext:0  # limit external conditions to module 0\n```\n\nor to a subset of modules\n\n```bash\ntm-vhdlproducer L1Menu_sample.xml --modules 2 --dist 1 --constraint ext:2,4-6  # limit external conditions to modules 2, 4, 5 and 6\n```\n\nList of supported condition constraints:\n - `ext`: external conditions\n - `zdc`: both ZDC+ and ZDC- conditions\n\n### Dryrun\n\nTo try out different optimizations use the `--dryrun` flag to prevent writing\noutput to the filesystem.\n\n```bash\ntm-vhdlproducer L1Menu_sample.xml --modules 2 --dist 1 --dryrun\n```\n\n## Generated output\n\n```\nL1Menu_sample-d1/\n +-- doc/\n |    +-- L1Menu_sample-d1.html\n |    `-- L1Menu_sample-d1.twiki\n +-- testvectors/\n +-- vhdl/\n |    +-- module_0/\n |    |    `-- src/\n |    |         `-- *.vhd\n |    `-- ...\n +-- xml/\n |    `-- L1Menu_sample-d1.xml\n `-- tm-vhdlproducer.log\n```\n\n## Documentation\n\nA TWiki page template and a HTML menu documentation is also written to the\n`doc/` directory in the output location.\n\n## Logging\n\nAll messages printed to the screen are written to a log file in the output\nlocation (e.g. `L1Menu_sample/tm-vhdlproducer.log`).\n\n## VHDL template hierarchy\n\nVHDL template hierarchy for condition instances located in [templates/vhdl/instances](tmVhdlProducer/templates/vhdl/instances).\n\n![VHDL templates overview](doc/templates_overview.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcms-l1-globaltrigger%2Ftm-vhdlproducer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcms-l1-globaltrigger%2Ftm-vhdlproducer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcms-l1-globaltrigger%2Ftm-vhdlproducer/lists"}