# This is an ide startup file. report=4 # set verbose, but not debug $stoponerr=1 #hinv -v mgv_menu { echo "" echo "=================== IMPACT VIDEO IDE COMMANDS ======================" echo "mg_setboard(0) mg_reset mgv_init mgv_galregl1" echo "mgv_abdcb mgv_abaddrbus mgv_abdatabus mgv_abpatrn" echo "mgv_ccdcb mgv_ccaddrbus mgv_ccdatabus mgv_ccpatrn" echo "mgv_vgiregpatrn mgv_vgiregwalk mgv_vgiint mgv_vgidma" echo "mgv_voutl0 mgv_voutl1 mgv_vgivoutl0" echo "mgv_extvin mgv_vinl1" echo "mgv_cctovgi mgv_cctovgix mgv_readcc mgv_gpitrig" echo "====================================================================" echo "mgv_initall mgv_aball mgv_ccall" echo "mgv_vgiregall mgv_vgiintall mgv_vgidmaall mgv_vgiall" echo "mgv_voutall mgv_vinall mgv_loopbackall" echo "mgv_all" echo "==================================================" echo "******* USE mgv_all to run all of them *********" echo "==================================================" echo "" } mgv_initall { $failed = 0; echo "" buffon; mg_setboard 0; mg_reset; resetcons; buffoff; $status = mgv_init; if ($status) { $failed = 1; return($status); } } mgv_aball { $failed = 0; echo "" echo "=====Initialize & Test AB and DRAM" $status = mgv_init; if ($status) { $failed = 1; return($status); } $status = mgv_abdcb; if ($status) { $failed = 1; return($status); } $status = mgv_abaddrbus -r -g -b -a if ($status) { $failed = 1; return($status); } $status = mgv_abdatabus -r -g -b -a if ($status) { $failed = 1; return($status); } $status = mgv_abpatrn -r -g -b -a if ($status) { $failed = 1; return($status); } # $status = mgv_abpatrnslow -r -g -b -a if ($status) { $failed = 1; return($status); } } mgv_ccall { $failed = 0; echo "" echo "=====Initialize & Test CC and Frame Buffer" $status = mgv_init; if ($status) { $failed = 1; return($status); } $status = mgv_ccdcb; if ($status) { $failed = 1; return($status); } $status = mgv_ccaddrbus if ($status) { $failed = 1; return(1); } $status = mgv_ccdatabus if ($status) { $failed = 1; return($status); } } mgv_vgiregall { $failed = 0; echo "" echo "=====Initialize & Test VGI registers" $status = mgv_init; if ($status) { $failed = 1; return($status); } $status = mgv_vgiregpatrn if ($status) { $failed = 1; return($status); } $status = mgv_init; if ($status) { $failed = 1; return($status); } $status = mgv_vgiregwalk if ($status) { $failed = 1; return($status); } } mgv_vgiintall { $failed = 0; echo "" echo "=====Initialize & Test VGI Interrupts" $status = mgv_init; if ($status) { $failed = 1; return($status); } $status = mgv_vgiint -i 0x1; if ($status) { $failed = 1; return($status); } # $status = mgv_vgiint -i 0x2; # if ($status) { # $failed = 1; # return($status); # } $status = mgv_vgiint -i 0x4; if ($status) { $failed = 1; return($status); } $status = mgv_vgiint -i 0x8; if ($status) { $failed = 1; return($status); } $status = mgv_vgiint -i 0x10; if ($status) { $failed = 1; return($status); } # $status = mgv_vgiint -i 0x20; # if ($status) { # $failed = 1; # return($status); # } $status = mgv_init; if ($status) { $failed = 1; return($status); } $status = mgv_vgiint -c 2 -i 0x1; if ($status) { $failed = 1; return($status); } # $status = mgv_vgiint -c 2 -i 0x2; # if ($status) { # $failed = 1; # return($status); # } $status = mgv_vgiint -c 2 -i 0x4; if ($status) { $failed = 1; return($status); } $status = mgv_vgiint -c 2 -i 0x8; if ($status) { $failed = 1; return($status); } $status = mgv_vgiint -c 2 -i 0x10; if ($status) { $failed = 1; return($status); } # $status = mgv_vgiint -c 2 -i 0x20; # if ($status) { # $failed = 1; # return($status); # } } mgv_vgidmaall { $failed = 0; echo "" echo "=====Initialize & Test VGI DMA's" $status = mgv_init; if ($status) { $failed = 1; return($status); } ide_delay -s 2; $status = mgv_vgidma -z 50; if ($status) { $failed = 1; return($status); } ide_delay -s 2; $status = mgv_vgidma -t 1 -z 50; if ($status) { $failed = 1; return($status); } ide_delay -s 2; $status = mgv_vgidma -v 1 -z 50; if ($status) { $failed = 1; return($status); } ide_delay -s 2; $status = mgv_vgidma -v 2 -z 50; if ($status) { $failed = 1; return($status); } ide_delay -s 2; # $status = mgv_vgidma -o 1 -v 3 -z 50; # if ($status) { # return($status); # } ide_delay -s 2; $status = mgv_vgidma -v 4 -z 50; if ($status) { $failed = 1; return($status); } ide_delay -s 2; $status = mgv_vgidma -t 1 -v 5 -z 50; if ($status) { $failed = 1; return($status); } ide_delay -s 2; $status = mgv_vgidma -t 1 -v 5 -z 50; if ($status) { $failed = 1; return($status); } ide_delay -s 2; $status = mgv_vgidma -t 1 -v 6 -y 0x40404040 -z 50; if ($status) { $failed = 1; return($status); } ide_delay -s 2; $status = mgv_initall; if ($failed) { $failed = 1; return($status); } ide_delay -s 2; $status = mgv_vgidma -c 2; if ($status) { $failed = 1; return($status); } ide_delay -s 2; $status = mgv_vgidma -c 2 -t 1; if ($status) { $failed = 1; return($status); } ide_delay -s 2; $status = mgv_vgidma -c 2 -v 1; if ($status) { $failed = 1; return($status); } ide_delay -s 2; $status = mgv_vgidma -c 2 -v 2; if ($status) { $failed = 1; return($status); } ide_delay -s 2; # $status = mgv_vgidma -c 2 -o 1 -v 3; # if ($status) { # return($status); # } ide_delay -s 2; $status = mgv_vgidma -c 2 -v 4; if ($status) { $failed = 1; return($status); } ide_delay -s 2; $status = mgv_vgidma -c 2 -t 1 -v 5; if ($status) { $failed = 1; return($status); } ide_delay -s 2; $status = mgv_vgidma -c 2 -t 1 -v 5; if ($status) { $failed = 1; return($status); } ide_delay -s 2; $status = mgv_vgidma -c 2 -t 1 -v 6 -y 0x40404040 ; if ($status) { $failed = 1; return($status); } } mgv_vgiall { $failed = 0; $status = mgv_vgiregall; if ($failed) { return($status); } $status = mgv_vgiintall; if ($failed) { $failed = 1; return($status); } $status = mgv_vgidmaall; if ($failed) { $failed = 1; return($status); } } mgv_voutall { $failed = 0; echo "" echo "=====Initialize & Test Video Output" $status = mgv_init; if ($status) { $failed = 1; return($status); } echo "" echo "******** Please select Channel A on the WFM 601i ********" echo "Press when ready" $status = mgv_waitforspace -s 86400 echo "" echo "Confirm patterns on Channel 1 Video Monitor" $status = mgv_voutl0 1; if ($status) { $failed = 1; return($status); } ide_delay -ms 10000 ; $status = mgv_init; if ($status) { $failed = 1; return($status); } echo "" $status = mgv_vgivoutl0; if ($status) { $failed = 1; return($status); } ide_delay -ms 10000 ; echo "" echo "******** Please select Channel B on the WFM 601i ********" echo "Press when ready" $status = mgv_waitforspace -s 86400 echo "" echo "Confirm patterns on Channel 2 Video Monitor" $status = mgv_voutl0 2; if ($status) { $failed = 1; return($status); } ide_delay -ms 10000 ; $status = mgv_init; if ($status) { $failed = 1; return($status); } echo "" $status = mgv_vgivoutl0 2; if ($status) { $failed = 1; return($status); } } mgv_vinall { $failed = 0; echo "" echo "=====Initialize & Test Video input" $status = mgv_init; if ($status) { $failed = 1; return($status); } echo "Video Input Tests for Channel 1" $status = mgv_extvin; if ($status) { $failed = 1; return($status); } $status = mgv_init; if ($status) { $failed = 1; return($status); } echo "Video Input Tests for Channel 2" $status = mgv_extvin 2; if ($status) { $failed = 1; return($status); } $status = mgv_init; if ($status) { $failed = 1; return($status); } $status = mgv_vinl1; if ($status) { $failed = 1; return($status); } } mgv_loopbackall { $failed = 0; echo "=====Initialize & Test Loop Back" $status = mgv_init; if ($status) { $failed = 1; return($status); } echo "" echo "******** Please select the Loop Back switch on the IDE switch box ********" echo "Press when ready" $status = mgv_waitforspace -s 86400 if ($status) { echo "" echo "CC1 to VGI1 Loop Back Test Timed Out" echo "" } else { echo "" echo "CC1 to VGI1 Loop Back Test for Channel 1" echo "" $status = mgv_cctovgi 1; if ($status) { $failed = 1; return($status); } } $status = mgv_init; if ($status) { $failed = 1; return($status); } echo "CC1 to VGI1 Loop Back Test for Channel 2" $status = mgv_cctovgi 2; if ($status) { $failed = 1; return($status); } } mgv_csc_all { mgv_initall; echo "Verifying whether the CSC/TMI optional board is present ..." $failed = 0; $status = mgv_csc_probe ; if ($status) { echo "CSC/TMI optional board is NOT present" return 0; } else { echo "Running CSC diagnostics ...." $status = mgv_csc_bus -b 0 -t 0 ; if ($status) { echo "CSC Address Bus test failed" $failed = 1; return ($status); } else { echo "CSC Address Bus test passed" } $status = mgv_csc_bus -b 1 -t 3 ; if ($status) { echo "CSC Data Bus test failed" $failed = 1; return($status); } else { echo "CSC Data Bus test passed" } $status = mgv_csc_outlut ; if ($status) { echo "CSC Output LUTS test failed" $failed = 1; return($status); } else { echo "CSC Output LUTS test passed" } $status = mgv_csc_coef ; if ($status) { echo "CSC Coefficient test failed" $failed = 1; return ($status); } else { echo "CSC Coefficient test passed" } return $status ; } } unix { echo "<<<< About to to boot UNIX......>>>>" boot dksc(0,1,0)unix; } mgv_all { $status = 0; $failed = 0; echo "" echo "Impact Video IDE Test Suite" echo "" ############### Initialize & Test All Loop Back $status = mgv_loopbackall; if ($failed) { return(-1); } ############### Test GPI Trigger echo "GPI Trigger Polarity Test" echo "Please set the GPI trigger switch to the OFF position" echo "Press when ready" $status = mgv_waitforspace -s 86400 if ($status) { echo "" echo "GPI Trigger Polarity Test Timed Out" echo "" } else { $status = mgv_gpitrig -p 0; if ($status) { return(-1); } $status = mgv_gpitrig -p 1; if ($status) { return(-1); } } echo; echo; echo; echo "Please select the TSG422 switch on the IDE switch box" echo "Press when ready" $status = mgv_waitforspace -s 86400 if ($status) { echo "" echo "Test timed out after waiting an hour!" return(-1) } echo; echo; echo; ############### Initialize & Test GALILEO 1.5 Register Access echo "" echo "=====Initialize & Test GALILEO 1.5 Register Access" $status = mgv_initall; if ($failed) { return($status); } $status = mgv_galregl1; if ($failed) { return($status); } ############### Initialize & Test CC and Frame Buffer $status = mgv_ccall; if ($failed) { return($status); } ############### Initialize & Test AB and DRAM $status = mgv_aball; if ($failed) { return($status); } ############### Initialize & Test VGI registers $status = mgv_vgiregall; if ($failed) { return($status); } ############### Initialize & Test VGI Interrupts $status = mgv_vgiintall; if ($failed) { return($status); } ############### Initialize & Test Video Output $status = mgv_voutall; if ($failed) { return($status); } ############### Initialize & Test Video input # $status = mgv_vinall; # if ($failed) { # return($status); # } ############### Initialize & Test VGI DMA's $status = mgv_vgidmaall; if ($failed) { return($status); } ############### Initialize & Test CSC $status = mgv_csc_all; if ($failed) { return($status); } ############### Initialize & Exit echo "" echo "=====Initialize & Exit" $status = mgv_init; if ($status) { return($status); } echo "" echo "Impact Video IDE Test Suite Completed" unix } $status = 0; mgv_menu