5 #ifndef ophidian_FLUTE_H
7 #define POWVFILE "3rdparty/flute/POWV9.dat" // LUT for POWV (Wirelength Vector)
8 #define PORTFILE "3rdparty/flute/PORT9.dat" // LUT for PORT (Routing Tree)
9 #define FLUTE_D 9 // LUT is used for d <= FLUTE_D, FLUTE_D <= 9
10 #define FLUTEROUTING 1 // 1 to construct routing, 0 to estimate WL only
11 #define REMOVE_DUPLICATE_PIN 0 // Remove dup. pin for flute_wl() & flute()
12 #define ACCURACY 8 // Default accuracy is 3
14 #define MAXD 1000 // max. degree of a net that can be handled
16 #ifndef DTYPE // Data type for distance
17 #define DTYPE unsigned
20 #define ophidian_FLUTE_H
23 namespace interconnection {
38 extern void readLUT();
39 extern DTYPE flute_wl(
int d, DTYPE x[], DTYPE y[],
int acc);
41 extern tree flute(
int d, DTYPE x[], DTYPE y[],
int acc);
43 extern DTYPE wirelength(
tree t);
44 extern void printtree(
tree t);
50 extern DTYPE flutes_wl_LD(
int d, DTYPE xs[], DTYPE ys[],
int s[]);
51 extern DTYPE flutes_wl_MD(
int d, DTYPE xs[], DTYPE ys[],
int s[],
int acc);
52 extern DTYPE flutes_wl_RDP(
int d, DTYPE xs[], DTYPE ys[],
int s[],
int acc);
53 extern tree flutes_LD(
int d, DTYPE xs[], DTYPE ys[],
int s[]);
54 extern tree flutes_MD(
int d, DTYPE xs[], DTYPE ys[],
int s[],
int acc);
55 extern tree flutes_RDP(
int d, DTYPE xs[], DTYPE ys[],
int s[],
int acc);
57 #if REMOVE_DUPLICATE_PIN==1
58 #define flutes_wl(d, xs, ys, s, acc) flutes_wl_RDP(d, xs, ys, s, acc)
59 #define flutes(d, xs, ys, s, acc) flutes_RDP(d, xs, ys, s, acc)
61 #define flutes_wl(d, xs, ys, s, acc) flutes_wl_ALLD(d, xs, ys, s, acc)
62 #define flutes(d, xs, ys, s, acc) flutes_ALLD(d, xs, ys, s, acc)
65 #define flutes_wl_ALLD(d, xs, ys, s, acc) flutes_wl_LMD(d, xs, ys, s, acc)
66 #define flutes_ALLD(d, xs, ys, s, acc) flutes_LMD(d, xs, ys, s, acc)
68 #define flutes_wl_LMD(d, xs, ys, s, acc) \
69 (d<=FLUTE_D ? flutes_wl_LD(d, xs, ys, s) : flutes_wl_MD(d, xs, ys, s, acc))
70 #define flutes_LMD(d, xs, ys, s, acc) \
71 (d<=FLUTE_D ? flutes_LD(d, xs, ys, s) : flutes_MD(d, xs, ys, s, acc))
73 #define ADIFF(x,y) ((x)>(y)?(x-y):(y-x)) // Absolute difference
79 #endif //ophidian_FLUTE_H