Perhaps I’m not using hierarchical sheets properly… Please correct me in what I’m doing!
I have a couple sub-circuits that I want to use multiple times throughout my over all design. Let’s call the lowest level circuits leaf_0 and leaf_1. I captured these in their own schematic sheets.
I created a couple of higher level hierarchy schematics. Let’s say mid_0 has 4 instances of leaf_0 and mid_1 has 3 instances of leaf_0 and 1 instance of leaf_1. I created the instance by using “Add sheet” and giving each instance a unique name, but pointing to the file for either leaf_0 or leaf_1 (as appropriate).
Then I created another level of hierarchy that instantiates the “mid” components. Let’s call this top_0. Again I instantiated the mid components by doing the “Add sheet” and referencing the proper files.
So top_0 has mid_0 and mid_1. The two mid_x components combined have 7 instances of leaf_0 and 1 instance of leaf_0.
When I request a BOM, I expect the parts for the top_0, but I also get the parts in the “original” “leaf” sheets and the original “mid” sheets.
I suspect that I’m not using the correct paradigm for hierarchy. In other systems I’ve used, one creates a sheet and if it is to be used as a sub-circuit (to be used in a higher level of hierarchy), a symbol is generated that represents the sheet. Then this new symbol is used in higher sheets to represent the leaf sheet.
It appears that in KiCad the original “sub-circuit sheet” has to be created where it is to be used first (the first instance). Then other instances use a link to this first use.
If this is the case, then if I delete my original leaf_0 file, then won’t all of the links to that file be broken?
How can I replace a link to the leaf_0 file with a reference to the actual file, so I don’t get extra parts in the BOM?
By the way, printing the design is also an issue… In the real design the “mid” sheets have many instances of the “leaf” sheets. So when printing, I get many (many, many) copies of the same circuit. What I expected was a single copy of the leaf circuit…
Thanks!