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

foreach loop support #384

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mglb
Copy link
Contributor

@mglb mglb commented Sep 27, 2022

Adds support for foreach loop construct. It does so by converting the loop into one or more (nested) for loops.

Since array ranges are not available at the moment when the loop processing happens, functions like $left, $right, etc are used in generated for loop(s). Yosys does not support arrays with multiple ranges, so in order to support those the functions are resolved in plugin's simplification step.

Todo:

  • more tests
  • cleanup
  • use/test foreach-related improvements made in Surelog (skipped indexes).

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

Successfully merging this pull request may close these issues.

1 participant