{"id":13772726,"url":"https://github.com/pku-dasys/cocoon","last_synced_at":"2025-05-11T05:33:26.772Z","repository":{"id":93876490,"uuid":"293499175","full_name":"pku-dasys/cocoon","owner":"pku-dasys","description":"An infrastructure for integrated EDA","archived":false,"fork":false,"pushed_at":"2023-07-20T00:21:16.000Z","size":1309,"stargazers_count":38,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-17T08:44:03.416Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/pku-dasys.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2020-09-07T10:43:50.000Z","updated_at":"2024-07-11T16:36:06.000Z","dependencies_parsed_at":"2024-01-15T04:05:24.499Z","dependency_job_id":"70a94150-a446-485a-adab-0efa70fa907a","html_url":"https://github.com/pku-dasys/cocoon","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/pku-dasys%2Fcocoon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pku-dasys%2Fcocoon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pku-dasys%2Fcocoon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pku-dasys%2Fcocoon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pku-dasys","download_url":"https://codeload.github.com/pku-dasys/cocoon/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:07.260Z","updated_at":"2025-05-11T05:33:26.446Z","avatar_url":"https://github.com/pku-dasys.png","language":"Python","funding_links":[],"categories":["Build Systems"],"sub_categories":[],"readme":"# Cocoon: An Infrastructure for Integrated EDA\nCocoon is an open-source infrastructure for integrated EDA with interoperability and interactivity. It contains a set of cross-tool interfaces and plays the role of EDA agent that can help IC designers choose EDA point tools to assemble a legal design flow and to produce ICs with a higher quality of results (QoR). It can also help EDA researchers and tool developer research new design methodology and cross-stage optimization. Below are key features of Cocoon:\n- Agile RTL-to-GDSII frontend and backend VLSI flow generation.\n- Completely user-defined tech library, component EDA tool and design constraints.\n- Multi-flow parallelism and automatic iterative circuit timing optimization.\n\n## Cocoon Architecture\n![avatar](image/arch.png)\n\n## Dependency\n - Python3\n - Genus or [Yosys](https://github.com/YosysHQ/yosys)\n - Innovus\n - [DREAMPlace](https://github.com/limbo018/DREAMPlace) (optional)\n - JDK 8+ and sbt (optional)\n\n## Setup\n- Clone this repo:\n  ```shell\n  git clone https://github.com/pku-dasys/cocoon.git\n  ```\n- If you are going to use DREAMPlace and yosys in your flow, pull git submodules in the root directory. Then solve their own dependencies.\n  ```shell\n  git submodule init\n  git submodule update\n  ```\n  Or alternatively, pull all the submodules when cloning the repo.\n  ```shell\n  git clone --recursive https://github.com/pku-dasys/cocoon.git\n  ```\n- Build DREAMPlace (optional):\n  ```shell\n  cd ./thirdparty/DREAMPlace/\n  mkdir build \n  cd build/ \n  cmake .. -DCMAKE_INSTALL_PREFIX=../install\n  make \n  make install\n  ```\n- Build yosys (optional):\n  ```shell\n  cd ./thirdparty/yosys/\n  mkdir build\n  cd build/\n  make -f ../Makefile\n  ```\n\n## Basic Usage\nOnce you have installed the previous required dependencies, you can run Cocoon from the command line using your customized configuration file in INI format. \n\nThree demo configurations `demo/config.sample1.ini`, `demo/config.sample2.ini`, `demo/config.sample3.ini` are provided, where your can find detailed description of user-defined options from the comments. Here's an example of 2 parallel flows.\n```ini\n[gcd]\n# Design settings\ndesign_name = gcd\nis_Chisel_design = False\nrtl_input = ./gcd/gcd.v\nChisel_input = \nresult_dir = ../results/\nclk_name = clk\ndelay = 1000\n\n# Library settings\nlib_name = gscl45nm\nlef_input = ./lib/gscl45nm.lef\nliberty_input = ./lib/gscl45nm.lib\n\n# Flow settings\nflow = {'synth':'yosys', 'placement':'dreamplace', 'routing':'innovus'}\nn_iter_IFT = 0\nverbose = False\ncadence_version = 19\n\n\n[ALU(Chisel)]\n# Design settings\ndesign_name = AluTop\nis_Chisel_design = True\nrtl_input = \nChisel_input = ./alu-chisel/\nresult_dir = ../results/\nclk_name = clk\ndelay = 1000\n\n# Library settings\nlib_name = gscl45nm\nlef_input = ./lib/gscl45nm.lef\nliberty_input = ./lib/gscl45nm.lib\n\n# Flow settings\nflow = {'synth':'genus', 'placement':'innovus', 'routing':'innovus'}\nn_iter_IFT = 0\nverbose = False\ncadence_version = 19\n```\nYou can directly run with the sample configurations with the demo designs, gcd (Verilog) and ALU (Chisel), together with the open-source FreePDK45nm library we provide in `./demo/`. For example:\n```bash\ncd cocoon/\npython run.py ./demo/config.sample1.ini\n```\nWith correctly customized configuration, you can run your own flow by executing:\n```bash\ncd cocoon/\npython run.py /Path/to/your/config.ini\n```\n## Ongoing work\n - Integrate more EDA tools\n - Efficient resource scheduling\n - Legality check (LVS, DRC, etc.) and post-simulation (e.g. timing, power)\n - Support design-space search and optimization\n\n## Related works\n- Berkeley [Hammer](https://github.com/ucb-bar/hammer/)\n- Stanford [mflowgen](https://github.com/mflowgen/mflowgen)\n- [SiliconCompiler](https://github.com/siliconcompiler/siliconcompiler)\n- [qflow](https://github.com/RTimothyEdwards/qflow)\n\n## Publication\n\nIf you use cocoon in your research, please cite our WOSET'20 paper: ``Jiaxi Zhang, Tuo Dai, Zhengzheng Ma, Yibo Lin, Guojie Luo, \"Cocoon: An Open Source Infrastructure for Integrated EDA with Interoperability and Interactivity\", Workshop on Open-Source EDA Technology (WOSET), November 2020.``\n```\n@article{zhang-cocoon-woset2020,\n  title   = \"{Cocoon: An Open Source Infrastructure for Integrated EDA with Interoperability and Interactivity}\",\n  author  = {Jiaxi Zhang and Tuo Dai and Zhengzheng Ma and Yibo Lin and Guojie Luo}\n  journal = {Workshop on Open-Source EDA Technology (WOSET)},\n  month   = {Nov},\n  year    = {2020},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpku-dasys%2Fcocoon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpku-dasys%2Fcocoon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpku-dasys%2Fcocoon/lists"}