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

Vivado flow not re-run when Verilog parameter is changed #423

Open
keegandent opened this issue Apr 5, 2024 · 3 comments
Open

Vivado flow not re-run when Verilog parameter is changed #423

keegandent opened this issue Apr 5, 2024 · 3 comments

Comments

@keegandent
Copy link

With the way the current Makefile is written, Synthesis, Implementation, etc. are not re-run when a Verilog parameter is changed in the edam. This is because the .xpr file is an order-only prerequisite of the successive targets, and is the only file updated when the parameter is changed.

I'm really not a makefile expert. My gut tells me one of two solutions needs to be used here. One is having design-affecting parameters in their own .tcl file that is a normal prerequisite of the synth target (or have it be part of the existing _synth.tcl which is already a prerequisite there). The other is using some sort of phony target, but I can't quite see a justification for that when there is a material code change to prompt the rebuild.

I'd be willing to help with working towards a solution here, but I'm wondering if there aren't other gaps where changes in the design need to be added to this issue and we can try to solve them all at once.

@keegandent
Copy link
Author

Additionally, updating the source files has no effect because those are also only normal prerequisites for the .xpr file, meaning the _synth.tcl script is never run so even if source_mgmt_mode is set to DisplayOnly or All, Vivado never has the opportunity to check if sources are out of date.

@olofk
Copy link
Owner

olofk commented Apr 5, 2024

Hmm... unfortunately it looks like you're right. I'm too tired right now to figure out the best way forward but it sounds like you're on the right track. IIRC, I had to make the xpr file an order-only dep because stupid Vivado keeps updating it everytime it launches. There's is probably a way to properly fix this though. Putting the parameters in a separate tcl file is worth investigating, but as you mention, there might be other issues too.

@keegandent
Copy link
Author

Hmm... unfortunately it looks like you're right. I'm too tired right now to figure out the best way forward but it sounds like you're on the right track. IIRC, I had to make the xpr file an order-only dep because stupid Vivado keeps updating it everytime it launches. There's is probably a way to properly fix this though. Putting the parameters in a separate tcl file is worth investigating, but as you mention, there might be other issues too.

All good boss, honestly you deserve massive thanks for the time you put into this project. Given how PITA Vivado expects to be in charge of dependency checking, maybe the simple approach is to just let it take control “Project Flow” instead of trying to have the makefile do it? I’m not sure how that will play out with using it for only part of a flow (e.g. using yosys for synthesis). But at least the all-Vivado flow would work as well as (and as poorly as) the underlying tool itself.

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