1ADDLOTRS(3) MBK LOGICAL FUNCTIONS ADDLOTRS(3)
2
3
4
6 addlotrs - create a logical transistor
7
9 #include "mlo.h"
10 lotrs_list ∗addlotrs(ptfig, type, x, y, width, length,
11 ps, pd, xs, xd,
12 ptgrid, ptsource, ptdrain, ptbulk, name)
13 lofig_list ∗ptfig;
14 char type;
15 long x, y;
16 unsigned short width, length;
17 unsigned short ps, pd;
18 unsigned short xs, xd;
19 losig_list ∗ptgrid, ∗ptsource, ∗ptdrain, ∗ptbulk;
20 const char ∗name;
21
23 ptfig Pointer to the figure in which the transistor
24 should be added
25
26 type transistor type
27
28 x, y Transistor coordinates
29
30 width, length Transistor grid width and length
31
32 ps, pd Perimeters of the source and drain
33
34 xs, xd Values to compute the areas of the source and
35 drain, see lotrs(3) for the effective area computa‐
36 tion
37
38 ptgrid Pointer to the signal to be connected on the tran‐
39 sistor grid
40
41 ptsource Pointer to the signal to be connected on the tran‐
42 sistor source
43
44 ptdrain Pointer to the signal to be connected on the tran‐
45 sistor drain
46
47 ptbulk Pointer to the signal to be connected on the tran‐
48 sistor bulk
49
50 name Transistor instance name
51
53 addlotrs creates a new transistor, and adds it to the list of transis‐
54 tors pointed to by ptfig->LOTRS. The new transistor is added in front
55 of the list, and becomes itself the list head.
56 The type parameter can take six values :
57
58 TRANSN for a N channel transistor
59
60 TRANSP for a P channel transistor
61
62 TRANSN_FAST for a high speed N channel transistor
63
64 TRANSP_FAST for a high speed P channel transistor
65
66 TRANSN_HVIO for a low leakage N channel transistor
67
68 TRANSP_HVIO for a low leakage P channel transistor
69
70 The x, y, width , length, ps, pd, xs and xd, arguments fill respec‐
71 tivly the X, Y, WIDTH, LENGTH, PS, PD, XS and XD fields.
72 Four connectors are created each time a transistor is added, and the
73 ptgrid, ptsource, ptdrain and ptbulk losigs are attached to the SIG
74 field of the locon of the appropriate connector. The connectors names
75 are grid, source, drain and bulk, their direction, DIR, are set to 'T',
76 and their TYPE INTERNAL. For details on the structures, see locon(3)
77 and lotrs(3).
78
80 addlotrs returns a pointer to the newly created transistor.
81
83 "∗∗∗ mbk error ∗∗∗ illegal transistor type : type"
84 The type is not a legal transistor type.
85
87 #include "mlo.h"
88 void n1_y() /∗ transistor netlist of an inverter ∗/
89 {
90 lofig_list ∗pt;
91 losig_list ∗in, ∗out, ∗vdd, ∗vss;
92 pt = addlofig("n1_y");
93 addlocon(pt, "in", in = givelosig(pt, 0), IN);
94 addlocon(pt, "out", out = givelosig(pt, 1), OUT);
95 addlocon(pt, "vdd", vdd = givelosig(pt, 2), IN);
96 addlocon(pt, "vss", vdd = givelosig(pt, 3), IN);
97 addlotrs(pt, TRANSN, 0, 0, 6, 1, in, vss, out, vss, trn_n1_y);
98 addlotrs(pt, TRANSP, 0, 0, 12, 1, in, vdd, out, vdd, trp_n1_y);
99 }
100
102 mbk(1), lofig(3), lotrs(3), locon(3), dellotrs(3).
103
104
105
106
107
108
109ASIM/LIP6 August 6, 2002 ADDLOTRS(3)