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

bcm56044sanity.soc (4365B)


      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 # Ranger+ BCM56044 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 pbmhg    0x1ffe00000
     22 local pbmge            0x2
     23 local pbmce           0x20  
     24 local pbmport  0x1ffe00022
     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: Ranger+ 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 ranger_plus_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 #MAC Loopback
    120 echo "Testing MAC Loopback - 1 Gb/s all GE ports"
    121 tr 18 PortBitMap=$pbmge Speed=1000
    122 $done
    123 
    124 echo "Testing MAC Loopback - 100 Gb/s all CE ports"
    125 tr 18 PortBitMap=$pbmce Speed=100G
    126 $done
    127 
    128 echo "Testing MAC Loopback - 11 Gb/s all HG ports"
    129 tr 18 PortBitMap=$pbmhg Speed=11G
    130 $done
    131 
    132 #PHY Loopback
    133 echo "Testing PHY Loopback - 1 Gb/s all GE ports"
    134 tr 19 PortBitMap=$pbmge Speed=1000
    135 $done
    136 
    137 echo "Testing PHY Loopback - 100 Gb/s all CE ports"
    138 tr 19 PortBitMap=$pbmce Speed=100G
    139 $done
    140 
    141 echo "Testing PHY Loopback - 11 Gb/s all HG42 ports"
    142 tr 19 PortBitMap=$pbmhg Speed=11G
    143 $done
    144 
    145 echo "Running MAC loopback V2 on all ports ..."
    146 tr 48 pbm=$pbmport
    147 $done
    148 
    149 echo "Running PHY loopback V2 on all ports ..."
    150 tr 49 pbm=$pbmport
    151 $done
    152 
    153 #Internal snake Loopback
    154 echo "Running internal snake on GE ports, MAC loopback ..."
    155 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=$pbmge
    156 $done
    157 
    158 echo "Running internal snake on GE ports, PHY loopback ..."
    159 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=$pbmge
    160 $done
    161 
    162 echo "Running internal snake on CE ports, MAC loopback ..."
    163 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=$pbmce
    164 $done
    165 
    166 echo "Running internal snake on CE ports, PHY loopback ..."
    167 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=$pbmce
    168 $done
    169 
    170 #Traffic Test
    171 echo "Running Traffic Test on GE ports in MAC mode ..."
    172 tr 72 RunMode=MAC PortBitMap=$pbmge c=10 sp=1000
    173 $done
    174 
    175 echo "Running Traffic Test on GE ports in PHY mode ..."
    176 tr 72 RunMode=PHY PortBitMap=$pbmge c=10 sp=1000
    177 $done
    178 
    179 echo "Running Traffic Test on CE ports in MAC mode ..."
    180 tr 72 RunMode=MAC PortBitMap=$pbmce c=10 sp=100G
    181 $done
    182 
    183 echo "Running Traffic Test on CE ports in PHY mode ..."
    184 tr 72 RunMode=PHY PortBitMap=$pbmce c=10 sp=100G
    185 $done
    186 
    187 echo "Running Traffic Test on HG ports in MAC mode ..."
    188 tr 72 RunMode=MAC PortBitMap=$pbmhg c=10 sp=max
    189 $done
    190 
    191 echo "Running Traffic Test on HG ports in PHY mode ..."
    192 tr 72 RunMode=PHY PortBitMap=$pbmhg c=10 sp=max
    193 $done
    194 
    195 date
    196 tl
    197 local returnCode $?
    198 
    199 echo Tests Complete.  Reinitializing ...
    200 config refresh
    201 rcload rc.soc
    202 counter off
    203 l2mode off
    204 
    205 # We want to show the return code from the tl command which
    206 # lists the results. The automated test infrastructure keys off of this
    207 # value
    208 echo "testsuite: finished: sanity: $returnCode"