-
Notifications
You must be signed in to change notification settings - Fork 118
/
api.html
3829 lines (3400 loc) · 237 KB
/
api.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>skidl 0.0.29 documentation</title>
<link rel="stylesheet" href="static/agogo.css" type="text/css" />
<link rel="stylesheet" href="static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="static/documentation_options.js"></script>
<script type="text/javascript" src="static/jquery.js"></script>
<script type="text/javascript" src="static/underscore.js"></script>
<script type="text/javascript" src="static/doctools.js"></script>
<script type="text/javascript" src="static/language_data.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
</head><body>
<div class="header-wrapper" role="banner">
<div class="header">
<div class="headertitle"><a
href="api.html#document-api">skidl 0.0.29 documentation</a></div>
<div class="rel" role="navigation" aria-label="related navigation">
</div>
</div>
</div>
<div class="content-wrapper">
<div class="content">
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<p><strong>This is a really, really bad API document.</strong> I’m working to make Sphinx generate a better one
but, right now, the description on the homepage about how to use SKiDL is much better than this.</p>
<div class="section" id="skidl-api">
<h1>SKiDL API<a class="headerlink" href="#skidl-api" title="Permalink to this headline">¶</a></h1>
<div class="toctree-wrapper compound">
<span id="document-overview"></span><div class="section" id="overview-of-how-skidl-works">
<h2>Overview of How SKiDL Works<a class="headerlink" href="#overview-of-how-skidl-works" title="Permalink to this headline">¶</a></h2>
<p>This is an <em>overview</em> of how SKiDL works.</p>
</div>
<span id="document-modules"></span><div class="section" id="skidl">
<h2>skidl<a class="headerlink" href="#skidl" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
<span id="document-skidl"></span><div class="section" id="skidl-package">
<h3>skidl package<a class="headerlink" href="#skidl-package" title="Permalink to this headline">¶</a></h3>
<div class="section" id="subpackages">
<h4>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h4>
<div class="toctree-wrapper compound">
<span id="document-skidl.tools"></span><div class="section" id="skidl-tools-package">
<h5>skidl.tools package<a class="headerlink" href="#skidl-tools-package" title="Permalink to this headline">¶</a></h5>
<div class="section" id="submodules">
<h6>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h6>
</div>
<div class="section" id="module-skidl.tools.kicad">
<span id="skidl-tools-kicad-module"></span><h6>skidl.tools.kicad module<a class="headerlink" href="#module-skidl.tools.kicad" title="Permalink to this headline">¶</a></h6>
<p>Handler for reading Kicad libraries and generating netlists.</p>
<dl class="function">
<dt id="skidl.tools.kicad._load_sch_lib_">
<code class="descclassname">skidl.tools.kicad.</code><code class="descname">_load_sch_lib_</code><span class="sig-paren">(</span><em>self</em>, <em>filename=None</em>, <em>lib_search_paths_=None</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.kicad._load_sch_lib_" title="Permalink to this definition">¶</a></dt>
<dd><p>Load the parts from a KiCad schematic library file.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>filename</strong> – The name of the KiCad schematic library file.</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="skidl.tools.kicad._parse_lib_part_">
<code class="descclassname">skidl.tools.kicad.</code><code class="descname">_parse_lib_part_</code><span class="sig-paren">(</span><em>self</em>, <em>get_name_only=False</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.kicad._parse_lib_part_" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a Part using a part definition from a KiCad schematic library.</p>
<p>This method was written based on the code from
<a class="reference external" href="https://github.com/KiCad/kicad-library-utils/tree/master/schlib">https://github.com/KiCad/kicad-library-utils/tree/master/schlib</a>.
It’s covered by GPL3.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>part_defn</strong> – A list of strings that define the part (usually read from a
schematic library file). Can also be None.</p></li>
<li><p><strong>get_name_only</strong> – If true, scan the part definition until the
name and aliases are found. The rest of the definition
will be parsed if the part is actually used.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="skidl.tools.kicad._gen_netlist_">
<code class="descclassname">skidl.tools.kicad.</code><code class="descname">_gen_netlist_</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.kicad._gen_netlist_" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="skidl.tools.kicad._gen_netlist_comp_">
<code class="descclassname">skidl.tools.kicad.</code><code class="descname">_gen_netlist_comp_</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.kicad._gen_netlist_comp_" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="skidl.tools.kicad._gen_netlist_net_">
<code class="descclassname">skidl.tools.kicad.</code><code class="descname">_gen_netlist_net_</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.kicad._gen_netlist_net_" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="skidl.tools.kicad._gen_xml_">
<code class="descclassname">skidl.tools.kicad.</code><code class="descname">_gen_xml_</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.kicad._gen_xml_" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="skidl.tools.kicad._gen_xml_comp_">
<code class="descclassname">skidl.tools.kicad.</code><code class="descname">_gen_xml_comp_</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.kicad._gen_xml_comp_" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="skidl.tools.kicad._gen_xml_net_">
<code class="descclassname">skidl.tools.kicad.</code><code class="descname">_gen_xml_net_</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.kicad._gen_xml_net_" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-skidl.tools.skidl">
<span id="skidl-tools-skidl-module"></span><h6>skidl.tools.skidl module<a class="headerlink" href="#module-skidl.tools.skidl" title="Permalink to this headline">¶</a></h6>
<p>Handler for reading SKiDL libraries and generating netlists.</p>
<dl class="function">
<dt id="skidl.tools.skidl._load_sch_lib_">
<code class="descclassname">skidl.tools.skidl.</code><code class="descname">_load_sch_lib_</code><span class="sig-paren">(</span><em>self</em>, <em>filename=None</em>, <em>lib_search_paths_=None</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.skidl._load_sch_lib_" title="Permalink to this definition">¶</a></dt>
<dd><p>Load the parts from a SKiDL schematic library file.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>filename</strong> – The name of the SKiDL schematic library file.</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="skidl.tools.skidl._parse_lib_part_">
<code class="descclassname">skidl.tools.skidl.</code><code class="descname">_parse_lib_part_</code><span class="sig-paren">(</span><em>self</em>, <em>get_name_only=False</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.skidl._parse_lib_part_" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a Part using a part definition from a SKiDL library.</p>
</dd></dl>
</div>
<div class="section" id="module-skidl.tools.spice">
<span id="skidl-tools-spice-module"></span><h6>skidl.tools.spice module<a class="headerlink" href="#module-skidl.tools.spice" title="Permalink to this headline">¶</a></h6>
<p>Handler for reading SPICE libraries.</p>
<dl class="function">
<dt id="skidl.tools.spice._load_sch_lib_">
<code class="descclassname">skidl.tools.spice.</code><code class="descname">_load_sch_lib_</code><span class="sig-paren">(</span><em>self</em>, <em>filename=None</em>, <em>lib_search_paths_=None</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.spice._load_sch_lib_" title="Permalink to this definition">¶</a></dt>
<dd><p>Load the .subckt I/O from a SPICE library file.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filename</strong> – The name of the SPICE library file.</p></li>
<li><p><strong>lib_search_paths</strong> – List of directories to search for the file.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="skidl.tools.spice._parse_lib_part_">
<code class="descclassname">skidl.tools.spice.</code><code class="descname">_parse_lib_part_</code><span class="sig-paren">(</span><em>self</em>, <em>get_name_only=False</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.spice._parse_lib_part_" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a Part using a part definition from a SPICE library.</p>
</dd></dl>
<dl class="function">
<dt id="skidl.tools.spice._mk_subckt_part">
<code class="descclassname">skidl.tools.spice.</code><code class="descname">_mk_subckt_part</code><span class="sig-paren">(</span><em>defn='XXX'</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.spice._mk_subckt_part" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="class">
<dt id="skidl.tools.spice.XspiceModel">
<em class="property">class </em><code class="descclassname">skidl.tools.spice.</code><code class="descname">XspiceModel</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.spice.XspiceModel" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Object to hold the parameters for an XSPICE model.</p>
<dl class="method">
<dt id="skidl.tools.spice.XspiceModel.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.spice.XspiceModel.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="skidl.tools.spice._gen_netlist_">
<code class="descclassname">skidl.tools.spice.</code><code class="descname">_gen_netlist_</code><span class="sig-paren">(</span><em>self</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.spice._gen_netlist_" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a PySpice Circuit generated from a SKiDL circuit.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>title</strong> – String containing the title for the PySpice circuit.</p></li>
<li><p><strong>libs</strong> – String or list of strings containing the paths to directories
containing SPICE models.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="skidl.tools.spice.node">
<code class="descclassname">skidl.tools.spice.</code><code class="descname">node</code><span class="sig-paren">(</span><em>net_or_pin</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.spice.node" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="skidl.tools.spice._get_spice_ref">
<code class="descclassname">skidl.tools.spice.</code><code class="descname">_get_spice_ref</code><span class="sig-paren">(</span><em>part</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.spice._get_spice_ref" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a SPICE reference ID for the part.</p>
</dd></dl>
<dl class="function">
<dt id="skidl.tools.spice._get_kwargs">
<code class="descclassname">skidl.tools.spice.</code><code class="descname">_get_kwargs</code><span class="sig-paren">(</span><em>part</em>, <em>kw</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.spice._get_kwargs" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a dict of keyword arguments to PySpice element constructor.</p>
</dd></dl>
<dl class="function">
<dt id="skidl.tools.spice.not_implemented">
<code class="descclassname">skidl.tools.spice.</code><code class="descname">not_implemented</code><span class="sig-paren">(</span><em>part</em>, <em>circuit</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.spice.not_implemented" title="Permalink to this definition">¶</a></dt>
<dd><p>Unable to add a particular SPICE part to a circuit.</p>
</dd></dl>
<dl class="function">
<dt id="skidl.tools.spice.add_part_to_circuit">
<code class="descclassname">skidl.tools.spice.</code><code class="descname">add_part_to_circuit</code><span class="sig-paren">(</span><em>part</em>, <em>circuit</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.spice.add_part_to_circuit" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a part to a PySpice Circuit object.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>part</strong> – SKiDL Part object.</p></li>
<li><p><strong>circuit</strong> – PySpice Circuit object.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="skidl.tools.spice._get_net_names">
<code class="descclassname">skidl.tools.spice.</code><code class="descname">_get_net_names</code><span class="sig-paren">(</span><em>part</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.spice._get_net_names" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a list of net names attached to the pins of a part.</p>
</dd></dl>
<dl class="function">
<dt id="skidl.tools.spice.add_subcircuit_to_circuit">
<code class="descclassname">skidl.tools.spice.</code><code class="descname">add_subcircuit_to_circuit</code><span class="sig-paren">(</span><em>part</em>, <em>circuit</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.spice.add_subcircuit_to_circuit" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a .SUBCKT part to a PySpice Circuit object.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>part</strong> – SKiDL Part object.</p></li>
<li><p><strong>circuit</strong> – PySpice Circuit object.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="skidl.tools.spice.add_xspice_to_circuit">
<code class="descclassname">skidl.tools.spice.</code><code class="descname">add_xspice_to_circuit</code><span class="sig-paren">(</span><em>part</em>, <em>circuit</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.tools.spice.add_xspice_to_circuit" title="Permalink to this definition">¶</a></dt>
<dd><p>Add an XSPICE part to a PySpice Circuit object.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>part</strong> – SKiDL Part object.</p></li>
<li><p><strong>circuit</strong> – PySpice Circuit object.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-skidl.tools">
<span id="module-contents"></span><h6>Module contents<a class="headerlink" href="#module-skidl.tools" title="Permalink to this headline">¶</a></h6>
<p>This package contains the handler functions for various EDA tools.</p>
</div>
</div>
</div>
</div>
<div class="section" id="submodules">
<h4>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h4>
</div>
<div class="section" id="module-skidl.Alias">
<span id="skidl-alias-module"></span><h4>skidl.Alias module<a class="headerlink" href="#module-skidl.Alias" title="Permalink to this headline">¶</a></h4>
<p>Handles aliases for Circuit, Part, Pin, Net, Bus, Interface objects.</p>
<dl class="class">
<dt id="skidl.Alias.Alias">
<em class="property">class </em><code class="descclassname">skidl.Alias.</code><code class="descname">Alias</code><span class="sig-paren">(</span><em>*aliases</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Alias.Alias" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">set</span></code></p>
<p>Multiple aliases can be added to another object to give it other names.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>aliases</strong> – A single string or a list of strings.</p>
</dd>
</dl>
<dl class="method">
<dt id="skidl.Alias.Alias.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>*aliases</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Alias.Alias.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Alias.Alias.__iadd__">
<code class="descname">__iadd__</code><span class="sig-paren">(</span><em>*aliases</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Alias.Alias.__iadd__" title="Permalink to this definition">¶</a></dt>
<dd><p>Add new aliases.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Alias.Alias.__str__">
<code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Alias.Alias.__str__" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the aliases as a delimited string.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Alias.Alias.__eq__">
<code class="descname">__eq__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Alias.Alias.__eq__" title="Permalink to this definition">¶</a></dt>
<dd><p>Return true if both lists of aliases have at least one alias in common.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>other</strong> – The Alias object which self will be compared to.</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="skidl.Alias.Alias.__hash__">
<code class="descname">__hash__</code><em class="property"> = None</em><a class="headerlink" href="#skidl.Alias.Alias.__hash__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-skidl.Bus">
<span id="skidl-bus-module"></span><h4>skidl.Bus module<a class="headerlink" href="#module-skidl.Bus" title="Permalink to this headline">¶</a></h4>
<p>Handles buses.</p>
<dl class="class">
<dt id="skidl.Bus.Bus">
<em class="property">class </em><code class="descclassname">skidl.Bus.</code><code class="descname">Bus</code><span class="sig-paren">(</span><em>name</em>, <em>*args</em>, <em>**attribs</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#skidl.baseobj.SkidlBaseObject" title="skidl.baseobj.SkidlBaseObject"><code class="xref py py-class docutils literal notranslate"><span class="pre">skidl.baseobj.SkidlBaseObject</span></code></a></p>
<p>This class collects one or more nets into a group that can be indexed.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>name</strong> – A string with the name of the bus.</p></li>
<li><p><strong>args</strong> – A list of ints, pins, nets, buses to attach to the net.</p></li>
</ul>
</dd>
<dt class="field-even">Keyword Arguments</dt>
<dd class="field-even"><p><strong>attribs</strong> – A dictionary of attributes and values to attach to
the Net object.</p>
</dd>
</dl>
<p class="rubric">Example</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">n</span> <span class="o">=</span> <span class="n">Net</span><span class="p">()</span>
<span class="n">led1</span> <span class="o">=</span> <span class="n">Part</span><span class="p">(</span><span class="s2">"Device"</span><span class="p">,</span> <span class="s1">'LED'</span><span class="p">)</span>
<span class="n">b</span> <span class="o">=</span> <span class="n">Bus</span><span class="p">(</span><span class="s1">'B'</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="n">n</span><span class="p">,</span> <span class="n">led1</span><span class="p">[</span><span class="s1">'K'</span><span class="p">])</span>
</pre></div>
</div>
<dl class="classmethod">
<dt id="skidl.Bus.Bus.get">
<em class="property">classmethod </em><code class="descname">get</code><span class="sig-paren">(</span><em>name</em>, <em>circuit=None</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.get" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the bus with the given name from a circuit, or return None.</p>
</dd></dl>
<dl class="classmethod">
<dt id="skidl.Bus.Bus.fetch">
<em class="property">classmethod </em><code class="descname">fetch</code><span class="sig-paren">(</span><em>name</em>, <em>*args</em>, <em>**attribs</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.fetch" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the bus with the given name from a circuit, or create it if not found.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>name</em>, <em>*args</em>, <em>**attribs</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.extend">
<code class="descname">extend</code><span class="sig-paren">(</span><em>*objects</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.extend" title="Permalink to this definition">¶</a></dt>
<dd><p>Extend bus by appending objects to the end (MSB).</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.insert">
<code class="descname">insert</code><span class="sig-paren">(</span><em>index</em>, <em>*objects</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.insert" title="Permalink to this definition">¶</a></dt>
<dd><p>Insert objects into bus starting at indexed position.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.get_nets">
<code class="descname">get_nets</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.get_nets" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the list of nets contained in this bus.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.get_pins">
<code class="descname">get_pins</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.get_pins" title="Permalink to this definition">¶</a></dt>
<dd><p>It’s an error to get the list of pins attached to all bus lines.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.copy">
<code class="descname">copy</code><span class="sig-paren">(</span><em>num_copies=None</em>, <em>**attribs</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.copy" title="Permalink to this definition">¶</a></dt>
<dd><p>Make zero or more copies of this bus.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>num_copies</strong> – Number of copies to make of this bus.</p>
</dd>
<dt class="field-even">Keyword Arguments</dt>
<dd class="field-even"><p><strong>attribs</strong> – Name/value pairs for setting attributes for the copy.</p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>A list of Bus copies or a Bus if num_copies==1.</p>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p><strong>Exception if the requested number of copies is a non-integer</strong><strong> or </strong><strong>negative.</strong> – </p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>An instance of a bus can be copied just by calling it like so:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">b</span> <span class="o">=</span> <span class="n">Bus</span><span class="p">(</span><span class="s1">'A'</span><span class="p">,</span> <span class="mi">8</span><span class="p">)</span> <span class="c1"># Create a bus.</span>
<span class="n">b_copy</span> <span class="o">=</span> <span class="n">b</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="c1"># Get two copies of the bus.</span>
</pre></div>
</div>
<p>You can also use the multiplication operator to make copies:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">b</span> <span class="o">=</span> <span class="mi">10</span> <span class="o">*</span> <span class="n">Bus</span><span class="p">(</span><span class="s1">'A'</span><span class="p">,</span> <span class="mi">8</span><span class="p">)</span> <span class="c1"># Create an array of buses.</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.__call__">
<code class="descname">__call__</code><span class="sig-paren">(</span><em>num_copies=None</em>, <em>**attribs</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.__call__" title="Permalink to this definition">¶</a></dt>
<dd><p>Make zero or more copies of this bus.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>num_copies</strong> – Number of copies to make of this bus.</p>
</dd>
<dt class="field-even">Keyword Arguments</dt>
<dd class="field-even"><p><strong>attribs</strong> – Name/value pairs for setting attributes for the copy.</p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>A list of Bus copies or a Bus if num_copies==1.</p>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p><strong>Exception if the requested number of copies is a non-integer</strong><strong> or </strong><strong>negative.</strong> – </p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>An instance of a bus can be copied just by calling it like so:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">b</span> <span class="o">=</span> <span class="n">Bus</span><span class="p">(</span><span class="s1">'A'</span><span class="p">,</span> <span class="mi">8</span><span class="p">)</span> <span class="c1"># Create a bus.</span>
<span class="n">b_copy</span> <span class="o">=</span> <span class="n">b</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="c1"># Get two copies of the bus.</span>
</pre></div>
</div>
<p>You can also use the multiplication operator to make copies:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">b</span> <span class="o">=</span> <span class="mi">10</span> <span class="o">*</span> <span class="n">Bus</span><span class="p">(</span><span class="s1">'A'</span><span class="p">,</span> <span class="mi">8</span><span class="p">)</span> <span class="c1"># Create an array of buses.</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.__mul__">
<code class="descname">__mul__</code><span class="sig-paren">(</span><em>num_copies</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.__mul__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.__rmul__">
<code class="descname">__rmul__</code><span class="sig-paren">(</span><em>num_copies</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.__rmul__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.__getitem__">
<code class="descname">__getitem__</code><span class="sig-paren">(</span><em>*ids</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.__getitem__" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a bus made up of the nets at the given indices.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>ids</strong> – A list of indices of bus lines. These can be individual
numbers, net names, nested lists, or slices.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A bus if the indices are valid, otherwise None.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.__setitem__">
<code class="descname">__setitem__</code><span class="sig-paren">(</span><em>ids</em>, <em>*pins_nets_buses</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.__setitem__" title="Permalink to this definition">¶</a></dt>
<dd><p>You can’t assign to bus lines. You must use the += operator.</p>
<p>This method is a work-around that allows the use of the += for making
connections to bus lines while prohibiting direct assignment. Python
processes something like my_bus[7:0] += 8 * Pin() as follows:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mf">1.</span> <span class="n">Bus</span><span class="o">.</span><span class="fm">__getitem__</span> <span class="ow">is</span> <span class="n">called</span> <span class="k">with</span> <span class="s1">'7:0'</span> <span class="k">as</span> <span class="n">the</span> <span class="n">index</span><span class="o">.</span> <span class="n">This</span>
<span class="n">returns</span> <span class="n">a</span> <span class="n">NetPinList</span> <span class="n">of</span> <span class="n">eight</span> <span class="n">nets</span> <span class="kn">from</span> <span class="nn">my_bus.</span>
<span class="mf">2.</span> <span class="n">The</span> <span class="n">NetPinList</span><span class="o">.</span><span class="fm">__iadd__</span> <span class="n">method</span> <span class="ow">is</span> <span class="n">passed</span> <span class="n">the</span> <span class="n">NetPinList</span> <span class="ow">and</span>
<span class="n">the</span> <span class="n">thing</span> <span class="n">to</span> <span class="n">connect</span> <span class="n">to</span> <span class="n">the</span> <span class="n">it</span> <span class="p">(</span><span class="n">eight</span> <span class="n">pins</span> <span class="ow">in</span> <span class="n">this</span> <span class="n">case</span><span class="p">)</span><span class="o">.</span> <span class="n">This</span>
<span class="n">method</span> <span class="n">makes</span> <span class="n">the</span> <span class="n">actual</span> <span class="n">connection</span> <span class="n">to</span> <span class="n">the</span> <span class="n">part</span> <span class="n">pin</span> <span class="ow">or</span> <span class="n">pins</span><span class="o">.</span> <span class="n">Then</span>
<span class="n">it</span> <span class="n">creates</span> <span class="n">an</span> <span class="n">iadd_flag</span> <span class="n">attribute</span> <span class="ow">in</span> <span class="n">the</span> <span class="nb">object</span> <span class="n">it</span> <span class="n">returns</span><span class="o">.</span>
<span class="mf">3.</span> <span class="n">Finally</span><span class="p">,</span> <span class="n">Bus</span><span class="o">.</span><span class="fm">__setitem__</span> <span class="ow">is</span> <span class="n">called</span><span class="o">.</span> <span class="n">If</span> <span class="n">the</span> <span class="n">iadd_flag</span> <span class="n">attribute</span>
<span class="ow">is</span> <span class="n">true</span> <span class="ow">in</span> <span class="n">the</span> <span class="n">passed</span> <span class="n">argument</span><span class="p">,</span> <span class="n">then</span> <span class="fm">__setitem__</span> <span class="n">was</span> <span class="n">entered</span>
<span class="k">as</span> <span class="n">part</span> <span class="n">of</span> <span class="n">processing</span> <span class="n">the</span> <span class="o">+=</span> <span class="n">operator</span><span class="o">.</span> <span class="n">If</span> <span class="n">there</span> <span class="ow">is</span> <span class="n">no</span>
<span class="n">iadd_flag</span> <span class="n">attribute</span><span class="p">,</span> <span class="n">then</span> <span class="fm">__setitem__</span> <span class="n">was</span> <span class="n">entered</span> <span class="k">as</span> <span class="n">a</span> <span class="n">result</span>
<span class="n">of</span> <span class="n">using</span> <span class="n">a</span> <span class="n">direct</span> <span class="n">assignment</span><span class="p">,</span> <span class="n">which</span> <span class="ow">is</span> <span class="ow">not</span> <span class="n">allowed</span><span class="o">.</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.__iter__">
<code class="descname">__iter__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.__iter__" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an iterator for stepping thru individual lines of the bus.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.is_movable">
<code class="descname">is_movable</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.is_movable" title="Permalink to this definition">¶</a></dt>
<dd><p>Return true if the bus is movable to another circuit.</p>
<p>A bus is movable if all the nets in it are movable.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.connect">
<code class="descname">connect</code><span class="sig-paren">(</span><em>*pins_nets_buses</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.connect" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the bus after connecting one or more nets, pins, or buses.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>pins_nets_buses</strong> – One or more Pin, Net or Bus objects or
lists/tuples of them.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The updated bus with the new connections.</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>You can connect nets or pins to a bus like so:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">p</span> <span class="o">=</span> <span class="n">Pin</span><span class="p">()</span> <span class="c1"># Create a pin.</span>
<span class="n">n</span> <span class="o">=</span> <span class="n">Net</span><span class="p">()</span> <span class="c1"># Create a net.</span>
<span class="n">b</span> <span class="o">=</span> <span class="n">Bus</span><span class="p">(</span><span class="s1">'B'</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span> <span class="c1"># Create a two-wire bus.</span>
<span class="n">b</span> <span class="o">+=</span> <span class="n">p</span><span class="p">,</span><span class="n">n</span> <span class="c1"># Connect pin and net to B[0] and B[1].</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.__iadd__">
<code class="descname">__iadd__</code><span class="sig-paren">(</span><em>*pins_nets_buses</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.__iadd__" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the bus after connecting one or more nets, pins, or buses.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>pins_nets_buses</strong> – One or more Pin, Net or Bus objects or
lists/tuples of them.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The updated bus with the new connections.</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>You can connect nets or pins to a bus like so:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">p</span> <span class="o">=</span> <span class="n">Pin</span><span class="p">()</span> <span class="c1"># Create a pin.</span>
<span class="n">n</span> <span class="o">=</span> <span class="n">Net</span><span class="p">()</span> <span class="c1"># Create a net.</span>
<span class="n">b</span> <span class="o">=</span> <span class="n">Bus</span><span class="p">(</span><span class="s1">'B'</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span> <span class="c1"># Create a two-wire bus.</span>
<span class="n">b</span> <span class="o">+=</span> <span class="n">p</span><span class="p">,</span><span class="n">n</span> <span class="c1"># Connect pin and net to B[0] and B[1].</span>
</pre></div>
</div>
</dd></dl>
<dl class="attribute">
<dt id="skidl.Bus.Bus.name">
<code class="descname">name</code><a class="headerlink" href="#skidl.Bus.Bus.name" title="Permalink to this definition">¶</a></dt>
<dd><p>Get, set and delete the name of the bus.</p>
<p>When setting the bus name, if another bus with the same name
is found, the name for this bus is adjusted to make it unique.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.__str__">
<code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.__str__" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a list of the nets in this bus as a string.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.__repr__">
<code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.__repr__" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a list of the nets in this bus as a string.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.__len__">
<code class="descname">__len__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.__len__" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the number of nets in this bus.</p>
</dd></dl>
<dl class="attribute">
<dt id="skidl.Bus.Bus.width">
<code class="descname">width</code><a class="headerlink" href="#skidl.Bus.Bus.width" title="Permalink to this definition">¶</a></dt>
<dd><p>Return width of a Bus, which is the same as using the len() operator.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.__bool__">
<code class="descname">__bool__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.__bool__" title="Permalink to this definition">¶</a></dt>
<dd><p>Any valid Bus is True</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Bus.Bus.__nonzero__">
<code class="descname">__nonzero__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Bus.Bus.__nonzero__" title="Permalink to this definition">¶</a></dt>
<dd><p>Any valid Bus is True</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-skidl.Circuit">
<span id="skidl-circuit-module"></span><h4>skidl.Circuit module<a class="headerlink" href="#module-skidl.Circuit" title="Permalink to this headline">¶</a></h4>
<p>Handles complete circuits made of parts and nets.</p>
<dl class="class">
<dt id="skidl.Circuit.Circuit">
<em class="property">class </em><code class="descclassname">skidl.Circuit.</code><code class="descname">Circuit</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#skidl.baseobj.SkidlBaseObject" title="skidl.baseobj.SkidlBaseObject"><code class="xref py py-class docutils literal notranslate"><span class="pre">skidl.baseobj.SkidlBaseObject</span></code></a></p>
<p>Class object that holds the entire netlist of parts and nets.</p>
<dl class="attribute">
<dt id="skidl.Circuit.Circuit.parts">
<code class="descname">parts</code><a class="headerlink" href="#skidl.Circuit.Circuit.parts" title="Permalink to this definition">¶</a></dt>
<dd><p>List of all the schematic parts as Part objects.</p>
</dd></dl>
<dl class="attribute">
<dt id="skidl.Circuit.Circuit.nets">
<code class="descname">nets</code><a class="headerlink" href="#skidl.Circuit.Circuit.nets" title="Permalink to this definition">¶</a></dt>
<dd><p>List of all the schematic nets as Net objects.</p>
</dd></dl>
<dl class="attribute">
<dt id="skidl.Circuit.Circuit.buses">
<code class="descname">buses</code><a class="headerlink" href="#skidl.Circuit.Circuit.buses" title="Permalink to this definition">¶</a></dt>
<dd><p>List of all the buses as Bus objects.</p>
</dd></dl>
<dl class="attribute">
<dt id="skidl.Circuit.Circuit.hierarchy">
<code class="descname">hierarchy</code><a class="headerlink" href="#skidl.Circuit.Circuit.hierarchy" title="Permalink to this definition">¶</a></dt>
<dd><p>A ‘.’-separated concatenation of the names of nested
SubCircuits at the current time it is read.</p>
</dd></dl>
<dl class="attribute">
<dt id="skidl.Circuit.Circuit.level">
<code class="descname">level</code><a class="headerlink" href="#skidl.Circuit.Circuit.level" title="Permalink to this definition">¶</a></dt>
<dd><p>The current level in the schematic hierarchy.</p>
</dd></dl>
<dl class="attribute">
<dt id="skidl.Circuit.Circuit.context">
<code class="descname">context</code><a class="headerlink" href="#skidl.Circuit.Circuit.context" title="Permalink to this definition">¶</a></dt>
<dd><p>Stack of contexts for each level in the hierarchy.</p>
</dd></dl>
<dl class="attribute">
<dt id="skidl.Circuit.Circuit.erc_list">
<code class="descname">erc_list</code><em class="property"> = [<function dflt_circuit_erc>]</em><a class="headerlink" href="#skidl.Circuit.Circuit.erc_list" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.reset">
<code class="descname">reset</code><span class="sig-paren">(</span><em>init=False</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.reset" title="Permalink to this definition">¶</a></dt>
<dd><p>Clear any circuitry and cached part libraries and start over.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.mini_reset">
<code class="descname">mini_reset</code><span class="sig-paren">(</span><em>init=False</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.mini_reset" title="Permalink to this definition">¶</a></dt>
<dd><p>Clear any circuitry but don’t erase any loaded part libraries.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.add_parts">
<code class="descname">add_parts</code><span class="sig-paren">(</span><em>*parts</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.add_parts" title="Permalink to this definition">¶</a></dt>
<dd><p>Add some Part objects to the circuit.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.rmv_parts">
<code class="descname">rmv_parts</code><span class="sig-paren">(</span><em>*parts</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.rmv_parts" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove some Part objects from the circuit.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.add_nets">
<code class="descname">add_nets</code><span class="sig-paren">(</span><em>*nets</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.add_nets" title="Permalink to this definition">¶</a></dt>
<dd><p>Add some Net objects to the circuit. Assign a net name if necessary.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.rmv_nets">
<code class="descname">rmv_nets</code><span class="sig-paren">(</span><em>*nets</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.rmv_nets" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove some Net objects from the circuit.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.add_buses">
<code class="descname">add_buses</code><span class="sig-paren">(</span><em>*buses</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.add_buses" title="Permalink to this definition">¶</a></dt>
<dd><p>Add some Bus objects to the circuit. Assign a bus name if necessary.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.rmv_buses">
<code class="descname">rmv_buses</code><span class="sig-paren">(</span><em>*buses</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.rmv_buses" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove some buses from the circuit.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.add_stuff">
<code class="descname">add_stuff</code><span class="sig-paren">(</span><em>*stuff</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.add_stuff" title="Permalink to this definition">¶</a></dt>
<dd><p>Add Parts, Nets, Buses, and Interfaces to the circuit.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.rmv_stuff">
<code class="descname">rmv_stuff</code><span class="sig-paren">(</span><em>*stuff</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.rmv_stuff" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove Parts, Nets, Buses, and Interfaces from the circuit.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.__iadd__">
<code class="descname">__iadd__</code><span class="sig-paren">(</span><em>*stuff</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.__iadd__" title="Permalink to this definition">¶</a></dt>
<dd><p>Add Parts, Nets, Buses, and Interfaces to the circuit.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.__isub__">
<code class="descname">__isub__</code><span class="sig-paren">(</span><em>*stuff</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.__isub__" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove Parts, Nets, Buses, and Interfaces from the circuit.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.get_nets">
<code class="descname">get_nets</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.get_nets" title="Permalink to this definition">¶</a></dt>
<dd><p>Get all the distinct nets for the circuit.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.ERC">
<code class="descname">ERC</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.ERC" title="Permalink to this definition">¶</a></dt>
<dd><p>Run class-wide and local ERC functions on this circuit.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit._merge_net_names">
<code class="descname">_merge_net_names</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit._merge_net_names" title="Permalink to this definition">¶</a></dt>
<dd><p>Select a single name for each multi-segment net.</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.generate_netlist">
<code class="descname">generate_netlist</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.generate_netlist" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a netlist and also write it to a file/stream.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>file</strong> – Either a file object that can be written to, or a string
containing a file name, or None.</p></li>
<li><p><strong>tool</strong> – The EDA tool the netlist will be generated for.</p></li>
<li><p><strong>do_backup</strong> – If true, create a library with all the parts in the circuit.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A netlist.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.generate_xml">
<code class="descname">generate_xml</code><span class="sig-paren">(</span><em>file_=None</em>, <em>tool=None</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.generate_xml" title="Permalink to this definition">¶</a></dt>
<dd><p>Return netlist as an XML string and also write it to a file/stream.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>file</strong> – Either a file object that can be written to, or a string
containing a file name, or None.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A string containing the netlist.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.generate_graph">
<code class="descname">generate_graph</code><span class="sig-paren">(</span><em>file_=None, engine='neato', rankdir='LR', part_shape='rectangle', net_shape='point', splines=None, show_values=True, show_anon=False, split_nets=['GND'], split_parts_ref=[]</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.generate_graph" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a graphviz graph as graphviz object and can also write it to a file/stream.
When used in ipython the graphviz object will drawn as an SVG in the output.</p>
<p>See <a class="reference external" href="https://graphviz.readthedocs.io/en/stable/">https://graphviz.readthedocs.io/en/stable/</a> and <a class="reference external" href="http://graphviz.org/doc/info/attrs.html">http://graphviz.org/doc/info/attrs.html</a></p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>file</strong> – A string containing a file name, or None.</p></li>
<li><p><strong>engine</strong> – See graphviz documentation</p></li>
<li><p><strong>rankdir</strong> – See graphviz documentation</p></li>
<li><p><strong>part_shape</strong> – Shape of the part nodes</p></li>
<li><p><strong>net_shape</strong> – Shape of the net nodes</p></li>
<li><p><strong>splines</strong> – Style for the edges, try ‘ortho’ for a schematic like feel</p></li>
<li><p><strong>show_values</strong> – Show values as external labels on part nodes</p></li>
<li><p><strong>show_anon</strong> – Show anonymous net names</p></li>
<li><p><strong>split_nets</strong> – splits up the plot for the given list of net names</p></li>
<li><p><strong>split_parts_ref</strong> – splits up the plot for all pins for the given list of part refs</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>graphviz.Digraph</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit.backup_parts">
<code class="descname">backup_parts</code><span class="sig-paren">(</span><em>file_=None</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit.backup_parts" title="Permalink to this definition">¶</a></dt>
<dd><p>Saves parts in circuit as a SKiDL library in a file.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>file</strong> – Either a file object that can be written to, or a string
containing a file name, or None. If None, a standard library
file will be used.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Nothing.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit._gen_netlist_kicad">
<code class="descname">_gen_netlist_kicad</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit._gen_netlist_kicad" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit._gen_netlist_spice">
<code class="descname">_gen_netlist_spice</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit._gen_netlist_spice" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a PySpice Circuit generated from a SKiDL circuit.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>title</strong> – String containing the title for the PySpice circuit.</p></li>
<li><p><strong>libs</strong> – String or list of strings containing the paths to directories
containing SPICE models.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="skidl.Circuit.Circuit._gen_xml_kicad">
<code class="descname">_gen_xml_kicad</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.Circuit._gen_xml_kicad" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="skidl.Circuit.SubCircuit">
<code class="descclassname">skidl.Circuit.</code><code class="descname">SubCircuit</code><span class="sig-paren">(</span><em>f</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.SubCircuit" title="Permalink to this definition">¶</a></dt>
<dd><p>A @SubCircuit decorator is used to create hierarchical circuits.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>f</strong> – The function containing SKiDL statements that represents a subcircuit.</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="skidl.Circuit.subcircuit">
<code class="descclassname">skidl.Circuit.</code><code class="descname">subcircuit</code><span class="sig-paren">(</span><em>f</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Circuit.subcircuit" title="Permalink to this definition">¶</a></dt>
<dd><p>A @SubCircuit decorator is used to create hierarchical circuits.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>f</strong> – The function containing SKiDL statements that represents a subcircuit.</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-skidl.Interface">
<span id="skidl-interface-module"></span><h4>skidl.Interface module<a class="headerlink" href="#module-skidl.Interface" title="Permalink to this headline">¶</a></h4>
<p>Handles interfaces for subsystems with complicated I/O.</p>
<dl class="class">
<dt id="skidl.Interface.Interface">
<em class="property">class </em><code class="descclassname">skidl.Interface.</code><code class="descname">Interface</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Interface.Interface" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>An Interface bundles a group of nets/buses into a single entity with each
net/bus becoming an attribute.</p>
<dl class="method">
<dt id="skidl.Interface.Interface.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Interface.Interface.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-skidl.Net">
<span id="skidl-net-module"></span><h4>skidl.Net module<a class="headerlink" href="#module-skidl.Net" title="Permalink to this headline">¶</a></h4>
<p>Handles nets.</p>
<dl class="class">
<dt id="skidl.Net.Traversal">
<em class="property">class </em><code class="descclassname">skidl.Net.</code><code class="descname">Traversal</code><span class="sig-paren">(</span><em>nets</em>, <em>pins</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Net.Traversal" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></p>
<p>Create new instance of Traversal(nets, pins)</p>
<dl class="method">
<dt id="skidl.Net.Traversal.__getnewargs__">
<code class="descname">__getnewargs__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Net.Traversal.__getnewargs__" title="Permalink to this definition">¶</a></dt>
<dd><p>Return self as a plain tuple. Used by copy and pickle.</p>
</dd></dl>
<dl class="staticmethod">
<dt id="skidl.Net.Traversal.__new__">
<em class="property">static </em><code class="descname">__new__</code><span class="sig-paren">(</span><em>_cls</em>, <em>nets</em>, <em>pins</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Net.Traversal.__new__" title="Permalink to this definition">¶</a></dt>
<dd><p>Create new instance of Traversal(nets, pins)</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Net.Traversal.__repr__">
<code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Net.Traversal.__repr__" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a nicely formatted representation string</p>
</dd></dl>
<dl class="attribute">
<dt id="skidl.Net.Traversal.__slots__">
<code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#skidl.Net.Traversal.__slots__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skidl.Net.Traversal._asdict">
<code class="descname">_asdict</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Net.Traversal._asdict" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a new OrderedDict which maps field names to their values.</p>
</dd></dl>
<dl class="attribute">
<dt id="skidl.Net.Traversal._field_defaults">
<code class="descname">_field_defaults</code><em class="property"> = {}</em><a class="headerlink" href="#skidl.Net.Traversal._field_defaults" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skidl.Net.Traversal._fields">
<code class="descname">_fields</code><em class="property"> = ('nets', 'pins')</em><a class="headerlink" href="#skidl.Net.Traversal._fields" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skidl.Net.Traversal._fields_defaults">
<code class="descname">_fields_defaults</code><em class="property"> = {}</em><a class="headerlink" href="#skidl.Net.Traversal._fields_defaults" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="classmethod">
<dt id="skidl.Net.Traversal._make">
<em class="property">classmethod </em><code class="descname">_make</code><span class="sig-paren">(</span><em>iterable</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Net.Traversal._make" title="Permalink to this definition">¶</a></dt>
<dd><p>Make a new Traversal object from a sequence or iterable</p>
</dd></dl>
<dl class="method">
<dt id="skidl.Net.Traversal._replace">
<code class="descname">_replace</code><span class="sig-paren">(</span><em>**kwds</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Net.Traversal._replace" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a new Traversal object replacing specified fields with new values</p>
</dd></dl>
<dl class="attribute">
<dt id="skidl.Net.Traversal.nets">
<code class="descname">nets</code><a class="headerlink" href="#skidl.Net.Traversal.nets" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for field number 0</p>
</dd></dl>
<dl class="attribute">
<dt id="skidl.Net.Traversal.pins">
<code class="descname">pins</code><a class="headerlink" href="#skidl.Net.Traversal.pins" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for field number 1</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="skidl.Net.Net">
<em class="property">class </em><code class="descclassname">skidl.Net.</code><code class="descname">Net</code><span class="sig-paren">(</span><em>name=None</em>, <em>circuit=None</em>, <em>*pins_nets_buses</em>, <em>**attribs</em><span class="sig-paren">)</span><a class="headerlink" href="#skidl.Net.Net" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#skidl.baseobj.SkidlBaseObject" title="skidl.baseobj.SkidlBaseObject"><code class="xref py py-class docutils literal notranslate"><span class="pre">skidl.baseobj.SkidlBaseObject</span></code></a></p>
<p>Lists of connected pins are stored as nets using this class.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>name</strong> – A string with the name of the net. If None or ‘’, then
a unique net name will be assigned.</p></li>
<li><p><strong>circuit</strong> – The Circuit object this net belongs to.</p></li>
<li><p><strong>*pins_nets_buses</strong> – One or more Pin, Net, or Bus objects or
lists/tuples of them to be connected to this net.</p></li>
</ul>
</dd>
<dt class="field-even">Keyword Arguments</dt>
<dd class="field-even"><p><strong>attribs</strong> – A dictionary of attributes and values to attach to
the Net object.</p>
</dd>
</dl>