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

# Write some vertical lines to the screen
# Starting at address 0x0, ending at address 0x2A300.
#
set addr [ format %x 0 ]

for {set i 0} {$i < 720} {incr i} {
	for {set j 0} {$j < 1280} {incr j} {
		puts "Writing Line: ${i}, Pixel: ${j} @ Address: ${addr}"
		  if        {$j/3 < 427} 	{ master_write_32 $mpath $addr 0xFF000000 
		} elseif {$j/3 < 854}          { master_write_32 $mpath $addr 0x00FF0000 
		} else 				{ master_write_32 $mpath $addr 0x0000FF00 }   	
		
		set addr [ format %x [ expr {$addr + 0x4} ] ]
	}
}

########################OUTPUT###############################
# System reset......
# Clocking running properly.
# Reset level is 1 (should be 1).
# Writing Line: 0, Pixel: 0 @ Address: 0
# Writing Line: 0, Pixel: 1 @ Address: 4
# Writing Line: 0, Pixel: 2 @ Address: 8
# Writing Line: 0, Pixel: 3 @ Address: c
# error: master_write_32: the value C doesn't contain a number
#    while executing
# "master_write_32 $mpath $addr 0xFF000000 "
#    (file "init.tcl" line 66)
#     invoked from within
# "source init.tcl"