w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
Rw11CntlDEUNA.hpp
Go to the documentation of this file.
1// $Id: Rw11CntlDEUNA.hpp 1185 2019-07-12 17:29:12Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2014-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2017-04-14 875 0.5 Initial version (minimal functions, 211bsd ready)
8// 2014-06-09 561 0.1 First draft
9// ---------------------------------------------------------------------------
10
11
16#ifndef included_Retro_Rw11CntlDEUNA
17#define included_Retro_Rw11CntlDEUNA 1
18
19#include <deque>
20
21#include "librtools/Rtime.hpp"
23
24#include "RethBuf.hpp"
25
26#include "Rw11CntlBase.hpp"
27#include "Rw11UnitDEUNA.hpp"
28
29namespace Retro {
30
31 class Rw11CntlDEUNA : public Rw11CntlBase<Rw11UnitDEUNA,1> {
32 public:
33
36
37 void Config(const std::string& name, uint16_t base, int lam);
38
39 virtual void Start();
40
41 virtual void UnitSetup(size_t ind);
42
43 void SetType(const std::string& type);
44 void SetMacDefault(const std::string& mac);
45 void SetRxPollTime(const Rtime& time);
46 void SetRxQueLimit(size_t rxqlim);
47
48 std::string MacDefault() const;
49 const Rtime& RxPollTime() const;
50 size_t RxQueLimit() const;
51
52 bool Running() const;
53
54 const char* MnemoPcmd(uint16_t pcmd) const;
55 const char* MnemoFunc(uint16_t func) const;
56 const char* MnemoState(uint16_t state) const;
57
58 bool RcvCallback(RethBuf::pbuf_t& pbuf);
59
60 virtual void Dump(std::ostream& os, int ind=0, const char* text=0,
61 int detail=0) const;
62
63 // some constants (also defined in cpp)
64 static const uint16_t kIbaddr = 0174510;
65 static const int kLam = 9;
66
67 static const uint16_t kPR0 = 000;
68 static const uint16_t kPR1 = 002;
69 static const uint16_t kPR2 = 004;
70 static const uint16_t kPR3 = 006;
71
72 static const uint16_t kProbeOff = kPR0;
73 static const bool kProbeInt = true;
74 static const bool kProbeRem = true;
75
76 static const uint16_t kPR0_M_SERI = kWBit15;
77 static const uint16_t kPR0_M_PCEI = kWBit14;
78 static const uint16_t kPR0_M_RXI = kWBit13;
79 static const uint16_t kPR0_M_TXI = kWBit12;
80 static const uint16_t kPR0_M_DNI = kWBit11;
81 static const uint16_t kPR0_M_RCBI = kWBit10;
82 static const uint16_t kPR0_M_BUSY = kWBit09;
83 static const uint16_t kPR0_M_USCI = kWBit08;
84 static const uint16_t kPR0_M_INTR = kWBit07;
85 static const uint16_t kPR0_M_INTE = kWBit06;
86 static const uint16_t kPR0_M_RSET = kWBit05;
87 static const uint16_t kPR0_M_BRST = kWBit04;
88 static const uint16_t kPR0_M_PCMD = 00017;
89
90 static const uint16_t kPR0_V_PCMDBP= 12;
91 static const uint16_t kPR0_B_PCMDBP= 00017;
92 static const uint16_t kPR0_M_PDMDWB= kWBit10;
93 static const uint16_t kPR0_M_PCWWB = kWBit08;
94
95 static const uint16_t kPCMD_NOOP = 0;
96 static const uint16_t kPCMD_GETPCBB = 1;
97 static const uint16_t kPCMD_GETCMD = 2;
98 static const uint16_t kPCMD_SELFTST = 3;
99 static const uint16_t kPCMD_START = 4;
100 static const uint16_t kPCMD_BOOT = 5;
101 static const uint16_t kPCMD_PDMD = 010;
102 static const uint16_t kPCMD_HALT = 016;
103 static const uint16_t kPCMD_STOP = 017;
104
105 static const uint16_t kPR1_M_XPWR = kWBit15;
106 static const uint16_t kPR1_M_ICAB = kWBit14;
107 static const uint16_t kPR1_M_PCTO = kWBit07;
108 static const uint16_t kPR1_M_DELUA= kWBit04;
109 static const uint16_t kPR1_M_STATE= 0017;
110
111 static const uint16_t kSTATE_RESET = 0;
112 static const uint16_t kSTATE_PLOAD = 1;
113 static const uint16_t kSTATE_READY = 2;
114 static const uint16_t kSTATE_RUN = 3;
115 static const uint16_t kSTATE_UHALT = 5;
116 static const uint16_t kSTATE_NHALT = 6;
117 static const uint16_t kSTATE_NUHALT = 7;
118 static const uint16_t kSTATE_PHALT = 010;
119 static const uint16_t kSTATE_SLOAD = 017;
120
121 static const uint16_t kPC0_M_FUNC = 0x00ff;
122 static const uint16_t kPC0_M_MBZ = 0xff00;
123
124 static const uint16_t kFUNC_NOOP = 0;
125 static const uint16_t kFUNC_RDPA = 2;
126 static const uint16_t kFUNC_RPA = 4;
127 static const uint16_t kFUNC_WPA = 5;
128 static const uint16_t kFUNC_RMAL = 6;
129 static const uint16_t kFUNC_WMAL = 7;
130 static const uint16_t kFUNC_RRF = 010;
131 static const uint16_t kFUNC_WRF = 011;
132 static const uint16_t kFUNC_RCTR = 012;
133 static const uint16_t kFUNC_RCCTR = 013;
134 static const uint16_t kFUNC_RMODE = 014;
135 static const uint16_t kFUNC_WMODE = 015;
136 static const uint16_t kFUNC_RSTAT = 016;
137 static const uint16_t kFUNC_RCSTAT = 017;
138 static const uint16_t kFUNC_RSID = 022;
139 static const uint16_t kFUNC_WSID = 023;
140
141 static const uint16_t kSTAT_M_ERRS = kWBit15;
142 static const uint16_t kSTAT_M_MERR = kWBit14;
143 static const uint16_t kSTAT_M_BABL = kWBit13;
144 static const uint16_t kSTAT_M_CERR = kWBit12;
145 static const uint16_t kSTAT_M_TMOT = kWBit11;
146 static const uint16_t kSTAT_M_RRNG = kWBit09;
147 static const uint16_t kSTAT_M_TRNG = kWBit08;
148 static const uint16_t kSTAT_M_PTCH = kWBit07;
149 static const uint16_t kSTAT_M_RRAM = kWBit06;
150 static const uint16_t kSTAT_M_RREV = 077;
151
152 static const uint16_t kMODE_M_PROM = kWBit15;
153 static const uint16_t kMODE_M_ENAL = kWBit14;
154 static const uint16_t kMODE_M_DRDC = kWBit13;
155 static const uint16_t kMODE_M_TPAD = kWBit12;
156 static const uint16_t kMODE_M_ECT = kWBit11;
157 static const uint16_t kMODE_M_DMNT = kWBit09;
158 static const uint16_t kMODE_M_INTL = kWBit06;
159 static const uint16_t kMODE_M_DTCR = kWBit03;
160 static const uint16_t kMODE_M_LOOP = kWBit02;
161 static const uint16_t kMODE_M_HDPX = kWBit00;
162 static const uint16_t kMODE_M_MBZ_DEUNA = 0x05f2;
163 static const uint16_t kMODE_M_MBZ_DELUA = 0x05b2;
164
165 static const uint16_t kTXR2_M_OWN = kWBit15;
166 static const uint16_t kTXR2_M_ERRS = kWBit14;
167 static const uint16_t kTXR2_M_MTCH = kWBit13;
168 static const uint16_t kTXR2_M_MORE = kWBit12;
169 static const uint16_t kTXR2_M_ONE = kWBit11;
170 static const uint16_t kTXR2_M_DEF = kWBit10;
171 static const uint16_t kTXR2_M_STF = kWBit09;
172 static const uint16_t kTXR2_M_ENF = kWBit08;
173 static const uint16_t kTXR2_M_SEGB = 00003;
174 static const uint16_t kTXR3_M_BUFL = kWBit15;
175 static const uint16_t kTXR3_M_UBTO = kWBit14;
176 static const uint16_t kTXR3_M_UFLO = kWBit13;
177 static const uint16_t kTXR3_M_LCOL = kWBit12;
178 static const uint16_t kTXR3_M_LCAR = kWBit11;
179 static const uint16_t kTXR3_M_RTRY = kWBit10;
180 static const uint16_t kTXR3_M_TDR = 01777;
181
182 static const uint16_t kRXR2_M_OWN = kWBit15;
183 static const uint16_t kRXR2_M_ERRS = kWBit14;
184 static const uint16_t kRXR2_M_FRAM = kWBit13;
185 static const uint16_t kRXR2_M_OFLO = kWBit12;
186 static const uint16_t kRXR2_M_CRC = kWBit11;
187 static const uint16_t kRXR2_M_STF = kWBit09;
188 static const uint16_t kRXR2_M_ENF = kWBit08;
189 static const uint16_t kRXR2_M_SEGB = 000003;
190 static const uint16_t kRXR3_M_BUFL = kWBit15;
191 static const uint16_t kRXR3_M_UBTO = kWBit14;
192 static const uint16_t kRXR3_M_NCHN = kWBit13;
193 static const uint16_t kRXR3_M_OVRN = kWBit12;
194 static const uint16_t kRXR3_M_MLEN = 07777;
195
196 static const uint32_t kUBA_M = 0x3fffe;
197 static const uint32_t kUBAODD_M = 0x3ffff;
198 static const uint16_t kDimMcast = 10;
199 static const uint16_t kDimCtrDeuna = 32;
200 static const uint16_t kDimCtrDelua = 34;
201 static const uint16_t kDimCtr = 34;
202 static const uint16_t kDimPlt = 100;
203
204 // statistics counter indices
205 enum stats {
262 };
263
264 protected:
265
266 enum s_tx {
269 };
270 enum s_rx {
274 };
275
277
278 void ClearMacList();
279 void ClearCtr();
280 void ClearStatus();
281
282 void Reset();
283 void SetRunning(bool run);
284 bool ExecGetcmd(RlinkCommandList& clist);
285
286 void Wlist2UBAddr(const uint16_t wlist[2], uint32_t& addr);
287 void Wlist2UBAddrLen(const uint16_t wlist[2],
288 uint32_t& addr, uint16_t& len);
289 void UBAddrLen2Wlist(uint16_t wlist[2],
290 uint32_t addr, uint16_t len);
291 void SetupPrimClist();
292
293 uint16_t GetPr1() const;
294
295 void StartTxRing();
296 void StartTxRing(const uint16_t dsccur[4],
297 const uint16_t dscnxt[4]);
298 void StopTxRing();
299
300 void StartRxRing();
301 void StartRxRing(const uint16_t dsccur[4],
302 const uint16_t dscnxt[4]);
303 void StopRxRing();
304
305 int TxRingHandler();
306 int RxRingHandler();
307 int RxPollHandler(const pollfd& pfd);
308
309 uint16_t RingIndexNext(uint16_t index, uint16_t size,
310 uint16_t inc=1) const;
311 uint16_t TxRingIndexNext(uint16_t inc=1) const;
312 uint16_t RxRingIndexNext(uint16_t inc=1) const;
313
314 uint32_t RingDscAddr(uint32_t base, uint16_t elen,
315 uint16_t index) const;
316 uint32_t TxRingDscAddr(uint16_t index) const;
317 uint32_t RxRingDscAddr(uint16_t index) const;
318
319 int MacFilter(uint64_t mac);
320
321 void UpdateStat16(uint32_t& stat, size_t ind, uint32_t inc=1);
322 void UpdateStat32(uint32_t& stat, size_t ind, uint32_t inc=1);
323
324 void LogMacFunc(const char* cmd, uint64_t mac);
325 void LogMcastFunc(const char* cmd);
326 void LogRingFunc(const char* cmd);
327 void LogFunc(const char* cmd, const char* tag1, uint16_t val1,
328 const char* tag2=nullptr, uint16_t val2=0);
329 void LogRingInfo(char rxtx, char rw);
330 void LogFrameInfo(char rxtx, const RethBuf& buf);
331
332 static void SetRingDsc(uint16_t dst[4], const uint16_t src[4]);
333 static std::string RingDsc2String(const uint16_t dsc[4], char rxtx);
334 static std::string RingDsc2OSEString(const uint16_t dsc[4], char fill=' ');
335
336 protected:
337 size_t fPC_rdpr0;
338 size_t fPC_rdpcb;
339 size_t fPC_lapcb;
348 uint32_t fPcbb;
349 uint16_t fPcb[4];
351 uint32_t fTxRingBase;
352 uint16_t fTxRingSize;
353 uint16_t fTxRingELen;
354 uint32_t fRxRingBase;
355 uint16_t fRxRingSize;
356 uint16_t fRxRingELen;
357 uint64_t fMacDefault;
358 uint64_t fMacList[2+kDimMcast];
360 uint16_t fPr0Last;
361 bool fPr1Pcto;
363 uint16_t fPr1State;
364 bool fRunning;
365 uint16_t fMode;
366 uint16_t fStatus;
367 uint16_t fTxRingIndex;
368 uint16_t fRxRingIndex;
369 uint16_t fTxDscCurPC[4];
370 uint16_t fTxDscNxtPC[4];
371 uint16_t fRxDscCurPC[4];
372 uint16_t fRxDscNxtPC[4];
374 uint16_t fTxDscCur[4];
375 uint16_t fTxDscNxt[4];
379 uint16_t fRxDscCur[4];
380 uint16_t fRxDscNxt[4];
382 size_t fRxQueLimit;
384 std::deque<RethBuf::pbuf_t> fRxBufQueue;
388 uint32_t fCtrRxFra;
389 uint32_t fCtrRxFraMcast;
390 uint32_t fCtrRxByt;
391 uint32_t fCtrRxBytMcast;
392 uint32_t fCtrRxFraLoInt;
393 uint32_t fCtrRxFraLoBuf;
394 uint32_t fCtrTxFra;
395 uint32_t fCtrTxFraMcast;
396 uint32_t fCtrTxByt;
397 uint32_t fCtrTxBytMcast;
398 uint32_t fCtrTxFraAbort;
399 uint32_t fCtrFraLoop;
400 };
401
402} // end namespace Retro
403
404#include "Rw11CntlDEUNA.ipp"
405
406#endif
static const uint16_t kWBit14
Definition: Rbits.hpp:46
static const uint16_t kWBit06
Definition: Rbits.hpp:38
static const uint16_t kWBit12
Definition: Rbits.hpp:44
static const uint16_t kWBit15
Definition: Rbits.hpp:47
static const uint16_t kWBit08
Definition: Rbits.hpp:40
static const uint16_t kWBit09
Definition: Rbits.hpp:41
static const uint16_t kWBit00
Definition: Rbits.hpp:32
static const uint16_t kWBit03
Definition: Rbits.hpp:35
static const uint16_t kWBit13
Definition: Rbits.hpp:45
static const uint16_t kWBit04
Definition: Rbits.hpp:36
static const uint16_t kWBit11
Definition: Rbits.hpp:43
static const uint16_t kWBit07
Definition: Rbits.hpp:39
static const uint16_t kWBit10
Definition: Rbits.hpp:42
static const uint16_t kWBit05
Definition: Rbits.hpp:37
static const uint16_t kWBit02
Definition: Rbits.hpp:34
FIXME_docs.
Definition: RethBuf.hpp:27
std::shared_ptr< RethBuf > pbuf_t
Definition: RethBuf.hpp:29
FIXME_docs.
Definition: Rtime.hpp:25
FIXME_docs.
Definition: RtimerFd.hpp:29
Implemenation (inline) of Rw11CntlBase.
static const uint16_t kMODE_M_MBZ_DEUNA
MBZ bit:10,8:4,1.
static const uint16_t kSTAT_M_RRNG
RRNG: rx ring error.
static const uint16_t kTXR2_M_SEGB
SEGB: msg of seg base.
virtual void UnitSetup(size_t ind)
FIXME_docs.
static const uint16_t kPR0_M_RSET
RSET: sw reset.
static const uint16_t kSTATE_PHALT
port halted
static const uint16_t kFUNC_WSID
WSID: write system id.
uint16_t fTxRingELen
tx ring entry length
static std::string RingDsc2OSEString(const uint16_t dsc[4], char fill=' ')
FIXME_docs.
static const uint16_t kSTAT_M_TMOT
TMOT: UNIBUS timeout.
static const uint16_t kSTAT_M_MERR
MERR: multiple errors.
bool fRunning
in kSTATE_RUN and active
static const uint16_t kPC0_M_FUNC
FUNC: function code.
static const uint16_t kFUNC_RMAL
RMAL: read mcast MAC list.
void Wlist2UBAddrLen(const uint16_t wlist[2], uint32_t &addr, uint16_t &len)
FIXME_docs.
static const uint16_t kPR0_M_RXI
RXI: receive rung intr.
uint32_t fCtrTxFraAbort
ctr: xmit aborted frames
enum s_rx fRxRingState
rx ring handler busy
void Config(const std::string &name, uint16_t base, int lam)
FIXME_docs.
static const uint16_t kTXR3_M_LCAR
LCAR: lost carrier.
static const uint16_t kRXR3_M_MLEN
MLEN: message length.
static std::string RingDsc2String(const uint16_t dsc[4], char rxtx)
FIXME_docs.
int AttnHandler(RlinkServer::AttnArgs &args)
FIXME_docs.
static const uint16_t kRXR2_M_ERRS
ERRS: error summary.
void Wlist2UBAddr(const uint16_t wlist[2], uint32_t &addr)
FIXME_docs.
static const uint16_t kSTATE_NHALT
ni halted
void ClearStatus()
FIXME_docs.
static const uint16_t kPCMD_GETCMD
GETCMD: get command.
void SetupPrimClist()
FIXME_docs.
uint16_t fRxDscNxt[4]
rx nxt ring dsc
static const uint16_t kMODE_M_INTL
INTL: int loopback(DELUA)
static const uint32_t kUBAODD_M
bits of odd unibus address
bool ExecGetcmd(RlinkCommandList &clist)
FIXME_docs.
static const uint16_t kPR0_V_PCMDBP
PCMDBP: pcmd busy prot.
void StartTxRing()
FIXME_docs.
Rtime fRxPollTime
rx poll time interval
static const uint16_t kSTATE_RESET
reset
uint16_t TxRingIndexNext(uint16_t inc=1) const
FIXME_docs.
static const uint16_t kPCMD_HALT
HALT: halt.
static const uint16_t kFUNC_RSTAT
RSTAT: read status.
static const uint16_t kTXR2_M_ONE
ONE: one collision.
uint16_t fRxRingELen
rx ring entry length
static const uint16_t kMODE_M_DMNT
DMNT: dis maint message.
void SetRxQueLimit(size_t rxqlim)
FIXME_docs.
int RxPollHandler(const pollfd &pfd)
FIXME_docs.
static const uint16_t kPR0_M_PDMDWB
PDMDWB: pdmd while busy.
static const uint16_t kMODE_M_DRDC
DRDC: dis data chaining.
static const uint16_t kPR0_M_TXI
TXI: transmit rung intr.
std::string MacDefault() const
FIXME_docs.
static const uint16_t kPR0_M_PCMD
PCMD: port command.
static const uint16_t kRXR2_M_OWN
OWN: owned by DENUA.
static const uint16_t kTXR2_M_OWN
OWN: owned by DEUNA.
void Reset()
FIXME_docs.
static const uint16_t kSTAT_M_TRNG
TRNG: tx ring error.
uint16_t fRxDscNxtPC[4]
rx nxt ring dsc from PrimClist
static const uint16_t kPR0
PR0 reg offset.
int fMcastCnt
mcast count
static const uint16_t kPCMD_STOP
STOP: stop.
static const uint16_t kPCMD_SELFTST
SELFTST: self test.
void LogRingFunc(const char *cmd)
FIXME_docs.
static const uint16_t kTXR3_M_UBTO
UBTO: UNIBUS timeout.
uint16_t fStatus
status
static const uint16_t kDimCtrDelua
DELUA count words (MAXCTR)
void UBAddrLen2Wlist(uint16_t wlist[2], uint32_t addr, uint16_t len)
FIXME_docs.
RtimerFd fRxPollTimer
rx poll timer
void LogFunc(const char *cmd, const char *tag1, uint16_t val1, const char *tag2=nullptr, uint16_t val2=0)
FIXME_docs.
static const uint16_t kTXR3_M_TDR
TDR: TDR value if RTRY=1.
size_t fPC_rdrxdsccur
PrimClist: rd rxdsc index.
static const uint16_t kRXR2_M_ENF
ENF: end of frame.
static const uint16_t kFUNC_WMODE
WMODE: write write.
static const uint16_t kDimCtr
max MAXCTR
size_t fRxQueLimit
rx queue limit
static const uint16_t kFUNC_RMODE
RMODE: read mode.
static const uint16_t kProbeOff
probe address offset (pr0)
uint32_t fCtrTxFraMcast
ctr: xmit mcast frames
static const uint16_t kRXR3_M_BUFL
BUFL: buf length error.
uint16_t fTxDscCur[4]
tx cur ring dsc
static const uint16_t kTXR2_M_ERRS
ERRS: error summary.
size_t fPC_rdpr0
PrimClist: rd pr0 index.
void SetType(const std::string &type)
FIXME_docs.
static const uint16_t kFUNC_RRF
RRF: read ring format.
RethBuf::pbuf_t fRxBufCurr
rx packet current
uint16_t fTxRingIndex
tx ring index
static const uint16_t kRXR2_M_FRAM
FRAM: frame error.
uint32_t fCtrFraLoop
ctr: loopback frames
size_t fPC_rdrxdscnxt
PrimClist: rd rxdsc index.
void ClearMacList()
FIXME_docs.
static const uint16_t kPCMD_GETPCBB
GETPCBB: get pcb base.
static const uint16_t kPCMD_NOOP
NOOP: noop.
std::deque< RethBuf::pbuf_t > fRxBufQueue
rx packet queue
uint32_t fCtrRxFra
ctr: rcvd frames
bool fPcbbValid
pcbb valid
uint16_t fPr0Last
last pr0 value
static const uint16_t kPR0_M_INTR
INTR: intr summary.
static const uint16_t kPR1_M_STATE
STATE: port status.
uint32_t TxRingDscAddr(uint16_t index) const
FIXME_docs.
static const uint16_t kTXR3_M_LCOL
LCOL: late collision.
static const uint16_t kMODE_M_TPAD
TPAD: tx msg padding ena.
void StartRxRing()
FIXME_docs.
static const uint16_t kDimMcast
max length Mcast list (MAXMLT)
bool Running() const
FIXME_docs.
uint16_t fPcb[4]
process control block
const char * MnemoFunc(uint16_t func) const
FIXME_docs.
static const uint16_t kPR3
PR3 reg offset.
size_t fRxBufOffset
rx packet offset
uint16_t fRxDscCur[4]
rx cur ring dsc
static const uint16_t kFUNC_RDPA
RDPA: read def MAC.
static const uint16_t kSTATE_SLOAD
secondary load
void UpdateStat16(uint32_t &stat, size_t ind, uint32_t inc=1)
FIXME_docs.
static const uint16_t kFUNC_RCTR
RCTR: read counters.
uint16_t fTxDscCurPC[4]
tx cur ring dsc from PrimClist
static const uint16_t kMODE_M_DTCR
DTCR: dis tx CRC.
static const uint16_t kTXR3_M_UFLO
UFLO: UNIBUS underflow.
static const uint16_t kMODE_M_ECT
ECT: ena collision test.
static const uint16_t kTXR3_M_BUFL
BUFL: buf length error.
static const uint16_t kIbaddr
DEUNA default address.
static const bool kProbeInt
probe int active
static const uint16_t kRXR2_M_CRC
CRC: CRC check error.
static const uint16_t kPR1_M_ICAB
ICAB: cable fail.
static const uint16_t kSTAT_M_RREV
RREV: ROM version.
size_t RxQueLimit() const
FIXME_docs.
static const uint16_t kRXR3_M_NCHN
NCHN: no data chaining.
static const uint16_t kPR0_M_BRST
RSET: breset seen.
static const uint16_t kFUNC_RPA
RPA: read phys MAC.
uint32_t fPcbb
process control block base
static const uint16_t kPR0_M_DNI
DNI: done intr.
static const uint16_t kPCMD_START
START: start tx/rx.
void SetRxPollTime(const Rtime &time)
FIXME_docs.
uint32_t fCtrRxFraLoBuf
ctr: rcvd frame lost buffers
bool RcvCallback(RethBuf::pbuf_t &pbuf)
FIXME_docs.
static const uint16_t kPC0_M_MBZ
MBZ.
void SetMacDefault(const std::string &mac)
FIXME_docs.
virtual void Start()
FIXME_docs.
RethBuf fTxBuf
tx packet buffer
size_t fPC_lapcb
PrimClist: la pcb index.
static const uint16_t kFUNC_RCSTAT
RCSTAT: read&clr status.
static const uint16_t kPR2
PR2 reg offset.
const char * MnemoPcmd(uint16_t pcmd) const
FIXME_docs.
uint32_t RingDscAddr(uint32_t base, uint16_t elen, uint16_t index) const
FIXME_docs.
static const uint16_t kRXR2_M_OFLO
OFLO: message overflow.
uint16_t fTxDscNxtPC[4]
tx nxt ring dsc from PrimClist
static const uint16_t kTXR2_M_STF
STF: start of frame.
static const uint16_t kSTAT_M_CERR
CERR: collision test er.
static const uint16_t kFUNC_WPA
WPA: write phys MAC.
static const uint16_t kSTAT_M_BABL
BABL: xmit on long(DELUA)
static const uint16_t kSTATE_NUHALT
ni and unibus halted
uint32_t fCtrTxByt
ctr: xmit bytes
uint32_t fCtrTxFra
ctr: xmit frames
static const uint16_t kSTATE_UHALT
unibus halted
const Rtime & RxPollTime() const
FIXME_docs.
size_t fPC_latxdscnxt
PrimClist: la txdsc nxt index.
static const uint16_t kPR0_M_SERI
SERI: status error intr.
static const bool kProbeRem
probr rem active
void StopTxRing()
FIXME_docs.
void LogRingInfo(char rxtx, char rw)
FIXME_docs.
void StopRxRing()
FIXME_docs.
void LogFrameInfo(char rxtx, const RethBuf &buf)
FIXME_docs.
int MacFilter(uint64_t mac)
FIXME_docs.
Rtime fCtrTimeCleared
ctr: time when cleared
uint16_t fRxRingIndex
rx ring index
static const uint16_t kTXR2_M_ENF
ENF: end of frame.
static const uint16_t kFUNC_WRF
WRF: write ring format.
static const uint16_t kPR1_M_XPWR
XPWR: transceive pwr fail.
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
size_t fPC_larxdsccur
PrimClist: la rxdsc index.
static const uint16_t kFUNC_RSID
RSID: read system id.
static const uint16_t kTXR3_M_RTRY
RTRY: retry failure.
uint32_t fTxRingBase
tx ring base
uint16_t fRxRingSize
rx ring size (# of entries)
uint16_t GetPr1() const
FIXME_docs.
static const uint16_t kSTAT_M_ERRS
ERRS: error summary.
void UpdateStat32(uint32_t &stat, size_t ind, uint32_t inc=1)
FIXME_docs.
static const uint16_t kTXR2_M_DEF
DEF: deferred.
int TxRingHandler()
FIXME_docs.
uint32_t RxRingDscAddr(uint16_t index) const
FIXME_docs.
static const uint16_t kTXR2_M_MORE
MORE: mult retry needed.
uint64_t fMacDefault
default MAC
uint16_t fTxRingSize
tx ring size (# of entries)
static const uint16_t kPR0_M_USCI
USCI: unsol state chang.
uint32_t fCtrRxByt
ctr: rcvd bytes
uint32_t fCtrTxBytMcast
ctr: xmit mcast bytes
static const uint16_t kPR0_M_BUSY
BUSY: command busy.
size_t fPC_rdtxdscnxt
PrimClist: rd txdsc nxt index.
static const uint16_t kPR0_M_INTE
INTE: intr enable.
static const uint16_t kSTATE_PLOAD
primary load
static const uint16_t kRXR3_M_OVRN
OVRN: overrun error.
static const uint16_t kFUNC_WMAL
RMAL: write mcast MAC list.
static const uint16_t kPCMD_BOOT
BOOT: boot.
static const uint16_t kSTAT_M_PTCH
PTCH: ROM patch.
int RxRingHandler()
FIXME_docs.
static const uint16_t kRXR2_M_SEGB
SEGB: msg of seg base.
static const uint16_t kTXR2_M_MTCH
MTCH: station match.
Rw11CntlDEUNA()
Default constructor.
static const uint16_t kPR0_B_PCMDBP
PCMDBP: pcmd busy prot.
static const uint16_t kSTATE_READY
ready
static const uint16_t kPR1_M_DELUA
ID0: 1=DELUA;0=DEUNA
uint32_t fRxRingBase
rx ring base
void LogMacFunc(const char *cmd, uint64_t mac)
FIXME_docs.
uint32_t fCtrRxBytMcast
ctr: rcvd mcast bytes
static const uint16_t kMODE_M_PROM
PROM: promiscous mode.
static const uint16_t kPR0_M_PCEI
PCEI: port cmd err intr.
static const uint16_t kPR0_M_PCWWB
PCWWB: pcmd write w busy.
size_t fTxBufOffset
tx packet offset
static const uint16_t kPR1_M_PCTO
PCTO: port cmd timeout.
void ClearCtr()
FIXME_docs.
bool fPr1Delua
pr1 delua flag
bool fRingValid
ring format valid
uint16_t fTxDscNxt[4]
tx nxt ring dsc
uint32_t fCtrRxFraLoInt
ctr: rcvd frame lost int error
uint16_t RingIndexNext(uint16_t index, uint16_t size, uint16_t inc=1) const
FIXME_docs.
size_t fPC_latxdsccur
PrimClist: la txdsc cur index.
uint16_t fRxDscCurPC[4]
rx cur ring dsc from PrimClist
static const uint16_t kMODE_M_MBZ_DELUA
MBZ bit:10,8:7,5:4,1.
const char * MnemoState(uint16_t state) const
FIXME_docs.
static const uint16_t kPR0_M_RCBI
RCBI: rcv buff unavail.
uint32_t fCtrRxFraMcast
ctr: rcvd mcast frames
size_t fPC_rdtxdsccur
PrimClist: rd txdsc cur index.
static const uint16_t kFUNC_NOOP
NOOP: noop.
enum s_tx fTxRingState
tx ring handler state
static const uint16_t kMODE_M_ENAL
ENAL: ena all mcasts.
static void SetRingDsc(uint16_t dst[4], const uint16_t src[4])
FIXME_docs.
static const uint16_t kDimCtrDeuna
DEUNA count words (MAXCTR)
~Rw11CntlDEUNA()
Destructor.
static const uint16_t kPCMD_PDMD
PDMD: poll demand.
static const uint16_t kDimPlt
max MAXPLT
static const uint16_t kFUNC_RCCTR
RCCTR: read&clr counters.
uint16_t fPr1State
pr1 state
static const uint16_t kMODE_M_HDPX
HDPX: half-duplex (DEUNA)
static const uint16_t kSTAT_M_RRAM
RRAM: run from RAM.
uint64_t fMacList[2+kDimMcast]
MAC list:0=phys,1=bcast,2+=mcast.
static const uint16_t kRXR2_M_STF
STF: start of frame.
static const uint16_t kRXR3_M_UBTO
UBTO: UNIBUS timeout.
static const uint16_t kPR1
PR1 reg offset.
bool fPr1Pcto
pr1 pcto flag
void SetRunning(bool run)
FIXME_docs.
size_t fPC_rdpcb
PrimClist: rd pcb index.
static const int kLam
DEUNA default lam.
uint16_t RxRingIndexNext(uint16_t inc=1) const
FIXME_docs.
static const uint16_t kMODE_M_LOOP
LOOP: int loopback.
static const uint16_t kSTATE_RUN
running
static const uint32_t kUBA_M
bits of even unibus address
void LogMcastFunc(const char *cmd)
FIXME_docs.
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47