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

bcm56544sanity.soc (5552B)


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