1 /* -*- tab-width: 4 -*- 2 * 3 * Electric(tm) VLSI Design System 4 * 5 * File: rout.h 6 * Header file for the wire routing tool 7 * Written by: Steven M. Rubin, Static Free Software 8 * 9 * Copyright (c) 2000 Static Free Software. 10 * 11 * Electric(tm) is free software; you can redistribute it and/or modify 12 * it under the terms of the GNU General Public License as published by 13 * the Free Software Foundation; either version 2 of the License, or 14 * (at your option) any later version. 15 * 16 * Electric(tm) is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with Electric(tm); see the file COPYING. If not, write to 23 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 24 * Boston, Mass 02111-1307, USA. 25 * 26 * Static Free Software 27 * 4119 Alpine Road 28 * Portola Valley, California 94028 29 * info@staticfreesoft.com 30 */ 31 32 #if defined(__cplusplus) && !defined(ALLCPLUSPLUS) 33 extern "C" 34 { 35 #endif 36 37 /* the meaning of "ROUT_state" */ 38 #define STITCHMODE 07 /* type of stitching being done */ 39 #define NOSTITCH 0 /* no stitching */ 40 #define AUTOSTITCH 1 /* automatic stitching by placement */ 41 #define MIMICSTITCH 2 /* mimic user stitching */ 42 #define SELECT 010 /* bit set if each wire should be OKed */ 43 #define SELSKIP 020 /* bit set if OK's should be skipped */ 44 #define SELDONE 040 /* bit set if any selection was done */ 45 46 /* the meaning of "ROUT_options" */ 47 #define MIMICINTERACTIVE 010 /* bit set if mimic runs interactively */ 48 #define MIMICIGNORENODESIZE 020 /* bit set if mimic ignores node size */ 49 #define MIMICIGNORENODETYPE 040 /* bit set if mimic ignores node type */ 50 #define MIMICUNROUTES 0100 /* bit set if mimic can unroute */ 51 #define MIMICIGNOREPORTS 0200 /* bit set if mimic ignores ports */ 52 #define MIMICONSIDERARCCOUNT 01000 /* bit set if mimic considers arc count */ 53 #define MIMICOTHARCTHISDIR 02000 /* bit set if mimic allows other arcs in this direction */ 54 55 extern TOOL *ro_tool; /* the Router tool object */ 56 extern INTBIG ro_statekey; /* variable key for "ROUT_state" */ 57 extern INTBIG ro_state; /* cached value for "ROUT_state" */ 58 extern INTBIG ro_preferedkey; /* variable key for "ROUT_prefered_arc" */ 59 60 /****************************** AUTO-STITCH ROUTING ******************************/ 61 62 /* check modules */ 63 #define NORCHECK ((RCHECK *)-1) 64 65 typedef struct Icheck 66 { 67 NODEINST *entity; /* node instance being checked */ 68 struct Icheck *nextcheck; /* next in list */ 69 } RCHECK; 70 extern RCHECK *ro_firstrcheck; 71 extern POLYLIST *ro_autostitchplist; 72 73 /****************************** MIMIC ROUTING ******************************/ 74 75 typedef struct 76 { 77 INTBIG numcreatedarcs; /* number of arcs just created */ 78 ARCINST *createdarcs[3]; /* up to 3 newly created arcs */ 79 INTBIG numcreatednodes; /* number of nodes just created */ 80 NODEINST *creatednodes[3]; /* up to 3 newly created nodes */ 81 INTBIG numdeletedarcs; /* number of arcs just created */ 82 ARCINST *deletedarcs[2]; /* up to 2 deleted arcs */ 83 INTBIG numdeletednodes; /* number of arcs just created */ 84 NODEINST *deletednodes[3]; /* up to 3 deleted nodes */ 85 } ROUTACTIVITY; 86 87 extern ROUTACTIVITY ro_lastactivity; /* last routing activity */ 88 extern NODEINST *ro_deletednodes[2]; /* nodes at end of last deleted arc */ 89 extern PORTPROTO *ro_deletedports[2]; /* ports on nodes at end of last deleted arc */ 90 91 /****************************** MAZE ROUTING ******************************/ 92 93 extern INTBIG ro_mazegridx; 94 extern INTBIG ro_mazegridy; 95 extern INTBIG ro_mazeoffsetx; 96 extern INTBIG ro_mazeoffsety; 97 extern INTBIG ro_mazeboundary; 98 99 /****************************** ROUTINES ******************************/ 100 101 /* prototypes for tool interface */ 102 void ro_init(INTBIG*, CHAR1*[], TOOL*); 103 void ro_done(void); 104 void ro_set(INTBIG, CHAR*[]); 105 void ro_slice(void); 106 void ro_startbatch(TOOL*, BOOLEAN); 107 void ro_endbatch(void); 108 void ro_modifynodeinst(NODEINST*,INTBIG,INTBIG,INTBIG,INTBIG,INTBIG,INTBIG); 109 void ro_modifyarcinst(ARCINST*,INTBIG,INTBIG,INTBIG,INTBIG,INTBIG,INTBIG); 110 void ro_modifyportproto(PORTPROTO*, NODEINST*, PORTPROTO*); 111 void ro_newobject(INTBIG, INTBIG); 112 void ro_killobject(INTBIG, INTBIG); 113 void ro_newvariable(INTBIG, INTBIG, INTBIG, INTBIG); 114 115 /* prototypes for intratool interface */ 116 void ro_autostitch(void); 117 INTBIG ro_findnetends(NETWORK *net, NODEINST ***nilist, PORTPROTO ***pplist, 118 INTBIG **xplist, INTBIG **yplist); 119 void ro_freemazememory(void); 120 void ro_freeautomemory(void); 121 void ro_freemimicmemory(void); 122 void ro_freerivermemory(void); 123 void ro_freercheck(RCHECK*); 124 INTBIG ro_getoptions(void); 125 void ro_mazeroutecell(void); 126 void ro_mazerouteselected(void); 127 void ro_mimicstitch(BOOLEAN forced); 128 BOOLEAN ro_river(NODEPROTO*); 129 130 #if defined(__cplusplus) && !defined(ALLCPLUSPLUS) 131 } 132 #endif 133