Encoding binary values in hierarchical sheets

Hi there,

I’m defining variables in the properties of a hierarchical sheet and then using them to select the appropriate resistor value or DNP. This allows me to encode different binary addresses in multiple instances of a hierarchical sheet for addresses of I2C components with 3 or more address pins.

Screenshot from 2021-06-09 19-11-39

This approach works but is a bit inefficient; you’re wasting 3 out of 6 footprints/net connections for something that will not be renumbered ever (a specific hierarchical sheet instance will always be encoded as that number). And cleaning this up on many hierarchical sheets in layout seems super inefficient and error-prone – not to mention putting the schematic and layout out of sync.

It seems like what I really need is a way to pass a pullup “value” (+V or GND), which can be passed down as individual bits, and then have that show up rather than just footprints with an actual resistor vs. DNP.

Does anyone have an idea how to do this better? Can scripting help here? (like exploding the value passed to a schematic into a specific footprint/net combo)


This is really a Config Mgmt issue. You obviously intend to have 1 pcb support multiple functions.
Will each function have a separate schematic or just a single schematic?

If there are multiple schematics, none will exactly match the pcb unless you have pn-000 be the generic that matches the pcb. Pn-001 will have one strapping, pn-002…

Or you can have 1 schematic with a strapping table.

I’m not aware of any automated scheme to pass strapping info in either flat file or hierarchical.

1 Like

You define variables as properties for each of the hierarchical sheets (identical ones) and then can expand them in the component value (not sure what all works, but trial and error say it works there).

In the example above, the hierarchical sheet instance has VCCA0=1K, VCCA1=DNP, VCCA2=DNP, GNDA0=DNP, GNDA1=10K, GNDA2=10K. These variables are then expanded in the component value field, like ${VACCA0}.

Yes, each of these hierarchical sheet instances is 100% identical except for the coding of this address, and they all live on a single bus as far as this example is concerned. Since you can’t have address collisions on I2C, they all have to have different address values.

I suppose you could pull the I2C bits out of the hierarchical sheet instance and dump the whole lot somewhere else. That’s kind of backwards in terms reading the schematic as each sheet instance is self contained. They just all communicate with each other.


And I2C is just one simple example. This multiple identical things living on the same bus issue comes up with other component types as well.

I understand, having done this before. There is also an issue with naming IO connectors for each pcb instance.

You can also use strapping options in a bus conn so any card can go anywhere.

1 Like