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

bcm56542sanity.soc (5335B)


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