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/] [prog_mem_xsct.tcl] - Blame information for rev 48

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 48 alirezamon
#!/usr/bin/tclsh
2
 
3
 
4
proc filehexdump filename {
5
        set fp [open $filename]
6
        fconfigure $fp -translation binary
7
        #set n 0
8
        while {![eof $fp]} {
9
                set bytes [read $fp 4]
10
                puts  [hexdump $bytes]
11
                puts "\n"
12
 
13
                #regsub -all {[^\x20-\xfe]} $bytes . ascii
14
                #puts [format "%04X %-48s %-16s" $n [hexdump $bytes] $ascii]
15
                #incr n 16
16
        }
17
        close $fp
18
}
19
proc hexdump string {
20
        binary scan $string H* hex
21
        regexp -all -inline ........ $hex
22
}
23
 
24
 
25
 
26
filehexdump "ram0.bin"

powered by: WebSVN 2.1.0

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