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

Disabling yosys's synthesis #365

Open
Henkru opened this issue Jan 1, 2023 · 1 comment
Open

Disabling yosys's synthesis #365

Henkru opened this issue Jan 1, 2023 · 1 comment

Comments

@Henkru
Copy link
Contributor

Henkru commented Jan 1, 2023

The CXXRTL backend for Yosys allows the generation of C++ code that can simulate a digital design, similar to the Verilator. The write_cxxrtl command is not usually used in combination with the synthesized version of the design, but the edalize_yosys_template.tcl script always runs the synth_xxx command.

I propose adding the ability to disable the synth command through the tools_options. Currently, the arch field, which is used to generate the synth command, is required. I'm suggesting that when the arch is not set, then the synth command is omitted. This would not need the introduction of a new field nor change the ABI, as the current implementation causes Edalize to crash if arch is set to None.

I have drafted a PoC of the above. In addition, the PoC also introduces the yosys_write_options field, which allows for the passing of extra arguments to the write command, such as the optimization level for write_cxxrtl.

Before creating a pull request, I would like to hear your thoughts on this proposal.

@olofk
Copy link
Owner

olofk commented Feb 23, 2023

I would very much like to have cxxrtl support added so I'm happy to add this functionality. Implementation-wise I would like to be more explicit though than just assuming cxxrtl when there is no arch.

I also think this would make more sense to have in the yosys class that belongs to the new Flow API https://github.com/olofk/edalize/blob/main/edalize/tools/yosys.py

bwitherspoon pushed a commit to bwitherspoon/edalize that referenced this issue Dec 17, 2023
Currently, generated cores (i.e. core files written by a `generator`)
are inserted into the list of cores, but their dependencies are ignored.
After this commit, cores are inserted into the list of available cores,
and their dependencies are evaluated as with normal cores.

The implementation is actually simple:

- Generators produce files, including .core files, in a special
  directory, unique per generator run.
- This directory is added as library to the core database.
- All cores in this new library (i.e. all .core files) are added as
  dependency to the current project.

With that in place, the normal dependency resolution process takes over.

This new behavior is actually easier to understand for users, as
generator-produced are no longer a special case, but handled exactly as
other cores.

NOTE: This commit also includes another behavior change: the
`generate.*.position` attribute is no longer supported, files are always
inserted according to the normal dependency resolution orders. The test
is changed accordingly. This needs to be documented better and a
deprecation warning issued.

Fixes olofk#365
bwitherspoon pushed a commit to bwitherspoon/edalize that referenced this issue Dec 17, 2023
Currently, generated cores (i.e. core files written by a `generator`)
are inserted into the list of cores, but their dependencies are ignored.
After this commit, cores are inserted into the list of available cores,
and their dependencies are evaluated as with normal cores.

The implementation is actually simple:

- Generators produce files, including .core files, in a special
  directory, unique per generator run.
- This directory is added as library to the core database.
- All cores in this new library (i.e. all .core files) are added as
  dependency to the current project.

With that in place, the normal dependency resolution process takes over.

This new behavior is actually easier to understand for users, as
generator-produced are no longer a special case, but handled exactly as
other cores.

NOTE: This commit also includes another behavior change: the
`generate.*.position` attribute is no longer supported, files are always
inserted according to the normal dependency resolution orders. The test
is changed accordingly. This needs to be documented better and a
deprecation warning issued.

Fixes olofk#365
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