Commit c43de311 authored by Christopher Alfeld's avatar Christopher Alfeld

Changed to have ptop file as second arg

parent a9223933
...@@ -19,19 +19,21 @@ if {[file dirname [info script]] == "."} { ...@@ -19,19 +19,21 @@ if {[file dirname [info script]] == "."} {
} else { } else {
set updir [file dirname [file dirname [info script]]] set updir [file dirname [file dirname [info script]]]
} }
set testbed "[file dirname [info script]]/testbed.ptop"
set assign "$updir/assign_hw/assign" set assign "$updir/assign_hw/assign"
set maxrun 5 set maxrun 5
set delaythresh .25 set delaythresh .25
if {[llength $argv] != 1} { if {[llength $argv] != 2} {
puts stderr "Syntax: assign <ir>" puts stderr "Syntax: assign <ir> <ptop>"
exit 1 exit 1
} }
set testbed [lindex $argv 1]
set irfile [lindex $argv 0]
# Generate top file. # Generate top file.
set fp [open $argv "r"] set fp [open $irfile "r"]
proc readto {fp s} { proc readto {fp s} {
while {[gets $fp line] >= 0} { while {[gets $fp line] >= 0} {
...@@ -113,10 +115,10 @@ close $topfp ...@@ -113,10 +115,10 @@ close $topfp
# run assign on the topfile and $testbed # run assign on the topfile and $testbed
puts "Running assign ($assign -b -t $testbed $tmpfile)" puts "Running assign ($assign -b -t $testbed $tmpfile)"
puts " Log in [file dirname $argv]/assign.log" puts " Log in [file dirname $irfile]/assign.log"
set run 0 set run 0
while {$run < $maxrun} { while {$run < $maxrun} {
set assignfp [open "|$assign -b -t $testbed $tmpfile | tee -a [file dirname $argv]/assign.log" r] set assignfp [open "|$assign -b -t $testbed $tmpfile | tee -a [file dirname $irfile]/assign.log" r]
set problem 0 set problem 0
set score -1 set score -1
set seed 0 set seed 0
...@@ -162,7 +164,7 @@ if {$run > $maxrun} { ...@@ -162,7 +164,7 @@ if {$run > $maxrun} {
close $assignfp close $assignfp
# append virtual section to ir # append virtual section to ir
set fp [open $argv a] set fp [open $irfile a]
puts "Adding virtual section" puts "Adding virtual section"
# XXX: we don't do links or lans yet # XXX: we don't do links or lans yet
......
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