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

Convert examples to use f4pga build instead of makefiles #298

Open
umarcor opened this issue May 18, 2022 · 7 comments
Open

Convert examples to use f4pga build instead of makefiles #298

umarcor opened this issue May 18, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@umarcor
Copy link
Contributor

umarcor commented May 18, 2022

Since chipsalliance/f4pga#530 was merged, the examples in this repository can be converted to use f4pga build instead of the current makefile based infrastructure. Python package f4pga includes entrypoints for the deprecated wrappers along with the new build subcommand. Therefore, examples can be converted one-by-one.

However, we need to first address #297.

@mithro
Copy link
Contributor

mithro commented May 20, 2022

@umarcor - We need to make sure that existing Makefile based flows continue to work.

@umarcor
Copy link
Contributor Author

umarcor commented May 20, 2022

@mithro
Copy link
Contributor

mithro commented May 20, 2022

@umarcor - I'm not sure I understand what is relevant in #297 and f4pga/f4pga-arch-defs#2509 (comment) to my comment?

@umarcor
Copy link
Contributor Author

umarcor commented May 20, 2022

@mithro, existing shell wrappers were moved from repo arch-defs to f4pga. Previously, they were installed as part of the arch-defs packages. Now, they need to be installed through pip, and 1 or 2 envvars need to be set (mentioned in f4pga/f4pga-arch-defs#2509 (comment)). Other than that, the Makefile based flows will continue to work because the shell wrappers are exactly the same (just moved and installed using a different procedure).

#297 is to track updating the guidelines in this repo in order to install the pip package and set the envvars, but without modifying any makefile at all.

On top of that, the pip package does include a new Python-only implementation, as an alternative to the makefile/shell based approach. This issue is to track updating the examples in this repo to use the Python-only approach.

@mithro
Copy link
Contributor

mithro commented May 20, 2022

@umarcor - As long as people's existing Makefile based flows continue to work (and are ideally also being tested in some way) then I'm happy.

(PS There is no reason that Python scripts can't be drop in 100% compatible replacement for shell scripts?)

@umarcor
Copy link
Contributor Author

umarcor commented May 20, 2022

(PS There is no reason that Python scripts can't be drop in 100% compatible replacement for shell scripts?)

@mithro, there was a prototype (chipsalliance/f4pga@2291026), but the current implementation is based on a JSON configuration file (https://github.com/chipsalliance/f4pga/blob/main/.github/sftest.json). It should be possible to replace the deprecated wrapper commands with functions calling one specific internal module/step/stage of f4pga. That's why the entrypoints are generated in Python, despite calling shell scripts internally, so that future changes in the implementation are "transparent". It is desirable to make internal modules/stages usable from Python, indeed, so that other projects can better integrate with f4pga (say edalize, EDAA, Xeda, etc.). However, I am not aware of the technical details and discussions that lead to the current implementation of command build, and I'm not familiar enough with the codebase yet.

@umarcor
Copy link
Contributor Author

umarcor commented Jun 9, 2022

FTR, example xc7/counter_test was modified to use f4pga build when targeting arty_35: #318.

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

No branches or pull requests

2 participants