- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
does anyone have a .tcl-script for writing data via the System Console to Avalon-MM slaves that he/she want's to share? Cheers, PeterLink Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's a pretty basic script ...
# -----------------------------------------------------------------# jtag_cmds.tcl# # 11/9/2014 D. W. Hawkins (dwh@ovro.caltech.edu)# # SystemConsole commands.# # -----------------------------------------------------------------
# =================================================================# Master access# =================================================================# # -----------------------------------------------------------------# Open the JTAG master service# -----------------------------------------------------------------
# Open the first Avalon-MM master service
proc jtag_open {} {
global jtag
# Close any open service
if {} {
jtag_close
}
set master_paths
if { == 0} {
puts "Sorry, no master nodes found"
return
}
# Select the first master service
set jtag(master)
open_service master $jtag(master)
return
}
# -----------------------------------------------------------------# Close the JTAG master service# -----------------------------------------------------------------#
proc jtag_close {} {
global jtag
if {} {
close_service master $jtag(master)
unset jtag(master)
}
return
}
# -----------------------------------------------------------------# JTAG-to-Avalon-MM bridge read/write# -----------------------------------------------------------------#
proc jtag_read {addr} {
global jtag
if {!} {
jtag_open
}
# Read 32-bits
set data
return $data
}
proc jtag_write {addr data} {
global jtag
if {!} {
jtag_open
}
# Write 32-bits
master_write_32 $jtag(master) $addr
return
}
You can start System Console and then type tcl> source jtag_cmds.tcl and then you can type jtag_read <address> or jtag_write <address> <data> These are dead-simple procedures. They are *not* efficient for transferring large amounts of data. Check out the other master procedures for better options (or ask). Cheers, Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Dave,
thanks heaps! That should get me started. Cheers, Peter
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page