~ubuntu-branches/ubuntu/jaunty/electric/jaunty

« back to all changes in this revision

Viewing changes to src/include/sc1.h

  • Committer: Bazaar Package Importer
  • Author(s): Onkar Shinde
  • Date: 2009-01-08 02:05:08 UTC
  • mfrom: (1.3.1 upstream) (3.1.3 sid)
  • mto: (3.1.4 sid)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: james.westby@ubuntu.com-20090108020508-3e7e6241i7bkit2l
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Electric(tm) VLSI Design System
3
 
 *
4
 
 * File: sc1.h
5
 
 * Header file for the QUISC Silicon Compiler
6
 
 * Written by: Andrew R. Kostiuk, Queen's University
7
 
 *
8
 
 * Copyright (c) 2000 Static Free Software.
9
 
 *
10
 
 * Electric(tm) is free software; you can redistribute it and/or modify
11
 
 * it under the terms of the GNU General Public License as published by
12
 
 * the Free Software Foundation; either version 2 of the License, or
13
 
 * (at your option) any later version.
14
 
 *
15
 
 * Electric(tm) is distributed in the hope that it will be useful,
16
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 
 * GNU General Public License for more details.
19
 
 *
20
 
 * You should have received a copy of the GNU General Public License
21
 
 * along with Electric(tm); see the file COPYING.  If not, write to
22
 
 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
23
 
 * Boston, Mass 02111-1307, USA.
24
 
 *
25
 
 * Static Free Software
26
 
 * 4119 Alpine Road
27
 
 * Portola Valley, California 94028
28
 
 * info@staticfreesoft.com
29
 
 */
30
 
 
31
 
#if defined(__cplusplus) && !defined(ALLCPLUSPLUS)
32
 
extern "C"
33
 
