guenevere5673.asm (2884B)
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 ; This is the default 5673 program for the Guenevere (BCM95695P24SX). 9 ; 10 ; To start it, use the following commands from BCM, 11 ; where unit 0 is the 5670 and units 3 and 4 are the 5673s: 12 ; 13 ; 0:led load guenevere5670.hex 14 ; 0:led auto on 15 ; 3:led load guenevere5673.hex 16 ; 3:led auto on 17 ; 4:led load guenevere5673.hex 18 ; 4:led auto on 19 ; *:led start 20 ; 21 ; The 3 programs should be started all at once so that blinking 22 ; is in sync across the 5673s. 23 ; 24 ; The Guenevere has 3 columns of 4 LEDs each as shown below: 25 ; 26 ; 5670 Unit 0 5673 Unit 3 5673 Unit 4 27 ; ------------- ------------- -------------- 28 ; L04 E1 E1 29 ; A04 R1 R1 30 ; L05 T1 T1 31 ; A05 L1 L1 32 ; 33 ; This program runs on each 5673 and controls only the rightmost 34 ; two columns of LEDs. The guenevere5670 program runs on 5670. 35 ; 36 ; There is one bit per LED with the following colors: 37 ; ZERO Green 38 ; ONE Black 39 ; 40 ; The bits are shifted out in the following order: 41 ; E1, R1, T1, L1 42 ; 43 ; Current implementation: 44 ; E1 reflects port 1 xe link enable 45 ; R1 reflects port 1 xe receive activity 46 ; T1 reflects port 1 xe transmit activity 47 ; L1 reflects port 1 xe link up 48 ; L04 reflects port 4 higig (External Higig 0) link up 49 ; A04 reflects port 4 higig (External Higig 0) receive/transmit activity 50 ; L05 reflects port 5 higig (External Higig 1) link up 51 ; A05 reflects port 5 higig (External Higig 1) receive/transmit activity 52 ; 53 ; 54 55 TICKS EQU 1 56 SECOND_TICKS EQU (30*TICKS) 57 TGIG_BLINK_TICKS EQU (SECOND_TICKS/10) 58 59 ld b,TGIG_BLINK_COUNT 60 inc (b) 61 ld a,(b) 62 cmp a,TGIG_BLINK_TICKS 63 jc up 64 ld (b),0 65 up: 66 port 0 67 call put 68 send 4 69 70 put: 71 pushst LINKEN 72 tinv 73 pack 74 ld a,(TGIG_BLINK_COUNT) 75 cmp a,TGIG_BLINK_TICKS/2 76 jc led_on 77 led_off: 78 pushst ONE 79 pack 80 pushst ONE 81 pack 82 jmp led_link 83 led_on: 84 pushst RX 85 tinv 86 pack 87 pushst TX 88 tinv 89 pack 90 led_link: 91 pushst LINKUP 92 tinv 93 pack 94 ret 95 96 ; 97 ; Symbolic names for the bits of the port status fields 98 ; 99 100 RX equ 0x0 ; received packet 101 TX equ 0x1 ; transmitted packet 102 COLL equ 0x2 ; collision indicator 103 SPEED_C equ 0x3 ; 100 Mbps 104 SPEED_M equ 0x4 ; 1000 Mbps 105 DUPLEX equ 0x5 ; half/full duplex 106 FLOW equ 0x6 ; flow control capable 107 LINKUP equ 0x7 ; link down/up status 108 LINKEN equ 0x8 ; link disabled/enabled status 109 ZERO equ 0xE ; always 0 110 ONE equ 0xF ; always 1 111 PORTDATA equ 0x80 ; Size 2 bytes 112 TGIG_BLINK_COUNT equ 0xc0