kut 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE.rdoc +6 -0
- data/README.rdoc +20 -0
- data/Rakefile.rb +63 -0
- data/bin/kut +27 -0
- data/doc-src/PINS.rdoc +18 -0
- data/examples/example_helper.rb +1 -0
- data/examples/net_list/print_cmp_list.rb +101 -0
- data/examples/pins/A3P1000_PQFP208.pins +216 -0
- data/examples/pins/AT32UC3A0512.pins +151 -0
- data/examples/pins/EMP7464S_TQFP100.pins +101 -0
- data/examples/pins/ata40conn.pins +44 -0
- data/examples/pins/full_sata.pins +25 -0
- data/examples/pins/jm20330.pins +85 -0
- data/lib/kut.rb +2 -0
- data/lib/kut/application.rb +56 -0
- data/lib/kut/commands/gost/bom2el_list.rb +171 -0
- data/lib/kut/commands/help-cmd.rb +32 -0
- data/lib/kut/commands/lib-gen-cmd.rb +88 -0
- data/lib/kut/commands/net_list2bom.rb +81 -0
- data/lib/kut/eeschema/wire.rb +3 -0
- data/lib/kut/kut_module.rb +18 -0
- data/lib/kut/library/components.rb +167 -0
- data/lib/kut/library/generator.rb +25 -0
- data/lib/kut/library/generator/default.rb +123 -0
- data/lib/kut/library/generator/gost-con.rb +116 -0
- data/lib/kut/library/generator/simple.rb +123 -0
- data/lib/kut/library/pins_reader.rb +47 -0
- data/lib/kut/library/regexp.rb +18 -0
- data/lib/kut/misc/matrix.rb +2 -0
- data/lib/kut/misc/point.rb +25 -0
- data/lib/kut/misc/rectangle.rb +20 -0
- data/lib/kut/net_list/concept.rb +20 -0
- data/lib/kut/net_list/kicad.rb +40 -0
- data/lib/kut/net_list/pcad.rb +69 -0
- data/lib/kut/tests/Rakefile.rb +0 -0
- data/lib/kut/tests/rectangle.rb +23 -0
- data/test/library_cmp_pin_test.rb +16 -0
- data/test/library_pins_reader_test.rb +40 -0
- data/test/point_test.rb +17 -0
- metadata +100 -0
@@ -0,0 +1,151 @@
|
|
1
|
+
#LEFT
|
2
|
+
1 PX00
|
3
|
+
2 PX01
|
4
|
+
3 PB20
|
5
|
+
4 PX02
|
6
|
+
5 PB21
|
7
|
+
6 PB22
|
8
|
+
7 VDDIO
|
9
|
+
8 GND
|
10
|
+
9 PB23
|
11
|
+
10 PX03
|
12
|
+
11 PB24
|
13
|
+
12 PX04
|
14
|
+
13 PB25
|
15
|
+
14 PB26
|
16
|
+
15 PB27
|
17
|
+
16 VDDOUT
|
18
|
+
17 VDDIN
|
19
|
+
18 GND
|
20
|
+
19 PB28
|
21
|
+
20 PB29
|
22
|
+
21 PB30
|
23
|
+
22 PB31
|
24
|
+
23 RESET_N
|
25
|
+
24 PX05
|
26
|
+
25 PA00
|
27
|
+
26 PX06
|
28
|
+
27 PA01
|
29
|
+
28 GND
|
30
|
+
29 VDDCORE
|
31
|
+
30 PA02
|
32
|
+
31 PX07
|
33
|
+
32 PA03
|
34
|
+
33 PX08
|
35
|
+
34 PA04
|
36
|
+
35 PX09
|
37
|
+
36 VDDIO
|
38
|
+
|
39
|
+
#BOTTOM
|
40
|
+
37 GND
|
41
|
+
38 PX10
|
42
|
+
39 PA05
|
43
|
+
40 PX11
|
44
|
+
41 PA06
|
45
|
+
42 PX12
|
46
|
+
43 PA07
|
47
|
+
44 PX13
|
48
|
+
45 PA08
|
49
|
+
46 PX14
|
50
|
+
47 PA09
|
51
|
+
48 PA10
|
52
|
+
49 N/C
|
53
|
+
50 PA11
|
54
|
+
51 VDDCORE
|
55
|
+
52 GND
|
56
|
+
53 PA12
|
57
|
+
54 PA13
|
58
|
+
55 VDDCORE
|
59
|
+
56 PA14
|
60
|
+
57 PA15
|
61
|
+
58 PA16
|
62
|
+
59 PX15
|
63
|
+
60 PA17
|
64
|
+
61 PX16
|
65
|
+
62 PA18
|
66
|
+
63 PX17
|
67
|
+
64 PA19
|
68
|
+
65 PX18
|
69
|
+
66 PA20
|
70
|
+
67 PX19
|
71
|
+
68 VBUS
|
72
|
+
69 VDDIO
|
73
|
+
70 DM
|
74
|
+
71 DP
|
75
|
+
72 GND
|
76
|
+
|
77
|
+
#RIGHT
|
78
|
+
73 PA21
|
79
|
+
74 PA22
|
80
|
+
75 PA23
|
81
|
+
76 PA24
|
82
|
+
77 PA25
|
83
|
+
78 PA26
|
84
|
+
79 PA27
|
85
|
+
80 PA28
|
86
|
+
81 VDDANA
|
87
|
+
82 ADVREF
|
88
|
+
83 GNDANA
|
89
|
+
84 VDDSYS
|
90
|
+
85 PC00
|
91
|
+
86 PC01
|
92
|
+
87 PX20
|
93
|
+
88 PB00
|
94
|
+
89 PX21
|
95
|
+
90 PB01
|
96
|
+
91 PX22
|
97
|
+
92 VDDIO
|
98
|
+
93 VDDIO
|
99
|
+
94 GND
|
100
|
+
95 PX23
|
101
|
+
96 PB02
|
102
|
+
97 PX24
|
103
|
+
98 PB03
|
104
|
+
99 PX25
|
105
|
+
100 PB04
|
106
|
+
101 PX26
|
107
|
+
102 PB05
|
108
|
+
103 PX27
|
109
|
+
104 PB06
|
110
|
+
105 PX28
|
111
|
+
106 PB07
|
112
|
+
107 PX29
|
113
|
+
108 VDDIO
|
114
|
+
|
115
|
+
#TOP
|
116
|
+
109 GND
|
117
|
+
110 PX30
|
118
|
+
111 PB08
|
119
|
+
112 PX31
|
120
|
+
113 PB09
|
121
|
+
114 PX32
|
122
|
+
115 PB10
|
123
|
+
116 VDDIO
|
124
|
+
117 GND
|
125
|
+
118 PX33
|
126
|
+
119 PB11
|
127
|
+
120 PX34
|
128
|
+
121 PB12
|
129
|
+
122 PA29
|
130
|
+
123 PA31
|
131
|
+
124 PC02
|
132
|
+
125 PC03
|
133
|
+
126 PB13
|
134
|
+
127 PB14
|
135
|
+
128 TMS
|
136
|
+
129 TCK
|
137
|
+
130 TDO
|
138
|
+
131 TDI
|
139
|
+
132 PC04
|
140
|
+
133 PC05
|
141
|
+
134 PB15
|
142
|
+
135 PX35
|
143
|
+
136 PB16
|
144
|
+
137 PX36
|
145
|
+
138 VDDCORE
|
146
|
+
139 PB17
|
147
|
+
140 PX37
|
148
|
+
141 PB18
|
149
|
+
142 PX38
|
150
|
+
143 PB19
|
151
|
+
144 PX39
|
@@ -0,0 +1,101 @@
|
|
1
|
+
#NAMES EMP7064S-TQFP100
|
2
|
+
1 NC
|
3
|
+
2 NC
|
4
|
+
3 PIO1
|
5
|
+
4 PIO2
|
6
|
+
5 VCCIO
|
7
|
+
6 TDI
|
8
|
+
7 NC
|
9
|
+
8 PIO3
|
10
|
+
9 NC
|
11
|
+
10 PIO4
|
12
|
+
11 PIO5
|
13
|
+
12 PIO6
|
14
|
+
13 GND
|
15
|
+
14 PIO7
|
16
|
+
15 PIO8
|
17
|
+
16 PIO9
|
18
|
+
17 TMS
|
19
|
+
18 PIO10
|
20
|
+
19 PIO11
|
21
|
+
20 VCCIO
|
22
|
+
21 PIO12
|
23
|
+
22 PIO13
|
24
|
+
23 PIO14
|
25
|
+
24 NC
|
26
|
+
25 PIO15
|
27
|
+
26 NC
|
28
|
+
27 PIO16
|
29
|
+
28 GND
|
30
|
+
29 NC
|
31
|
+
30 NC
|
32
|
+
31 PIO17
|
33
|
+
32 PIO18
|
34
|
+
33 PIO19
|
35
|
+
34 PIO20
|
36
|
+
35 PIO21
|
37
|
+
36 VCCIO
|
38
|
+
37 PIO22
|
39
|
+
38 PIO23
|
40
|
+
39 PIO24
|
41
|
+
40 GND
|
42
|
+
41 VCCINT
|
43
|
+
42 PIO25
|
44
|
+
43 PIO26
|
45
|
+
44 PIO27
|
46
|
+
45 GND
|
47
|
+
46 PIO28
|
48
|
+
47 PIO29
|
49
|
+
48 PIO30
|
50
|
+
49 PIO31
|
51
|
+
50 PIO32
|
52
|
+
51 NC
|
53
|
+
52 NC
|
54
|
+
53 VCCIO
|
55
|
+
54 PIO33
|
56
|
+
55 NC
|
57
|
+
56 PIO34
|
58
|
+
57 NC
|
59
|
+
58 PIO35
|
60
|
+
59 PIO36
|
61
|
+
60 PIO37
|
62
|
+
61 GND
|
63
|
+
62 PIO38
|
64
|
+
63 PIO39
|
65
|
+
64 TCK
|
66
|
+
65 PIO40
|
67
|
+
66 PIO41
|
68
|
+
67 PIO42
|
69
|
+
68 VCCIO
|
70
|
+
69 PIO43
|
71
|
+
70 PIO44
|
72
|
+
71 PIO45
|
73
|
+
72 NC
|
74
|
+
73 PIO46
|
75
|
+
74 NC
|
76
|
+
75 TDO
|
77
|
+
76 GND
|
78
|
+
77 PIO47
|
79
|
+
78 PIO48
|
80
|
+
79 NC
|
81
|
+
80 NC
|
82
|
+
81 PIO49
|
83
|
+
82 PIO50
|
84
|
+
83 PIO51
|
85
|
+
84 VCCIO
|
86
|
+
85 PIO52
|
87
|
+
86 PIO53
|
88
|
+
87 PIO54
|
89
|
+
88 GND
|
90
|
+
89 GCLK1
|
91
|
+
90 OE1
|
92
|
+
91 GCLRn
|
93
|
+
92 GCLK2
|
94
|
+
93 VCCINT
|
95
|
+
94 PIO55
|
96
|
+
95 PIO56
|
97
|
+
96 PIO57
|
98
|
+
97 GND
|
99
|
+
98 PIO58
|
100
|
+
99 PIO59
|
101
|
+
100 PIO60
|
@@ -0,0 +1,44 @@
|
|
1
|
+
#LEFT
|
2
|
+
1 RESETn
|
3
|
+
3 DD7
|
4
|
+
5 DD6
|
5
|
+
7 DD5
|
6
|
+
9 DD4
|
7
|
+
11 DD3
|
8
|
+
13 DD2
|
9
|
+
15 DD1
|
10
|
+
17 DD0
|
11
|
+
19 GND
|
12
|
+
21 DMARQ
|
13
|
+
23 DIOWn
|
14
|
+
25 DIORn
|
15
|
+
27 IORDY
|
16
|
+
29 DMACKn
|
17
|
+
31 INTRQ
|
18
|
+
33 DA1
|
19
|
+
35 DA0
|
20
|
+
37 CS0n
|
21
|
+
39 DASPn
|
22
|
+
|
23
|
+
#RIGHT
|
24
|
+
2 GND
|
25
|
+
4 DD8
|
26
|
+
6 DD9
|
27
|
+
8 DD10
|
28
|
+
10 DD11
|
29
|
+
12 DD12
|
30
|
+
14 DD13
|
31
|
+
16 DD14
|
32
|
+
18 DD15
|
33
|
+
20 KEY
|
34
|
+
22 GND
|
35
|
+
24 GND
|
36
|
+
26 GND
|
37
|
+
28 CSEL
|
38
|
+
30 GND
|
39
|
+
32 IOCS16n
|
40
|
+
34 PDIAG
|
41
|
+
36 DA2
|
42
|
+
38 CS1n
|
43
|
+
40 GND
|
44
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#LEFT
|
2
|
+
|
3
|
+
S1 Gnd
|
4
|
+
S2 A+
|
5
|
+
S3 A-
|
6
|
+
S4 Gnd
|
7
|
+
S5 B-
|
8
|
+
S6 B+
|
9
|
+
S7 Gnd
|
10
|
+
#NO-PIN
|
11
|
+
P1 V33
|
12
|
+
P2 V33
|
13
|
+
P3 V33
|
14
|
+
P4 Gnd
|
15
|
+
P5 Gnd
|
16
|
+
P6 Gnd
|
17
|
+
P7 V5
|
18
|
+
P8 V5
|
19
|
+
P9 V5
|
20
|
+
P10 Gnd
|
21
|
+
P11 Reserved
|
22
|
+
P12 Gnd
|
23
|
+
P13 V12
|
24
|
+
P14 V12
|
25
|
+
P15 V12
|
@@ -0,0 +1,85 @@
|
|
1
|
+
#ALIAS JM20330
|
2
|
+
#REF U
|
3
|
+
#LEFT
|
4
|
+
43 UAI
|
5
|
+
45 UAO
|
6
|
+
#NO-PIN
|
7
|
+
26 REXT
|
8
|
+
27 RXP
|
9
|
+
28 RXN
|
10
|
+
31 TXN
|
11
|
+
32 TXP
|
12
|
+
#NO-PIN
|
13
|
+
18 MODE0
|
14
|
+
19 MODE1
|
15
|
+
20 MODE2
|
16
|
+
#NO-PIN
|
17
|
+
36 CLKSEL0
|
18
|
+
37 CLKSEL1
|
19
|
+
17 PORn
|
20
|
+
21 ATAIOEN
|
21
|
+
33 MSSEL
|
22
|
+
35 SSCEN
|
23
|
+
38 FXDMA
|
24
|
+
39 PMEN
|
25
|
+
40 PHYRDY
|
26
|
+
52 SP
|
27
|
+
#NO-PIN
|
28
|
+
22 XTALI
|
29
|
+
23 XTALO
|
30
|
+
|
31
|
+
#RIGHT
|
32
|
+
16 RESETn
|
33
|
+
#NO-PIN
|
34
|
+
62 DD0
|
35
|
+
64 DD1
|
36
|
+
2 DD2
|
37
|
+
5 DD3
|
38
|
+
7 DD4
|
39
|
+
11 DD5
|
40
|
+
13 DD6
|
41
|
+
15 DD7
|
42
|
+
14 DD8
|
43
|
+
12 DD9
|
44
|
+
10 DD10
|
45
|
+
6 DD11
|
46
|
+
3 DD12
|
47
|
+
1 DD13
|
48
|
+
63 DD14
|
49
|
+
61 DD15
|
50
|
+
#NO-PIN
|
51
|
+
60 DMARQ
|
52
|
+
59 DIOWn
|
53
|
+
58 DIORn
|
54
|
+
55 IORDY
|
55
|
+
54 DMACKn
|
56
|
+
53 INTRQ
|
57
|
+
#NO-PIN
|
58
|
+
48 CS0n
|
59
|
+
47 CS1n
|
60
|
+
50 DA0
|
61
|
+
51 DA1
|
62
|
+
49 DA2
|
63
|
+
46 PDIAGn
|
64
|
+
34 DASPn
|
65
|
+
|
66
|
+
#TOP
|
67
|
+
|
68
|
+
|
69
|
+
#BOTTOM
|
70
|
+
9 VCCK
|
71
|
+
41 VCCK
|
72
|
+
56 VCCK
|
73
|
+
4 VCCO
|
74
|
+
44 VCCO
|
75
|
+
8 DGND
|
76
|
+
42 DGND
|
77
|
+
57 DGND
|
78
|
+
#NO-PIN
|
79
|
+
24 AVDDH
|
80
|
+
29 AVDDL
|
81
|
+
30 AGND
|
82
|
+
25 AGND
|
83
|
+
#NO-PIN
|
84
|
+
#NO-PIN
|
85
|
+
#NO-PIN
|
data/lib/kut.rb
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'optparse'
|
2
|
+
require 'ostruct'
|
3
|
+
|
4
|
+
module Kut
|
5
|
+
class Application
|
6
|
+
attr_accessor :commands
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
@option_parser = OptionParser.new
|
10
|
+
@options = OpenStruct.new
|
11
|
+
@commands = []
|
12
|
+
end
|
13
|
+
|
14
|
+
def show_help
|
15
|
+
puts 'usage: kut [--help] COMMAND [ARGS]'
|
16
|
+
puts 'The most commonly used kut commands are:'
|
17
|
+
cmd_name_len = 10
|
18
|
+
commands.each { |cmd|
|
19
|
+
cmd_space = ' ' * (cmd_name_len - cmd.name.size)
|
20
|
+
puts "#{' '*3}#{cmd.name}#{cmd_space}#{cmd.help_banner}"
|
21
|
+
}
|
22
|
+
exit
|
23
|
+
end
|
24
|
+
|
25
|
+
def command_by_name(cmd_name)
|
26
|
+
cmd = nil
|
27
|
+
commands.each { |c|
|
28
|
+
if c.name == cmd_name
|
29
|
+
cmd = c
|
30
|
+
break
|
31
|
+
end
|
32
|
+
}
|
33
|
+
return cmd
|
34
|
+
end
|
35
|
+
|
36
|
+
def run_command(cmd_name, args)
|
37
|
+
cmd = command_by_name(cmd_name)
|
38
|
+
if cmd then
|
39
|
+
cmd.run(args)
|
40
|
+
else
|
41
|
+
puts "kut: #{cmd_name} is not a kut-command. See 'kut --help'"
|
42
|
+
exit
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def run
|
47
|
+
show_help() unless ARGV
|
48
|
+
show_help() if ARGV.size() == 0
|
49
|
+
show_help() if ['-h', '--help'].include?(ARGV[0])
|
50
|
+
|
51
|
+
args = ARGV.dup()
|
52
|
+
args.delete_at(0)
|
53
|
+
run_command(ARGV[0], args)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|