1ADDLOCAP(3) MBK LOGICAL FUNCTIONS ADDLOCAP(3)
2
3
4
6 addlocap - create a logical capacitor
7
9 #include "mlo.h"
10
11 locap_list ∗addlocap(ptfig,type,capa,tcon,bcon,name)
12 lofig_list ∗ptfig ;
13 char type ;
14 double capa ;
15 losig_list ∗tcon, ∗bcon ;
16 const char ∗name ;
17
19 ptfig Pointer to the figure in which the capacitor should
20 be added
21
22 type Capacitor type
23
24 capa Capacitance value in Farads
25
26 tcon Pointer to the signal to be connected on the capac‐
27 itor top plate
28
29 bcon Pointer to the signal to be connected on the capac‐
30 itor bottom plate
31
32 name Capacitor instance name
33
35 addlocap creates a new capacitor, and adds it to the list of capacitors
36 pointed to by ptfig -> LOCAP. The new capacitor is added in front of
37 the list, and becomes itself the list head.
38 The type parameter can take two values :
39
40 CAPMIM for a metal/metal capacitor (the top plate
41 and the bottom plate layers are different
42 metal layers)
43
44 CAPPNWELL for a POLY/NWELL capacitor (if available in
45 the technology). The top plate layer is
46 POLY, bottom plate is NWELL.
47
48 The capa argument is the capacitance value in Farads.
49 Two connectors are created each time a capacitor is added, and the tcon
50 and bcon losigs are attached to the SIG field of the locon of the
51 appropriate connector. The connectors names are tcon (top plate) and
52 bcon (bottom plate); their direction, DIR, are set to 'P', and their
53 TYPE INTERNAL. For details on the structures, see locon(3) and
54 locap(3).
55
57 addlocap returns a pointer to the newly created capacitor.
58
60 "∗∗∗ mbk error ∗∗∗ illegal capacitor type : type"
61 The type is not a legal capacitor type.
62
64 #include "mlo.h"
65
66 void parallel_capacitors(void) /∗ netlist of two parallel capacitors ∗/
67 {
68 lofig_list ∗pt = NULL ;
69 losig_list ∗in = NULL ;
70 losig_list ∗out = NULL ;
71
72 pt = addlofig("parallel_capacitors") ;
73 addlocon(pt,"in",in = givelosig(pt,0),IN) ;
74 addlocon(pt,"out",out = givelosig(pt,1),OUT) ;
75
76 addlocap(pt,CAPMIM,0.5e-6,in,out,"cap1") ;
77 addlocap(pt,CAPMIM,0.5e-6,in,out,"cap2") ;
78 }
79
81 mbk(1), lofig(3), locap(3), locon(3), dellocap(3).
82
83
84
85
86
87
88ASIM/LIP6 August 14, 2002 ADDLOCAP(3)