{"id":26269674,"url":"https://github.com/artecs-group/posit-hls","last_synced_at":"2025-04-30T22:00:23.365Z","repository":{"id":192637684,"uuid":"687057946","full_name":"artecs-group/posit-hls","owner":"artecs-group","description":"Generating Posit-Based Accelerators With High-Level Synthesis","archived":false,"fork":false,"pushed_at":"2024-08-05T11:29:28.000Z","size":10297,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-30T20:22:23.740Z","etag":null,"topics":["computer-arithmetic","floating-point","hls","posit"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/artecs-group.png","metadata":{"files":{"readme":"README.md","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":"2023-09-04T14:10:09.000Z","updated_at":"2024-08-05T11:29:32.000Z","dependencies_parsed_at":"2024-04-02T11:46:33.288Z","dependency_job_id":"92aeb78d-d7cc-4de8-a6f9-d9cc620af152","html_url":"https://github.com/artecs-group/posit-hls","commit_stats":null,"previous_names":["artecs-group/posit-hls"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artecs-group%2Fposit-hls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artecs-group%2Fposit-hls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artecs-group%2Fposit-hls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artecs-group%2Fposit-hls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artecs-group","download_url":"https://codeload.github.com/artecs-group/posit-hls/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251789604,"owners_count":21644084,"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":["computer-arithmetic","floating-point","hls","posit"],"created_at":"2025-03-14T05:15:45.869Z","updated_at":"2025-04-30T22:00:23.343Z","avatar_url":"https://github.com/artecs-group.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- # posit-hls --\u003e\n# Generating Posit-Based Accelerators With High-Level Synthesis\n\nThis repo contains the code to reproduce the experiments, as well as the results, from the paper\n[Generating Posit-Based Accelerators With High-Level Synthesis](https://doi.org/10.1109/TCSI.2023.3299009).  \nIt can also serve as an example of how to use HLS for the generation of posit arithmetic accelerators.\n\n### Prerequisites\n\nYou need to install a modified version of the [Bambu framework](https://panda.deib.polimi.it/?page_id=31). More precisely, clone the following repo, which contains the necessary modifications to make Bambu work with posit units: https://github.com/RaulMurillo/PandA-bambu. Then follow the [official installation instructions](https://panda.deib.polimi.it/?page_id=88).\n\n\u003cdiv style=\"border: 2px solid #f0f0f0; padding: 10px;\"\u003e\n    \u003cstrong\u003e⚠️ Note:\u003c/strong\u003e\n    Ensure you install Bambu from the `posit_utils` branch.\n\u003c/div\u003e\n\nAfter the installation, you must pre-characterize the target device you wish to use. To that end, you need to use the Eucalyptus tool. You can use the `characterize_device_custom.sh` script from `PandA-bambu/etc/devices/` directory with the following arguments:\n```bash\n--devices=\u003clist of target devices comma separated\u003e --eucalyptus=/bin/eucalyptus --spider=/\u003cbambu installation dir\u003e/bin/spider -j8 -c\"--flopoco=posit\"\n\n```\nThe resulting `.xml` file must be copied into the corresponding folder within `PandA-bambu/etc/devices/`.\n\nFinally, compile and install the tool again.\n\n\u003cdiv style=\"border: 2px solid #f0f0f0; padding: 10px;\"\u003e\n    \u003cstrong\u003e⚠️ Note:\u003c/strong\u003e\n    This makes Bambu work just with the posit format, breaking compatibility with floating-point. To restore the original functionality, execute the previous script without the `-c\"--flopoco=posit\"` argument, and repeat the following steps. You can keep the different `.xml` files and just replace and compile (but the name must be preserved).\n\u003c/div\u003e\n\n### Usage\n\nTo generate a posit-based accelerator, take any C program using floating-point numbers, and use the option `--flopoco=posit` when calling Bambu. The `float` and `double` types will be automatically translated by 32 or 64-bit posits.\n\n\n\u003cdiv style=\"border: 2px solid #f0f0f0; padding: 10px;\"\u003e\n    \u003cstrong\u003e⚠️ Note:\u003c/strong\u003e\n    The automatic simulation of Bambu will fail when using posits, since it relies on C floats to simulate the behavior of the accelerator. Generating testbench with all 0's usually avoids this issue.\n\u003c/div\u003e\n\n\n### Structure of the repo\n\n* Both `Bambu` and `Vitis_HLS` contain a similar structure, with one subdir per test. Operation-level applications can be found at the root, while real applications are grouped under the `polybench` folder.\n* The sources from `Bambu` can serve as examples of how to use Bambu to generate posit-based accelerators. For more details, see the `bambu.sh` scripts.\n* In `error_eval`, the numerical error of the different PolyBench applications is computed via software emulation (for faster computation).\n\n\n### Publications\n\nOverview paper:\n\n\u003e R. Murillo, A. A. D. Barrio, G. Botella and C. Pilato, \"Generating Posit-Based Accelerators With High-Level Synthesis,\" in IEEE Transactions on Circuits and Systems I: Regular Papers, doi: [10.1109/TCSI.2023.3299009](https://doi.org/10.1109/TCSI.2023.3299009).\n\nIf you find this project useful, please do not forget to cite this paper.\n\n### Acknowledgments\n\nThis work was supported in part by MCIN/AEI/10.13039/ 501100011033 under Grant PID2021-123041OB-I00; in part by the “ERDF—A Way of Making Europe;” in part by the 2020 Leonardo Grant for Researchers and Cultural Creators, BBVA Foundation, under Grant PR2003_20/01; in part by CM under Grant S2018/TCS-4423; in part by the EU Horizon 2020 Programme under Grant 957269; and in part by the HiPEAC6 Network funded by the EU Horizon 2020 Programme under Grant ICT-2019-871174.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartecs-group%2Fposit-hls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartecs-group%2Fposit-hls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartecs-group%2Fposit-hls/lists"}