Skip to content
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

Document how to run the plugins, and how to contribute. #372

Open
kanndil opened this issue Jul 21, 2022 · 7 comments
Open

Document how to run the plugins, and how to contribute. #372

kanndil opened this issue Jul 21, 2022 · 7 comments

Comments

@kanndil
Copy link
Contributor

kanndil commented Jul 21, 2022

I am working on a plugin, and am trying to figure out how to add it to this repo.

I can't figure out whether this repo is just a collection of plugins, and each plugin works independently and is built independently, or it implements a way of building all the plugins at once. And if so, what steps should I follow before I add my plugin, and pull request.

@tmichalak
Copy link
Collaborator

@kanndil glad to hear that you are working on a plugin that clearly planning to contribute by opening a PR.
This repo holds the sources and tests for the plugins so you came to the right place :)
We don't have a step-by-step guide in the documentation, but you can use any of the existing directories/plugins as reference (such as the sdc-plugin. Each of those plugins contains a main Makefile that includes the Makefile_plugin.common that has a nice description of the structure of the plugin. From there you will see that another characteristic of the plugin directory is the tests directory that has a separate Makefile which includes a Makefile_test.common.
So, basically a new plugin should go into a separate directory and consist of the plugins's source code, tests and a handful of makefiles which include the Makefile_plugin.common and Makefile_test.common.

@kanndil
Copy link
Contributor Author

kanndil commented Jul 23, 2022

@tmichalak Thank you for you response.

I followed the instructions, however still having a problem running the makefile and the (plugin -i) command.

When I run the makefile, I expect a plugin_name.so file to be added to Yosys's shared folder, but the file remains empty.

@kanndil
Copy link
Contributor Author

kanndil commented Jul 26, 2022

Apparently I have the same problem in issue #74

@tmichalak
Copy link
Collaborator

@kanndil, but you are able to build the .so file, correct? Do you call make install ?

@kanndil
Copy link
Contributor Author

kanndil commented Jul 26, 2022

@tmichalak yes, the building works fine, only the copying to the shared folder part doesn't work

  Youssefs-MacBook-Pro:fasm-plugin youssef$ make install
  install -D fasm.so /usr/local/Cellar/yosys/0.19/share/yosys/plugins/fasm.so
  install: illegal option -- D
  usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
                 [-o owner] file1 file2
         install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
                 [-o owner] file1 ... fileN directory
         install -d [-v] [-g group] [-m mode] [-o owner] directory ...
  make: *** [install_plugin] Error 64
  Youssefs-MacBook-Pro:fasm-plugin youssef$ 

@tmichalak
Copy link
Collaborator

@kanndil have you tried install -d ?

@kanndil
Copy link
Contributor Author

kanndil commented Jul 27, 2022

@tmichalak removing the -D option worked for me, the shared object file is copied successfully to the directory
Screen Shot 2022-07-27 at 6 14 03 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants