Hierarchy-General question

Hello KiCaders

I’m having some difficulty using hierarchy blocks, maybe I’m missing something,

I created in the root page a hierarchy block (say sheet name: Analog1), after finishing the hierarchy circuit in Analog1, i went back to the root page, I copied the hierarchy block of Analog1 and created a second hierarchy clock (say sheet name:Analog2)

Here are my two questions

  1. If i delete the second sheet Analog 2, then I go to the file directory of the project in the window explorer I still see the Ananlog2 file, I realized that after I deleted the hierarchy block of Analog2 then I tried to create it again KICAD complained that the same file name exist,

  2. If i copy hierarchy page, can the new copy be different from the original hierarchy? if i make a change to the original hierarchy automatically updates all copied hierarchy

Thank you for your time in advnace

I would avoid the “copy” of blocks if that is what you are really doing as you could be creating a circular reference.

The root sheet is often a block diagram with each block being a hierarchical sheet. For example, a power supply, serial communications, CPU, etc. You MAY draw connections at the top (root) level but don’t really need to. Within each block, use the Global Labels to name signals going to other sheets and it will all work (be very careful with case, and spelling).

Now you may also be asking about a single item (sheet) being used in multiple higher level projects. That is also possible but again, requires care. In my case, I have a connector for a backplane and have just 1 sheet which is a member of multiple hierarchies.

Iisbarry,

Thank you for taking the time to reply to my questions. yes I’m copying the hierarchy blocks from the root page and pasted on the same root page in order to create a duplicate circuit. If that is wrong, how else i can copy a hierarchy block?

Thanks

I’ve not done what you are suggesting. An alternative approach,

  1. open one of the lower level pages (Page1A) and draw your circuit, save it.
  2. open a new lower level page (Page 1B)
  3. then FILE, APPEND Schematic
  4. copy the schematic from Page 1A

Now, this will NOT dynamically update if you make a change to Page1A.

I can’t immediately think of a way to have a dynamic link between the 2 pages. Let me ponder and see if someone else knows a trick.

I do it all the time, to have multi-channels with the same circuitry. It should not be a problem, circling reference is possible, but it is just a natural of link list stuffs so it not event a problem for me.

Also, since I do it for multi-channel, using Global Net/Label may hurt you in many cases. I use reduce the use of make each of my block of schematic are more flexible, event with taking difference supply path it needed.

That is normal - and not a complain, it just make sure if you want to link to the same file schematic or you mean a new one.

If I understand you, then each hierarchy just a link to a physical schematic file. You can have multiple hierarchy blocks link to the same file. KiCad will trace the Reference destination correctly by using a unique ID/timestamp when you create the hierarchy block. So all the other fields (Values, Datasheet) are share, but Reference destination and component units can be difference and tracked by KiCad.

1 Like

Thank you , very helpful

Several comments:

  1. If you delete a sheet, the file does NOT necessarily disappear (get deleted). It still exists, there is just to reference to it.
  2. If you either copy a sheet or do the File - Append, you still need to go into the file and edit the names of individual signals or they will all be tied together in parallel.
  3. Also consider using a B size sheet and just copy and paste the circuit multiple times.

Just be careful.

This is the right answer.
You can have Sheet:Analog1 and Sheet:Analog2 both sharing the same file, for example File:Analog.
Any change in Analog1 will be mirrored in analog2 and vice versa.

@ST2 To continue the explanation, KiCad will keep track of the different reference designators between two (or more) sheets pointing to the same file. It will also keep the local signal labels separate. Any global lables (this includes power/ground symbols) will be connected across all the sheets. If you want to pass a signal from the parent sheet to a child sheet’s local label (e.g. pass AnalogInput1 to sheet Analog1, and AnalogInput2 to sheet Analog2) you will need to use hierarchical labels.

If you are familiar with programming:

  • Global and local labels are analogous to global and local variables.
  • Hierarchical sheets are analogous to function calls (the schematic file it points to is the actual function code itself).
  • Hierarchical pins are analogous to function call arguments.

I hope this helps. :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.