Commit e92e0ef1 authored by Christopher Alfeld's avatar Christopher Alfeld
Browse files

ptop stuff

parent 7faeb1ad
CXX=/usr/gnu/bin/g++
CC=/usr/gnu/bin/gcc
LEDA=/n/paria/z/dga/LEDA-4.0
OBJS=testbed.o parse_top.o parse_ir.o
OBJS=testbed.o parse_top.o parse_ir.o parse_ptop.o
LIBS+=-L${LEDA} -lD3 -lW -lP -lG -lL -L/usr/X11R6/lib -lX11 -lm -L. -lg2c
LDFLAGS+= -O3 -fomit-frame-pointer -m486
CXXFLAGS = -I${LEDA}/incl
# Pick one of the two below.
CXXFLAGS += -Wall -O3 -fomit-frame-pointer -m486
#CXXFLAGS += -O0 -g
# CXXFLAGS += -Wall -O3 -fomit-frame-pointer -m486
CXXFLAGS += -O0 -g
DEPLIBS=$(OBJS)
all: assign irtest
all: assign irtest testptop
assign: assign.o ${DEPLIBS}
${CXX} assign.o -o assign ${LIBS} $(OBJS) ${LDFLAGS}
......@@ -26,3 +26,7 @@ clean:
irtest: irtest.o ${DEPLIBS}
${CXX} irtest.o -o irtest ${LIBS} testbed.o parse_ir.o ${LDFLAGS}
testptop: testptop.o ${DEPLIBS}
${CXX} testptop.o -o testptop ${LIBS} testbed.o parse_ptop.o \
${LDFLAGS}
#!/usr/local/bin/tclsh
######################################################################
# gentestbed.tcl
#
# gentestbed.tcl <switches> <nodesperswitch> <linkspernode> <internode> <interswitch>
######################################################################
if {[llength $argv] != 5} {
puts "Syntax: gentestbed.tcl <switches> <nodesperswitch> <linkspernode> <internode> <interswitch>"
exit 1
}
set i 0
foreach a {switches nodes links inode iswitch} {
upvar 0 $a v
set v [lindex $argv $i]
incr i
}
for {set s 0} {$s < $switches} {incr s} {
puts "node switch_$s switch"
for {set n 0} {$n < $nodes} {incr n} {
puts "node node_${s}_$n pc"
puts "link node_${s}_$n switch_$s $inode $links"
}
}
for {set s 0} {$s < $switches} {incr s} {
for {set s2 $s} {$s2 < $switches} {incr s2} {
if {$s != $s2} {
puts "link switch_${s} switch_${s2} 1 $iswitch"
}
}
}
node switch_0 switch
node node_0_0 pc
link node_0_0 switch_0 100 3
node node_0_1 pc
link node_0_1 switch_0 100 3
node node_0_2 pc
link node_0_2 switch_0 100 3
node node_0_3 pc
link node_0_3 switch_0 100 3
node node_0_4 pc
link node_0_4 switch_0 100 3
node node_0_5 pc
link node_0_5 switch_0 100 3
node node_0_6 pc
link node_0_6 switch_0 100 3
node node_0_7 pc
link node_0_7 switch_0 100 3
node switch_1 switch
node node_1_0 pc
link node_1_0 switch_1 100 3
node node_1_1 pc
link node_1_1 switch_1 100 3
node node_1_2 pc
link node_1_2 switch_1 100 3
node node_1_3 pc
link node_1_3 switch_1 100 3
node node_1_4 pc
link node_1_4 switch_1 100 3
node node_1_5 pc
link node_1_5 switch_1 100 3
node node_1_6 pc
link node_1_6 switch_1 100 3
node node_1_7 pc
link node_1_7 switch_1 100 3
node switch_2 switch
node node_2_0 pc
link node_2_0 switch_2 100 3
node node_2_1 pc
link node_2_1 switch_2 100 3
node node_2_2 pc
link node_2_2 switch_2 100 3
node node_2_3 pc
link node_2_3 switch_2 100 3
node node_2_4 pc
link node_2_4 switch_2 100 3
node node_2_5 pc
link node_2_5 switch_2 100 3
node node_2_6 pc
link node_2_6 switch_2 100 3
node node_2_7 pc
link node_2_7 switch_2 100 3
node switch_3 switch
node node_3_0 pc
link node_3_0 switch_3 100 3
node node_3_1 pc
link node_3_1 switch_3 100 3
node node_3_2 pc
link node_3_2 switch_3 100 3
node node_3_3 pc
link node_3_3 switch_3 100 3
node node_3_4 pc
link node_3_4 switch_3 100 3
node node_3_5 pc
link node_3_5 switch_3 100 3
node node_3_6 pc
link node_3_6 switch_3 100 3
node node_3_7 pc
link node_3_7 switch_3 100 3
link switch_0 switch_1 1 400
link switch_0 switch_2 1 400
link switch_0 switch_3 1 400
link switch_1 switch_2 1 400
link switch_1 switch_3 1 400
link switch_2 switch_3 1 400
node switch_0 switch
node node_0_0 pc
link node_0_0 switch_0 100 3
node node_0_1 pc
link node_0_1 switch_0 100 3
node node_0_2 pc
link node_0_2 switch_0 100 3
node node_0_3 pc
link node_0_3 switch_0 100 3
node node_0_4 pc
link node_0_4 switch_0 100 3
node node_0_5 pc
link node_0_5 switch_0 100 3
node node_0_6 pc
link node_0_6 switch_0 100 3
node node_0_7 pc
link node_0_7 switch_0 100 3
node switch_1 switch
node node_1_0 pc
link node_1_0 switch_1 100 3
node node_1_1 pc
link node_1_1 switch_1 100 3
node node_1_2 pc
link node_1_2 switch_1 100 3
node node_1_3 pc
link node_1_3 switch_1 100 3
node node_1_4 pc
link node_1_4 switch_1 100 3
node node_1_5 pc
link node_1_5 switch_1 100 3
node node_1_6 pc
link node_1_6 switch_1 100 3
node node_1_7 pc
link node_1_7 switch_1 100 3
node switch_2 switch
node node_2_0 pc
link node_2_0 switch_2 100 3
node node_2_1 pc
link node_2_1 switch_2 100 3
node node_2_2 pc
link node_2_2 switch_2 100 3
node node_2_3 pc
link node_2_3 switch_2 100 3
node node_2_4 pc
link node_2_4 switch_2 100 3
node node_2_5 pc
link node_2_5 switch_2 100 3
node node_2_6 pc
link node_2_6 switch_2 100 3
node node_2_7 pc
link node_2_7 switch_2 100 3
node switch_3 switch
node node_3_0 pc
link node_3_0 switch_3 100 3
node node_3_1 pc
link node_3_1 switch_3 100 3
node node_3_2 pc
link node_3_2 switch_3 100 3
node node_3_3 pc
link node_3_3 switch_3 100 3
node node_3_4 pc
link node_3_4 switch_3 100 3
node node_3_5 pc
link node_3_5 switch_3 100 3
node node_3_6 pc
link node_3_6 switch_3 100 3
node node_3_7 pc
link node_3_7 switch_3 100 3
node switch_4 switch
node node_4_0 pc
link node_4_0 switch_4 100 3
node node_4_1 pc
link node_4_1 switch_4 100 3
node node_4_2 pc
link node_4_2 switch_4 100 3
node node_4_3 pc
link node_4_3 switch_4 100 3
node node_4_4 pc
link node_4_4 switch_4 100 3
node node_4_5 pc
link node_4_5 switch_4 100 3
node node_4_6 pc
link node_4_6 switch_4 100 3
node node_4_7 pc
link node_4_7 switch_4 100 3
node switch_5 switch
node node_5_0 pc
link node_5_0 switch_5 100 3
node node_5_1 pc
link node_5_1 switch_5 100 3
node node_5_2 pc
link node_5_2 switch_5 100 3
node node_5_3 pc
link node_5_3 switch_5 100 3
node node_5_4 pc
link node_5_4 switch_5 100 3
node node_5_5 pc
link node_5_5 switch_5 100 3
node node_5_6 pc
link node_5_6 switch_5 100 3
node node_5_7 pc
link node_5_7 switch_5 100 3
node switch_6 switch
node node_6_0 pc
link node_6_0 switch_6 100 3
node node_6_1 pc
link node_6_1 switch_6 100 3
node node_6_2 pc
link node_6_2 switch_6 100 3
node node_6_3 pc
link node_6_3 switch_6 100 3
node node_6_4 pc
link node_6_4 switch_6 100 3
node node_6_5 pc
link node_6_5 switch_6 100 3
node node_6_6 pc
link node_6_6 switch_6 100 3
node node_6_7 pc
link node_6_7 switch_6 100 3
node switch_7 switch
node node_7_0 pc
link node_7_0 switch_7 100 3
node node_7_1 pc
link node_7_1 switch_7 100 3
node node_7_2 pc
link node_7_2 switch_7 100 3
node node_7_3 pc
link node_7_3 switch_7 100 3
node node_7_4 pc
link node_7_4 switch_7 100 3
node node_7_5 pc
link node_7_5 switch_7 100 3
node node_7_6 pc
link node_7_6 switch_7 100 3
node node_7_7 pc
link node_7_7 switch_7 100 3
link switch_0 switch_1 1 1000
link switch_0 switch_2 1 1000
link switch_0 switch_3 1 1000
link switch_0 switch_4 1 1000
link switch_0 switch_5 1 1000
link switch_0 switch_6 1 1000
link switch_0 switch_7 1 1000
link switch_1 switch_2 1 1000
link switch_1 switch_3 1 1000
link switch_1 switch_4 1 1000
link switch_1 switch_5 1 1000
link switch_1 switch_6 1 1000
link switch_1 switch_7 1 1000
link switch_2 switch_3 1 1000
link switch_2 switch_4 1 1000
link switch_2 switch_5 1 1000
link switch_2 switch_6 1 1000
link switch_2 switch_7 1 1000
link switch_3 switch_4 1 1000
link switch_3 switch_5 1 1000
link switch_3 switch_6 1 1000
link switch_3 switch_7 1 1000
link switch_4 switch_5 1 1000
link switch_4 switch_6 1 1000
link switch_4 switch_7 1 1000
link switch_5 switch_6 1 1000
link switch_5 switch_7 1 1000
link switch_6 switch_7 1 1000
......@@ -52,6 +52,8 @@ public:
testedge();
virtual ~testedge();
inline int number() { return number_; }
inline void number(int newnum) { number_ = newnum; }
inline int capacity() { return capacity_; }
inline void capacity(int newcap) { capacity_ = newcap; }
......@@ -69,7 +71,7 @@ public:
private:
int capacity_;
int number_;
};
/*
......@@ -84,5 +86,6 @@ typedef GRAPH<testnode, testedge> tbgraph;
void parse_top(tbgraph &G, istream& i);
void parse_ir(tbgraph &G, istream& i);
void parse_ptop(tbgraph &G, istream& i);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment