From bc88c3aa4eb599f5cd465f34bd96797d5770dc18 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 13 Sep 2016 20:00:57 -0300 Subject: [PATCH] components/gencon.pl: add asymmeric connectors (like D-Sub), name CONN__ --- components/HIERARCHY | 39 +++++++++++++++++++++++++++++++++++++++ components/gencon.pl | 21 +++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/components/HIERARCHY b/components/HIERARCHY index 71b6fa2..17ba10f 100644 --- a/components/HIERARCHY +++ b/components/HIERARCHY @@ -113,6 +113,45 @@ Connector conn_38x2 conn_39x2 conn_40x2 + conn_2_1 + conn_3_2 + conn_4_3 + conn_5_4 + conn_6_5 + conn_7_6 + conn_8_7 + conn_9_8 + conn_10_9 + conn_11_10 + conn_12_11 + conn_13_12 + conn_14_13 + conn_15_14 + conn_16_15 + conn_17_16 + conn_18_17 + conn_19_18 + conn_20_19 + conn_21_20 + conn_22_21 + conn_23_22 + conn_24_23 + conn_25_24 + conn_26_25 + conn_27_26 + conn_28_27 + conn_29_28 + conn_30_29 + conn_31_30 + conn_32_31 + conn_33_32 + conn_34_33 + conn_35_34 + conn_36_35 + conn_37_36 + conn_38_37 + conn_39_38 + conn_40_39 Generic TESTPOINT conn_2 diff --git a/components/gencon.pl b/components/gencon.pl index 89d2d32..fa39914 100755 --- a/components/gencon.pl +++ b/components/gencon.pl @@ -35,5 +35,26 @@ for ($x = 1; $x <= 40; $x++) { print "ENDDRAW\n"; print "ENDDEF\n"; } + + next if $x == 1; + + $name = "CONN_$x" . "_" . ($x - 1); + print "#\n# $name\n#\n"; + print "DEF $name CON 0 40 Y N 1 F N\n"; + $h = $x / 2 * 100; + print "F0 \"CON\" 0 " . ($h + 50) . " 60 H V C CNN\n"; + print "F1 \"$name\" 0 " . (-$h - 50) . " 60 H V C CNN\n"; + print "DRAW\n"; + print "S -100 -$h 100 $h 0 1 0 N\n"; + for ($px = 1; $px <= $x; $px++) { + print "X $px $px -400 " . + ($h - $px * 100 + 50) . " 300 R 50 50 1 1 P\n"; + next if $px == $x; + $n = $px + $x; + print "X $n $n 400 " . + ($h - $px * 100) . " 300 L 50 50 1 1 P\n"; + } + print "ENDDRAW\n"; + print "ENDDEF\n"; } print "#\n#End Library\n";