{
34
 
#endif
35
 
 
36
 
/***********************************************************************
37
 
        General Constants
38
 
------------------------------------------------------------------------
39
 
*/
40
 
#define VERSION                 "1.00"
41
 
#define DATE                    "Feb 24, 1987"
42
 
#define PARS                    10
43
 
#define MAXLINE         80
44
 
#define GND                             0
45
 
#define PWR                             1
46
 
#define SCSIMFILE       "simset.tmp"
47
 
 
48
 
/***********************************************************************
49
 
        Error Codes
50
 
------------------------------------------------------------------------
51
 
*/
52
 
 
53
 
#define SC_NOERROR                                      0
54
 
#define SC_UNKNOWN                                      1
55
 
#define SC_NCREATE                                      2
56
 
#define SC_NCREATECELL                          3
57
 
#define SC_CELLEXISTS                           4
58
 
#define SC_CELLNOMAKE                           5
59
 
#define SC_XCREATE                                      6
60
 
#define SC_NLIBRARY                                     7
61
 
#define SC_XLIBRARY                                     8
62
 
#define SC_NLIBRARYUSE                          9
63
 
#define SC_NOLIBRARY                            10
64
 
#define SC_NLIBRARYREAD                         11
65
 
#define SC_LIBNOMAKE                            12
66
 
#define SC_NOMEMORY                                     13
67
 
#define SC_LIBNSTYLE                            14
68
 
#define SC_LIBNOREAD                            15
69
 
#define SC_CRNODENONAME                         16
70
 
#define SC_CRNODENOPROTO                        17
71
 
#define SC_CRNODENOLIB                          18
72
 
#define SC_CRNODEPROTONF                        19
73
 
#define SC_NOCELL                                       20
74
 
#define SC_CRNODENOMAKE                         21
75
 
#define SC_NODENAMENOMAKE                       22
76
 
#define SC_NIEXISTS                                     23
77
 
#define SC_NSHOW                                        24
78
 
#define SC_XSHOW                                        25
79
 
#define SC_SHOWPNOCELL                          26
80
 
#define SC_CELLNOFIND                           27
81
 
#define SC_NCONNECT                                     28
82
 
#define SC_PORTNFIND                            29
83
 
#define SC_NOUARC                                       30
84
 
#define SC_ARCNOMAKE                            31
85
 
#define SC_COMPNFILE                            32
86
 
#define SC_COMPFILENOPEN                        33
87
 
#define SC_XCONLIST                                     34
88
 
#define SC_NPERR                                        35
89
 
#define SC_EDGEERROR                            36
90
 
#define SC_SIMNPARS                                     37
91
 
#define SC_SIMXCMD                                      38
92
 
#define SC_SIMSETNPARS                          39
93
 
#define SC_SIMXSETVAL                           40
94
 
#define SC_SIMSHOWNPARS                         41
95
 
#define SC_SIMNOVAR                                     42
96
 
#define SC_NIVARNOMAKE                          43
97
 
#define SC_SIMWRITENPARS                        44
98
 
#define SC_SIMWRITEFOPEN                        45
99
 
#define SC_SCVARNOFIND                          46
100
 
#define SC_SETNCMD                                      47
101
 
#define SC_SETXCMD                                      48
102
 
#define SC_NPNOTFIND                            49
103
 
#define SC_PPNOTFIND                            50
104
 
#define SC_SETXPORTDIR                          51
105
 
#define SC_EXPORTNONODE                         52
106
 
#define SC_EXPORTNODENOFIND                     53
107
 
#define SC_EXPORTNOPORT                         54
108
 
#define SC_EXPORTPORTNOFIND                     55
109
 
#define SC_EXPORTXPORTTYPE                      56
110
 
#define SC_EXPORTNONAME                         57
111
 
#define SC_EXPORTNAMENOTUNIQUE          58
112
 
#define SC_SIMSETFERROR                         59
113
 
#define SC_COMPVHDLERR                          60
114
 
#define SC_NINOFIND                                     61
115
 
#define SC_ORDERNPARS                           62
116
 
#define SC_SELECTNCMD                           63
117
 
#define SC_SELECT_CELL_NONAME           64
118
 
#define SC_SELECT_XCMD                          65
119
 
#define SC_SET_OUTPUT_FILE_XOPEN        66
120
 
#define SC_PLACE_NO_CONNECTIONS         67
121
 
#define SC_PLACE_XCMD                           68
122
 
#define SC_PLACE_SET_NOCMD                      69
123
 
#define SC_PLACE_SET_XCMD                       70
124
 
#define SC_CELL_NO_PLACE                        71
125
 
#define SC_ROUTE_XCMD                           72
126
 
#define SC_ROUTE_SET_XCMD                       73
127
 
#define SC_ROUTE_SET_NOCMD                      74
128
 
#define SC_CELL_NO_ROUTE                        75
129
 
#define SC_MAKE_XCMD                            76
130
 
#define SC_MAKE_SET_NOCMD                       77
131
 
#define SC_MAKE_SET_XCMD                        78
132
 
#define SC_MAKER_NOCREATE_LEAF_CELL     79
133
 
#define SC_MAKER_NOCREATE_LEAF_INST     80
134
 
#define SC_MAKER_NOCREATE_LEAF_FEED     81
135
 
#define SC_MAKER_NOCREATE_VIA           82
136
 
#define SC_MAKER_NOCREATE_LAYER2        83
137
 
#define SC_MAKER_NOCREATE_LAYER1        84
138
 
#define SC_MAKER_NOCREATE_XPORT         85
139
 
#define SC_NOSET_CELL_NUMS                      86
140
 
#define SC_SET_CNUMS_XOPT                       87
141
 
#define SC_NO_LAYER1_NODE                       88
142
 
#define SC_NO_LAYER2_NODE                       89
143
 
#define SC_NO_VIA                                       90
144
 
#define SC_NO_LAYER1_ARC                        91
145
 
#define SC_NO_LAYER2_ARC                        92
146
 
#define SC_NO_LAYER_PWELL                       93
147
 
#define SC_NOCREATE_PWELL                       94
148
 
#define SC_NO_ALS                                       95
149
 
#define SC_NO_VHDL_PROG                         96
150
 
#define SC_ORDER_XOPEN_FILE                     97
151
 
#define SC_VERIFY_NO_CELLS                      98
152
 
#define SC_SET_NAME_NO_PARS                     99
153
 
#define SC_SET_NAME_INST_NO_FIND        100
154
 
#define SC_SET_NAME_PORT_NO_FIND        101
155
 
#define SC_SET_NAME_NO_NODE                     102
156
 
 
157
 
/***********************************************************************
158
 
    Savable Parameters
159
 
------------------------------------------------------------------------
160
 
*/
161
 
#define SC_PARAM_MAKE_HORIZ_ARC          1
162
 
#define SC_PARAM_MAKE_VERT_ARC           2
163
 
#define SC_PARAM_MAKE_L1_WIDTH           3
164
 
#define SC_PARAM_MAKE_L2_WIDTH           4
165
 
#define SC_PARAM_MAKE_PWR_WIDTH          5
166
 
#define SC_PARAM_MAKE_MAIN_PWR_WIDTH     6
167
 
#define SC_PARAM_MAKE_MAIN_PWR_RAIL      7
168
 
#define SC_PARAM_MAKE_PWELL_SIZE         8
169
 
#define SC_PARAM_MAKE_PWELL_OFFSET       9
170
 
#define SC_PARAM_MAKE_NWELL_SIZE        10
171
 
#define SC_PARAM_MAKE_NWELL_OFFSET      11
172
 
#define SC_PARAM_MAKE_VIA_SIZE          12
173
 
#define SC_PARAM_MAKE_MIN_SPACING       13
174
 
#define SC_PARAM_ROUTE_FEEDTHRU_SIZE    14
175
 
#define SC_PARAM_ROUTE_PORT_X_MIN_DIST  15
176
 
#define SC_PARAM_ROUTE_ACTIVE_DIST      16
177
 
#define SC_PARAM_PLACE_NUM_ROWS         17
178
 
 
179
 
/* default values for maker */
180
 
#define DEFAULT_MIN_SPACING                     2400            /* minimum metal spacing */
181
 
#define DEFAULT_VIA_SIZE                        1600            /* VIA size */
182
 
#define DEFAULT_ARC_HORIZONTAL          NOARCPROTO      /* arc name on layer 1 */
183
 
#define DEFAULT_ARC_VERTICAL            NOARCPROTO      /* arc name on layer 2 */
184
 
#define DEFAULT_L2_TRACK_WIDTH          1600            /* layer 2 track width */
185
 
#define DEFAULT_L1_TRACK_WIDTH          1600            /* layer 1 track width */
186
 
#define DEFAULT_POWER_TRACK_WIDTH       2000            /* power track width */
187
 
#define DEFAULT_MAIN_POWER_WIDTH        3200            /* main power buses width */
188
 
#define DEFAULT_MAIN_POWER_RAIL     0                   /* main power on horizontal */
189
 
#define DEFAULT_PWELL_SIZE                      0                       /* P-well size */
190
 
#define DEFAULT_PWELL_OFFSET            0                       /* P-well offset from bottom */
191
 
#define DEFAULT_NWELL_SIZE                      0                       /* N-well size */
192
 
#define DEFAULT_NWELL_OFFSET            0                       /* N-well offset from bottom */
193
 
 
194
 
/* default values for router */
195
 
#define DEFAULT_FEED_THROUGH_SIZE       6400    /* feed through size */
196
 
#define DEFAULT_PORT_X_MIN_DISTANCE     3200    /* min distance between ports*/
197
 
#define DEFAULT_ACTIVE_DISTANCE         3200    /* minimum distance to active*/
198
 
 
199
 
/* default values for placer */
200
 
#define DEFAULT_NUM_OF_ROWS                     4       /* default number of rows */
201
 
 
202
 
/***********************************************************************
203
 
        QUISC Cell Structure
204
 
------------------------------------------------------------------------
205
 
*/
206
 
 
207
 
typedef struct Isccell
208
 
{
209
 
        char              *name;                        /* name of complex cell */
210
 
        int                max_node_num;        /* maximum number of nodes */
211
 
        struct Iscnitree  *niroot;                      /* root to instance tree for cell */
212
 
        struct Iscnitree  *nilist;                      /* list of instances for cell */
213
 
        struct Iscsim     *siminfo;                     /* simulation information */
214
 
        struct Iscextnode *ex_nodes;            /* extracted nodes */
215
 
        int                bits;                        /* flags for processing cell */
216
 
        struct Iscextnode *power;                       /* list of power ports */
217
 
        struct Iscextnode *ground;                      /* list of ground ports */
218
 
        struct Iscport    *ports, *lastport; /* list of ports */
219
 
        struct Iscplace   *placement;           /* placement information of cell */
220
 
        struct Iscroute   *route;                       /* routing information for cell */
221
 
        struct Isccell    *next;                        /* list of SC cells */
222
 
} SCCELL;
223
 
 
224
 
typedef struct Iscport
225
 
{
226
 
        char             *name;                         /* name of port */
227
 
        struct Iscnitree *node;                         /* special node */
228
 
        struct Isccell   *parent;                       /* complex cell on which */
229
 
                                                                                /* this port resides */
230
 
        int               bits;                         /* port attributes */
231
 
        struct Iscport   *next;                         /* pointer to next port */
232
 
} SCPORT;
233
 
 
234
 
typedef struct Isccellnums
235
 
{
236
 
        int                     top_active;                     /* active area from top */
237
 
        int                     bottom_active;          /* active are from bottom */
238
 
        int                     left_active;            /* active area from left */
239
 
        int                     right_active;           /* active are from right */
240
 
} SCCELLNUMS;
241
 
 
242
 
/***********************************************************************
243
 
        Instance Tree Structure
244
 
------------------------------------------------------------------------
245
 
*/
246
 
 
247
 
/***** Types of Instances *****/
248
 
#define SCLEAFCELL     0
249
 
#define SCCOMPLEXCELL  1
250
 
#define SCSPECIALCELL  2
251
 
#define SCFEEDCELL     3
252
 
#define SCSTITCH       4
253
 
#define SCLATERALFEED  5
254
 
 
255
 
typedef struct Iscnitree
256
 
{
257
 
        char                            *name;          /* pointer to string of instance name */
258
 
        int                                     number;         /* alternative number of node */
259
 
        int                                     type;           /* type of instance */
260
 
        char                            *np;            /* pointer to leaf cell */
261
 
                                                                        /* or SCCELL if complex */
262
 
        int                                     size;           /* x size if leaf cell */
263
 
        struct Iscconlist       *connect;       /* pointer to connection list */
264
 
        struct Iscniport        *ports;         /* list of io ports and ext nodes */
265
 
        struct Iscniport        *power;         /* list of actual power ports */
266
 
        struct Iscniport        *ground;        /* list of actual ground ports */
267
 
        int                                     flags;          /* bits for silicon compiler */
268
 
        char                            *tp;            /* generic temporary pointer */
269
 
        struct Iscnitree        *next;          /* pointer to next instance in list */
270
 
        struct Iscnitree        *lptr;          /* left pointer for tree structure */
271
 
        struct Iscnitree        *rptr;          /* right pointer for tree structure */
272
 
} SCNITREE;
273
 
 
274
 
typedef struct Iscniport
275
 
{
276
 
        char                            *port;          /* leaf port or */
277
 
                                                                        /* SCPORT if on complex cell */
278
 
        struct Iscextnode       *ext_node;      /* extracted node */
279
 
        int                                     bits;           /* bits for processing */
280
 
        int                                     xpos;           /* x position if leaf port */
281
 
        struct Iscniport        *next;          /* list of instance ports */
282
 
} SCNIPORT;
283
 
#define SCNIPORTSEEN    0x00000001
284
 
 
285
 
/***********************************************************************
286
 
        Connection Structures
287
 
------------------------------------------------------------------------
288
 
*/
289
 
 
290
 
typedef struct Iscconlist
291
 
{
292
 
        struct Iscniport        *portA;         /* pointer to port on node A */
293
 
        struct Iscnitree        *nodeB;         /* pointer to node B */
294
 
        struct Iscniport        *portB;         /* pointer to port on node B */
295
 
        struct Iscextnode       *ext_node;      /* pointer to extracted node */
296
 
        struct Iscconlist   *next;              /* pointer to next list element */
297
 
} SCCONLIST;
298
 
 
299
 
/***********************************************************************
300
 
        Extraction Structures
301
 
------------------------------------------------------------------------
302
 
*/
303
 
 
304
 
typedef struct Iscextport
305
 
{
306
 
        struct Iscnitree        *node;          /* instance of extracted node */
307
 
        struct Iscniport        *port;          /* instance port */
308
 
        struct Iscextport       *next;          /* next in list of common node */
309
 
} SCEXTPORT;
310
 
 
311
 
#define SCEXTNODECLUSE  0x0003
312
 
#define SCEXTNODEGROUP1 0x0001
313
 
#define SCEXTNODEGROUP2 0x0002
314
 
 
315
 
typedef struct Iscextnode
316
 
{
317
 
        char                            *name;          /* optional name of port */
318
 
        struct Iscextport       *firstport;     /* link list of ports */
319
 
        int                                     flags;          /* flags for processing */
320
 
        char                            *ptr;           /* generic pointer for processing */
321
 
        struct Iscextnode       *next;          /* link list of nodes */
322
 
} SCEXTNODE;
323
 
 
324
 
/***********************************************************************
325
 
        Simulation Structures
326
 
------------------------------------------------------------------------
327
 
*/
328
 
 
329
 
#define SCSIMWRITEBITS  0x00000003      /* flag bits for sim write */
330
 
#define SCSIMWRITENEED  0x00000001      /* needs to be written */
331
 
#define SCSIMWRITESEEN  0x00000002      /* has been written */
332
 
 
333
 
typedef struct Iscsim
334
 
{
335
 
        char            *model;
336
 
        struct Iscsim   *next;
337
 
} SCSIM;
338
 
 
339
 
/***********************************************************************
340
 
        Placement Structures and Constants
341
 
------------------------------------------------------------------------
342
 
*/
343
 
 
344
 
/***** general placement information *****/
345
 
typedef struct Iscplace
346
 
{
347
 
        int                                             num_inst;       /* number of instances */
348
 
        int                                             size_inst;      /* total size of instances */
349
 
        int                                             avg_size;       /* average size of inst */
350
 
        int                                             avg_height;     /* average height of inst */
351
 
        int                                             num_rows;       /* number of rows */
352
 
        int                                             size_rows;      /* target size of each row */
353
 
        struct Iscrowlist               *rows;          /* rows of placed cells */
354
 
        struct Iscnbplace               *plist;         /* start of cell list */
355
 
        struct Iscnbplace               *endlist;       /* end of cell list */
356
 
} SCPLACE;
357
 
 
358
 
typedef struct Iscplacecontrol
359
 
{
360
 
        int             stats_flag;                     /* TRUE = print statistics */
361
 
        int             sort_flag;                      /* TRUE = sort cluster tree */
362
 
        int             net_balance_flag;       /* TRUE = do net balance */
363
 
        int             net_balance_limit;      /* limit of movement */
364
 
        int             vertical_cost;          /* scaling factor */
365
 
} SCPLACECONTROL;
366
 
 
367
 
#define SCBITS_PLACEMASK        0x01
368
 
#define SCBITS_PLACED           0x01
369
 
#define SCBITS_EXTRACT          0x02
370
 
 
371
 
typedef struct Isccluster
372
 
{
373
 
        struct Iscnitree                *node;    /* instance of cluster */
374
 
        int                                             number;   /* number of cluster */
375
 
        int                                             size;     /* total size of members */
376
 
        struct Isccluster               *last;    /* pointer to last cluster */
377
 
        struct Isccluster               *next;    /* pointer to next cluster */
378
 
} SCCLUSTER;
379
 
 
380
 
typedef struct Iscclustertree
381
 
{
382
 
        struct Isccluster               *cluster; /* pointer to cluster */
383
 
                                                                                  /* NOSCCLUSTER if intermediate node*/
384
 
        int                                             bits;     /* working bits */
385
 
        struct Iscclustertree   *parent;  /* parent node */
386
 
        struct Iscclustertree   *next;    /* pointer to nodes on same level */
387
 
        struct Iscclustertree   *lptr;    /* pointer to one group */
388
 
        struct Iscclustertree   *rptr;    /* pointer to second group */
389
 
} SCCLUSTERTREE;
390
 
 
391
 
typedef struct Iscclconnect
392
 
{
393
 
        struct Iscclustertree   *node[2]; /* pointers to names of nodes */
394
 
        int                                             count;    /* number of connections */
395
 
        struct Iscclconnect             *next;    /* pointer to next list element */
396
 
        struct Iscclconnect             *last;    /* pointer to previous list element*/
397
 
} SCCLCONNECT;
398
 
 
399
 
typedef struct Iscrowlist
400
 
{
401
 
        struct Iscnbplace       *start;         /* start of row cells */
402
 
        struct Iscnbplace       *end;           /* end of row cells */
403
 
        int                                     row_num;        /* row number (0 = bottom) */
404
 
        int                                     row_size;       /* current row size */
405
 
        struct Iscrowlist       *next;          /* next in row list */
406
 
        struct Iscrowlist       *last;          /* last in row list */
407
 
} SCROWLIST;
408
 
 
409
 
#define NOSCNBPLACE     ((SCNBPLACE *)-1)
410
 
typedef struct Iscnbplace
411
 
{
412
 
        struct Iscnitree        *cell;          /* pointer to cell */
413
 
        int                                     xpos;           /* x position (0 at left) */
414
 
        struct Iscnbplace       *last;          /* pointer to last in list */
415
 
        struct Iscnbplace       *next;          /* pointer to right in list */
416
 
} SCNBPLACE;
417
 
 
418
 
typedef struct Iscchannel
419
 
{
420
 
        int                                     number;         /* number of channel */
421
 
        struct Iscnbtrunk       *trunks;        /* list of trunks */
422
 
        struct Iscchannel       *last;          /* last in list of channels */
423
 
        struct Iscchannel       *next;          /* next in list of channels */
424
 
} SCCHANNEL;
425
 
 
426
 
typedef struct Iscnbtrunk
427
 
{
428
 
        struct Iscextnode       *ext_node;      /* pointer to extracted node */
429
 
        int                                     minx;           /* minimum trunk going left */
430
 
        int                                     maxx;           /* maximum trunk going right */
431
 
        struct Iscnbtrunk       *same;          /* same in next channel */
432
 
        struct Iscnbtrunk       *next;          /* pointer to next trunk */
433
 
} SCNBTRUNK;
434
 
 
435
 
#define SC_PLACE_SORT_ALL_TREES 0x0000000F
436
 
#define SC_PLACE_SORT_TREE_0    0x00000001
437
 
#define SC_PLACE_SORT_TREE_1    0x00000002
438
 
#define SC_PLACE_SORT_TREE_2    0x00000004
439
 
#define SC_PLACE_SORT_TREE_3    0x00000008
440
 
#define SC_PLACE_SORT_MASK_1    0x0000000D
441
 
#define SC_PLACE_SORT_MASK_2    0x0000000B
442
 
#define SC_PLACE_SORT_CASE_1    0x00000005
443
 
#define SC_PLACE_SORT_CASE_2    0x0000000A
444
 
 
445
 
 
446
 
/***********************************************************************
447
 
        Routing structures and constants
448
 
------------------------------------------------------------------------
449
 
*/
450
 
 
451
 
/***** Directions that ports can be attached to *****/
452
 
#define SCPORTDIRMASK   0x0000000F      /* mask for port direction */
453
 
#define SCPORTDIRUP             0x00000001      /* port direction up */
454
 
#define SCPORTDIRDOWN   0x00000002      /* port direction down */
455
 
#define SCPORTDIRRIGHT  0x00000004      /* port direction right */
456
 
#define SCPORTDIRLEFT   0x00000008      /* port direction left */
457
 
#define SCPORTTYPE              0x000003F0      /* port type mask */
458
 
#define SCGNDPORT               0x00000010      /* ground port */
459
 
#define SCPWRPORT               0x00000020      /* power port */
460
 
#define SCBIDIRPORT             0x00000040      /* bidirectional port */
461
 
#define SCOUTPORT               0x00000080      /* output port */
462
 
#define SCINPORT                0x00000100      /* input port */
463
 
#define SCUNPORT                0x00000200      /* unknown port */
464
 
 
465
 
#define SCROUTEMASK             0x00000007      /* mask for all bits */
466
 
#define SCROUTESEEN             0x00000001      /* seen in processing */
467
 
#define SCROUTEUNUSABLE 0x00000002      /* unusable in current track */
468
 
#define SCROUTETEMPNUSE 0x00000004      /* temporary not use */
469
 
 
470
 
typedef struct Iscroute
471
 
{
472
 
        struct Iscroutechannel  *channels;      /* list of channels */
473
 
        struct Iscrouteexport   *exports;       /* exported ports */
474
 
        struct Iscrouterow              *rows;          /* route rows */
475
 
} SCROUTE;
476
 
 
477
 
typedef struct Iscroutecontrol
478
 
{
479
 
        int                     verbose;                                /* verbose flag */
480
 
        int                     fuzzy_window_limit;             /* for pass through window */
481
 
} SCROUTECONTROL;
482
 
 
483
 
typedef struct Iscrouterow
484
 
{
485
 
        int                                             number;         /* number, 0 = bottom */
486
 
        struct Iscroutenode             *nodes;         /* list of extracted nodes */
487
 
        struct Iscrowlist               *row;           /* reference actual row */
488
 
        struct Iscrouterow              *last;          /* last in row list */
489
 
        struct Iscrouterow              *next;          /* next in row list */
490
 
} SCROUTEROW;
491
 
 
492
 
typedef struct Iscroutenode
493
 
{
494
 
        struct Iscextnode               *ext_node;      /* extracted node */
495
 
        struct Iscrouterow              *row;           /* reference row */
496
 
        struct Iscrouteport             *firstport;     /* first port in row */
497
 
        struct Iscrouteport             *lastport;      /* last port in row */
498
 
        struct Iscroutenode             *same_next;     /* same nodes in above rows */
499
 
        struct Iscroutenode             *same_last;     /* same nodes in below rows */
500
 
        struct Iscroutenode             *next;          /* nodes in same row */
501
 
} SCROUTENODE;
502
 
 
503
 
typedef struct Iscrouteport
504
 
{
505
 
        struct Iscnbplace               *place;         /* reference place */
506
 
        struct Iscniport                *port;          /* particular port */
507
 
        struct Iscroutenode             *node;          /* reference node */
508
 
        int                                             flags;          /* flags for processing */
509
 
        struct Iscrouteport             *last;          /* previous port in list */
510
 
        struct Iscrouteport             *next;          /* next port in list */
511
 
} SCROUTEPORT;
512
 
 
513
 
typedef struct Iscroutechannel
514
 
{
515
 
        int                                             number;         /* number, 0 is bottom */
516
 
        struct Iscroutechnode   *nodes;         /* list of nodes */
517
 
        struct Iscroutetrack    *tracks;        /* list of tracks */
518
 
        struct Iscroutechannel  *last;          /* last in channel list */
519
 
        struct Iscroutechannel  *next;          /* next in channel list */
520
 
} SCROUTECHANNEL;
521
 
 
522
 
typedef struct Iscroutechnode
523
 
{
524
 
        struct Iscextnode               *ext_node;      /* extracted node */
525
 
        int                                             number;         /* optional net number */
526
 
        struct Iscroutechport   *firstport;     /* first port in row */
527
 
        struct Iscroutechport   *lastport;      /* last port in row */
528
 
        struct Iscroutechannel  *channel;       /* reference channel */
529
 
        int                                             flags;          /* flags for processing */
530
 
        struct Iscroutechnode   *same_next;     /* same nodes in above rows */
531
 
        struct Iscroutechnode   *same_last;     /* same nodes in below rows */
532
 
        struct Iscroutechnode   *next;          /* nodes in same row */
533
 
} SCROUTECHNODE;
534
 
 
535
 
typedef struct Iscroutechport
536
 
{
537
 
        struct Iscrouteport             *port;          /* reference port */
538
 
        struct Iscroutechnode   *node;          /* reference channel node */
539
 
        int                                             xpos;           /* x position */
540
 
        int                                             flags;          /* flags for processing */
541
 
        struct Iscroutechport   *last;          /* previous port in list */
542
 
        struct Iscroutechport   *next;          /* next port in list */
543
 
} SCROUTECHPORT;
544
 
 
545
 
typedef struct Iscroutevcg
546
 
{
547
 
        struct Iscroutechnode   *chnode;        /* channel node */
548
 
        int                                             flags;          /* flags for processing */
549
 
        struct Iscroutevcgedge  *edges;         /* edges of graph */
550
 
} SCROUTEVCG;
551
 
 
552
 
typedef struct Iscroutevcgedge
553
 
{
554
 
        struct Iscroutevcg              *node;          /* to which node */
555
 
        struct Iscroutevcgedge  *next;          /* next in list */
556
 
} SCROUTEVCGEDGE;
557
 
 
558
 
typedef struct Iscroutezrg
559
 
{
560
 
        int                                             number;         /* number of zone */
561
 
        struct Iscroutezrgmem   *chnodes;       /* list of channel nodes */
562
 
        struct Iscroutezrg              *last;          /* last zone */
563
 
        struct Iscroutezrg              *next;          /* next zone */
564
 
} SCROUTEZRG;
565
 
 
566
 
typedef struct Iscroutezrgmem
567
 
{
568
 
        struct Iscroutechnode   *chnode;        /* channel node */
569
 
        struct Iscroutezrgmem   *next;          /* next in zone */
570
 
} SCROUTEZRGMEM;
571
 
 
572
 
typedef struct Iscroutetrack
573
 
{
574
 
        int                                             number;         /* number of track, 0 = top */
575
 
        struct Iscroutetrackmem *nodes;         /* track member */
576
 
        struct Iscroutetrack    *last;          /* last track in list */
577
 
        struct Iscroutetrack    *next;          /* next track in list */
578
 
} SCROUTETRACK;
579
 
 
580
 
typedef struct Iscroutetrackmem
581
 
{
582
 
        struct Iscroutechnode   *node;          /* channel node */
583
 
        struct Iscroutetrackmem *next;          /* next in same track */
584
 
} SCROUTETRACKMEM;
585
 
 
586
 
typedef struct Iscrouteexport
587
 
{
588
 
        struct Iscport                  *xport;         /* export port */
589
 
        struct Iscroutechport   *chport;        /* channel port */
590
 
        struct Iscrouteexport   *next;          /* next export port */
591
 
} SCROUTEEXPORT;
592
 
 
593
 
/***********************************************************************
594
 
        MAKER Structures
595
 
------------------------------------------------------------------------
596
 
*/
597
 
 
598
 
typedef struct Iscmakerinfo
599
 
{
600
 
        int                     x_size;                         /* size in X */
601
 
        int                     y_size;                         /* size in Y */
602
 
        int                     area;                           /* total area */
603
 
        int                     min_x;                          /* minimum X coordinate */
604
 
        int                     max_x;                          /* maximum X coordinate */
605
 
        int                     min_y;                          /* minimum Y coordinate */
606
 
        int                     max_y;                          /* maximum Y coordinate */
607
 
        int                     num_leaf_cells;         /* number of leaf cells */
608
 
        int                     num_feeds;                      /* number of feed throughs */
609
 
        int                     num_rows;                       /* number of rows of cells */
610
 
        int                     num_channels;           /* number of routing channels */
611
 
        int                     num_tracks;                     /* number of routing tracks */
612
 
        int                     track_length;           /* total track length */
613
 
} SCMAKERINFO;
614
 
 
615
 
typedef struct Iscmakerdata
616
 
{
617
 
        struct Isccell                  *cell;          /* cell being layed out */
618
 
        struct Iscmakerrow              *rows;          /* list of rows */
619
 
        struct Iscmakerchannel  *channels;      /* list of channels */
620
 
        struct Iscmakerpower    *power;         /* list of vdd ports */
621
 
        struct Iscmakerpower    *ground;        /* list of ground ports */
622
 
        int                                             minx;           /* minimum x position */
623
 
        int                                             maxx;           /* maximum x position */
624
 
        int                                             miny;           /* minimum y position */
625
 
        int                                             maxy;           /* maximum y position */
626
 
} SCMAKERDATA;
627
 
 
628
 
typedef struct Iscmakerrow
629
 
{
630
 
        int                                             number;         /* row number */
631
 
        struct Iscmakerinst             *members;       /* instances in rows */
632
 
        int                                             minx;           /* minimum X position */
633
 
        int                                             maxx;           /* maximum X position */
634
 
        int                                             miny;           /* minimum Y position */
635
 
        int                                             maxy;           /* maximum Y position */
636
 
        int                                             flags;          /* processing bits */
637
 
        struct Iscmakerrow              *last;          /* last row */
638
 
        struct Iscmakerrow              *next;          /* next row */
639
 
} SCMAKERROW;
640
 
 
641
 
typedef struct Iscmakerinst
642
 
{
643
 
        struct Iscnbplace               *place;         /* reference place */
644
 
        struct Iscmakerrow              *row;           /* reference row */
645
 
        int                                             xpos;           /* X position */
646
 
        int                                             ypos;           /* Y position */
647
 
        int                                             xsize;          /* size in X */
648
 
        int                                             ysize;          /* size in Y */
649
 
        int                                             flags;          /* processing flags */
650
 
        char                                    *instance;      /* leaf instance */
651
 
        struct Iscmakerinst             *next;          /* next in row */
652
 
} SCMAKERINST;
653
 
 
654
 
typedef struct Iscmakerchannel
655
 
{
656
 
        int                                             number;         /* number of channel */
657
 
        struct Iscmakertrack    *tracks;        /* list of tracks */
658
 
        int                                             num_tracks;     /* number of tracks */
659
 
        int                                             miny;           /* minimum Y position */
660
 
        int                                             ysize;          /* Y size */
661
 
        int                                             flags;          /* processing bits */
662
 
        struct Iscmakerchannel  *last;          /* last channel */
663
 
        struct Iscmakerchannel  *next;          /* next channel */
664
 
} SCMAKERCHANNEL;
665
 
 
666
 
typedef struct Iscmakertrack
667
 
{
668
 
        int                                             number;         /* track number */
669
 
        struct Iscmakernode             *nodes;         /* nodes in track */
670
 
        struct Iscroutetrack    *track;         /* reference track */
671
 
        int                                             ypos;           /* Y position */
672
 
        int                                             flags;          /* processing bits */
673
 
        struct Iscmakertrack    *last;          /* previous track */
674
 
        struct Iscmakertrack    *next;          /* next track */
675
 
} SCMAKERTRACK;
676
 
 
677
 
typedef struct Iscmakernode
678
 
{
679
 
        struct Iscmakervia              *vias;          /* list of vias */
680
 
        struct Iscmakernode             *next;          /* next node in track */
681
 
} SCMAKERNODE;
682
 
 
683
 
#define SCVIASPECIAL    0x00000001
684
 
#define SCVIAEXPORT             0x00000002
685
 
#define SCVIAPOWER              0x00000004
686
 
typedef struct Iscmakervia
687
 
{
688
 
        int                                             xpos;           /* X position */
689
 
        struct Iscroutechport   *chport;        /* associated channel port */
690
 
        char                                    *instance;      /* associated leaf instance */
691
 
        int                                             flags;          /* flags for processing */
692
 
        struct Iscrouteexport   *xport;         /* export port */
693
 
        struct Iscmakervia              *next;          /* next via */
694
 
} SCMAKERVIA;
695
 
 
696
 
typedef struct Iscmakerpower
697
 
{
698
 
        struct Iscmakerpowerport *ports;        /* list of power ports */
699
 
        int                                             ypos;           /* vertical position of row */
700
 
        struct Iscmakerpower    *next;          /* next in row list */
701
 
        struct Iscmakerpower    *last;          /* last in row list */
702
 
} SCMAKERPOWER;
703
 
 
704
 
typedef struct Iscmakerpowerport
705
 
{
706
 
        struct Iscmakerinst             *inst;          /* instance */
707
 
        struct Iscniport                *port;          /* port on instance */
708
 
        int                                             xpos;           /* resultant x position */
709
 
        struct Iscmakerpowerport *next;         /* next in list */
710
 
        struct Iscmakerpowerport *last;         /* last in list */
711
 
} SCMAKERPOWERPORT;
712
 
 
713
 
/***********************************************************************
714
 
        CPU Time Usage Constants and Structures
715
 
------------------------------------------------------------------------
716
 
*/
717
 
 
718
 
#define TIME_RESET      0
719
 
#define TIME_REL        1
720
 
#define TIME_ABS        2
721
 
 
722
 
typedef struct tbuffer
723
 
{
724
 
        int             proc_user_time;
725
 
        int             proc_system_time;
726
 
        int             child_user_time;
727
 
        int             child_system_time;
728
 
} TBUFFER;
729
 
 
730
 
/***********************************************************************
731
 
        Simulator information
732
 
-----------------------------------------------------------------------
733
 
*/
734
 
#define SC_ALS_FORMAT 1
735
 
#define SC_SILOS_FORMAT 2
736
 
 
737
 
extern TOOL       *sc_tool;                             /* the Silicon Compiler tool object */
738
 
extern INTBIG      sc_filetypescsim;    /* Silicon compiler simulation file descriptor */
739
 
extern INTBIG      sc_filetypesctab;    /* Silicon compiler table file descriptor */
740
 
 
741
 
/* prototypes for tool interface */
742
 
void sc_init(INTBIG*, char*[], TOOL*);
743
 
void sc_done(void);
744
 
void sc_set(INTBIG, char*[]);
745
 
INTBIG sc_request(char*, va_list);
746
 
void sc_slice(void);
747
 
 
748
 
/* prototypes for intratool interface */
749
 
void Sc_clear_stop(void);
750
 
int Sc_stop(void);
751
 
int Sc_connect(int, char*[]);
752
 
int Sc_create(int, char*[]);
753
 
int Sc_delete(void);
754
 
int Sc_export(int, char*[]);
755
 
int Sc_extract(int, char*[]);
756
 
int Sc_maker(int, char*[]);
757
 
int Sc_place(int, char*[]);
758
 
int Sc_route(int, char*[]);
759
 
void Sc_schematic(void);
760
 
int Sc_simulation(int, char*[]);
761
 
int Sc_verify(void);
762
 
char *Sc_find_leaf_facet(char*);
763
 
char *Sc_first_leaf_port(char*);
764
 
char *Sc_next_leaf_port(char*);
765
 
int Sc_leaf_port_type(char*);
766
 
int Sc_leaf_port_bits(char*);
767
 
char *Sc_leaf_port_name(char*);
768
 
void Sc_leaf_facet_get_nums(char*, SCCELLNUMS*);
769
 
void Sc_extract_print_nodes(SCCELL*);
770
 
void Sc_route_print_channel(SCROUTECHANNEL*);
771
 
char *Sc_leaf_facet_name(char*);
772
 
int Sc_leaf_facet_set_nums(char*, SCCELLNUMS*);
773
 
SCNITREE **Sc_findni(SCNITREE**, char*);
774
 
char *Sc_find_leaf_port(char*, char*);
775
 
int *Sc_leaf_port_bits_address(char*);
776
 
int Sc_library_read(char*);
777
 
int Sc_library_use(char*);
778
 
void Sc_leaf_port_set_next(char*, char*);
779
 
void Sc_leaf_port_set_first(char*, char*);
780
 
void Sc_remove_inst_from_itree(SCNITREE**, SCNITREE*);
781
 
void Sc_make_nilist(SCNITREE*, SCCELL*);
782
 
int Sc_seterrmsg(int, ...);
783
 
int Sc_leaf_facet_xsize(char*);
784
 
int Sc_leaf_facet_ysize(char*);
785
 
int Sc_leaf_port_xpos(char*);
786
 
int Sc_leaf_port_ypos(char*);
787
 
void Sc_initialize(void);
788
 
void Sc_main(void);
789
 
void Sc_one_command(int, char*[]);
790
 
SCNIPORT *Sc_findpp(SCNITREE*, char*);
791
 
SCNITREE *Sc_new_instance(char*, int);
792
 
int Sc_conlist(SCNITREE*, SCNIPORT*, SCNITREE*, SCNIPORT*);
793
 
char *Sc_cpu_time(int);
794
 
char *Sc_create_leaf_facet(char*);
795
 
int Sc_setup_for_maker(ARCPROTO*, ARCPROTO*);
796
 
char *Sc_create_leaf_instance(char*, char*, int, int, int, int, int, int, char*);
797
 
char *Sc_create_layer2_node(int, int, int, int, char*);
798
 
char *Sc_create_via(int, int, char*);
799
 
char *Sc_create_layer1_node(int, int, int, int, char*);
800
 
char *Sc_create_nwell(int, int, int, int, char*);
801
 
char *Sc_create_pwell(int, int, int, int, char*);
802
 
char *Sc_create_track_layer1(char*, char*, char*, char*, int, char*);
803
 
char *Sc_create_track_layer2(char*, char*, char*, char*, int, char*);
804
 
char *Sc_create_export_port(char*, char*, char*, int, char*);
805
 
int Sc_free_placement(SCPLACE*);
806
 
int Sc_free_route(SCROUTE*);
807
 
int Sc_leaf_port_direction(char*);
808
 
SCNIPORT *Sc_new_instance_port(SCNITREE*);
809
 
char **Sc_leaf_facet_sim_info(char*);
810
 
int Sc_leaf_facet_set_sim(SCSIM*, char*);
811
 
char *Sc_first_leaf_facet(void);
812
 
char *Sc_next_leaf_facet(char*);
813
 
int *Sc_leaf_facet_bits_address(char*);
814
 
int Sc_leaf_facet_bits(char*);
815
 
INTBIG ScGetParameter(INTBIG paramnum);
816
 
void ScSetParameter(INTBIG paramnum, INTBIG addr);
817
 
 
818
 
#if defined(__cplusplus) && !defined(ALLCPLUSPLUS)
819
 
}
820
 
#endif