
########## Tcl recorder starts at 06/23/05 11:29:46 ##########

set version "5.0"
set proj_dir "C:/evaluation boards/xp/high_end/eval_code/ddr/vhdl/pnr"
cd $proj_dir

# Get directory paths
set pver $version
regsub -all {\.} $pver {_} pver
set lscfile "lsc_"
append lscfile $pver ".ini"
set lsvini_dir [lindex [array get env LSC_INI_PATH] 1]
set lsvini_path [file join $lsvini_dir $lscfile]
if {[catch {set fid [open $lsvini_path]} msg]} {
	 puts "File Open Error: $lsvini_path"
	 return false
} else {set data [read $fid]; close $fid }
foreach line [split $data '\n'] { 
	set lline [string tolower $line]
	set lline [string trim $lline]
	if {[string compare $lline "\[paths\]"] == 0} { set path 1; continue}
	if {$path && [regexp {^\[} $lline]} {set path 0; break}
	if {$path && [regexp {^bin} $lline]} {set cpld_bin $line; continue}
	if {$path && [regexp {^fpgapath} $lline]} {set fpga_dir $line}}

set cpld_bin [string range $cpld_bin [expr [string first "=" $cpld_bin]+1] end]
regsub -all "\"" $cpld_bin "" cpld_bin
set cpld_bin [file join $cpld_bin]
set install_dir [string range $cpld_bin 0 [expr [string first "ispcpld" $cpld_bin]-2]]
regsub -all "\"" $install_dir "" install_dir
set install_dir [file join $install_dir]
set fpga_dir [string range $fpga_dir [expr [string first "=" $fpga_dir]+1] end]
regsub -all "\"" $fpga_dir "" fpga_dir
set fpga_dir [file join $fpga_dir]

switch $tcl_platform(platform) {
   windows {
      set fpga_bin [file join $fpga_dir "bin" "nt"]
	     if {[string match "*$fpga_bin;*" $env(PATH)] == 0 } {
	        set env(PATH) "$fpga_bin;$env(PATH)" } }
   unix {
      set fpga_bin [file join $fpga_dir "bin" "sol"]
      if {[string match "*$fpga_bin;*" $env(PATH)] == 0 } {
         set env(PATH) "$fpga_bin;$env(PATH)"}}}

if {[string match "*$cpld_bin;*" $env(PATH)] == 0 } {
   set env(PATH) "$cpld_bin;$env(PATH)" }

lappend auto_path [file join $install_dir "ispcpld" "tcltk" "lib" "ispwidget" "runproc"]
package require runcmd

# Commands to make the Process: 
# Hierarchy
if [runCmd "\"$cpld_bin/edfin\" -i ../syn/rev_1/ddr_top.edn -jhd ddr_top.jhd -log ddr_top.log -dev orca -lbp \"$fpga_dir/data\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}

########## Tcl recorder end at 06/23/05 11:29:46 ###########


########## Tcl recorder starts at 06/23/05 11:31:29 ##########

set version "5.0"
set proj_dir "C:/evaluation boards/xp/high_end/eval_code/ddr/vhdl/pnr"
cd $proj_dir

# Get directory paths
set pver $version
regsub -all {\.} $pver {_} pver
set lscfile "lsc_"
append lscfile $pver ".ini"
set lsvini_dir [lindex [array get env LSC_INI_PATH] 1]
set lsvini_path [file join $lsvini_dir $lscfile]
if {[catch {set fid [open $lsvini_path]} msg]} {
	 puts "File Open Error: $lsvini_path"
	 return false
} else {set data [read $fid]; close $fid }
foreach line [split $data '\n'] { 
	set lline [string tolower $line]
	set lline [string trim $lline]
	if {[string compare $lline "\[paths\]"] == 0} { set path 1; continue}
	if {$path && [regexp {^\[} $lline]} {set path 0; break}
	if {$path && [regexp {^bin} $lline]} {set cpld_bin $line; continue}
	if {$path && [regexp {^fpgapath} $lline]} {set fpga_dir $line}}

set cpld_bin [string range $cpld_bin [expr [string first "=" $cpld_bin]+1] end]
regsub -all "\"" $cpld_bin "" cpld_bin
set cpld_bin [file join $cpld_bin]
set install_dir [string range $cpld_bin 0 [expr [string first "ispcpld" $cpld_bin]-2]]
regsub -all "\"" $install_dir "" install_dir
set install_dir [file join $install_dir]
set fpga_dir [string range $fpga_dir [expr [string first "=" $fpga_dir]+1] end]
regsub -all "\"" $fpga_dir "" fpga_dir
set fpga_dir [file join $fpga_dir]

switch $tcl_platform(platform) {
   windows {
      set fpga_bin [file join $fpga_dir "bin" "nt"]
	     if {[string match "*$fpga_bin;*" $env(PATH)] == 0 } {
	        set env(PATH) "$fpga_bin;$env(PATH)" } }
   unix {
      set fpga_bin [file join $fpga_dir "bin" "sol"]
      if {[string match "*$fpga_bin;*" $env(PATH)] == 0 } {
         set env(PATH) "$fpga_bin;$env(PATH)"}}}

if {[string match "*$cpld_bin;*" $env(PATH)] == 0 } {
   set env(PATH) "$cpld_bin;$env(PATH)" }

lappend auto_path [file join $install_dir "ispcpld" "tcltk" "lib" "ispwidget" "runproc"]
package require runcmd

# Commands to make the Process: 
# Hierarchy
if [runCmd "\"$cpld_bin/edfin\" -i ../syn/rev_1/ddr_top.edn -jhd ddr_top.jhd -log ddr_top.log -dev orca -lbp \"$fpga_dir/data\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}

########## Tcl recorder end at 06/23/05 11:31:29 ###########


########## Tcl recorder starts at 06/23/05 11:31:29 ##########

set version "5.0"
set proj_dir "C:/evaluation boards/xp/high_end/eval_code/ddr/vhdl/pnr"
cd $proj_dir

# Get directory paths
set pver $version
regsub -all {\.} $pver {_} pver
set lscfile "lsc_"
append lscfile $pver ".ini"
set lsvini_dir [lindex [array get env LSC_INI_PATH] 1]
set lsvini_path [file join $lsvini_dir $lscfile]
if {[catch {set fid [open $lsvini_path]} msg]} {
	 puts "File Open Error: $lsvini_path"
	 return false
} else {set data [read $fid]; close $fid }
foreach line [split $data '\n'] { 
	set lline [string tolower $line]
	set lline [string trim $lline]
	if {[string compare $lline "\[paths\]"] == 0} { set path 1; continue}
	if {$path && [regexp {^\[} $lline]} {set path 0; break}
	if {$path && [regexp {^bin} $lline]} {set cpld_bin $line; continue}
	if {$path && [regexp {^fpgapath} $lline]} {set fpga_dir $line}}

set cpld_bin [string range $cpld_bin [expr [string first "=" $cpld_bin]+1] end]
regsub -all "\"" $cpld_bin "" cpld_bin
set cpld_bin [file join $cpld_bin]
set install_dir [string range $cpld_bin 0 [expr [string first "ispcpld" $cpld_bin]-2]]
regsub -all "\"" $install_dir "" install_dir
set install_dir [file join $install_dir]
set fpga_dir [string range $fpga_dir [expr [string first "=" $fpga_dir]+1] end]
regsub -all "\"" $fpga_dir "" fpga_dir
set fpga_dir [file join $fpga_dir]

switch $tcl_platform(platform) {
   windows {
      set fpga_bin [file join $fpga_dir "bin" "nt"]
	     if {[string match "*$fpga_bin;*" $env(PATH)] == 0 } {
	        set env(PATH) "$fpga_bin;$env(PATH)" } }
   unix {
      set fpga_bin [file join $fpga_dir "bin" "sol"]
      if {[string match "*$fpga_bin;*" $env(PATH)] == 0 } {
         set env(PATH) "$fpga_bin;$env(PATH)"}}}

if {[string match "*$cpld_bin;*" $env(PATH)] == 0 } {
   set env(PATH) "$cpld_bin;$env(PATH)" }

lappend auto_path [file join $install_dir "ispcpld" "tcltk" "lib" "ispwidget" "runproc"]
package require runcmd

# Commands to make the Process: 
# Generate Data File (JEDEC)
if [runCmd "\"$fpga_bin/edif2ngd\" -l mg5g00 -d lfxp10c \"../syn/rev_1/ddr_top.edn\" \"ddr_top.ngo\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
if [runCmd "\"$fpga_bin/edif2ngd\" -l mg5g00 -d lfxp10c \"../syn/rev_1/ddr_top.edn\" \"ddr_top.ngo\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
if [runCmd "\"$cpld_bin/edfmodgen\" -inp \"../syn/rev_1/ddr_top.edn\" -log \"ddr_top.emg\" -arch mg5g00 -dev lfxp10c"] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
if [runCmd "\"$fpga_bin/edfupdate\" -t \"ddr_vhdl_pnr.tcy\" -w \"ddr_top.ngo\" -m \"ddr_top.ngo\" \"ddr_vhdl_pnr.ngx\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
if [runCmd "\"$fpga_bin/ngdbuild\" -a mg5g00 -d lfxp10c -p \"$proj_dir\" \"ddr_top.ngo\" \"ddr_vhdl_pnr.ngd\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
if [runCmd "\"$fpga_bin/map\" -a mg5g00 -p lfxp10c -t fpbga388 -s 5 \"ddr_vhdl_pnr.ngd\" -o \"ddr_vhdl_pnr_map.ncd\" -mp \"ddr_vhdl_pnr.mrp\" \"ddr_vhdl_pnr.prf\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
if [catch {open ddr_vhdl_pnr.cm2 w} rspFile] {
	puts stderr "Cannot create response file ddr_vhdl_pnr.cm2: $rspFile"
} else {
	puts $rspFile "-t ddr_vhdl_pnr.mt
-to ddr_vhdl_pnr.tw1
-o ddr_vhdl_pnr.tcm
-log ddr_vhdl_pnr.log
-pr ddr_vhdl_pnr.prf
-rpt ddr_vhdl_pnr.mrp
"
	close $rspFile
}
if [runCmd "\"$cpld_bin/checkpoint\" -m -f \"ddr_vhdl_pnr.cmm\" -f \"ddr_vhdl_pnr.cm2\" -arch mg5g00 \"ddr_vhdl_pnr_map.ncd\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
file delete ddr_vhdl_pnr.cm2
if [catch {open ddr_vhdl_pnr.p2t w} rspFile] {
	puts stderr "Cannot create response file ddr_vhdl_pnr.p2t: $rspFile"
} else {
	puts $rspFile "-w
-i 6
-l 5
-n 1
-t 1
-s 1
-c 0
-e 0
"
	close $rspFile
}
if [catch {open ddr_vhdl_pnr.p3t w} rspFile] {
	puts stderr "Cannot create response file ddr_vhdl_pnr.p3t: $rspFile"
} else {
	puts $rspFile "-rem
-log ddr_vhdl_pnr.log
-o ddr_vhdl_pnr.par
-pr ddr_vhdl_pnr.prf
"
	close $rspFile
}
if [runCmd "\"$cpld_bin/multipar\" -p ddr_vhdl_pnr.p2t -f \"ddr_vhdl_pnr.p3t\" \"ddr_vhdl_pnr_map.ncd\" \"ddr_vhdl_pnr.ncd\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
if [catch {open ddr_vhdl_pnr.cm2 w} rspFile] {
	puts stderr "Cannot create response file ddr_vhdl_pnr.cm2: $rspFile"
} else {
	puts $rspFile "-t ddr_vhdl_pnr.pt
-to ddr_vhdl_pnr.twr
-o ddr_vhdl_pnr.tcp
-log ddr_vhdl_pnr.log
-pr ddr_vhdl_pnr.prf
-rpt ddr_vhdl_pnr.par
"
	close $rspFile
}
if [runCmd "\"$cpld_bin/checkpoint\" -p -f \"ddr_vhdl_pnr.cmp\" -f \"ddr_vhdl_pnr.cm2\" -arch mg5g00 \"ddr_vhdl_pnr.ncd\" -l 60"] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
file delete ddr_vhdl_pnr.cm2
if [catch {open ddr_vhdl_pnr.t2b w} rspFile] {
	puts stderr "Cannot create response file ddr_vhdl_pnr.t2b: $rspFile"
} else {
	puts $rspFile "-g CfgMode:Disable
-g readback:flash
-g readcapture:disable
-g ramcfg:reset
-g synsrc:no
-g pllset:none
-g es:yes
"
	close $rspFile
}
if [runCmd "\"$fpga_bin/bitgen\" -f \"ddr_vhdl_pnr.t2b\" -w \"ddr_vhdl_pnr.ncd\" \"ddr_vhdl_pnr.prf\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
if [runCmd "\"$cpld_bin/synsvf\" -exe \"$install_dir/ispvmsystem/ispufw\" -prj ddr_vhdl_pnr -if ddr_vhdl_pnr.bit -log ddr_vhdl_pnr.prm -b2j -oft -jed -of ddr_vhdl_pnr.jed -comment ddr_vhdl_pnr.alt "] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}

########## Tcl recorder end at 06/23/05 11:31:29 ###########


########## Tcl recorder starts at 06/23/05 11:33:20 ##########

set version "5.0"
set proj_dir "C:/evaluation boards/xp/high_end/eval_code/ddr/vhdl/pnr"
cd $proj_dir

# Get directory paths
set pver $version
regsub -all {\.} $pver {_} pver
set lscfile "lsc_"
append lscfile $pver ".ini"
set lsvini_dir [lindex [array get env LSC_INI_PATH] 1]
set lsvini_path [file join $lsvini_dir $lscfile]
if {[catch {set fid [open $lsvini_path]} msg]} {
	 puts "File Open Error: $lsvini_path"
	 return false
} else {set data [read $fid]; close $fid }
foreach line [split $data '\n'] { 
	set lline [string tolower $line]
	set lline [string trim $lline]
	if {[string compare $lline "\[paths\]"] == 0} { set path 1; continue}
	if {$path && [regexp {^\[} $lline]} {set path 0; break}
	if {$path && [regexp {^bin} $lline]} {set cpld_bin $line; continue}
	if {$path && [regexp {^fpgapath} $lline]} {set fpga_dir $line}}

set cpld_bin [string range $cpld_bin [expr [string first "=" $cpld_bin]+1] end]
regsub -all "\"" $cpld_bin "" cpld_bin
set cpld_bin [file join $cpld_bin]
set install_dir [string range $cpld_bin 0 [expr [string first "ispcpld" $cpld_bin]-2]]
regsub -all "\"" $install_dir "" install_dir
set install_dir [file join $install_dir]
set fpga_dir [string range $fpga_dir [expr [string first "=" $fpga_dir]+1] end]
regsub -all "\"" $fpga_dir "" fpga_dir
set fpga_dir [file join $fpga_dir]

switch $tcl_platform(platform) {
   windows {
      set fpga_bin [file join $fpga_dir "bin" "nt"]
	     if {[string match "*$fpga_bin;*" $env(PATH)] == 0 } {
	        set env(PATH) "$fpga_bin;$env(PATH)" } }
   unix {
      set fpga_bin [file join $fpga_dir "bin" "sol"]
      if {[string match "*$fpga_bin;*" $env(PATH)] == 0 } {
         set env(PATH) "$fpga_bin;$env(PATH)"}}}

if {[string match "*$cpld_bin;*" $env(PATH)] == 0 } {
   set env(PATH) "$cpld_bin;$env(PATH)" }

lappend auto_path [file join $install_dir "ispcpld" "tcltk" "lib" "ispwidget" "runproc"]
package require runcmd

# Commands to make the Process: 
# HTML Place & Route Report
if [catch {open ddr_vhdl_pnr.rsp w} rspFile] {
	puts stderr "Cannot create response file ddr_vhdl_pnr.rsp: $rspFile"
} else {
	puts $rspFile "-mrp ddr_vhdl_pnr.mrp
-pad ddr_vhdl_pnr.pad
-par ddr_vhdl_pnr.par
-ptwr ddr_vhdl_pnr.twr
ddr_vhdl_pnr
"
	close $rspFile
}
if [runCmd "\"$fpga_bin/htmlrpt\" -f \"ddr_vhdl_pnr.rsp\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
file delete ddr_vhdl_pnr.rsp

########## Tcl recorder end at 06/23/05 11:33:20 ###########


########## Tcl recorder starts at 06/23/05 11:35:48 ##########

set version "5.0"
set proj_dir "C:/evaluation boards/xp/high_end/eval_code/ddr/vhdl/pnr"
cd $proj_dir

# Get directory paths
set pver $version
regsub -all {\.} $pver {_} pver
set lscfile "lsc_"
append lscfile $pver ".ini"
set lsvini_dir [lindex [array get env LSC_INI_PATH] 1]
set lsvini_path [file join $lsvini_dir $lscfile]
if {[catch {set fid [open $lsvini_path]} msg]} {
	 puts "File Open Error: $lsvini_path"
	 return false
} else {set data [read $fid]; close $fid }
foreach line [split $data '\n'] { 
	set lline [string tolower $line]
	set lline [string trim $lline]
	if {[string compare $lline "\[paths\]"] == 0} { set path 1; continue}
	if {$path && [regexp {^\[} $lline]} {set path 0; break}
	if {$path && [regexp {^bin} $lline]} {set cpld_bin $line; continue}
	if {$path && [regexp {^fpgapath} $lline]} {set fpga_dir $line}}

set cpld_bin [string range $cpld_bin [expr [string first "=" $cpld_bin]+1] end]
regsub -all "\"" $cpld_bin "" cpld_bin
set cpld_bin [file join $cpld_bin]
set install_dir [string range $cpld_bin 0 [expr [string first "ispcpld" $cpld_bin]-2]]
regsub -all "\"" $install_dir "" install_dir
set install_dir [file join $install_dir]
set fpga_dir [string range $fpga_dir [expr [string first "=" $fpga_dir]+1] end]
regsub -all "\"" $fpga_dir "" fpga_dir
set fpga_dir [file join $fpga_dir]

switch $tcl_platform(platform) {
   windows {
      set fpga_bin [file join $fpga_dir "bin" "nt"]
	     if {[string match "*$fpga_bin;*" $env(PATH)] == 0 } {
	        set env(PATH) "$fpga_bin;$env(PATH)" } }
   unix {
      set fpga_bin [file join $fpga_dir "bin" "sol"]
      if {[string match "*$fpga_bin;*" $env(PATH)] == 0 } {
         set env(PATH) "$fpga_bin;$env(PATH)"}}}

if {[string match "*$cpld_bin;*" $env(PATH)] == 0 } {
   set env(PATH) "$cpld_bin;$env(PATH)" }

lappend auto_path [file join $install_dir "ispcpld" "tcltk" "lib" "ispwidget" "runproc"]
package require runcmd

# Commands to make the Process: 
# Hierarchy
if [runCmd "\"$cpld_bin/edfin\" -i ../syn/rev_1/ddr_top.edn -jhd ddr_top.jhd -log ddr_top.log -dev orca -lbp \"$fpga_dir/data\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}

########## Tcl recorder end at 06/23/05 11:35:48 ###########


########## Tcl recorder starts at 06/23/05 11:35:48 ##########

set version "5.0"
set proj_dir "C:/evaluation boards/xp/high_end/eval_code/ddr/vhdl/pnr"
cd $proj_dir

# Get directory paths
set pver $version
regsub -all {\.} $pver {_} pver
set lscfile "lsc_"
append lscfile $pver ".ini"
set lsvini_dir [lindex [array get env LSC_INI_PATH] 1]
set lsvini_path [file join $lsvini_dir $lscfile]
if {[catch {set fid [open $lsvini_path]} msg]} {
	 puts "File Open Error: $lsvini_path"
	 return false
} else {set data [read $fid]; close $fid }
foreach line [split $data '\n'] { 
	set lline [string tolower $line]
	set lline [string trim $lline]
	if {[string compare $lline "\[paths\]"] == 0} { set path 1; continue}
	if {$path && [regexp {^\[} $lline]} {set path 0; break}
	if {$path && [regexp {^bin} $lline]} {set cpld_bin $line; continue}
	if {$path && [regexp {^fpgapath} $lline]} {set fpga_dir $line}}

set cpld_bin [string range $cpld_bin [expr [string first "=" $cpld_bin]+1] end]
regsub -all "\"" $cpld_bin "" cpld_bin
set cpld_bin [file join $cpld_bin]
set install_dir [string range $cpld_bin 0 [expr [string first "ispcpld" $cpld_bin]-2]]
regsub -all "\"" $install_dir "" install_dir
set install_dir [file join $install_dir]
set fpga_dir [string range $fpga_dir [expr [string first "=" $fpga_dir]+1] end]
regsub -all "\"" $fpga_dir "" fpga_dir
set fpga_dir [file join $fpga_dir]

switch $tcl_platform(platform) {
   windows {
      set fpga_bin [file join $fpga_dir "bin" "nt"]
	     if {[string match "*$fpga_bin;*" $env(PATH)] == 0 } {
	        set env(PATH) "$fpga_bin;$env(PATH)" } }
   unix {
      set fpga_bin [file join $fpga_dir "bin" "sol"]
      if {[string match "*$fpga_bin;*" $env(PATH)] == 0 } {
         set env(PATH) "$fpga_bin;$env(PATH)"}}}

if {[string match "*$cpld_bin;*" $env(PATH)] == 0 } {
   set env(PATH) "$cpld_bin;$env(PATH)" }

lappend auto_path [file join $install_dir "ispcpld" "tcltk" "lib" "ispwidget" "runproc"]
package require runcmd

# Commands to make the Process: 
# Generate Data File (JEDEC)
if [runCmd "\"$fpga_bin/edif2ngd\" -l mg5g00 -d lfxp10c \"../syn/rev_1/ddr_top.edn\" \"ddr_top.ngo\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
if [runCmd "\"$fpga_bin/edif2ngd\" -l mg5g00 -d lfxp10c \"../syn/rev_1/ddr_top.edn\" \"ddr_top.ngo\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
if [runCmd "\"$cpld_bin/edfmodgen\" -inp \"../syn/rev_1/ddr_top.edn\" -log \"ddr_top.emg\" -arch mg5g00 -dev lfxp10c"] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
if [runCmd "\"$fpga_bin/edfupdate\" -t \"ddr_vhdl_pnr.tcy\" -w \"ddr_top.ngo\" -m \"ddr_top.ngo\" \"ddr_vhdl_pnr.ngx\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
if [runCmd "\"$fpga_bin/ngdbuild\" -a mg5g00 -d lfxp10c -p \"$proj_dir\" \"ddr_top.ngo\" \"ddr_vhdl_pnr.ngd\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
if [runCmd "\"$fpga_bin/map\" -a mg5g00 -p lfxp10c -t fpbga388 -s 5 \"ddr_vhdl_pnr.ngd\" -o \"ddr_vhdl_pnr_map.ncd\" -mp \"ddr_vhdl_pnr.mrp\" \"ddr_vhdl_pnr.prf\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
if [catch {open ddr_vhdl_pnr.cm2 w} rspFile] {
	puts stderr "Cannot create response file ddr_vhdl_pnr.cm2: $rspFile"
} else {
	puts $rspFile "-t ddr_vhdl_pnr.mt
-to ddr_vhdl_pnr.tw1
-o ddr_vhdl_pnr.tcm
-log ddr_vhdl_pnr.log
-pr ddr_vhdl_pnr.prf
-rpt ddr_vhdl_pnr.mrp
"
	close $rspFile
}
if [runCmd "\"$cpld_bin/checkpoint\" -m -f \"ddr_vhdl_pnr.cmm\" -f \"ddr_vhdl_pnr.cm2\" -arch mg5g00 \"ddr_vhdl_pnr_map.ncd\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
file delete ddr_vhdl_pnr.cm2
if [catch {open ddr_vhdl_pnr.p2t w} rspFile] {
	puts stderr "Cannot create response file ddr_vhdl_pnr.p2t: $rspFile"
} else {
	puts $rspFile "-w
-i 6
-l 5
-n 1
-t 1
-s 1
-c 0
-e 0
"
	close $rspFile
}
if [catch {open ddr_vhdl_pnr.p3t w} rspFile] {
	puts stderr "Cannot create response file ddr_vhdl_pnr.p3t: $rspFile"
} else {
	puts $rspFile "-rem
-log ddr_vhdl_pnr.log
-o ddr_vhdl_pnr.par
-pr ddr_vhdl_pnr.prf
"
	close $rspFile
}
if [runCmd "\"$cpld_bin/multipar\" -p ddr_vhdl_pnr.p2t -f \"ddr_vhdl_pnr.p3t\" \"ddr_vhdl_pnr_map.ncd\" \"ddr_vhdl_pnr.ncd\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
if [catch {open ddr_vhdl_pnr.cm2 w} rspFile] {
	puts stderr "Cannot create response file ddr_vhdl_pnr.cm2: $rspFile"
} else {
	puts $rspFile "-t ddr_vhdl_pnr.pt
-to ddr_vhdl_pnr.twr
-o ddr_vhdl_pnr.tcp
-log ddr_vhdl_pnr.log
-pr ddr_vhdl_pnr.prf
-rpt ddr_vhdl_pnr.par
"
	close $rspFile
}
if [runCmd "\"$cpld_bin/checkpoint\" -p -f \"ddr_vhdl_pnr.cmp\" -f \"ddr_vhdl_pnr.cm2\" -arch mg5g00 \"ddr_vhdl_pnr.ncd\" -l 60"] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
file delete ddr_vhdl_pnr.cm2
if [catch {open ddr_vhdl_pnr.t2b w} rspFile] {
	puts stderr "Cannot create response file ddr_vhdl_pnr.t2b: $rspFile"
} else {
	puts $rspFile "-g CfgMode:Disable
-g readback:flash
-g readcapture:disable
-g ramcfg:reset
-g synsrc:no
-g pllset:none
-g es:yes
"
	close $rspFile
}
if [runCmd "\"$fpga_bin/bitgen\" -f \"ddr_vhdl_pnr.t2b\" -w \"ddr_vhdl_pnr.ncd\" \"ddr_vhdl_pnr.prf\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
if [runCmd "\"$cpld_bin/synsvf\" -exe \"$install_dir/ispvmsystem/ispufw\" -prj ddr_vhdl_pnr -if ddr_vhdl_pnr.bit -log ddr_vhdl_pnr.prm -b2j -oft -jed -of ddr_vhdl_pnr.jed -comment ddr_vhdl_pnr.alt "] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}

########## Tcl recorder end at 06/23/05 11:35:48 ###########


########## Tcl recorder starts at 06/23/05 11:37:53 ##########

set version "5.0"
set proj_dir "C:/evaluation boards/xp/high_end/eval_code/ddr/vhdl/pnr"
cd $proj_dir

# Get directory paths
set pver $version
regsub -all {\.} $pver {_} pver
set lscfile "lsc_"
append lscfile $pver ".ini"
set lsvini_dir [lindex [array get env LSC_INI_PATH] 1]
set lsvini_path [file join $lsvini_dir $lscfile]
if {[catch {set fid [open $lsvini_path]} msg]} {
	 puts "File Open Error: $lsvini_path"
	 return false
} else {set data [read $fid]; close $fid }
foreach line [split $data '\n'] { 
	set lline [string tolower $line]
	set lline [string trim $lline]
	if {[string compare $lline "\[paths\]"] == 0} { set path 1; continue}
	if {$path && [regexp {^\[} $lline]} {set path 0; break}
	if {$path && [regexp {^bin} $lline]} {set cpld_bin $line; continue}
	if {$path && [regexp {^fpgapath} $lline]} {set fpga_dir $line}}

set cpld_bin [string range $cpld_bin [expr [string first "=" $cpld_bin]+1] end]
regsub -all "\"" $cpld_bin "" cpld_bin
set cpld_bin [file join $cpld_bin]
set install_dir [string range $cpld_bin 0 [expr [string first "ispcpld" $cpld_bin]-2]]
regsub -all "\"" $install_dir "" install_dir
set install_dir [file join $install_dir]
set fpga_dir [string range $fpga_dir [expr [string first "=" $fpga_dir]+1] end]
regsub -all "\"" $fpga_dir "" fpga_dir
set fpga_dir [file join $fpga_dir]

switch $tcl_platform(platform) {
   windows {
      set fpga_bin [file join $fpga_dir "bin" "nt"]
	     if {[string match "*$fpga_bin;*" $env(PATH)] == 0 } {
	        set env(PATH) "$fpga_bin;$env(PATH)" } }
   unix {
      set fpga_bin [file join $fpga_dir "bin" "sol"]
      if {[string match "*$fpga_bin;*" $env(PATH)] == 0 } {
         set env(PATH) "$fpga_bin;$env(PATH)"}}}

if {[string match "*$cpld_bin;*" $env(PATH)] == 0 } {
   set env(PATH) "$cpld_bin;$env(PATH)" }

lappend auto_path [file join $install_dir "ispcpld" "tcltk" "lib" "ispwidget" "runproc"]
package require runcmd

# Commands to make the Process: 
# HTML Place & Route Report
if [catch {open ddr_vhdl_pnr.rsp w} rspFile] {
	puts stderr "Cannot create response file ddr_vhdl_pnr.rsp: $rspFile"
} else {
	puts $rspFile "-mrp ddr_vhdl_pnr.mrp
-pad ddr_vhdl_pnr.pad
-par ddr_vhdl_pnr.par
-ptwr ddr_vhdl_pnr.twr
ddr_vhdl_pnr
"
	close $rspFile
}
if [runCmd "\"$fpga_bin/htmlrpt\" -f \"ddr_vhdl_pnr.rsp\""] {
	return
} else {
	vwait done
	if [checkResult $done] {
		return
	}
}
file delete ddr_vhdl_pnr.rsp

########## Tcl recorder end at 06/23/05 11:37:53 ###########

