'eeschema' allows instances with the same name

Bug #593782 reported by sergeiste
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Medium
Wayne Stambaugh

Bug Description

When I add sons to top level block using "Place the hierarchical sheet", a form with two fields pops up - the fields are file name and sheet name.

While the file name can be any, and can be repetitive (several instances of the same subblock), sheet name, which is instance name, should be unique in a given sheet.

In a hierarchical design items are identifies as

top_level.instance_name_1.instance_name_2...instance_name_N.item_name

where item_name is node, component, etc.

I.e. at each hierarchical level instance names should be unique - otherwise it's impossible to differentiate between the instances. It's the same as if in a family twins are born, they are given different names - twins in this case are like different instances of the same subblock.

Revision history for this message
Stephen Eaton (seaton) wrote :

Can confirm that eeschema does allow the same name of hierarchical sheets in 2010-05-05 BZR 2356 even though sheet names are the same.

Changed in kicad:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Duplicate hierarchical sheet names do not cause sheet instance problems because internally EESchema uses time stamps to create hierarchical instances not sheet names. The sheet name path displayed in the title bar is not used to create an instance of the sheet. It is displayed to the user because /4B3A1333/4B616B96" wouldn't make much sense. Since there is no technical reason to prevent duplicate hierarchical sheet names, it becomes a matter of user expectation. I agree that duplicate hierarchical sheet names is confusing so I would consider adding a check for duplicate names to the sheet editing code. Anyone else have any opinions on this? What about non-hierarchical sheets? Should we allow sheets that load different files to have the same name?

Changed in kicad:
assignee: nobody → Wayne Stambaugh (stambaughw)
status: Confirmed → In Progress
Revision history for this message
sdaau (sd-imi) wrote :

Just a note:

> Since there is no technical reason to prevent duplicate hierarchical sheet names, it becomes a matter of user expectation.

I'm trying to use Kicad for generating a SPICE netlist, and it seems kicad uses the hierarchical sheet names to devise net names, e.g.

...
Rc1 /hiername_1/inCKE /hiername_1/N_Rc1 1K
...
Rc1 /hiername_2/inCKE /hiername_2/N_Rc1 1K
...

... so I guess it would be a good idea to enforce a unique name check.

(then, on the other hand, the spice netlist generator just dumps internal components names, as in Rc1, without differentiating them; but I guess it won't be a problem, as long as the net names are unique ...)

Cheers!

Martin Errenst (imp-d)
tags: added: eeschema hierarchical sheets
Revision history for this message
Derek Kozel (dkozel) wrote :

I tested today and a check now prevents the creation of a second hierarchical sheet with a duplicate name.

Steps to reproduce:
1. Open KiCad and start a new project.
2. Open Eeschema by clicking on the button
3. Place a hierarchical sheet (Filename: sheet1.sch Sheet Name: sheet)
4. Place a hierarchical sheet (Filename: sheet2.sch Sheet Name: sheet)
* An Error pop up is displayed with the text 'A sheet named "sheet" already exists.' is displayed.
* BUG: The sheet component is still rendered until the schematic is redrawn by zooming in or out or another component is interacted with. The sheet component cannot be selected or interacted with.

Application: kicad
Version: (2014-08-13 BZR 5072)-product Release build
wxWidgets: Version 3.0.0 (debug,wchar_t,compiler with C++ ABI 1002,GCC 4.8.2,wx containers,compatible with 2.8)
Platform: Linux 3.13.0-34-generic x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.54.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=OFF
         KICAD_SCRIPTING_MODULES=OFF
         KICAD_SCRIPTING_WXPYTHON=OFF
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Well what do know? Apparently I did fix it and forgot to mark as fix committed. That happens when you get old. However, the case sensitivity is an issue because windows does not support case sensitivity file names by default even though NTFS supports it (although I've never tried it). Also, I must have forget to update the view to clear the sheet that was rejected due to duplicate names. Fixing both of these issues should be fairly straight forward.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

OK. I think I got everything fixed up in r5095. I also added a validator to prevent the user from using illegal file name characters in the file name text control in the sheet properties dialog. Please file a new bug report if you find anything else that need to be fixed.

Changed in kicad:
status: In Progress → Fix Committed
Jon Neal (reportingsjr)
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.