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

Compiling source files from a single directory to two separate libraries #78

Closed
danielblomkvistbitvis opened this issue Oct 15, 2015 · 3 comments

Comments

@danielblomkvistbitvis
Copy link

Hi,

I'm attempting to compile source files from a single directory into two separate libraries. I've added the source files in my run.py, but during compilation only one of the two libraries are successfully compiled.

The directory structure is as follows:

ModuleA:

  • ModuleAFile1.vhd
  • ModuleAFile2.vhd
  • CommonFile1.vhd
  • CommonFile2.vhd

ModuleB:

  • ModuleBFile1.vhd

ModuleC:

  • ModuleCFile1.vhd

And this is the library structure I want:

LibraryA:

  • ModuleAFile1.vhd
  • ModuleAFile2.vhd

LibraryB:

  • ModuleBFile1.vhd
  • CommonFile1.vhd
  • CommonFile2.vhd

LibraryC:

  • ModuleCFile1.vhd
  • CommonFile1.vhd
  • CommonFile2.vhd

This fails as a file in LibraryB can't find the packages that reside in CommonFile1.vhd and CommonFile2.vhd in its work library during compilation.

I have discovered that if the ordering of my calls to add_source_files() in the run.py script has an effect on which of LibraryB and LibraryC that won't compile.

In my example here LibraryC will compile, while LibraryB will fail. Now if I switch the ordering so that LibraryB has its calls to add_source_files() after LibraryC, LibraryC will be the one that fails.

From running with --log-level info I can see that it seems like the source files CommonFile1.vhd and CommonFile2.vhd are added to both libraries, but maybe the second one overwrites the first?

It seems to me like dependencies are set up correctly w.r.t. file location.

@kraigher
Copy link
Collaborator

Yes this is a bug. I will hopefully fix it this evening. Thank you for reporting.

@kraigher
Copy link
Collaborator

Fixed and released in v0.39.0.

@danielblomkvistbitvis
Copy link
Author

Thank you! :)

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