
/*
 * $Header: C:/cvsroot/Vert03/vertlib/routing.h,v 1.2 2004/06/22 21:44:15 mjames Exp $
 *
 * $Log: routing.h,v $
 * Revision 1.2  2004/06/22 21:44:15  mjames
 * Firrst build most files
 *
 * Revision 1.6  2002/09/09 09:53:39  mjames
 * Moved pin remapping function to pin ident editing function from
 * sorting pin name routine.
 *
 * Revision 1.5  2001/12/24 21:18:12  mjames
 * Declare ensure_reservation externally
 *
 * Revision 1.4  2001/10/31 22:20:17  mjames
 * Tidying up problematical comments caused by CVS
 * 'intelligent' comment guessing
 *
 * Revision 1.3  2001/07/20 10:47:43  mjames
 * Allowed setting of pin routing group properties on pins on nets
 * by the
 * "set pin" command
 *
 * Revision 1.2  2001/06/06 12:10:17  mjames
 * Move from HPUX
 *
 * Revision 1.1.1.1  2000/10/19 21:58:40  mjames
 * Mike put it here
 *
 *
 * Revision 1.41  2000/10/04  10:37:11  10:37:11  mjames (Mike James)
 * Modified for Vertical2 : support COMPONENTS and SIGNALS
 *
 * Revision 1.41  2000/10/04  10:37:11  10:37:11  mjames (Mike James)
 * Part of Release PSAVAT01
 *
 * Revision 1.40  2000/10/02  11:04:20  11:04:20  mjames (Mike James)
 * new_vhdl
 *

 * Revision 1.39  2000/09/27  14:42:24  14:42:24  mjames (Mike James)

 * Part of Release Sep_27_ST_2000

 *

 * Revision 1.38  2000/09/21  10:15:54  10:15:54  mjames (Mike James)

 * Part of Release Sep21Alpha

 *

 * Revision 1.37  2000/08/25  09:57:19  09:57:19  mjames (Mike James)

 * Part of Release Aug25_alpha

 *

 * Revision 1.36  2000/08/16  08:57:36  08:57:36  mjames (Mike James)

 * Part of Release CD01_Aug2000

 *

 * Revision 1.35  2000/08/14  14:45:16  14:45:16  mjames (Mike James)

 * Part of Release Aug_14_2000

 *

 * Revision 1.34  2000/08/11  08:30:36  08:30:36  mjames (Mike James)

 * Part of Release Aug_11_2000

 *

 * Revision 1.33  2000/08/09  10:31:53  10:31:53  mjames (Mike James)

 * Part of Release Aug__9_2000

 *

 * Revision 1.32  2000/05/31  11:43:05  11:43:05  mjames (Mike James)

 * Part of Release May_31_2000

 *

 * Revision 1.31  2000/05/08  17:01:43  17:01:43  mjames (Mike James)

 * Part of Release May__8_2000

 *

 * Revision 1.30  2000/05/08  16:59:36  16:59:36  mjames (Mike James)

 * Part of Release May__8_2000

 *

 * Revision 1.29  2000/05/08  16:57:12  16:57:12  mjames (Mike James)

 * Part of Release May__8_2000

 *

 * Revision 1.28  2000/03/08  16:19:30  16:19:30  mjames (Mike James)

 * New version including PC

 *

 * Revision 1.25  2000/01/20  15:58:53  15:58:53  mjames (Mike James)

 * Part of Release R22

 *

 * Revision 1.24  99/12/22  11:15:34  11:15:34  mjames (Mike James)

 * Part of Release Dec_22_1999

 *

 * Revision 1.23  99/05/04  09:52:50  09:52:50  mjames (Mike James)

 * General checkin

 *

 * Revision 1.21  98/06/15  14:20:44  14:20:44  mjames (Mike James)

 * Removed and added Route Create from general routing algorithm.

 * Added routing routing groups

 *

 * Revision 1.20  98/02/11  11:27:17  11:27:17  mjames (Mike James)

 * Checked in for version 6.2a

 *

 * Revision 1.19  97/04/23  08:44:45  08:44:45  mjames (Mike James)

 * CHecked in for release rel23041997

 *

 * Revision 1.18  97/01/03  13:41:12  13:41:12  mjames (Mike James)

 * Added the force_route() function to set/clear the

 * how_routed field of the net to enable/disable

 * usability of a routed net.

 *

 * Revision 1.17  96/12/13  08:44:14  08:44:14  mjames (Mike James)

 * Update to v5.1, added Write ID , exact routing

 *

 * Revision 1.16  96/08/06  13:40:48  13:40:48  mjames (Mike James)

 * Added FIX_LOCATION attribute

 *

 * Revision 1.15  96/07/19  14:38:57  14:38:57  mjames (Mike James)

 * Update to give to PRL

 *

 * Revision 1.14  1996/07/12  15:52:12  mjames

 * Sorted out things like Alias and Jumpers

 * Work Correctly

 * Print COrrectly

 *

 * Revision 1.13  96/06/17  13:02:29  13:02:29  mjames (Mike James)

 * Added fix_pins function to try and sort out internal/external

 * connections being fixed to external pins by name

 *

 * Revision 1.12  96/06/11  14:11:58  14:11:58  mjames (Mike James)

 * Added hierarchical jumpering

 *

 * Revision 1.11  96/06/04  11:58:15  11:58:15  mjames (Mike James)

 * Added a lot of stuff to do with internal/external sockets,

 * Net renaming. Net jumpering by node ID as well as net name

 *

 * Revision 1.10  96/03/29  14:47:16  14:47:16  mjames (Mike James)

 * Added VHDL netlist writing to the capabilities of ACFREAD

 *

 * Revision 1.9  96/03/26  07:22:18  07:22:18  mjames (Mike James)

 *

 * Revision 1.8  96/03/18  13:51:26  13:51:26  mjames (Mike James)

 * Real Revision 2.1

 *

 * Revision 1.5  96/02/13  09:13:34  09:13:34  mjames (Mike James)

 * Updated to be version 2.0 with net joining

 *

 * Revision 1.4  96/02/08  15:28:36  15:28:36  mjames (Mike James)

 * First release

 *

 * Revision 1.3  96/02/07  16:01:37  16:01:37  mjames (Mike James)

 * Added correct RCS header

 *

 * Revision 1.2  96/02/07  15:50:51  15:50:51  mjames (Mike James)

 * Added RCS ident message

 *

 * Revision 1.1  96/01/10  13:15:09  13:15:09  mjames (Mike James)
 * Initial revision

 *  */

