Hi, I seek some advice here from more experienced users here. For the first time I’m working on a schematic where I do intend to use buses in a hierarchical sheet system.
My area of interest is the scenario where I have different naming convention for bus connections between the root sheet and hierarchical sheet.
I understand that for sub-sheet I can have bus signals connected to one of my hierarchical pins (which will become a port of hierarchical bus). This hierarchical bus carries its original signal names. On the root schematic I can connect to this hierarchical bus pin to get it’s original signals, but if I use different naming on the root schematic, they will not connect.
Is there an elegant way of cross-linking these signals? Or do I need to use exaclty the same signal names (labels) for the whole schematic ? This way it would be easy, but then the schematic blocks would be harder to re-use. So may be there are some tricks I could learn?
A bus can be renamed when going though a hierarchical sheet connector. In the link below, I created an example with two identical sheets, but with different connections on the PCB.
But I do not use buses frequent enough and forgot the details myself, but it should be easy if you fiddle a bit with that example.
OK I’ve started to play with your example a bit, and it partially works.
For simple buses (non-listed) KiCad can maintain connectivity even if the bus members are having diferent names on both ends.
E.g. can connect BUS_[7…0] with SIGNAL_[7…0], even without additinal Root-level bus rename.
However at the time you start using listed buses (like {R[7…0] G[7…0]} to {RED[7…0] GREEN[7…0]} ) it fails, like it’s a bit too much for KiCad.
Need to keep exploring…
As I wrote earlier, I’m fuzzy on the details, but I do recall that naming the bus in the root sheet too is important for proper connectivity.
In you example, only the Extra_sheet carries different net names (as both Some_sheet sheets are basically same file). And this is the one that gives connectivity troubles.
I can get simple (only one signal set) buses cross-connected, but this does not work for muliple signal labels (like some RGB connection for example).
I never used combinations of vector buses ( someBus[1…7] ) and group buses {SDA SCL} in one single bus. I have not yet had the need for that. For group buses I always exclusively use aliases.
For instance. {I2C} of the attached image is an allias for {SDA SCL}.
As heavy bus user I know that labels in the rootsheet are hardly needed. I actually can’t recall a scenario that is was needed, but perhaps… IDK.
What perhaps might be useful to you is to use prefixes.
For instance if I were to use more than 1 I2C bus, one for an OLED and one for a button Matrix. Both the subsheets for the OLED and matrix can still use {I2C}
as bus name. This is no different than usual.
But in the MCU sheet (where both buses would exist) I would need to add a prefix like
OLED{I2C}
with the labels being named OLED.SDA
and OLED.SCL
and the other bus would be named matrix{I2C}
with the labels matrix.SDA
and matrix.SCL
.
In the oled and matrix subsheets you could also add the same prefixes if you prefer but technically you wouldn’t have to.
I put the label names on top of the sheets for you.
Also I would like to refer to the manual. I’d say, if not done yet, read it once and go practice and trial and error yourself. That oughta teach you
Hope any of it helps
Bas