I am using Kicad 4.02-stable, release build. I have read some forums posts on the topic of hierarchical schematics. I find that the terms “file name” and ‘sheet name’ are used interchangeably. However, when you place a Hierarchical Sheet (Place->Hierarchical Sheet), it produces a dialog box where have fields for “File name” and “Sheet name”. The fields are filled in with default values “file579F66FB.sch” and “Sheet579F66FB” correspondingly. Given the different fields, they are apparently two different concepts. Can someone explain:
-
How these these names are used in Kicad project management? (I realize file name would relate to a physical file on your storage device, whereas the sheet name may be a logical name.)
-
The importance of the ‘sheet’ and ‘file’ prefixes and if they are required?
-
Must the file name and sheet name be the same, other than the file and sheet prefixes?
-
Would you ever set the sheet and file names the same? (without the prefix)
-
Would you ever have subsequently sub-sheets that have the same file name? Would you ever have subsequently sub-sheets that have the same sheet name?
Thanks!
Usually hierarchical sheet files aren’t visible in the projects file view. You have to use the file browser of your OS to see them.
Any .sch file can become a hierarchical sheet. That’s the beauty of it. You can re-use tested&proven designs and build up on them.
The prefixes are probably there to make it easier to see what those fields are about - you can use what you want.
The sheet name doesn’t need to be the same as the file name.
EEschema doesn’t care if your hierachical-sheet-symbol named blueberry-cookie-recepie in the master sheet does link to yuk.sch or yum.sch.
I use hierarchical sheets to transfer proven designs, so the names of the .sch files and the names of the symbols in EEschema are usually the same (unless I change things, then they can divert).
EEschema doesn’t allow 2 sheets with the same name (just tested it).
Linking to the same file via 2 different sheets seems possible, but what would be the use case?
Multirail power supply for example. Multichannell audio processing. Multistage digital delay line. And many others.
Yeah, but wouldn’t the references in those files need to reflect the sheet they are supposed to be in?
R1, R2, R3, etc…
I didn’t test this, but when I look into a h-sheets .sch file I see the references are being set.
I can’t reuse that same file in another h-sheet then, can I?
I’d have to make a copy and use that, no?
@Joan_Sparky, thanks for the excellent explanation. Are there any naming conventions, for both the file names and sheet names, that you would recommend?[quote=“Joan_Sparky, post:2, topic:3609”]
Usually hierarchical sheet files aren’t visible in the projects file view. You have to use the file browser of your OS to see them.
[/quote]
I’m not sure I understand…I only see files in my OS folder named in the ‘File name’ field. There are no OS files corresponding to hierarchical sheets named in ‘Sheet name’ field.
Yes you can (Mr. Obama
). This functionality is called “complex hierarchy”. If you look at demos
folder you will find an example.
Every componnent in H-Sheet in complex hierarchy have reference mapping after annotation:
AR Path="/4B3A13A4/4B3A1357" Ref="RV2" Part="1"
AR Path="/4B3A1333/4B3A1357" Ref="RV1" Part="1"
This way Eeschema know who is who in reused schematic.
1 Like
Thx for setting me straight @keruseykaryu and @Andy_P

@Andy_P and @keruseykaryu Thanks for the detailed answers! They should add your responses to the help file! 
One follow up question for everyone: when creating a pcb layout with PCBNew, will there appears to be only one NET list for all sheets? I want to know if you can have a single KiCad project with multiple schematics or sheets but have separate NETs to create separate PCBs. Thanks!
KiCad flattens the hierarchy and makes a single netlist. This is one reason why the subsheets are hidden in the project browser.
If you look at the netlist with a text editor, you can get some hints about which sheet a net is on from the names.
You can have a top sheet calling a few pcbs beneath for panelling with V-cuts, but these are logically one board to the pcb maker and component references etc cannot be repeated
This approach is asking for trouble.
It is not possible at all in KiCad because project file (especially its file name) is the key element.