/* the number of nodes that will be accepted on a net while trying to find
   if a connection exists between two EPLDs */
#define MAX_NODES_FOR_PATH_SEARCH 100

/* used in search for pre-existing path */
extern int MaxNodesForSearch;

/* if this is =1 then all nets connected must be in the same groups on EPLDs */
extern int global_group_flag;

/* these define the head and tail of a dummy net identifier rsvXXXXXz */

/* which is ignored on net input */
#define RES_FMT "rsv%05dz"

/* 3 + 5 + 1 character */
#define RES_NAMLEN 9

/* format of created jumpered nets */
#define JUMP_FMT "jmp%s%05d"

#define JUMP_NAMLEN (MAXIDLEN)

extern noderef_t *
search_net_for_socket (noderef_t *wanted_ref, noderef_t *net_nodes, int use_group_mask);

extern void clear_routing_flags (noderef_t *net_nodes);

extern void count_nets (char *message);

/* normal routing */
extern void perform_routing (HowRouted_t how);

extern void perform_trial_naming (void);

/* routing utilities used in jumpering */
extern net_t *remove_net (net_t **list, net_t *net);

extern void combine_routed_and_unrouted (net_t *routed_net, net_t *unrouted_net);

extern void transfer_net_to_named (net_t **from_list, net_t *net);

/* alter whether or not a net is routable */
extern void force_route (char *netname, HowRouted_t flag);

/* set the group routing flags on a given socket */
extern void set_group_route_flags (char *template, int flag);

/* set the group routing flags on pins on a given socket */
extern void set_pin_group_flags (char *template, int flag);

extern void ensure_reservation (void);
