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

bcm56643sanity.soc (5648B)


      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 BCM56643 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 0x3fffffffffffe
     22 local pbmxe 0x3c000000000000
     23 local pbmhg 0x3c0000000000000
     24 local pbmport 0x3fffffffffffffe
     25 
     26 # Turn off Mem cache and Parity checks for mem tests
     27 config add mem_cache_enable=0
     28 config add parity_enable=0
     29 
     30 echo "testsuite: started: sanity"
     31 rcload rc.soc
     32 counter off
     33 l2mode off
     34 
     35 # We need to print out port status since any cabling effects results.
     36 *:ps
     37 
     38 if $?1 'local full_test 1'
     39 
     40 # Avoid link messages while testing
     41 linkscan off
     42 ibodsync off
     43 init
     44 init misc
     45 
     46 local done 'echo "   Done"'
     47 
     48 #Display some useful information
     49 date
     50 ver
     51 soc
     52 
     53 #Start Test
     54 echo "Running PCI Compliance ..."
     55 tr 2
     56 $done
     57 
     58 echo "Running PCI S-Channel Buf ..."
     59 tr 4
     60 $done
     61 
     62 init soc
     63 debug -warn
     64 echo "Running Register reset defaults ..."
     65 tr 1
     66 $done
     67 
     68 echo "Running Register read/write ..."
     69 tr 3 mask64
     70 $done
     71 debug +warn
     72 
     73 rcload rc.soc
     74 counter off
     75 l2mode off
     76 echo "Running CPU Benchmarks (No Mem Cache) ..."
     77 tr 21
     78 $done
     79 
     80 tr3_mem.soc
     81 
     82 # Re-initialize to clean up of various read/writes to MMU memories
     83 rcload rc.soc
     84 counter off
     85 l2mode off
     86 linkscan off
     87 
     88 echo "Running counter width verification test ..."
     89 tr 30
     90 $done
     91 
     92 echo "Running counter read/write test ..."
     93 tr 31
     94 $done
     95 
     96 #Hashing tests - TBD
     97 #tr 55
     98 
     99 echo "Running MDIO Linkscan test"
    100 tr 60
    101 $done
    102 
    103 echo "Testing CPU DMA loopback ..."
    104 #tr 17
    105 $done
    106 
    107 #echo "Testing CPU DMA, Scatter/Gather Reload ..."
    108 #tr 22
    109 #$done
    110 
    111 echo "Testing CPU DMA, Scatter/Gather Simple ..."
    112 #tr 23
    113 $done
    114 
    115 echo "Testing CPU DMA, Scatter/Gather Random ..."
    116 #tr 24
    117 $done
    118 
    119 ps
    120 
    121 #MAC Loopback
    122 echo "Testing MAC Loopback - 1 Gb/s all GE ports"
    123 tr 18 PortBitMap=$pbmge Speed=1000
    124 $done
    125 
    126 echo "Testing MAC Loopback - 10 Gb/s all XE ports"
    127 tr 18 PortBitMap=$pbmxe Speed=10G
    128 $done
    129 
    130 echo "Testing MAC Loopback - 42 Gb/s all HG ports"
    131 tr 18 PortBitMap=$pbmhg Speed=42G 
    132 $done
    133 
    134 
    135 #echo "Testing PHY Loopback - 1 Gb/s all GE ports"
    136 #tr 19 PortBitMap=$pbmge Speed=1000
    137 #$done
    138 
    139 echo "Testing PHY Loopback - 10 Gb/s all XE ports"
    140 tr 19 PortBitMap=$pbmxe Speed=10G
    141 $done
    142 
    143 echo "Testing PHY Loopback - 42 Gb/s all HG ports"
    144 tr 19 PortBitMap=$pbmhg Speed=42G
    145 $done
    146 
    147 echo "Running MAC loopback V2 on all ports ..."
    148 tr 48 pbm=$pbmport
    149 $done
    150 
    151 
    152 #echo "Running PHY loopback V2 on all ports ..."
    153 #tr 49 pbm=$pbmport
    154 #$done
    155 
    156 #Internal snake Loopback
    157 echo "Running internal snake on GE ports, MAC loopback ..."
    158 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=$pbmge
    159 $done
    160 
    161 
    162 #echo "Running internal snake on GE ports, PHY loopback ..."
    163 #tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=$pbmge
    164 #$done
    165 
    166 echo "Running internal snake on XE ports, MAC loopback ..."
    167 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=$pbmxe
    168 $done
    169 
    170 echo "Running internal snake on XE ports, PHY loopback ..."
    171 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=$pbmxe
    172 $done
    173 
    174 #Traffic Test
    175 echo "Running Traffic Test on GE ports in MAC mode ..."
    176 tr 72 RunMode=MAC PortBitMap=$pbmge c=10 sp=1000
    177 $done
    178 
    179 
    180 #echo "Running Traffic Test on GE ports in PHY mode ..."
    181 #tr 72 RunMode=PHY PortBitMap=$pbmge c=10 sp=1000
    182 #$done
    183 
    184 echo "Running Traffic Test on XE ports in MAC mode ..."
    185 tr 72 RunMode=MAC PortBitMap=$pbmxe c=10 sp=10G
    186 $done
    187 
    188 echo "Running Traffic Test on XE ports in PHY mode ..."
    189 tr 72 RunMode=PHY PortBitMap=$pbmxe c=10 sp=10G
    190 $done
    191 
    192 echo "Running Traffic Test on HG ports in MAC mode ..."
    193 tr 72 RunMode=MAC PortBitMap=$pbmhg c=10 sp=42G
    194 $done
    195 
    196 echo "Running Traffic Test on HG ports in PHY mode ..."
    197 tr 72 RunMode=PHY PortBitMap=$pbmhg c=10 sp=42G
    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"