OpenCores
URL https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk

Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc

[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [src_c/] [jtag/] [jtag_quartus_stp/] [test.tcl] - Blame information for rev 38

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 alirezamon
#quartus_stp -t 
2
#This portion of the script is derived from some of the examples from Altera
3
global usbblaster_name
4
global test_device
5
# List all available programming hardwares, and select the USBBlaster.
6
# (Note: this example assumes only one USBBlaster connected.)
7
# Programming Hardwares:
8
foreach hardware_name [get_hardware_names] {
9
        puts $hardware_name
10
        if { [string match "DE-SoC *" $hardware_name] } {
11
                set usbblaster_name $hardware_name
12
        }
13
}
14
 
15
 
16
puts "\nSelect JTAG chain connected to $usbblaster_name.\n";
17
 
18
# List all devices on the chain, and select the first device on the chain.
19
#Devices on the JTAG chain:
20
 
21
 
22
foreach device_name [get_device_names -hardware_name $usbblaster_name] {
23
        puts $device_name
24
        if { [string match "@2*" $device_name] } {
25
                set test_device $device_name
26
        }
27
}
28
puts "\nSelect device: $test_device.\n";
29
 
30
# Open device 
31
proc openport {} {
32
        global usbblaster_name
33
        global test_device
34
        open_device -hardware_name $usbblaster_name -device_name $test_device
35
}
36
 
37
# Close device.  Just used if communication error occurs
38
proc closeport { } {
39
        catch {device_unlock}
40
        catch {close_device}
41
}
42
 
43
 
44
 
45
openport
46
device_lock -timeout 10000
47
 
48
device_virtual_ir_shift -instance_index 127 -ir_value 1 -no_captured_ir_value
49
device_virtual_dr_shift -dr_value 3 -instance_index 127  -length 2 -no_captured_dr_value -value_in_hex
50
device_virtual_dr_shift -dr_value 2 -instance_index 127  -length 2 -no_captured_dr_value -value_in_hex
51
device_virtual_ir_shift -instance_index 127 -ir_value 0 -no_captured_ir_value
52
catch {device_unlock}
53
 
54
after 1000
55
 
56
device_lock -timeout 10000
57
device_virtual_ir_shift -instance_index 127 -ir_value 1 -no_captured_ir_value
58
device_virtual_dr_shift -dr_value 3 -instance_index 127  -length 2 -no_captured_dr_value -value_in_hex
59
device_virtual_dr_shift -dr_value 0 -instance_index 127  -length 2 -no_captured_dr_value -value_in_hex
60
device_virtual_ir_shift -instance_index 127 -ir_value 0 -no_captured_ir_value
61
catch {device_unlock}
62
 
63
after 1000
64
 
65
device_lock -timeout 10000
66
device_virtual_ir_shift -instance_index 127 -ir_value 1 -no_captured_ir_value
67
device_virtual_dr_shift -dr_value 3 -instance_index 127  -length 2 -no_captured_dr_value -value_in_hex
68
set data [device_virtual_dr_shift -dr_value 2 -instance_index 127  -length 2  -value_in_hex]
69
puts $data
70
device_virtual_ir_shift -instance_index 127 -ir_value 0 -no_captured_ir_value
71
catch {device_unlock}
72
 
73
after 1000
74
 
75
closeport
76
 
77
 
78
 
79
 
80
 
81
 
82
 
83
 
84
 
85
 

powered by: WebSVN 2.1.0

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