- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
My design captures images from an external video source and records them to DDR3.
In addition to my custom logic, I also have a Jtag to Avalog master connected the DDR3 controller (via Qsys).
Is it possible to save a section of the memory (representing a single image) into a file on my hard drive via System Console ?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've done something similar so this might help:
proc DDR3_read_to_file {} {
set imagefile [open "C:/Users/RParks/system_console/scripts/image_read.mem" w]
# set imagefile [open "/root/system_console/scripts/image_read.mem" w]
set read_data [<ddr_read_command> <addr> <length>]
# puts $read_data
puts $imagefile [format "%s" $read_data]
close $imagefile
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for the reply.
But where in your script do you specify the DDR3 address range that you want to be copied to the file ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, so my solution wasn't for DDR3 and you'd need to customise it for your system but in mine I wrote a separate proc <ddr_read_command> which took 2 arguments, the address and length.
The below might be a helpful starting point for you to write your own:
proc memory_rd_cmd {addr length} {
variable claimed_path
set readdata {}
for {set i 0} {$i < $length} {incr i} {
lappend readdata [master_read_32 $claimed_path [expr {$addr+$i}] 1]
}
return $readdata
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
I'll try it.
I thought I'd easily find an online example for this exact scenario - but I can't.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page