Cvpcb calculates number of pins wrong

Bug #1703155 reported by Ryan
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Low
Jeff Young

Bug Description

I am using a 74HC14 part (a simple and VERY common 14-pin logic gate).
This happens to be a hex schmitt-trigger-input inverter gate array.
I am only using 4 of the 6 logic gates from this chip. I am also using the GND and VCC pins (pins 7 and 14 respectively).
There are only 4 logic gates on my schematic.
The total number of pins I am USING is 10.
When I run Cvpcb, it thinks that a 74HC14 is a 10-pin part, but that is wrong.
A 74HC14 is a 14-pin part.
When I place two extra inverters from my 74hc14, Cvpcb then thinks that this is a 14-pin (which is correct).

My problem is this: Cvpcb should think my 74HC14 is a 14-pin ALWAYS.
It shouldn't DECIDE how many pins it has based on how many gates I place on my schematic.
Even if you are only using 1 of the 6 gates in the part, you still have to place the entire part.

***

Application: kicad
Version: 4.0.6 release build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1010,GCC 6.3.0,wx containers,compatible with 2.8)
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
Boost version: 1.60.0
Curl version: libcurl/7.52.1 OpenSSL/1.0.2k zlib/1.2.11 libssh2/1.8.0 nghttp2/1.19.0 librtmp/2.3
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=ON
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

Revision history for this message
Gaurav Juvekar (gauravjuvekar) wrote :

Confirmed on nightly

Application: kicad
Version: no-vcs-found-895c0bb~58~ubuntu16.04.1, release build
Libraries: wxWidgets 3.0.2
           libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Platform: Linux 4.6.3-040603-generic x86_64, 64 bit, Little endian, wxGTK
- Build Info -
wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.58.0
Curl: 7.47.0
KiCad - Compiler: GCC 5.4.0 with C++ ABI 1009
        Settings: USE_WX_GRAPHICS_CONTEXT=OFF
                  USE_WX_OVERLAY=OFF
                  KICAD_SCRIPTING=ON
                  KICAD_SCRIPTING_MODULES=ON
                  KICAD_SCRIPTING_WXPYTHON=ON
                  KICAD_SCRIPTING_ACTION_MENU=ON
                  BUILD_GITHUB_PLUGIN=ON
                  KICAD_USE_OCE=ON

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

There are two issues at play here. One is the CvPcb code. The other is user related.

The first issue is that CvPcb uses the number of net connections to determine the pin count filtering which is technically incorrect and is causing this issue. This will not be trivial to fix. The current CvPcb netlist code does not use the symbol libraries in any way so it would require adding access to the symbol libraries to get the actual pin count of the symbol which would resolve this issue.

The second issue is that you should never leave unused gate inputs floating. This is a really bad design practice and is most likely why the KiCad devs missed this because they would have added all of the unused gates the the schematic and tied the unused inputs either high or low. This would result the correct net connection count.

Changed in kicad:
importance: Undecided → Low
Revision history for this message
Jeff Young (jeyjey) wrote :

We need to move CvPcb to a Kiway-transmitted SCH_REFERENCE_LIST. (We can then also fix the issue of assigning a footprint to a symbol on a duplicated sub-sheet should update all instances of that sub-sheet.)

Revision history for this message
Jeff Young (jeyjey) wrote :

The pins turn out to be in the netlist, so for now count them instead of using the netlist count as a proxy.

Changed in kicad:
assignee: nobody → Jeff Young (jeyjey)
milestone: none → 5.0.0-rc2
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 778a3a4777f9a2de4b7edfc85e3fc910eb4987fd
https://git.launchpad.net/kicad/patch/?id=778a3a4777f9a2de4b7edfc85e3fc910eb4987fd

Changed in kicad:
status: Confirmed → Fix Committed
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.