Posted to tcl by Covid-19 at Tue Apr 27 17:48:31 GMT 2021view raw

  1. # Write some vertical lines to the screen
  2. # Starting at address 0x0, ending at address 0x2A300.
  3. #
  4. set addr [ format %x 0 ]
  5.  
  6. for {set i 0} {$i < 720} {incr i} {
  7. for {set j 0} {$j < 1280} {incr j} {
  8. puts "Writing Line: ${i}, Pixel: ${j} @ Address: ${addr}"
  9. if {$j/3 < 427} { master_write_32 $mpath $addr 0xFF000000
  10. } elseif {$j/3 < 854} { master_write_32 $mpath $addr 0x00FF0000
  11. } else { master_write_32 $mpath $addr 0x0000FF00 }
  12.  
  13. set addr [ format %x [ expr {$addr + 0x4} ] ]
  14. }
  15. }
  16.  
  17. ########################OUTPUT###############################
  18. # System reset......
  19. # Clocking running properly.
  20. # Reset level is 1 (should be 1).
  21. # Writing Line: 0, Pixel: 0 @ Address: 0
  22. # Writing Line: 0, Pixel: 1 @ Address: 4
  23. # Writing Line: 0, Pixel: 2 @ Address: 8
  24. # Writing Line: 0, Pixel: 3 @ Address: c
  25. # error: master_write_32: the value C doesn't contain a number
  26. # while executing
  27. # "master_write_32 $mpath $addr 0xFF000000 "
  28. # (file "init.tcl" line 66)
  29. # invoked from within
  30. # "source init.tcl"