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

twolynx.asm (1728B)


      1 ;
      2 ;
      3 ;
      4 ; This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      5 ; 
      6 ; Copyright 2007-2019 Broadcom Inc. All rights reserved.
      7 ; 
      8 ;
      9 ; This is the default program for the Lynx SDK (BCM95673K4S)
     10 ;
     11 ; To start it, use the following commands from BCM:
     12 ;
     13 ;	0:led load twolynx.hex
     14 ;	1:led load twolynx.hex
     15 ;	*:led start
     16 ;
     17 ; On the Dual Lynx SDK board, there are two Lynx chips (unit 0 and 1).
     18 ; Each is connected to its own scan chain of 8 bits long.
     19 ;
     20 ; The Dual Lynx SDK has 4 columns of 4 LEDs each, as shown below:
     21 ;
     22 ;      E1 E2 E3 E4
     23 ;      R1 R2 R3 R4
     24 ;      T1 T2 T3 T4
     25 ;      L1 L2 L3 L4
     26 ;
     27 ; There is one bit per LED with the following colors:
     28 ;	ZERO		Green
     29 ;	ONE		Black
     30 ;
     31 ; The bits are shifted out in the following order:
     32 ;	E1, R1, T1, L1, E2, R2, T2, L2
     33 ;
     34 ; Current implementation:
     35 ;	E1 reflects port 1 higig link enable
     36 ;	R1 reflects port 1 higig receive activity
     37 ;	T1 reflects port 1 higig transmit activity
     38 ;	L1 reflects port 1 higig link up
     39 ;
     40 
     41 	port	1
     42 	call	put
     43 	port	0
     44 	call	put
     45 
     46 	send	8
     47 
     48 put:
     49 	pushst	LINKEN
     50 	tinv
     51 	pack
     52 	pushst	RX
     53 	tinv
     54 	pack
     55 	pushst	TX
     56 	tinv
     57 	pack
     58 	pushst	LINKUP
     59 	tinv
     60 	pack
     61 	ret
     62 
     63 TICKS		EQU	1
     64 SECOND_TICKS	EQU	(30*TICKS)
     65 TXRX_ALT_TICKS	EQU	(SECOND_TICKS/6)
     66 TX_ALT_COUNT	equ	0xc0
     67 RX_ALT_COUNT	equ	0xc1
     68 
     69 ;
     70 ; Symbolic names for the bits of the port status fields
     71 ;
     72 
     73 RX		equ	0x0	; received packet
     74 TX		equ	0x1	; transmitted packet
     75 COLL		equ	0x2	; collision indicator
     76 SPEED_C		equ	0x3	; 100 Mbps
     77 SPEED_M		equ	0x4	; 1000 Mbps
     78 DUPLEX		equ	0x5	; half/full duplex
     79 FLOW		equ	0x6	; flow control capable
     80 LINKUP		equ	0x7	; link down/up status
     81 LINKEN		equ	0x8	; link disabled/enabled status
     82 ZERO		equ	0xE	; always 0
     83 ONE		equ	0xF	; always 1