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

bcm56543sanity.soc (5347B)


      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 BCM56543 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 0x2
     22 local pbmhg 0x1ffe00000
     23 local pbmport 0x1ffe00002
     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
     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=$pbmge Speed=1000
    121 $done
    122 
    123 echo "Testing MAC Loopback - 11 Gb/s HG ports"
    124 tr 18 PortBitMap=hg2,hg3 Speed=11G
    125 $done
    126 
    127 echo "Testing MAC Loopback - 11 Gb/s HG ports"
    128 tr 18 PortBitMap=hg0,hg1 Speed=11G
    129 $done
    130 
    131 #PHY Loopback
    132 echo "Testing PHY Loopback - 1 Gb/s all GE ports"
    133 tr 19 PortBitMap=$pbmge Speed=1000
    134 $done
    135 
    136 echo "Testing PHY Loopback - 11 Gb/s all HG21 ports"
    137 tr 19 PortBitMap=hg2,hg3 speed=11G; $done'
    138 
    139 echo "Testing PHY Loopback - 11 Gb/s all HG42 ports"
    140 tr 19 PortBitMap=hg0,hg1 Speed=11G
    141 $done
    142 
    143 echo "Running MAC loopback V2 on all ports ..."
    144 tr 48 pbm=$pbmport
    145 $done
    146 
    147 echo "Running PHY loopback V2 on all ports ..."
    148 tr 49 pbm=$pbmport
    149 $done
    150 
    151 #Internal snake Loopback
    152 echo "Running internal snake on GE ports, MAC loopback ..."
    153 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=$pbmhg
    154 $done
    155 
    156 echo "Running internal snake on GE ports, PHY loopback ..."
    157 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=$pbmhg
    158 $done
    159 
    160 #Traffic Test
    161 echo "Running Traffic Test on GE ports in MAC mode ..."
    162 tr 72 RunMode=MAC PortBitMap=$pbmge c=10 sp=1000
    163 $done
    164 
    165 echo "Running Traffic Test on GE ports in PHY mode ..."
    166 tr 72 RunMode=PHY PortBitMap=$pbmge c=10 sp=1000
    167 $done
    168 
    169 echo "Running Traffic Test on HG21 ports in MAC mode ..."
    170 tr 72 RunMode=MAC PortBitMap=hg0,hg1 c=10 sp=21G
    171 $done
    172 
    173 echo "Running Traffic Test on HG21 ports in PHY mode ..."
    174 tr 72 RunMode=PHY PortBitMap=hg0,hg1 c=10 sp=21G
    175 $done
    176 
    177 echo "Running Traffic Test on HG42 ports in MAC mode ..."
    178 tr 72 RunMode=MAC PortBitMap=hg0,hg1 c=10 sp=42G
    179 $done
    180 
    181 echo "Running Traffic Test on HG42 ports in PHY mode ..."
    182 tr 72 RunMode=PHY PortBitMap=hg0,hg1 c=10 sp=42G
    183 $done
    184 
    185 # if you have cable with following paring
    186 #    xe0-xe4, xe1-xe5, xe2-xe6, xe3-xe7
    187 #    xe8-xe12, xe9-xe13, xe10-xe14, xe11-xe15
    188 #    ...
    189 #    xe56-xe60, xe57-xe61, xe58-xe62, xe59-xe63
    190 #
    191 # tr 72 rm=external pbm=xe0,xe4 an=f sp=10g
    192 # tr 72 rm=external pbm=xe1,xe5 an=f sp=10g
    193 # tr 72 rm=external pbm=xe2,xe6 an=f sp=10g
    194 # tr 72 rm=external pbm=xe3,xe7 an=f sp=10g
    195 # tr 72 rm=external pbm=xe8,xe12 an=f sp=10g
    196 # tr 72 rm=external pbm=xe9,xe13 an=f sp=10g
    197 # tr 72 rm=external pbm=xe10,xe14 an=f sp=10g
    198 # tr 72 rm=external pbm=xe11,xe15 an=f sp=10g
    199 # ...
    200 # tr 72 rm=external pbm=xe56,xe60 an=f sp=10g
    201 # tr 72 rm=external pbm=xe57,xe61 an=f sp=10g
    202 # tr 72 rm=external pbm=xe58,xe62 an=f sp=10g
    203 # tr 72 rm=external pbm=xe59,xe63 an=f sp=10g
    204 
    205 # if you have cable with following paring
    206 #    xe0-xe4, xe1-xe5, xem-xe6, xe3-xe7
    207 #    xe8-xe12, xe9-xe13, xe10-xe14, xe11-xe15
    208 #    ...
    209 #    xe56-xe60, xe57-xe61, xe58-xe62, xe59-xe63
    210 # echo "Running external loopback ..."
    211 # tr 20 tpbm=xe0-xe3 di=4 an=f s=10g
    212 # tr 20 tpbm=xe8-xe11 di=4 an=f s=10g
    213 # tr 20 tpbm=xe16-xe19 di=4 an=f s=10g
    214 # tr 20 tpbm=xe24-xe27 di=4 an=f s=10g
    215 # tr 20 tpbm=xe32-xe35 di=4 an=f s=10g
    216 # tr 20 tpbm=xe40-xe43 di=4 an=f s=10g
    217 # tr 20 tpbm=xe48-xe51 di=4 an=f s=10g
    218 # tr 20 tpbm=xe56-xe59 di=4 an=f s=10g
    219 # $done
    220 
    221 # Show status
    222 date
    223 tl
    224 local returnCode $?
    225 
    226 echo Tests Complete.  Reinitializing ...
    227 config refresh
    228 rcload rc.soc
    229 counter off
    230 l2mode off
    231 
    232 # We want to show the return code from the tl command which
    233 # lists the results. The automated test infrastructure keys off of this
    234 # value
    235 echo "testsuite: finished: sanity: $returnCode"
    236