📄 footpresure.tcl
字号:
########## Tcl recorder starts at 02/17/09 15:08:05 ##########
set version "6.0"
set proj_dir "E:/raflfile/sd/cpld"
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; continue}
if {$path && [regexp {^fpgabinpath} $lline]} {set fpga_bin $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]
set fpga_bin [string range $fpga_bin [expr [string first "=" $fpga_bin]+1] end]
regsub -all "\"" $fpga_bin "" fpga_bin
set fpga_bin [file join $fpga_bin]
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/vhd2jhd\" footvhdl.vhd -o footvhdl.jhd -m \"$install_dir/ispcpld/generic/lib/vhd/location.map\" -p \"$install_dir/ispcpld/generic/lib\""] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
########## Tcl recorder end at 02/17/09 15:08:05 ###########
########## Tcl recorder starts at 02/17/09 15:08:23 ##########
# Commands to make the Process:
# Compile EDIF File
if [catch {open CPLD_MPU1.cmd w} rspFile] {
puts stderr "Cannot create response file CPLD_MPU1.cmd: $rspFile"
} else {
puts $rspFile "PROJECT: CPLD_MPU1
working_path: \"$proj_dir\"
module: cpld_mpu1
vhdl_file_list: footvhdl.vhd
output_file_name: cpld_mpu1
suffix_name: edi
"
close $rspFile
}
if [runCmd "\"$cpld_bin/synpwrap\" -e cpld_mpu1 -target mach"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
file delete CPLD_MPU1.cmd
if [runCmd "\"$cpld_bin/edif2blf\" -edf cpld_mpu1.edi -out cpld_mpu1.bl0 -err automake.err -log cpld_mpu1.log -prj footpresure -lib \"$install_dir/ispcpld/dat/mach.edn\" -net_vcc vcc -net_gnd gnd -nbx -dse -tlw -cvt yes -xor"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
########## Tcl recorder end at 02/17/09 15:08:23 ###########
########## Tcl recorder starts at 02/17/09 15:09:34 ##########
# Commands to make the Process:
# VHDL Test Bench Template
if [runCmd "\"$cpld_bin/vhd2naf\" -tfi -proj footpresure -mod cpld_mpu1 -out cpld_mpu1 -tpl \"$install_dir/ispcpld/generic/vhdl/testbnch.tft\" -ext vht footvhdl.vhd"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
########## Tcl recorder end at 02/17/09 15:09:34 ###########
########## Tcl recorder starts at 02/17/09 15:09:37 ##########
# Commands to make the Process:
# Compiled Equations
if [runCmd "\"$cpld_bin/blif2eqn\" cpld_mpu1.bl0 -o cpld_mpu1.eq0 -err automake.err"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
########## Tcl recorder end at 02/17/09 15:09:37 ###########
########## Tcl recorder starts at 02/17/09 15:12:27 ##########
# Commands to make the Process:
# Hierarchy
if [runCmd "\"$cpld_bin/vhd2jhd\" footvhdl.vhd -o footvhdl.jhd -m \"$install_dir/ispcpld/generic/lib/vhd/location.map\" -p \"$install_dir/ispcpld/generic/lib\""] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
########## Tcl recorder end at 02/17/09 15:12:27 ###########
########## Tcl recorder starts at 02/17/09 15:24:52 ##########
# Commands to make the Process:
# Hierarchy
if [runCmd "\"$cpld_bin/vhd2jhd\" footvhdl.vhd -o footvhdl.jhd -m \"$install_dir/ispcpld/generic/lib/vhd/location.map\" -p \"$install_dir/ispcpld/generic/lib\""] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
########## Tcl recorder end at 02/17/09 15:24:52 ###########
########## Tcl recorder starts at 02/17/09 15:25:24 ##########
# Commands to make the Process:
# Hierarchy
if [runCmd "\"$cpld_bin/vhd2jhd\" footvhdl.vhd -o footvhdl.jhd -m \"$install_dir/ispcpld/generic/lib/vhd/location.map\" -p \"$install_dir/ispcpld/generic/lib\""] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
########## Tcl recorder end at 02/17/09 15:25:24 ###########
########## Tcl recorder starts at 02/17/09 15:27:49 ##########
# Commands to make the Process:
# Hierarchy
if [runCmd "\"$cpld_bin/vhd2jhd\" footvhdl.vhd -o footvhdl.jhd -m \"$install_dir/ispcpld/generic/lib/vhd/location.map\" -p \"$install_dir/ispcpld/generic/lib\""] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
########## Tcl recorder end at 02/17/09 15:27:49 ###########
########## Tcl recorder starts at 02/17/09 15:27:56 ##########
# Commands to make the Process:
# Hierarchy
if [runCmd "\"$cpld_bin/vhd2jhd\" footvhdl.vhd -o footvhdl.jhd -m \"$install_dir/ispcpld/generic/lib/vhd/location.map\" -p \"$install_dir/ispcpld/generic/lib\""] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
########## Tcl recorder end at 02/17/09 15:27:56 ###########
########## Tcl recorder starts at 02/17/09 15:27:58 ##########
# Commands to make the Process:
# Compiled Equations
if [catch {open CPLD_MPU1.cmd w} rspFile] {
puts stderr "Cannot create response file CPLD_MPU1.cmd: $rspFile"
} else {
puts $rspFile "PROJECT: CPLD_MPU1
working_path: \"$proj_dir\"
module: cpld_mpu1
vhdl_file_list: footvhdl.vhd
output_file_name: cpld_mpu1
suffix_name: edi
"
close $rspFile
}
if [runCmd "\"$cpld_bin/synpwrap\" -e cpld_mpu1 -target mach"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
file delete CPLD_MPU1.cmd
if [runCmd "\"$cpld_bin/edif2blf\" -edf cpld_mpu1.edi -out cpld_mpu1.bl0 -err automake.err -log cpld_mpu1.log -prj footpresure -lib \"$install_dir/ispcpld/dat/mach.edn\" -net_vcc vcc -net_gnd gnd -nbx -dse -tlw -cvt yes -xor"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
if [runCmd "\"$cpld_bin/blif2eqn\" cpld_mpu1.bl0 -o cpld_mpu1.eq0 -err automake.err"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
########## Tcl recorder end at 02/17/09 15:27:58 ###########
########## Tcl recorder starts at 02/17/09 15:28:25 ##########
# Commands to make the Process:
# VHDL Test Bench Template
if [runCmd "\"$cpld_bin/vhd2naf\" -tfi -proj footpresure -mod cpld_mpu1 -out cpld_mpu1 -tpl \"$install_dir/ispcpld/generic/vhdl/testbnch.tft\" -ext vht footvhdl.vhd"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
########## Tcl recorder end at 02/17/09 15:28:25 ###########
########## Tcl recorder starts at 02/17/09 15:28:30 ##########
# Commands to make the Process:
# Constraint Editor
if [runCmd "\"$cpld_bin/mblifopt\" cpld_mpu1.bl0 -collapse none -reduce none -keepwires -err automake.err -family"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
if [runCmd "\"$cpld_bin/mblflink\" \"cpld_mpu1.bl1\" -o \"footpresure.bl2\" -omod \"footpresure\" -err \"automake.err\""] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
if [runCmd "\"$cpld_bin/impsrc\" -prj footpresure -lci footpresure.lct -log footpresure.imp -err automake.err -tti footpresure.bl2 -dir $proj_dir"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
if [runCmd "\"$cpld_bin/abelvci\" -vci footpresure.lct -blifopt footpresure.b2_"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
if [runCmd "\"$cpld_bin/mblifopt\" footpresure.bl2 -sweep -mergefb -err automake.err -o footpresure.bl3 @footpresure.b2_ "] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
if [runCmd "\"$cpld_bin/abelvci\" -vci footpresure.lct -dev lc4k -diofft footpresure.d0"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
if [runCmd "\"$cpld_bin/mdiofft\" footpresure.bl3 -family amdmach -idev van -o footpresure.bl4 -oxrf footpresure.xrf -err automake.err @footpresure.d0 "] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
if [runCmd "\"$cpld_bin/abelvci\" -vci footpresure.lct -dev lc4k -prefit footpresure.l0"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
if [runCmd "\"$cpld_bin/prefit\" -blif -inp footpresure.bl4 -out footpresure.bl5 -err automake.err -log footpresure.log -mod cpld_mpu1 @footpresure.l0 -sc"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
if [runCmd "\"$cpld_bin/blifstat\" -i footpresure.bl5 -o footpresure.sif"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
# Application to view the Process:
# Constraint Editor
if [catch {open lattice_cmd.rs2 w} rspFile] {
puts stderr "Cannot create response file lattice_cmd.rs2: $rspFile"
} else {
puts $rspFile "-nodal -src footpresure.bl5 -type BLIF -presrc footpresure.bl3 -crf footpresure.crf -sif footpresure.sif -devfile \"$install_dir/ispcpld/dat/lc4k/m4s_128_92.dev\" -lci footpresure.lct
"
close $rspFile
}
if [runCmd "\"$cpld_bin/lciedit\" @lattice_cmd.rs2"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
########## Tcl recorder end at 02/17/09 15:28:30 ###########
########## Tcl recorder starts at 02/17/09 15:29:00 ##########
# Commands to make the Process:
# Optimization Constraint
# - none -
# Application to view the Process:
# Optimization Constraint
if [catch {open opt_cmd.rs2 w} rspFile] {
puts stderr "Cannot create response file opt_cmd.rs2: $rspFile"
} else {
puts $rspFile "-global -lci footpresure.lct -touch footpresure.imp
"
close $rspFile
}
if [runCmd "\"$cpld_bin/optedit\" @opt_cmd.rs2"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
########## Tcl recorder end at 02/17/09 15:29:00 ###########
########## Tcl recorder starts at 02/17/09 15:29:10 ##########
# Commands to make the Process:
# JEDEC File
if [catch {open footpresure.rs1 w} rspFile] {
puts stderr "Cannot create response file footpresure.rs1: $rspFile"
} else {
puts $rspFile "-i footpresure.bl5 -lci footpresure.lct -d m4s_128_92 -lco footpresure.lco -html_rpt -fti footpresure.fti -fmt PLA -tto footpresure.tt4 -nojed -eqn footpresure.eq3 -tmv NoInput.tmv
-rpt_num 1
"
close $rspFile
}
if [catch {open footpresure.rs2 w} rspFile] {
puts stderr "Cannot create response file footpresure.rs2: $rspFile"
} else {
puts $rspFile "-i footpresure.bl5 -lci footpresure.lct -d m4s_128_92 -lco footpresure.lco -html_rpt -fti footpresure.fti -fmt PLA -tto footpresure.tt4 -eqn footpresure.eq3 -tmv NoInput.tmv
-rpt_num 1
"
close $rspFile
}
if [runCmd "\"$cpld_bin/lpf4k\" \"@footpresure.rs2\""] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
file delete footpresure.rs1
file delete footpresure.rs2
if [runCmd "\"$cpld_bin/tda\" -i footpresure.bl5 -o footpresure.tda -lci footpresure.lct -dev m4s_128_92 -family lc4k -mod cpld_mpu1 -ovec noinput.tmv -err tda.err "] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
if [runCmd "\"$cpld_bin/synsvf\" -exe \"$install_dir/ispvmsystem/ispufw\" -prj footpresure -if footpresure.jed -j2s -log footpresure.svl "] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
########## Tcl recorder end at 02/17/09 15:29:10 ###########
########## Tcl recorder starts at 02/17/09 15:29:13 ##########
# Commands to make the Process:
# Constraint Editor
# - none -
# Application to view the Process:
# Constraint Editor
if [catch {open lattice_cmd.rs2 w} rspFile] {
puts stderr "Cannot create response file lattice_cmd.rs2: $rspFile"
} else {
puts $rspFile "-nodal -src footpresure.bl5 -type BLIF -presrc footpresure.bl3 -crf footpresure.crf -sif footpresure.sif -devfile \"$install_dir/ispcpld/dat/lc4k/m4s_128_92.dev\" -lci footpresure.lct
"
close $rspFile
}
if [runCmd "\"$cpld_bin/lciedit\" @lattice_cmd.rs2"] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
########## Tcl recorder end at 02/17/09 15:29:13 ###########
########## Tcl recorder starts at 02/17/09 15:35:30 ##########
# Commands to make the Process:
# Hierarchy
if [runCmd "\"$cpld_bin/vhd2jhd\" footvhdl.vhd -o footvhdl.jhd -m \"$install_dir/ispcpld/generic/lib/vhd/location.map\" -p \"$install_dir/ispcpld/generic/lib\""] {
return
} else {
vwait done
if [checkResult $done] {
return
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -