summaryrefslogtreecommitdiffstats
path: root/sw/cpld/ADDRESS_DECODER.tcl
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2017-04-13 16:03:11 +0200
committerNao Pross <naopross@thearcway.org>2017-04-13 16:03:11 +0200
commit985e16b181fd55e28538f2d4524550bd425b86e9 (patch)
tree3d444d9e6a651a4345069c8fc96a60a811a57ac8 /sw/cpld/ADDRESS_DECODER.tcl
parentMerge branch 'master' into naopross (diff)
downloadz80uPC-985e16b181fd55e28538f2d4524550bd425b86e9.tar.gz
z80uPC-985e16b181fd55e28538f2d4524550bd425b86e9.zip
switch from GAL (pld) to M4 32/32 CPLD
add M4 32/32 CPLD datasheet new VHDL code with better control over the address space thanks to the M4 which has a 16 bit input port
Diffstat (limited to 'sw/cpld/ADDRESS_DECODER.tcl')
-rw-r--r--sw/cpld/ADDRESS_DECODER.tcl270
1 files changed, 270 insertions, 0 deletions
diff --git a/sw/cpld/ADDRESS_DECODER.tcl b/sw/cpld/ADDRESS_DECODER.tcl
new file mode 100644
index 0000000..4c9fe3f
--- /dev/null
+++ b/sw/cpld/ADDRESS_DECODER.tcl
@@ -0,0 +1,270 @@
+
+########## Tcl recorder starts at 04/03/17 14:05:56 ##########
+
+set version "2.0"
+set proj_dir "//nas001/account_PIF/_prossn/SAMB_3/lab3/projects/z80uPC/sw/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\" address_decoder.vhd -o address_decoder.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 04/03/17 14:05:56 ###########
+
+
+########## Tcl recorder starts at 04/03/17 14:07:59 ##########
+
+# Commands to make the Process:
+# Hierarchy
+if [runCmd "\"$cpld_bin/vhd2jhd\" address_decoder.vhd -o address_decoder.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 04/03/17 14:07:59 ###########
+
+
+########## Tcl recorder starts at 04/03/17 14:08:48 ##########
+
+# Commands to make the Process:
+# Hierarchy
+if [runCmd "\"$cpld_bin/vhd2jhd\" address_decoder.vhd -o address_decoder.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 04/03/17 14:08:48 ###########
+
+
+########## Tcl recorder starts at 04/03/17 14:11:44 ##########
+
+# Commands to make the Process:
+# Hierarchy
+if [runCmd "\"$cpld_bin/vhd2jhd\" address_decoder.vhd -o address_decoder.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 04/03/17 14:11:44 ###########
+
+
+########## Tcl recorder starts at 04/03/17 14:22:22 ##########
+
+# Commands to make the Process:
+# Hierarchy
+if [runCmd "\"$cpld_bin/vhd2jhd\" address_decoder.vhd -o address_decoder.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 04/03/17 14:22:22 ###########
+
+
+########## Tcl recorder starts at 04/03/17 14:22:30 ##########
+
+# Commands to make the Process:
+# Hierarchy
+if [runCmd "\"$cpld_bin/vhd2jhd\" address_decoder.vhd -o address_decoder.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 04/03/17 14:22:31 ###########
+
+
+########## Tcl recorder starts at 04/03/17 14:28:11 ##########
+
+# Commands to make the Process:
+# Hierarchy
+if [runCmd "\"$cpld_bin/vhd2jhd\" address_decoder.vhd -o address_decoder.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 04/03/17 14:28:11 ###########
+
+
+########## Tcl recorder starts at 04/03/17 14:56:18 ##########
+
+# Commands to make the Process:
+# Hierarchy
+if [runCmd "\"$cpld_bin/vhd2jhd\" address_decoder.vhd -o address_decoder.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 04/03/17 14:56:18 ###########
+
+
+########## Tcl recorder starts at 04/03/17 14:56:23 ##########
+
+# Commands to make the Process:
+# Hierarchy
+if [runCmd "\"$cpld_bin/vhd2jhd\" address_decoder.vhd -o address_decoder.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 04/03/17 14:56:23 ###########
+
+
+########## Tcl recorder starts at 04/13/17 10:29:16 ##########
+
+# Commands to make the Process:
+# Hierarchy
+if [runCmd "\"$cpld_bin/vhd2jhd\" address_decoder.vhd -o address_decoder.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 04/13/17 10:29:16 ###########
+
+
+########## Tcl recorder starts at 04/13/17 10:29:50 ##########
+
+# Commands to make the Process:
+# Hierarchy
+if [runCmd "\"$cpld_bin/vhd2jhd\" address_decoder.vhd -o address_decoder.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 04/13/17 10:29:50 ###########
+
+
+########## Tcl recorder starts at 04/13/17 10:33:10 ##########
+
+# Commands to make the Process:
+# Hierarchy
+if [runCmd "\"$cpld_bin/vhd2jhd\" address_decoder.vhd -o address_decoder.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 04/13/17 10:33:10 ###########
+
+
+########## Tcl recorder starts at 04/13/17 10:33:11 ##########
+
+# Commands to make the Process:
+# Hierarchy
+if [runCmd "\"$cpld_bin/vhd2jhd\" address_decoder.vhd -o address_decoder.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 04/13/17 10:33:11 ###########
+
+
+########## Tcl recorder starts at 04/13/17 10:34:43 ##########
+
+# Commands to make the Process:
+# Hierarchy
+if [runCmd "\"$cpld_bin/vhd2jhd\" address_decoder.vhd -o address_decoder.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 04/13/17 10:34:43 ###########
+