/**
	\file "grouter/groute_types.h"
	Forward declarations of grouter types.  
	The struct definitions can be found in "grouter/grouter.h"
	$Id: groute_types.h,v 1.2 2006/02/08 03:46:53 fang Exp $
 */

#ifndef	__GROUTER_GROUTE_TYPES_H__
#define	__GROUTER_GROUTE_TYPES_H__

#include "netlist/netlist_types.h"

/*
 * Density means the number of signals passing through a particular
 * point of a channel.  Since there are two directions in which
 * signals can run, there are two density maps: one for the number
 * of signals crossing horizontally across each vertical column
 * (d_RowsByCol), and the other for the number of signals crossing
 * vertically across each horizontal row (d_ColsByRow).  The maximum
 * density is just the maximum value for each of these two maps.
 * The indices of the two maps parallel those of the channel's
 * columns and rows, which include the pseudo-columns/rows at
 * the two ends of the channel as well as the ones in the interior.
 * However, the zero-th and last entries of the two maps are ignored.
 */
typedef struct
{
    short	*dm_value;	/* Contains dm_size elements, but element 0
				 * is unused.
				 */
    int		 dm_size;	/* Number of elements in dm_value array */
    int		 dm_max;	/* Maximum over dm_value[1 .. dm_size-1] */
    int		 dm_cap;	/* Capacity: if dm_value[i] exceeds dm_cap,
				 * then the channel is overcommitted at
				 * position (row or column) i.
				 */
} DensMap;

struct gl_globchan;
typedef struct gl_globchan	GlobChan;

struct gl_netclient;
typedef struct gl_netclient	NetClient;

struct gl_czone;
typedef struct czone		CZone;

struct netset;
typedef struct netset		NetSet;

/*
 * NetId.
 * In order to prevent the channel router from trying to connect two
 * independent segments of a net that both happen to pass through a
 * channel, if they are already connected elsewhere, the global router
 * assigns a "segment" identifier to each distinct two-point component
 * of the global route.  The following structure bundles together a
 * unique identifier for a net with this segment identifier, using
 * this information to set up the pins for channel routing.
 */
struct gl_netid
{
    struct nlNet        *netid_net;
    int                  netid_seg;
};      /* NetId */
typedef struct gl_netid		NetId;

struct glpoint;
typedef struct glpoint		GlPoint;

struct glPage;
typedef struct glPage		GlPage;

#endif	/* __GROUTER_GROUTE_TYPES_H__ */

