OpenCores
URL https://opencores.org/ocsvn/bustap-jtag/bustap-jtag/trunk

Subversion Repositories bustap-jtag

[/] [bustap-jtag/] [trunk/] [cmd/] [altera/] [virtual_jtag_console.tcl] - Diff between revs 6 and 8

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 6 Rev 8
Line 1... Line 1...
##**************************************************************
##**************************************************************
## Module             : virtual_jtag_consile.tcl
## Module             : virtual_jtag_console.tcl
## Platform           : Windows xp sp2
## Platform           : Windows xp sp2
## Author             : Bibo Yang  (ash_riple@hotmail.com)
## Author             : Bibo Yang  (ash_riple@hotmail.com)
## Organization       : www.opencores.org
## Organization       : www.opencores.org
## Revision           : 2.1 
## Revision           : 2.1 
## Date               : 2012/03/15
## Date               : 2012/03/15
Line 36... Line 36...
        set fifo_data [device_virtual_dr_shift -instance_index $jtag_index_0 -length 50 -value_in_hex]
        set fifo_data [device_virtual_dr_shift -instance_index $jtag_index_0 -length 50 -value_in_hex]
        device_unlock
        device_unlock
        return $fifo_data
        return $fifo_data
}
}
 
 
proc config_addr {{jtag_index_1 1} {mask_1 0100000000}} {
proc config_addr {{jtag_index_1 1} {mask 0100000000} {mask_id 1}} {
 
        global log
 
        set mask_leng [string length $mask]
 
        if {$mask_leng!=10} {
 
                $log insert end "\nError: Wrong address mask length @$mask_id: [expr $mask_leng-2]. Expects: 8.\n"
 
 
 
        } else {
        device_lock -timeout 5
        device_lock -timeout 5
        device_virtual_ir_shift -instance_index $jtag_index_1 -ir_value 1 -no_captured_ir_value
        device_virtual_ir_shift -instance_index $jtag_index_1 -ir_value 1 -no_captured_ir_value
        set addr_mask [device_virtual_dr_shift -instance_index $jtag_index_1 -dr_value $mask_1 -length 40 -value_in_hex]
                set addr_mask [device_virtual_dr_shift -instance_index $jtag_index_1 -dr_value $mask -length 40 -value_in_hex]
        device_unlock
        device_unlock
        return $addr_mask
        return $addr_mask
}
}
 
}
 
 
proc config_trig {{jtag_index_2 2} {trig_1 00000000000000}} {
proc config_trig {{jtag_index_2 2} {trig 00000000000000}} {
 
        global log
 
        set trig_leng [string length $trig]
 
        if {$trig_leng!=14} {
 
                $log insert end "\nError: Wrong trigger condition length: [expr $trig_leng-2]. Expects: 4+8.\n"
 
        } else {
        device_lock -timeout 5
        device_lock -timeout 5
        device_virtual_ir_shift -instance_index $jtag_index_2 -ir_value 1 -no_captured_ir_value
        device_virtual_ir_shift -instance_index $jtag_index_2 -ir_value 1 -no_captured_ir_value
        set addr_trig [device_virtual_dr_shift -instance_index $jtag_index_2 -dr_value $trig_1 -length 56 -value_in_hex]
                set addr_trig [device_virtual_dr_shift -instance_index $jtag_index_2 -dr_value $trig -length 56 -value_in_hex]
        device_unlock
        device_unlock
        return $addr_trig
        return $addr_trig
}
}
 
}
 
 
proc open_jtag_device {{test_cable "USB-Blaster [USB-0]"} {test_device "@2: EP2SGX90 (0x020E30DD)"}} {
proc open_jtag_device {{test_cable "USB-Blaster [USB-0]"} {test_device "@2: EP2SGX90 (0x020E30DD)"}} {
        open_device -hardware_name $test_cable -device_name $test_device
        open_device -hardware_name $test_cable -device_name $test_device
        # Retrieve device id code.
        # Retrieve device id code.
        device_lock -timeout 5
        device_lock -timeout 5
Line 147... Line 160...
        global addr_rden
        global addr_rden
        for {set i 1} {$i<=16} {incr i} {
        for {set i 1} {$i<=16} {incr i} {
                set    mask [format "%1X" [expr $i-1]]
                set    mask [format "%1X" [expr $i-1]]
                append mask [format "%1X" [expr $addr_wren*8+$addr_rden*4+[set address_span_en$i]]]
                append mask [format "%1X" [expr $addr_wren*8+$addr_rden*4+[set address_span_en$i]]]
                append mask [set address_span$i]
                append mask [set address_span$i]
                config_addr 1 $mask
                config_addr 1 $mask $i
        }
        }
}
}
 
 
proc initAddrConfig {} {
proc initAddrConfig {} {
        global log
        global log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.