1GENLIB_WIRE3.3(October 1, 1997) GENLIB_WIRE3.3(October 1, 1997)
2
3
4
6 GENLIB_WIRE3 - place three physical segments in the current figure
7
9 #include <genlib.h>
10 void GENLIB_WIRE3(layer, width, ins1, con1, index1, ins2, con2, index2, x1, y1, x2, y2)
11 char layer;
12 long width;
13 char ∗ins1, ∗con1, ∗ins2, ∗con2;
14 long x1, y1, x2, y2;
15
17 layer Layout layer of the segment
18
19 width Width of the segment
20
21 ins1 Name of the instance in which the connector con1 is
22 to be looked for
23
24 con1 Name of a connector, or reference, used as first
25 endpoint of the wire
26
27 ins2 Name of the instance in which the connector con2 is
28 to be looked for
29
30 con2 Name of a connector, or reference, used as last
31 endpoint of the wire
32
33 x1, y1 Coordinates of the segment's first elbow endpoint
34 in the current figure
35
36 x2, y2 Coordinates of the segment's second elbow endpoint
37 in the current figure
38
40 WIRE3 adds three segments made of the layer level in the current layout
41 cell, the starting point being the connector, or reference, con1 of the
42 instance ins1, and the ending point being the connector, or reference,
43 con2 of the instance ins1. The first segment is drawn between the coor‐
44 dinates of con1 in the current figure and x1, y1. The second one
45 between x1, y1 and x2, y2, and the last, but not the least, between x2,
46 y2 and the coordinates of con2 in the current figure.
47
48 If the endpoints are connectors, the indexes index1 and index2 must
49 respectivly refer to con1 and con2. If they are references, then they
50 are not taked care of. One shall notice that connectors and references
51 of a given model should not share names if WIRE3 is to be used.
52
53 The layer argument can take the following legal values :
54
55 NWELL
56
57 PWELL
58
59 NTIE
60
61 PTIE
62
63 NDIF
64
65 PDIF
66
67 NTRANS
68
69 PTRANS
70
71 POLY
72
73 ALU1
74
75 ALU2
76
77 ALU3
78
79 TPOLY
80
81 TALU1
82
83 TALU2
84
85 TALU3
86
88 "GENLIB_WIRE3 impossible : missing GENLIB_DEF_PHFIG"
89 No figure has been yet specified by a call to DEF_PHFIG. So it
90 isn't possible to place an instance inside it. you must call
91 DEF_PHFIG before any other layout action.
92 "illegal addphseg : x1, y1, x2, y2"
93 A symbolic segment must be either vertical or horizontal, so
94 either x1 = x2, or y1 = y2. Since WIRE3 creates segments from
95 relative coordinates, care must be taken to follow the previous
96 rule.
97 "GENLIB_WIRE3 impossible : same name conX, for connector and reference
98 in insX"
99 The model of the instance insX has both a connector and a refer‐
100 ence that matches the conX name. This is not legal since genlib
101 doesn't know which one to choose as point.
102 "illegal getphins : instance insX does not exist"
103 The instance called insX does not currently belong to the fig‐
104 ure.
105
107 #include <genlib.h>
108 draw_wire(cellHeight)
109 long cellHeight;
110 {
111 /* draw a wire made of 1, 2, or 3 segments, given from and to connectors
112 or reference, and the x and y coordinates of each elbow points */
113 GENLIB_WIRE1(ALU1,1,"lastpg2","g2",1,"cabl31","sg",2);
114 GENLIB_WIRE3(ALU1,1,"cabl31","sp",2, "celout2", "cin", 1,
115 GENLIB_GET_CON_X("cabl31","sp",2),
116 GENLIB_GET_CON_Y("cabl31","sp",2) + cellHeight / 2,
117 GENLIB_GET_CON_X("celout2", "cin", 1),
118 GENLIB_GET_CON_Y("cabl31","sp",2) + cellHeight / 2);
119 GENLIB_WIRE1(POLY,1,"celout3","g",1,"celout2","co",0);
120 }
121
123 genlib(1), GENLIB_DEF_PHFIG(3), GENLIB_SAVE_PHFIG(3), GEN‐
124 LIB_COPY_UP_SEG(3), GENLIB_PHSEG(3), GENLIB_THRU_H(3), GEN‐
125 LIB_THRU_CON_H(3), GENLIB_THRU_V(3), GENLIB_THRU_CON_V(3), GEN‐
126 LIB_WIRE1(3), GENLIB_WIRE2(3).
127
128
129
130
131
132
133PROCEDURAL GENERATION LANGUAGE ASIM/LIP6 GENLIB_WIRE3.3(October 1, 1997)