openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

hx5_sanity_screen.soc (6105B)


      1 # 
      2 # This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      3 # 
      4 # Copyright 2007-2019 Broadcom Inc. All rights reserved.
      5 #
      6 # Helix5 Sanity
      7 #
      8 # Script to run all available tests as quickly as possible.
      9 # For testing basic sanity of new drivers, simulators, chips, etc.
     10 
     11 # Set run command script not to fail on errors reported by commands
     12 # this allows the script to continue if a test fails
     13 set rcerror=false
     14 
     15 # Set up test mode: don't stop on errors, show progress on each test
     16 tm -stoponerror +progress
     17 # Unselect all
     18 ts -*
     19 
     20 # First load the ETH mode config ...
     21 echo "Loading eth mode config ......"
     22 config clear
     23 config show
     24 rcload hx5_config_eth_mode.bcm
     25 rc
     26 
     27 echo "testsuite: started: sanity"
     28 time 'rcload rc.soc'
     29     counter off
     30 l2mode off
     31 
     32 # We need to print out port status since any cabling effects results.
     33 *:ps
     34 
     35 if $?1 'local full_test 1'
     36 
     37 # Avoid link messages while testing
     38 linkscan off
     39 
     40 init soc
     41 local done 'echo "   Done"'
     42 
     43 #Display some useful information
     44 date
     45 ver
     46 soc
     47 
     48 #bb voltage core 0.92
     49 
     50 #Start Test
     51 if !$?ihost_mode \
     52     'echo "tr 2: Running PCI Compliance ...";\
     53      tr 2;\
     54      $done;\
     55      date'
     56 
     57 echo "tr 4: Running PCI S-Channel Buf ..."
     58 tr 4
     59 $done
     60 date
     61 
     62 echo "tr 1: Running Register reset defaults ..."
     63 tr 1
     64 $done
     65 date
     66 
     67 init soc
     68 cancun load cmh
     69 cancun load cch
     70 init misc
     71 echo "tr 3: Running Register read/write ..."
     72 tr 3 mask64
     73 $done
     74 date
     75 
     76 rcload rc.soc
     77 counter off
     78 l2mode off
     79 linkscan off
     80 memscan off
     81 
     82 echo "tr 21: Running CPU Benchmarks ..."
     83 tr 21
     84 $done
     85 date
     86 
     87 counter off
     88 l2mode off
     89 linkscan off
     90 init soc
     91 cancun load cmh
     92 cancun load cch
     93 init misc
     94 
     95 set rct=false
     96 # Usage: BCM.0>td3_sanity_screen w x y z
     97 # (w,x,y,z can be 50,51,52,71) and in any combination
     98 # By default ie. if no arguments provided, only TR 50, 52,71 are run
     99 echo "Running memory tests ..."
    100 if !"expr $1+0 == 50" || !"expr $2+0 == 50" || !"expr $3+0 == 50" || !"expr $4+0 == 50" \
    101     'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \
    102     'rcload tr50_bcm56370_a0.soc'
    103 if !"expr $1+0 == 51" || !"expr $2+0 == 51" || !"expr $3+0 == 51" || !"expr $4+0 == 51" \
    104     'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \
    105     'rcload tr51_bcm56370_a0.soc'
    106 if !"expr $1+0 == 52" || !"expr $2+0 == 52" || !"expr $3+0 == 52" || !"expr $4+0 == 52" \
    107     'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \
    108     'rcload tr52_bcm56370_a0.soc'
    109 if !"expr $1+0 == 71" || !"expr $2+0 == 71" || !"expr $3+0 == 71" || !"expr $4+0 == 71" \
    110     'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \
    111     'rcload tr71_bcm56370_a0.soc'
    112 if !"expr $1+0 == 0" && !"expr $2+0 == 0" && !"expr $3+0 == 0" && !"expr $4+0 == 0" \
    113     'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \
    114     'rcload tr50_bcm56370_a0.soc' \
    115     'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \
    116     'rcload tr52_bcm56370_a0.soc' \
    117     'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \
    118     'rcload tr71_bcm56370_a0.soc'
    119 $done
    120 
    121 # Re-initialize to clean up of various read/writes to MMU memories
    122 set rct=true
    123 rcload rc.soc
    124 counter off
    125 l2mode off
    126 linkscan off
    127 memscan off
    128 date
    129 
    130 echo "tr 17: Testing CPU DMA loopback ..."
    131 rc
    132 tr 17
    133 $done
    134 date
    135 
    136 #MAC Loopback
    137 echo "tr 18: Testing MAC Loopback"
    138 tr 18 PortBitMap=e
    139 $done
    140 date
    141 
    142 # The PHY based tests 19 and 39 will be run below ...
    143 
    144 echo "tr 30: Running counter width verification test ..."
    145 tr 30
    146 $done
    147 date
    148 
    149 echo "tr 31: Running Counter/MIB test ..."
    150 tr 31
    151 $done
    152 date
    153 
    154 
    155 echo "tr 48: Running MAC loopback  - Mark 2 test ..."
    156 tr 48
    157 $done
    158 date
    159 
    160 
    161 echo "tr 60: Running MDIO Linkscan test ..."
    162 tr 60
    163 $done
    164 date
    165 
    166 #Traffic Test
    167 
    168 echo "tr 72: Running Traffic Test in MAC mode..."
    169 tr 72 RunMode=MAC PortBitMap=e tis=5
    170 $done
    171 date
    172 
    173 echo "tr 72: Running Traffic Test in PHY mode..."
    174 tr 72 RunMode=PHY PortBitMap=e tis=5
    175 $done
    176 date
    177 
    178 echo "tr 72: Running Traffic Test in EXT mode..."
    179 tr 72 pbm=xe0-xe27,xe32-xe35 runmode=ext an=f
    180 $done
    181 date
    182 
    183 echo "tr 500: Running Traffic Test in PHY mode on XE ports test ..."
    184 tr 500
    185 $done
    186 date
    187 
    188 echo "tr 502: Running SBUS DMA Performance test ..."
    189 tr 502
    190 $done
    191 date
    192 
    193 echo "tr 503: Running CCM DMA functionality test ..."
    194 tr 503
    195 $done
    196 date
    197 
    198 echo "tr 504: Running FIFO DMA functionality test ..."
    199 tr 504
    200 $done
    201 date
    202 
    203 #echo "tr 505: Running SCHAN DMA functionality test ..."
    204 #tr 505
    205 #$done
    206 #date
    207 
    208 # TR 19 and 39 PHY modes the lane swap config to not be
    209 # present in the config, hence we will delete then and
    210 # run those tests here ...
    211 
    212 config delete phy_chain_rx_lane_map_physical{1.0}
    213 config delete phy_chain_tx_lane_map_physical{1.0}
    214 config delete phy_chain_rx_lane_map_physical{17.0}
    215 config delete phy_chain_tx_lane_map_physical{17.0}
    216 config delete phy_chain_rx_lane_map_physical{33.0}
    217 config delete phy_chain_tx_lane_map_physical{33.0}
    218 config delete phy_chain_rx_lane_map_physical{49.0}
    219 config delete phy_chain_tx_lane_map_physical{49.0}
    220 config delete phy_chain_rx_lane_map_physical{53.0}
    221 config delete phy_chain_tx_lane_map_physical{53.0}
    222 config delete phy_chain_rx_lane_map_physical{57.0}
    223 config delete phy_chain_tx_lane_map_physical{57.0}
    224 config delete phy_chain_rx_lane_map_physical{61.0}
    225 config delete phy_chain_tx_lane_map_physical{61.0}
    226 rc
    227 
    228 echo "Running traffic tests with Lane swap variables skipped from config ..."
    229 
    230 echo "tr 19: Testing PHY Loopback"
    231 tr 19 PortBitMap=e 
    232 $done
    233 date
    234  
    235 #Internal snake Loopback
    236 echo "tr 39: Running internal snake on all XE ports, MAC loopback ..."
    237 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=e Count=1
    238 $done
    239 date
    240 
    241 echo "tr 39: Running internal snake on all XE ports, MAC loopback ..."
    242 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=e Count=1
    243 $done
    244 date
    245 
    246 tl
    247 local returnCode $?
    248 
    249 echo Tests Complete.  Reinitializing ...
    250 #config refresh
    251 rcload rc.soc
    252 counter off
    253 l2mode off
    254 
    255 # We want to show the return code from the tl command which
    256 # lists the results. The automated test infrastructure keys off of this
    257 # value
    258 echo "testsuite: finished: sanity: $returnCode"