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

Add clashRulesWithTop to set a specific top entity and module #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

techninja1008
Copy link
Contributor

This changeset refactors out the logic of clashRules into a clashRulesWithTop function that allows specification of a top module and entrypoint. clashRules is kept with the same signature and heuristic to determine those extra arguments in the simple cases.

Specifically, I've found for my use case that the isModuleName heuristic doesn't work as I compile through stack, and I need the ability to set custom values for clashTopName.

@gergoerdi
Copy link
Owner

Can you share the complete example where the isModuleName-based heuristic doesn't work?

@techninja1008
Copy link
Contributor Author

techninja1008 commented Dec 3, 2022

In order for the clash compilation to work successfully inside stack, I have to pass a path to my module rather than a module name, otherwise the initial call to clash for dep-makefile fails and complains that the module doesn't exist. This then breaks the heuristic, as the module name is not Main but the passed file is a path and not a module.

I'm actually not sure why this breakage actually happens, and so far I've only been able to determine it's caused by not passing a HDL option when calling clash.

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.

2 participants