1 ;;; -*- Mode: Midas -*-
2 ;;; Copyright (c) 1999 Massachusetts Institute of Technology
4 ;;; This program is free software; you can redistribute it and/or
5 ;;; modify it under the terms of the GNU General Public License as
6 ;;; published by the Free Software Foundation; either version 3 of the
7 ;;; License, or (at your option) any later version.
9 ;;; This program is distributed in the hope that it will be useful,
10 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 ;;; General Public License for more details.
14 ;;; You should have received a copy of the GNU General Public License
15 ;;; along with this program; if not, write to the Free Software
16 ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 ;;; Canonical symbol definition macro, FOO==BAR with error check.
27 IFN Z-$$TEM1,.ERR Z MULTIPLY .QUOTE`.QUOTE/DEFINED/`
35 ; Junk for Interlan NI1010A Unibus Ethernet Interface
37 ;Interrupt information
38 DEFSYM %ILVEC==300 ;Input side interrupt vector (non-standard)
39 ;Output side assumed to be %LHVEC+4
40 DEFSYM %ILPRI==5 ;Interrupt priority (should be 6, but
41 ; hard to change to anything but 4!)
43 DEFSYM %ILBAS==764000 ;Base of NI1010A Registers in UB space
46 DEFSYM %ILCSR==%ILBAS ;Control and Status Register
47 DEFSYM %ILBAR==%ILBAS+2 ;Buffer Address Register
48 DEFSYM %ILBCR==%ILBAS+4 ;Byte COunt Register
52 DEFSYM %ILEUA==:140000 ;Extended UB address field
53 DEFSYM %ILCMD==:37400 ;Command Function Code
54 DEFSYM %ILCD==:200 ;Command Done
55 DEFSYM %ILCIE==:100 ;Command Interrupt Enable
56 DEFSYM %ILRD==:40 ;Receive DMA done
57 DEFSYM %ILRIE==:20 ;Receive Interrupt Enable
58 DEFSYM %ILSTS==:17 ;Command Status Code
60 ;Commands (in %ILCMD field of CSR)
61 DEFSYM %ILSML==400 ;Module Loopback (through interface)
62 DEFSYM %ILSIL==1000 ;Set Internal Loopback
63 DEFSYM %ILCLM==1400 ;Clear loopback mode
64 DEFSYM %ILSPR==2000 ;Promiscuous Receive Mode
65 DEFSYM %ILCPR==2400 ;Clear Promiscuous Receive Mode
66 DEFSYM %ILSRE==3000 ;Set Receive-on-error bit
67 DEFSYM %ILCRE==3400 ;Clear Receive-on-error bit
68 DEFSYM %ILOFL==4000 ;Go Offline
69 DEFSYM %ILONL==4400 ;Go Online
70 DEFSYM %ILROD==5000 ;Run onboard diagnostics
71 DEFSYM %ILSIS==6000 ;Set Insert-source-address mode
72 DEFSYM %ILCIS==7000 ;Clear Insert-source-address mode
73 DEFSYM %ILDPA==7400 ;Set physical address to default
74 DEFSYM %ILSRM==10000 ;Receive all multicast packets
75 DEFSYM %ILCRM==10400 ;Clear Receive all multicast packets
76 DEFSYM %ILRRS==14000 ;Report and reset statistics
77 DEFSYM %ILRCD==14400 ;Report Collision Delay Times
78 DEFSYM %ILRCV==20000 ;Supply Receive Buffer
79 DEFSYM %ILLXD==24000 ;Load Transmit Data
80 DEFSYM %ILLXS==24400 ;Load Transmit Data and Send
81 DEFSYM %ILLGA==25000 ;Load Group Addreses
82 DEFSYM %ILDGA==25400 ;Delete Group Adresses
84 DEFSYM %ILFRQ==30000 ;Flush Receive BAR/BCR Queue
85 DEFSYM %ILRST==37400 ;Reset
87 ;Error codes. Found in %ILSTS field of CSR
88 DEFSYM %ILEOK==0 ;Success
89 DEFSYM %ILERT==1 ;Success, with retries
90 DEFSYM %ILEBC==2 ;Illegal Command
91 DEFSYM %ILEIC==3 ;Invalid Command
92 DEFSYM %ILERE==4 ;Receiver Error
93 DEFSYM %ILEBB==5 ;Buffer Size Too Big
94 DEFSYM %ILEFS==6 ;Frams Size Too Small
95 DEFSYM %ILEEC==10 ;Excessive Collisions
96 DEFSYM %ILEBA==12 ;Buffer Not Word Aligned
97 DEFSYM %ILENX==17 ;Non-eXistant Memory
99 ;Diagnostic codes. Results from %ILROD command
100 DEFSYM %ILDOK==0 ;No Problem
101 DEFSYM %ILDCE==1 ;ROM/RAM Checksum Error
102 DEFSYM %ILDDE==2 ;DMA Circuitry Failed
103 DEFSYM %ILDXE==3 ;Transmit Circuitry Failed
104 DEFSYM %ILDRE==4 ;Receive Circuitry Failed
105 DEFSYM %ILDLE==5 ;Loopback checks failed
107 ;Frame status bits, returned in frame status byte
108 ; at the top of each received packet.
109 DEFSYM %ILFCE==1 ;CRC Error in packet
110 DEFSYM %ILFAE==2 ;Alignment Error
111 DEFSYM %ILFFL==4 ;1+ frames lost just before
113 IFN $$TEMP,EXPUNG DEFSYM