Skip to content

Add Support for Parmys plugin in VTR/Yosys #2215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 16, 2022

Conversation

poname
Copy link
Contributor

@poname poname commented Dec 8, 2022

Provide Support for intelligent partial mapping for VTR/Yosys using Parmys plugin.

The plugin will be built and installed using the YOSYS_PARMYS_PLUGIN flag when buildin the VTR project:
make CMAKE_PARAMS="-DWITH_YOSYS=on -DYOSYS_PARMYS_PLUGIN=ON"

To specify the partial mapper, a new argument named -mapper is added to the run_vtr_flow script for Yosys frontend. The available options are [yosys and parmys]. If no mapper is specified or -mapper yosys is used then as before the Yosys itself will perform the partial mapping. If -mapper parmys is passed then the partial mapping stage will be performed by the parmys pass within Yosys.

The plugin is added as an external project to the VTR CMake tree and when building with -DYOSYS_PARMYS_PLUGIN=ON flag, CMake clones the parmys-plugin repository into the VTR_ROOT/libs/EXTERNAL directory and builds the specified tag.

Description

This PR provides support for Parmys (Partial Mapper for Yosys) plugin in VTR with Yosys frontend. Parmys is a Yosys plugin that performs intelligent partial mapping (inference, binding, and hard/soft logic trade-offs) from Odin-II.

how to run a sample task:

make CMAKE_PARAMS="-DWITH_YOSYS=on -DYOSYS_PARMYS_PLUGIN=ON" -j$(nproc)
./vtr_flow/scripts/run_vtr_task.py ./vtr_flow/tasks/regression_tests/vtr_reg_yosys_parmys/vtr_benchmarks/ -j$(nproc)
#or
./vtr_flow/scripts/run_vtr_flow.py ./vtr_flow/benchmarks/verilog/sha.v ./vtr_flow/arch/timing/k6_frac_N10_frac_chain_mem32K_40nm.xml -start yosys -mapper parmys

Related Issue

#2214

How Has This Been Tested?

A new regression test named vtr_reg_yosys_parmys is added with golden results regenerated. This regression test includes vtr_benchmarks and koios tasks utilizing k6_frac_N10_frac_chain_mem32K_40nm and k6FracN10LB_mem20K_complexDSP_customSB_22nm architectures respectively. This regression test is also added to the CI (Github workflows).

Types of changes

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@poname poname changed the title [WIP] Adding Support for Parmys plugin in VTR/Yosys Add Support for Parmys plugin in VTR/Yosys Dec 8, 2022
@poname
Copy link
Contributor Author

poname commented Dec 8, 2022

@vaughnbetz once the tests are passed this PR would be ready to be reviewed/merged.

@github-actions github-actions bot added build Build system docs Documentation external_libs infra Project Infrastructure lang-make CMake/Make code Odin Odin II Logic Synthesis Tool: Unsorted item labels Dec 8, 2022
@poname
Copy link
Contributor Author

poname commented Dec 9, 2022

@vaughnbetz all tests are passed. The PR is ready to be reviewed/merged.

@alirezazd
Copy link
Contributor

@vaughnbetz PR review completed. This PR does not introduce any changes to VTR but only adds a couple of Python and TCL scripts along with some documentation updates. Should be OK to merge.

@vaughnbetz
Copy link
Contributor

Looks good -- includes very nice documentation on the new command option. :).

@vaughnbetz vaughnbetz merged commit 5845ee0 into verilog-to-routing:master Dec 16, 2022
@alirezazd alirezazd deleted the yosys_parmys_23 branch December 16, 2022 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build system docs Documentation external_libs infra Project Infrastructure lang-make CMake/Make code Odin Odin II Logic Synthesis Tool: Unsorted item
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants