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

tr3_sanity.soc (5640B)


      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 # Triumph3 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 
     12 # Set run command script not to fail on errors reported by commands
     13 # this allows the script to continue if a test fails
     14 set rcerror=false
     15 
     16 # Set up test mode: don't stop on errors, show progress on each test
     17 tm -stoponerror +progress
     18 # Unselect all
     19 ts -*
     20 
     21 if $?BCM56540_A0 || $?BCM56541_A0 || $?BCM56542_A0 || \
     22    $?BCM56540_A1 || $?BCM56541_A1 || $?BCM56542_A1 || \
     23    $?BCM56540_B0 || $?BCM56541_B0 || $?BCM56542_B0 \
     24     'local firebolt4 1'
     25 
     26 if $?BCM56544_A0 || $?BCM56545_A0 || $?BCM56546_A0 || \
     27    $?BCM56544_A1 || $?BCM56545_A1 || $?BCM56546_A1 || \
     28    $?BCM56544_B0 || $?BCM56545_B0 || $?BCM56546_B0 \
     29     'local apollo2 1'
     30 
     31 # Turn off Mem cache and Parity checks for mem tests
     32 config add mem_cache_enable=0
     33 config add parity_enable=0
     34 
     35 echo "testsuite: started: sanity"
     36 rcload rc.soc
     37 counter off
     38 l2mode off
     39 
     40 # We need to print out port status since any cabling effects results.
     41 *:ps
     42 
     43 if $?1 'local full_test 1'
     44 
     45 # Avoid link messages while testing
     46 linkscan off
     47 
     48 init
     49 init misc
     50 
     51 local done 'echo "   Done"'
     52 
     53 #Display some useful information
     54 date
     55 ver
     56 soc
     57 
     58 #Start Test
     59 echo "Running PCI Compliance ..."
     60 tr 2
     61 $done
     62 
     63 echo "Running PCI S-Channel Buf ..."
     64 tr 4
     65 $done
     66 
     67 init soc
     68 debug -warn
     69 echo "Running Register reset defaults ..."
     70 tr 1
     71 $done
     72 
     73 echo "Running Register read/write ..."
     74 tr 3 mask64
     75 $done
     76 debug +warn
     77 
     78 rcload rc.soc
     79 counter off
     80 l2mode off
     81 echo "Running CPU Benchmarks (No Mem Cache) ..."
     82 tr 21
     83 $done
     84 
     85 #tr3_mem.soc
     86 
     87 # Re-initialize to clean up of various read/writes to MMU memories
     88 rcload rc.soc
     89 counter off
     90 l2mode off
     91 linkscan off
     92 
     93 echo "Running counter width verification test ..."
     94 tr 30
     95 $done
     96 
     97 echo "Running counter read/write test ..."
     98 tr 31
     99 $done
    100 
    101 #Hashing tests - TBD
    102 #tr 55
    103 
    104 echo "Running MDIO Linkscan test"
    105 tr 60
    106 $done
    107 
    108 echo "Testing CPU DMA loopback ..."
    109 tr 17
    110 $done
    111 
    112 #echo "Testing CPU DMA, Scatter/Gather Reload ..."
    113 #tr 22
    114 #$done
    115 
    116 echo "Testing CPU DMA, Scatter/Gather Simple ..."
    117 tr 23
    118 $done
    119 
    120 echo "Testing CPU DMA, Scatter/Gather Random ..."
    121 tr 24
    122 $done
    123 
    124 #MAC Loopback
    125 echo "Testing MAC Loopback - 1 Gb/s all GE ports"
    126 tr 18 PortBitMap=ge Speed=1000
    127 $done
    128 
    129 echo "Testing MAC Loopback - 10 Gb/s all XE ports"
    130 tr 18 PortBitMap=xe Speed=10G
    131 $done
    132 
    133 echo "Testing MAC Loopback - 10 Gb/s all HG ports"
    134 tr 18 PortBitMap=hg Speed=10G
    135 $done
    136 
    137 #PHY Loopback
    138 echo "Testing PHY Loopback - 1 Gb/s all GE ports"
    139 tr 19 PortBitMap=ge Speed=1000
    140 $done
    141 
    142 echo "Testing PHY Loopback - 10 Gb/s all XE ports"
    143 tr 19 PortBitMap=xe Speed=10G
    144 $done
    145 
    146 echo "Testing PHY Loopback - 10 Gb/s all HG ports"
    147 tr 19 PortBitMap=hg Speed=10G
    148 $done
    149 
    150 echo "Running MAC loopback V2 on all ports ..."
    151 tr 48
    152 $done
    153 
    154 echo "Running PHY loopback V2 on all ports ..."
    155 tr 49
    156 $done
    157 
    158 #Internal snake Loopback
    159 echo "Running internal snake on GE ports, MAC loopback ..."
    160 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=ge
    161 $done
    162 
    163 echo "Running internal snake on GE ports, PHY loopback ..."
    164 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=ge
    165 $done
    166 
    167 echo "Running internal snake on XE ports, MAC loopback ..."
    168 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=xe
    169 $done
    170 
    171 echo "Running internal snake on XE ports, PHY loopback ..."
    172 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=xe
    173 $done
    174 
    175 #Traffic Test
    176 echo "Running Traffic Test in MAC mode ..."
    177 tr 72 RunMode=MAC PortBitMap=ge
    178 $done
    179 
    180 echo "Running Traffic Test in PHY mode ..."
    181 tr 72 RunMode=PHY PortBitMap=ge
    182 $done
    183 
    184 echo "Running Traffic Test in MAC mode ..."
    185 tr 72 RunMode=MAC PortBitMap=xe
    186 $done
    187 
    188 echo "Running Traffic Test in PHY mode ..."
    189 tr 72 RunMode=PHY PortBitMap=xe
    190 $done
    191 
    192 echo "Running Traffic Test in MAC mode ..."
    193 tr 72 RunMode=MAC PortBitMap=hg
    194 $done
    195 
    196 echo "Running Traffic Test in PHY mode ..."
    197 tr 72 RunMode=PHY PortBitMap=hg
    198 $done
    199 
    200 # if you have cable with following paring
    201 #    xe0-xe4, xe1-xe5, xe2-xe6, xe3-xe7
    202 #    xe8-xe12, xe9-xe13, xe10-xe14, xe11-xe15
    203 #    ...
    204 #    xe56-xe60, xe57-xe61, xe58-xe62, xe59-xe63
    205 #
    206 # tr 72 rm=external pbm=xe0,xe4 an=f sp=10g
    207 # tr 72 rm=external pbm=xe1,xe5 an=f sp=10g
    208 # tr 72 rm=external pbm=xe2,xe6 an=f sp=10g
    209 # tr 72 rm=external pbm=xe3,xe7 an=f sp=10g
    210 # tr 72 rm=external pbm=xe8,xe12 an=f sp=10g
    211 # tr 72 rm=external pbm=xe9,xe13 an=f sp=10g
    212 # tr 72 rm=external pbm=xe10,xe14 an=f sp=10g
    213 # tr 72 rm=external pbm=xe11,xe15 an=f sp=10g
    214 # ...
    215 # tr 72 rm=external pbm=xe56,xe60 an=f sp=10g
    216 # tr 72 rm=external pbm=xe57,xe61 an=f sp=10g
    217 # tr 72 rm=external pbm=xe58,xe62 an=f sp=10g
    218 # tr 72 rm=external pbm=xe59,xe63 an=f sp=10g
    219 
    220 # if you have cable with following paring
    221 #    xe0-xe4, xe1-xe5, xem-xe6, xe3-xe7
    222 #    xe8-xe12, xe9-xe13, xe10-xe14, xe11-xe15
    223 #    ...
    224 #    xe56-xe60, xe57-xe61, xe58-xe62, xe59-xe63
    225 # echo "Running external loopback ..."
    226 # tr 20 tpbm=xe0-xe3 di=4 an=f s=10g
    227 # tr 20 tpbm=xe8-xe11 di=4 an=f s=10g
    228 # tr 20 tpbm=xe16-xe19 di=4 an=f s=10g
    229 # tr 20 tpbm=xe24-xe27 di=4 an=f s=10g
    230 # tr 20 tpbm=xe32-xe35 di=4 an=f s=10g
    231 # tr 20 tpbm=xe40-xe43 di=4 an=f s=10g
    232 # tr 20 tpbm=xe48-xe51 di=4 an=f s=10g
    233 # tr 20 tpbm=xe56-xe59 di=4 an=f s=10g
    234 # $done
    235 
    236 # Show status
    237 date
    238 tl
    239 local returnCode $?
    240 
    241 echo Tests Complete.  Reinitializing ...
    242 config refresh
    243 rcload rc.soc
    244 counter off
    245 l2mode off
    246 
    247 # We want to show the return code from the tl command which
    248 # lists the results. The automated test infrastructure keys off of this
    249 # value
    250 echo "testsuite: finished: sanity: $returnCode"