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/] [perl_gui/] [lib/] [tcl/] [source.tcl] - Blame information for rev 38

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 alirezamon
#!/usr/bin/tclsh
2
 
3
## Setup USB hardware - assumes only USB Blaster is installed and
4
## an FPGA is the only device in the JTAG chain
5
 
6
 
7
set usb [lindex [get_hardware_names] 0]
8
set device_name [lindex [get_device_names -hardware_name $usb] 0]
9
 
10
 
11
 
12
 
13
 
14
 
15
proc update_src { src_name   src_content } {
16
        global device_name usb
17
        foreach instance [get_insystem_source_probe_instance_info -hardware_name $usb -device_name $device_name] {
18
                set name [lindex $instance 3]
19
                if {[regexp {P[0-9]+} $name var] } {
20
 
21
                        set index [lindex $instance 0]
22
                        set index_name [lindex $instance 3]
23
 
24
                        global device_name usb
25
 
26
 
27
                        if { $index_name eq $src_name } {
28
                                start_insystem_source_probe -device_name $device_name -hardware_name $usb
29
                                write_source_data -instance_index $index -value $src_content -value_in_hex
30
                                puts "src_ ${index_name} is programed with  $src_content value"
31
                                # End of editing sequence
32
                                end_insystem_source_probe
33
                        }
34
 
35
                }
36
        }
37
 
38
}
39
 
40
 
41
 
42
 
43
if { $::argc > 0 } {
44
 
45
                puts $usb
46
                puts $device_name
47
                # Initiate a editing sequence
48
 
49
 
50
                set write_num  $::argc
51
                #start_insystem_source_probe -device_name $device_name -hardware_name $usb
52
                for {set i 0} {$i < $write_num} {incr i 2 } {
53
                        set src_name [lindex $::argv $i]
54
                        set src_content  [lindex $::argv $i+1]
55
                        update_src   $src_name  $src_content
56
                }
57
 
58
 
59
 
60
} else {
61
    puts "no command line argument passed"
62
}
63
 
64
 
65
 
66
 
67
 
68
 
69
 
70
 
71
 
72
 
73
 
74
 

powered by: WebSVN 2.1.0

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