ipbus / ipbb

IPbus Builder Tool
GNU General Public License v3.0
12 stars 12 forks source link

.dep file syntax in dev/2021b #133

Closed thesps closed 3 years ago

thesps commented 3 years ago

I'm porting the .dep files of a design from v0.5.2 to dev/2021b (aside: I notice there is a 2021d tag as well, not sure if this still applies there). I'm noticing a small difference that I need in my .dep file syntax, I think related to the package/component parsing. I'm not sure if I'm misunderstanding something in the syntax or the expected directory structure.

Here's a minimal example to reproduce the issue (or observation). I have an ipbb workspace that looks like this under src/:

$ tree .
.
├── packageA
│   └── firmware
│       ├── cfg
│       │   └── A.dep
│       └── hdl
│           └── A.vhd
└── packageB
    └── component
        └── firmware
            ├── cfg
            │   └── top.dep
            └── hdl
                └── B.vhd

A.vhd and B.vhd are empty files, but the idea is that I want to source packageA from packageB. The contents of A.dep is just src A.vhd. In ipbb v0.5.2, the correct syntax for top.dep is:

src B.vhd
include -c packageA: A.dep

With ipbb dev/2021b this gives a dependency error:

ERROR: Project 'test' contains unresolved dependencies: 1 unresolved file.
+--------------------------------------------------------------------------------------------------------+
|            path expression              package    component                 included by               |
+========================================================================================================+
| packageA/component/firmware/cfg/A.dep   packageA   component   packageB/component/firmware/cfg/top.dep |
+--------------------------------------------------------------------------------------------------------+

I think because 'component' is effectively unspecified now, it uses the 'current' component, which exists in packageB but not packageA.

What I found to be the required syntax for top.dep is like:

src B.vhd
include -c packageA:./ A.dep

(Note the extra ./ after :). Basically I'm just wondering, is this expected, have I missed something in the .dep file syntax or the directory structure setup? e.g., should there always be a 'component' within the package? Thanks in advance for any guidance.

alessandrothea commented 3 years ago

Thanks for the detailed report. No, if this is in 2021c it's also in 2021d Let me have a look.

alessandrothea commented 3 years ago

Bug spotted, stand by for a hotfix.

alessandrothea commented 3 years ago

Hi @thesps , should be fixed in master. Can you give it a go?

thesps commented 3 years ago

Yep that works, thanks a lot!