-
Notifications
You must be signed in to change notification settings - Fork 270
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_manual_dependency has no effect #617
Comments
Adding tree to make the configuration part make more sense. Here is the directory structure/hierarchy.
Where we have some other scripts that auto organize everything into folder_dsn and folder_tb, which is why the symlinks are required to get everything into foo_tb. So we are attempting to set the architecture of foo.u_bar.u_bah to empty and are unable to set foo-rtl.vhd as a dependency of foo_cfg_empty_bah.vhd despite printouts saying that it is being added. |
The feature is documented here. Seems the text is a bit wierd and should be updated. The configuration file should depend on the architecture file: cfg = lib.add_source_file('configuration.vhd')
arch = lib.add_source_file('architecture.vhd')
cfg.add_dependency_on(arch) Does this correspond to you usage? |
It looks like Lines 149 to 150 in b06474f
I hadn't seen this and am calling ui._project.add_manual_dependency directly. But otherwise yes in concept that is my use case. |
Are you not seeing the correct dependencies when running with Btw: |
That's the odd part, I do see the dependency output with --log-level debug. Just no impact. It looks like some change has happened by switching to And yes I am acutely aware of that unfortunately. Have had to mangle a few private fields on this particular project since they didn't want me to fork and there's some odd use cases here. Good learning experience though, I feel much more capable of helping you guys out now. |
Ok. With switching to add_dependency_on the compile order is changed as I expect and things work. Do you have any interest in looking into the reason it didn't pick up on that particular configuration, or should we chalk that up as another need to switch parser type thing? I am fine with either option personally. |
Understanding that configuration is not something that would be nice to do with the current regex based parser. We would need a real parser. One option we have would be to add support for declaring a dependency with a comment. It would be more convenient and local in this case. |
That's an interesting thought. In this case I am having users create a yaml to specify everything and one of the fields is
However it does seem like it could be hard to find for someone coming along later to edit the code. It would be nice to see the standardization of some sort of manifest like what you've done with rust_hdl. That seems a more likely place to specify these things. We are doing this on another project now where each block has manifest.yaml with all file/tool information in it, I go and read them to pass to vunit/Vivado/Spyglass/whatever. Here you can identify the blocks that your block depends on, if necessary. That discussion is probably best had on tsfpga, though. |
@nfrancque, refs #347, #352, #353, #577 and #529. This is a proof of concept I wrote, to have a default Moreover, ghdl-language-server currently uses a Apart from that, are you comfortable or, at least don't you mind, using Gitter? There have been recent discussions regarding the modularisation of VUnit and how it could improve the integration with other tools, such as tsfpga or cocotb. I think it would be interesting to create a project, say VHDL/cfg, where maintainers of VUnit, rust_hdl, GHDL, tsfpga, cocotb, edalize, fusesoc, etc. can collaborate to define a format that all of them can use as input. I believe we should define a structure with multiple bindings to support multiple file formats JSON/YAML/TOML and multiple languages. For now, we'd only need Python, Rust, JSON and TOML. |
Root issue is with a configuration of the following form:
I know it looks weird. Use case is verification team creating an empty version of a sub-block to insert a BFM in its place. This method is the least number of duplicate copies of files, so is ideal but could obviously create separate copies of design files if necessary.
Vunit does not recognize the need to have foo(rtl) compiled before the configuration and a compile error occurs. Running with -k twice is a consistent workaround. If we can resolve this that would be ideal for my use case, but you would expect the manual dependency to be a guaranteed failsafe.
So, after doing the following (semi-psuedocode with the libraries):
No manual dependency
add_manual_dependency(foo_dsn(foo-rtl.vhd), foo_tb(foo_cfg_empty_bah.vhd))
add_manual_dependency(foo_tb(foo_cfg_empty_bah.vhd), foo_dsn(foo-rtl.vhd))
There is no effect on the file order between any 3 of these options. Running with --debug does display inverted printout between the two calls, so it is getting to
vunit/vunit/project.py
Line 354 in 3a2670e
I did the order flipping because it appears the internal function call ordering may be flipped between
vunit/vunit/project.py
Line 402 in 3a2670e
vunit/vunit/project.py
Line 172 in 3a2670e
Anyone have any thoughts on how to approach?
The text was updated successfully, but these errors were encountered: