read_ram_risc8.tcl 605 B

123456789101112131415161718
  1. foreach hardware_name [get_hardware_names] {
  2. if { [string match "USB-Blaster*" $hardware_name] } {
  3. set usbblaster_name $hardware_name
  4. }
  5. }
  6. puts "JTAG chain: $usbblaster_name";
  7. foreach device_name [get_device_names -hardware_name $usbblaster_name] {
  8. if { [string match "@1*" $device_name] } {
  9. set test_device $device_name
  10. }
  11. }
  12. puts "Device: $test_device";
  13. begin_memory_edit -hardware_name $hardware_name -device_name $device_name
  14. set content [read_content_from_memory -instance_index 0 -start_address 0 -word_count 4096 -content_in_hex]
  15. end_memory_edit
  16. puts "\n[exec echo $content | fold -w64 ]\n"