676 lines
16 KiB
Plaintext
676 lines
16 KiB
Plaintext
# This is an ide startup file.
|
|
report=2 # set verbose, but not debug
|
|
$stoponerr=1
|
|
#hinv -v
|
|
|
|
cosmo2_probeslot {
|
|
|
|
echo "====== Probing GIO Slot... ======"
|
|
$status = cos2_init ;
|
|
$status = cos2_ProbeSlot1;
|
|
if ($status == 0) {
|
|
echo "======= cos2_ProbeSlot Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
return (1);
|
|
}
|
|
|
|
flush {
|
|
|
|
cosmo2_flush -c 0;
|
|
cosmo2_flush -c 1;
|
|
cosmo2_flush -c 2;
|
|
cosmo2_flush -c 3;
|
|
}
|
|
|
|
|
|
|
|
cosmo2_cgi1_revision {
|
|
$status = cos2_getrev ;
|
|
if ($status == 0) {
|
|
echo "======= Read Revision Failed =========="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
return (1);
|
|
}
|
|
|
|
cosmo2_reset {
|
|
$status = cos2_BrdRst;
|
|
if ($status == 0) {
|
|
echo "======= cos2_BoardReset Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
cosmo2_cgi1_revision ;
|
|
return (1);
|
|
}
|
|
|
|
cosmo2_setpiomode {
|
|
echo "======== Set Pio Mode ============="
|
|
$status = cos2_setpiomode ;
|
|
if ($status == 0) {
|
|
echo "======= PIO Mode Failed ==============="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
return (1);
|
|
}
|
|
|
|
cosmo2_unsetpiomode {
|
|
echo "======== Set Pio Mode ============="
|
|
$status = cos2_unsetpio ;
|
|
if ($status == 0) {
|
|
echo "======= Diable PIO Mode Failed ==============="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
return (1);
|
|
}
|
|
|
|
|
|
cosmo2_cgi1tests {
|
|
echo "====== cgi1test ======"
|
|
cosmo2_resetchannel;
|
|
$status = cos2_databustest ;
|
|
if ($status == 0) {
|
|
echo "======= cos2_Cgi1DataBusTest Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
$status = cos2_cgi1_patrn ;
|
|
if ($status == 0) {
|
|
echo "======= cos2_Cgi1PatrnTest Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
$status = cos2_cgi1_uniq ;
|
|
if ($status == 0) {
|
|
echo "======= cos2_Cgi1AddrUniq Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
return (1);
|
|
|
|
}
|
|
|
|
SRAMPatrnTest {
|
|
echo "====== SRAM Pattern Testing.... ======"
|
|
|
|
$status = cos2_SramPatrn ;
|
|
if ($status == 0) {
|
|
echo "======= cos2_SramPatrn Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
echo "====== SRAM Walk Testing.... ======"
|
|
$status = cos2_SramWalk ;
|
|
if ($status == 0) {
|
|
echo "======= cos2_SramWalk Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
return (1);
|
|
}
|
|
|
|
cosmo2_fifotests {
|
|
echo "====== Data Fifo Testing.... ======"
|
|
cosmo2_resetchannel;
|
|
$status = cos2_FifoFlagsPatrn ;
|
|
if ($status == 0) {
|
|
echo "======= cos2_FifoFlagsPatrn Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
$status = cos2_FifoFlagAddrUniq ;
|
|
if ($status == 0) {
|
|
echo "======= cos2_FifoAddrUniq Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
$status = cos2_McuFifoflagPatrn ;
|
|
if ($status == 0) {
|
|
echo "======= cos2_McuFifoflagPatrn Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
$status = cos2_McuFifoFlagAddrUniq ;
|
|
if ($status == 0) {
|
|
echo "======= cos2_McuFifoFlagAddrUniq Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
$status = cos2_McuFifoLPB ;
|
|
if ($status == 0) {
|
|
echo "======= cos2_McuFifoLPB Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
|
|
echo "====== Data Fifo Test Passed ======"
|
|
return (1);
|
|
|
|
}
|
|
|
|
cosmo2_fifo_lpb {
|
|
echo "====== fifo loop back test ============"
|
|
cosmo2_resetchannel;
|
|
$status = cos2_fifo_lb -c 0 ;
|
|
if ($status == 0) {
|
|
echo "======= fifo loop back from 0 to 1 Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
$status = cos2_fifo_lb -c 1 ;
|
|
if ($status == 0) {
|
|
echo "======= fifo loop back from 1 to 0 Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
$status = cos2_fifo_lb -c 2 ;
|
|
if ($status == 0) {
|
|
echo "======= fifo loop back from 2 to 3 Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
$status = cos2_fifo_lb -c 3 ;
|
|
if ($status == 0) {
|
|
echo "======= fifo loop back from 3 to 2 Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
$status = cos2_fifo_uniqueness ;
|
|
if ($status == 0) {
|
|
echo "======= cos2_fifo_uniqueness Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
return (1);
|
|
}
|
|
|
|
|
|
cosmo2_mcu2upc2fifo {
|
|
|
|
cosmo2_resetchannel;
|
|
|
|
echo "====== mcu2upc2fifo2 test ============"
|
|
cosmo2_setpiomode ;
|
|
|
|
$status = cos2_mcu2upc2fifo -c 0 -v 0xe0;
|
|
if ($status == 0) {
|
|
echo "====== mcu 2 cpc 2 fifo of video channel 0 Failed======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
$status = cos2_mcu2upc2fifo -c 1 -v 0xe1;
|
|
if ($status == 0) {
|
|
echo "====== mcu 2 upc 2 fifo of video channel 0 Failed======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
$status = cos2_mcu2upc2fifo -c 2 -v 0xe0;
|
|
if ($status == 0) {
|
|
echo "====== mcu 2 cpc 2 fifo of video channel 1 Failed======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
$status = cos2_mcu2upc2fifo -c 3 -v 0xe1;
|
|
if ($status == 0) {
|
|
echo "====== mcu 2 upc 2 fifo of video channel 1 Failed======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
return (1);
|
|
}
|
|
|
|
|
|
cosmo2_tablepass {
|
|
cosmo2_resetchannel;
|
|
|
|
echo "====== Table Pass Testing for channel 0.... ======"
|
|
$status = cos2_tblpass 0;
|
|
if ($status == 0) {
|
|
echo "======= cos2_tblpass Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
echo "====== Table Pass Testing for channel 1.... ======"
|
|
$status = cos2_tblpass 1;
|
|
if ($status == 0) {
|
|
echo "======= cos2_tblpass Failed ======="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
return (1);
|
|
}
|
|
|
|
cosmo2_fbc_patrn {
|
|
echo "====== FBC patrn Testing.... ======"
|
|
cosmo2_resetchannel;
|
|
$status = cos2_fbc_patrn
|
|
if ($status == 0) {
|
|
echo "======= FBC Patrn Failed.... ======"
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
echo "====== FBC Address uniqne Testing.... ======"
|
|
$status = cos2_fbc_AddrUniq ;
|
|
if ($status == 0) {
|
|
echo "======= FBC Patrn Failed.... ======"
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
return (1);
|
|
}
|
|
|
|
cosmo2_z050_test {
|
|
cosmo2_resetchannel
|
|
echo "====== Z050 Patrn Testing.... ======"
|
|
$status = cos2_z050Patrn ;
|
|
if ($status == 0) {
|
|
echo "======= Z050 Patrn Failed.... ======"
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
echo "====== Z050 Walking Testing.... ======"
|
|
$status = cos2_z050Walk ;
|
|
if ($status == 0) {
|
|
echo "======= Z050 walk Failed.... ======"
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
echo "====== Z050 Address Unique Testing.... ======"
|
|
$status = cos2_z050AddrUniq ;
|
|
if ($status == 0) {
|
|
echo "======= Z050 Address Unique Failed.... ======"
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
return (1);
|
|
}
|
|
|
|
|
|
cosmo2_scaler_patrn {
|
|
|
|
cosmo2_resetchannel;
|
|
echo "====== GVS patrn video channel 0=========="
|
|
$status = cos2_gvs_patrn0 ;
|
|
if ($status == 0) {
|
|
echo "======= GVS patrn video channel 0 failed =========="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
echo "====== GVS patrn video channel 1=========="
|
|
$status = cos2_gvs_patrn1 ;
|
|
if ($status == 0) {
|
|
echo "======= GVS patrn video channel 0 failed =========="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
return (1);
|
|
|
|
}
|
|
|
|
cosmo2_hardware_revision {
|
|
$status = hware_rev
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
|
|
return (1);
|
|
}
|
|
|
|
cosmo2_upc_patrn {
|
|
cosmo2_resetchannel;
|
|
echo "====== UPC address unique Testing.... ======"
|
|
$status = cos2_UpcAddrUniq ;
|
|
if ($status == 0) {
|
|
echo "======= UPC address unique Test Failed ======"
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
echo "====== UPC Patrn Testing.... ======"
|
|
$status = cos2_UpcPatrn ;
|
|
if ($status == 0) {
|
|
echo "======= UPC Patrn Test Failed.... ======"
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
return (1);
|
|
}
|
|
|
|
cosmo2_cbar_patrn {
|
|
cosmo2_resetchannel
|
|
|
|
echo "====== CBAR Testing in progress ==========="
|
|
$status = cos2_CbarPatrn ;
|
|
if ($status == 0) {
|
|
echo "======= CBAR Test Failed ==========="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
echo "======= CBAR ADDR UNIQUE =========="
|
|
$status = cos2_CbarAddrUniq ;
|
|
if ($status == 0) {
|
|
echo "======= CBAR ADDR UNIQUE =========="
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
return (1);
|
|
|
|
}
|
|
|
|
cosmo2_fbc_bufs_test {
|
|
echo "====== fbc field buffers test .... ======"
|
|
cosmo2_resetchannel;
|
|
$status = cos2_fbc_scaler_test -c 0 -s 1 -b 0;
|
|
if ($status == 0) {
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
$status = cos2_fbc_scaler_test -c 0 -s 1 -b 1;
|
|
if ($status == 0) {
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
$status = cos2_fbc_scaler_test -c 1 -s 1 -b 0;
|
|
if ($status == 0) {
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
$status = cos2_fbc_scaler_test -c 1 -s 1 -b 1;
|
|
if ($status == 0) {
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
return (1);
|
|
}
|
|
|
|
cosmo2_fbc_scaler_test {
|
|
cosmo2_resetchannel;
|
|
echo "====== scaler tests .... ======"
|
|
$status = cos2_fbc_scaler_test -c 0 -s 0 -b 0;
|
|
if ($status == 0) {
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
$status = cos2_fbc_scaler_test -c 1 -s 0 -b 1;
|
|
if ($status == 0) {
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
return (1);
|
|
}
|
|
|
|
cosmo2_compress0 {
|
|
cosmo2_resetchannel;
|
|
$count = 0
|
|
while ($count < 16) {
|
|
$status = cos2_patcomp -c 0 -m 0 -a 1 -v 0
|
|
if ($status == 0) {
|
|
return ($status) ;
|
|
}
|
|
$count = $count + 1
|
|
}
|
|
|
|
return (1);
|
|
}
|
|
|
|
cosmo2_compressslave0 {
|
|
cosmo2_resetchannel;
|
|
$count = 0
|
|
while ($count < 16) {
|
|
$status = cos2_patcomp_slave -c 0 -m 0 -a 1 -v 0
|
|
if ($status == 0) {
|
|
return ($status) ;
|
|
}
|
|
$count = $count + 1
|
|
}
|
|
|
|
return (1);
|
|
}
|
|
|
|
cosmo2_compress1 {
|
|
cosmo2_resetchannel;
|
|
$count = 0
|
|
while ($count < 16) {
|
|
$status = cos2_patcomp -c 1 -m 0 -a 1 -v 0
|
|
if ($status == 0) {
|
|
return ($status) ;
|
|
}
|
|
$count = $count + 1
|
|
}
|
|
return (1);
|
|
}
|
|
|
|
cosmo2_compressslave1 {
|
|
cosmo2_resetchannel;
|
|
$count = 0
|
|
while ($count < 16) {
|
|
$status = cos2_patcomp_slave -c 1 -m 0 -a 1 -v 0
|
|
if ($status == 0) {
|
|
return ($status) ;
|
|
}
|
|
$count = $count + 1
|
|
}
|
|
return (1);
|
|
}
|
|
|
|
cosmo2_z016_test {
|
|
cosmo2_resetchannel;
|
|
echo "====== Z050 Patrn Testing.... ======"
|
|
$status = cos2_z016Walk ;
|
|
if ($status == 0) {
|
|
echo "======= Z016 Patrn Failed.... ======"
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
echo "====== Z016 Walking Testing.... ======"
|
|
$status = cos2_z016Patrn ;
|
|
if ($status == 0) {
|
|
echo "======= Z016 walk Failed.... ======"
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
return (1);
|
|
}
|
|
|
|
|
|
|
|
cosmo2_dma_test {
|
|
|
|
cosmo2_resetchannel
|
|
ide_delay -s 2
|
|
echo " testing dma channel 0 to 1"
|
|
$status = cos2_dma01
|
|
if ($status == 0) {
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
|
|
cosmo2_resetchannel
|
|
ide_delay -s 2
|
|
echo " testing dma channel 1 to 0"
|
|
$status = cos2_dma10
|
|
if ($status == 0) {
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
|
|
cosmo2_resetchannel
|
|
ide_delay -s 2
|
|
echo " testing dma channel 2 to 3"
|
|
$status = cos2_dma23
|
|
if ($status == 0) {
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
|
|
|
|
cosmo2_resetchannel
|
|
ide_delay -s 2
|
|
echo " testing dma channel 3 to 2"
|
|
$status = cos2_dma32
|
|
if ($status == 0) {
|
|
$failed = 1;
|
|
return ($status) ;
|
|
}
|
|
}
|
|
|
|
cc1_patrn_test {
|
|
cosmo2_probeslot
|
|
cosmo2_reset
|
|
cc1_patrn
|
|
}
|
|
|
|
|
|
cosmo2_fbc2upc2fifotest {
|
|
fbc2upc2fifo -c 0;
|
|
fbc2upc2fifo -c 1;
|
|
}
|
|
|
|
cosmo2_all {
|
|
$status = cosmo2_probeslot
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
$status = cosmo2_reset
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
$status = cosmo2_cgi1_revision
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
cosmo2_ledon
|
|
$status = cosmo2_cgi1tests
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
$status = cosmo2_fifotests
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
$status = cosmo2_hardware_revision
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
ide_delay -s 2
|
|
$status = cosmo2_upc_patrn
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
$status = cosmo2_scaler_patrn
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
$status = cosmo2_mcu2upc2fifo
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
$status = cosmo2_fifo_lpb
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
|
|
cosmo2_sram_test
|
|
cosmo2_gpsw
|
|
$status = cosmo2_z050_test
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
$status = cosmo2_z016_test
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
$status = cosmo2_cbar_patrn
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
echo " downloading xilinx in fbc ...."
|
|
d_xlx -f bootp()recycle:fbc.exo
|
|
$status = cosmo2_fbc_patrn
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
|
|
cosmo2_fbc2upc2fifotest
|
|
$status = cosmo2_tablepass
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
$status = cc1_revision
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
echo "DMA in progress for each channel...."
|
|
cosmo2_dma_test
|
|
|
|
$status = cosmo2_fbc_bufs_test
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
$status = cosmo2_fbc_scaler_test
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
|
|
$status = cosmo2_compress0
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
|
|
$status = cosmo2_compress1
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
|
|
$status = cosmo2_compressslave0
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
|
|
$status = cosmo2_compressslave1
|
|
if ($status == 0)
|
|
return ($status) ;
|
|
|
|
cosmo2_ledoff
|
|
echo "All tests passed"
|
|
}
|
|
|
|
cosmo2_load_xlx {
|
|
cosmo2_probeslot
|
|
cosmo2_reset
|
|
d_xlx -f bootp()recycle:fbc.exo
|
|
}
|
|
|
|
|
|
cos2_constcolor_test {
|
|
cos2_cc -c 0 -f 0 -l 50 -p 0x304050
|
|
}
|
|
|
|
|
|
cosmo2_menu {
|
|
echo "================= COSMO2 IDE COMMANDS ===================="
|
|
echo " "
|
|
echo "cosmo2_all cosmo2_reset cosmo2_cgi1_revision"
|
|
echo "ProbeSlot cosmo2_cgi1tests cosmo2_setpiomode "
|
|
echo "cosmo2_unsetpiomode"
|
|
echo "cosmo2_fifotests cosmo2_z050_test cosmo2_z016_test"
|
|
echo "cosmo2_tablepass cosmo2_fifo_lpb cosmo2_mcu2upc2fifo"
|
|
echo "hware_rev cosmo2_upc_patrn cosmo2_cbar_patrn"
|
|
echo "cosmo2_fbc_patrn"
|
|
echo "cc1_revision cc1_data_bus cc1_init cc1_patrn"
|
|
echo "cosmo2_ledon cosmo2_ledoff"
|
|
echo "d_xlx cos2_sram_test"
|
|
echo "cosmo2_fbc2upc2fifotest cc1_patrn_test"
|
|
echo " "
|
|
}
|
|
|
|
$failed = 0;
|
|
cosmo2_menu
|