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

bcm56640sanity.soc (5372B)


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