w11 - cpp 0.794
Backend server for Rlink and w11
|
FIXME_docs. More...
#include <Rw11CntlLP11.hpp>
Public Types | |
enum | stats { kStatNQue = Rw11Cntl::kDimStat , kStatNNull , kStatNChar , kStatNLine , kStatNPage , kDimStat } |
Public Types inherited from Retro::Rw11Cntl | |
enum | stats { kStatNAttnHdl = 0 , kStatNAttnNoAct , kDimStat } |
Public Member Functions | |
Rw11CntlLP11 () | |
Default constructor. | |
~Rw11CntlLP11 () | |
Destructor. | |
void | Config (const std::string &name, uint16_t base, int lam) |
FIXME_docs. | |
virtual void | Start () |
FIXME_docs. | |
virtual void | UnitSetup (size_t ind) |
FIXME_docs. | |
void | SetRlim (uint16_t rlim) |
FIXME_docs. | |
uint16_t | Rlim () const |
FIXME_docs. | |
uint16_t | Itype () const |
FIXME_docs. | |
bool | Buffered () const |
FIXME_docs. | |
uint16_t | FifoSize () const |
FIXME_docs. | |
virtual void | Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const |
FIXME_docs. | |
Public Member Functions inherited from Retro::Rw11CntlBase< Rw11UnitLP11, 1 > | |
Rw11CntlBase (const std::string &type) | |
Constructor. | |
~Rw11CntlBase () | |
Destructor. | |
virtual size_t | NUnit () const |
FIXME_docs. | |
virtual Rw11Unit & | UnitBase (size_t index) const |
FIXME_docs. | |
Rw11UnitLP11 & | Unit (size_t index) const |
FIXME_docs. | |
const std::shared_ptr< Rw11UnitLP11 > & | UnitSPtr (size_t index) const |
FIXME_docs. | |
virtual void | Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const |
FIXME_docs. | |
Public Member Functions inherited from Retro::Rw11Cntl | |
Rw11Cntl (const std::string &type) | |
Constructor. | |
virtual | ~Rw11Cntl () |
Destructor. | |
Rw11Cntl (const Rw11Cntl &)=delete | |
Rw11Cntl & | operator= (const Rw11Cntl &)=delete |
void | SetCpu (Rw11Cpu *pcpu) |
FIXME_docs. | |
Rw11Cpu & | Cpu () const |
FIXME_docs. | |
Rw11 & | W11 () const |
FIXME_docs. | |
RlinkServer & | Server () const |
FIXME_docs. | |
RlinkConnect & | Connect () const |
FIXME_docs. | |
RlogFile & | LogFile () const |
FIXME_docs. | |
const std::string & | Type () const |
FIXME_docs. | |
const std::string & | Name () const |
FIXME_docs. | |
uint16_t | Base () const |
FIXME_docs. | |
int | Lam () const |
FIXME_docs. | |
void | SetEnable (bool ena) |
FIXME_docs. | |
bool | Enable () const |
FIXME_docs. | |
virtual bool | Probe () |
FIXME_docs. | |
bool | ProbeFound () const |
FIXME_docs. | |
uint16_t | ProbeDataInt () const |
FIXME_docs. | |
uint16_t | ProbeDataRem () const |
FIXME_docs. | |
const Rw11Probe & | ProbeStatus () const |
FIXME_docs. | |
virtual void | Start () |
FIXME_docs. | |
bool | IsStarted () const |
FIXME_docs. | |
virtual size_t | NUnit () const =0 |
virtual Rw11Unit & | UnitBase (size_t index) const =0 |
virtual bool | BootCode (size_t unit, std::vector< uint16_t > &code, uint16_t &aload, uint16_t &astart) |
FIXME_docs. | |
virtual void | UnitSetup (size_t ind) |
FIXME_docs. | |
virtual void | UnitSetupAll () |
FIXME_docs. | |
void | SetTraceLevel (uint32_t level) |
FIXME_docs. | |
uint32_t | TraceLevel () const |
FIXME_docs. | |
std::string | UnitName (size_t index) const |
FIXME_docs. | |
Rstats & | Stats () |
FIXME_docs. | |
virtual void | Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const |
FIXME_docs. | |
Static Public Attributes | |
static const uint16_t | kIbaddr = 0177514 |
LP11 default address. | |
static const int | kLam = 8 |
LP11 default lam. | |
static const uint16_t | kCSR = 000 |
CSR reg offset. | |
static const uint16_t | kBUF = 002 |
BUF reg offset. | |
static const uint16_t | kProbeOff = kCSR |
probe address offset (rcsr) | |
static const bool | kProbeInt = true |
probe int active | |
static const bool | kProbeRem = true |
probr rem active | |
static const uint16_t | kFifoMaxSize = 127 |
maximal fifo size | |
static const uint16_t | kCSR_M_ERROR = kWBit15 |
csr.err mask | |
static const uint16_t | kCSR_V_RLIM = 12 |
csr.rlim shift | |
static const uint16_t | kCSR_B_RLIM = 007 |
csr.rlim bit mask | |
static const uint16_t | kCSR_V_TYPE = 8 |
csr.type shift | |
static const uint16_t | kCSR_B_TYPE = 0007 |
csr.type bit mask | |
static const uint16_t | kBUF_M_VAL = kWBit15 |
buf.val mask | |
static const uint16_t | kBUF_V_FUSE = 8 |
buf.fuse shift | |
static const uint16_t | kBUF_B_FUSE = 0177 |
buf.fuse bit mask | |
static const uint16_t | kBUF_M_DATA = 0177 |
buf data mask | |
Static Public Attributes inherited from Retro::Rw11CntlBase< Rw11UnitLP11, 1 > | |
static const size_t | kNUnit |
number of units | |
Static Public Attributes inherited from Retro::Rbits | |
static const uint8_t | kBBit00 = 1u<< 0 |
static const uint8_t | kBBit01 = 1u<< 1 |
static const uint8_t | kBBit02 = 1u<< 2 |
static const uint8_t | kBBit03 = 1u<< 3 |
static const uint8_t | kBBit04 = 1u<< 4 |
static const uint8_t | kBBit05 = 1u<< 5 |
static const uint8_t | kBBit06 = 1u<< 6 |
static const uint8_t | kBBit07 = 1u<< 7 |
static const uint16_t | kWBit00 = 1u<< 0 |
static const uint16_t | kWBit01 = 1u<< 1 |
static const uint16_t | kWBit02 = 1u<< 2 |
static const uint16_t | kWBit03 = 1u<< 3 |
static const uint16_t | kWBit04 = 1u<< 4 |
static const uint16_t | kWBit05 = 1u<< 5 |
static const uint16_t | kWBit06 = 1u<< 6 |
static const uint16_t | kWBit07 = 1u<< 7 |
static const uint16_t | kWBit08 = 1u<< 8 |
static const uint16_t | kWBit09 = 1u<< 9 |
static const uint16_t | kWBit10 = 1u<<10 |
static const uint16_t | kWBit11 = 1u<<11 |
static const uint16_t | kWBit12 = 1u<<12 |
static const uint16_t | kWBit13 = 1u<<13 |
static const uint16_t | kWBit14 = 1u<<14 |
static const uint16_t | kWBit15 = 1u<<15 |
static const uint32_t | kLBit00 = 1u<< 0 |
static const uint32_t | kLBit01 = 1u<< 1 |
static const uint32_t | kLBit02 = 1u<< 2 |
static const uint32_t | kLBit03 = 1u<< 3 |
static const uint32_t | kLBit04 = 1u<< 4 |
static const uint32_t | kLBit05 = 1u<< 5 |
static const uint32_t | kLBit06 = 1u<< 6 |
static const uint32_t | kLBit07 = 1u<< 7 |
static const uint32_t | kLBit08 = 1u<< 8 |
static const uint32_t | kLBit09 = 1u<< 9 |
static const uint32_t | kLBit10 = 1u<<10 |
static const uint32_t | kLBit11 = 1u<<11 |
static const uint32_t | kLBit12 = 1u<<12 |
static const uint32_t | kLBit13 = 1u<<13 |
static const uint32_t | kLBit14 = 1u<<14 |
static const uint32_t | kLBit15 = 1u<<15 |
static const uint32_t | kLBit16 = 1u<<16 |
static const uint32_t | kLBit17 = 1u<<17 |
static const uint32_t | kLBit18 = 1u<<18 |
static const uint32_t | kLBit19 = 1u<<19 |
static const uint32_t | kLBit20 = 1u<<20 |
static const uint32_t | kLBit21 = 1u<<21 |
static const uint32_t | kLBit22 = 1u<<22 |
static const uint32_t | kLBit23 = 1u<<23 |
static const uint32_t | kLBit24 = 1u<<24 |
static const uint32_t | kLBit25 = 1u<<25 |
static const uint32_t | kLBit26 = 1u<<26 |
static const uint32_t | kLBit27 = 1u<<27 |
static const uint32_t | kLBit28 = 1u<<28 |
static const uint32_t | kLBit29 = 1u<<29 |
static const uint32_t | kLBit30 = 1u<<30 |
static const uint32_t | kLBit31 = 1u<<31 |
Protected Member Functions | |
int | AttnHandler (RlinkServer::AttnArgs &args) |
FIXME_docs. | |
void | ProcessUnbuf (uint16_t buf) |
FIXME_docs. | |
void | WriteChar (uint8_t ochr) |
FIXME_docs. | |
void | ProcessBuf (const RlinkCommand &cmd, bool prim) |
FIXME_docs. | |
int | RcvHandler () |
FIXME_docs. | |
Protected Member Functions inherited from Retro::Rw11Cntl | |
void | ConfigCntl (const std::string &name, uint16_t base, int lam, uint16_t probeoff, bool probeint, bool proberem) |
FIXME_docs. | |
Protected Attributes | |
size_t | fPC_buf |
PrimClist: buf index. | |
uint16_t | fRlim |
interrupt rate limit | |
uint16_t | fItype |
interface type | |
uint16_t | fFsize |
fifo size | |
uint16_t | fRblkSize |
rblk chunk size | |
bool | fQueBusy |
rcv queue busy | |
Protected Attributes inherited from Retro::Rw11CntlBase< Rw11UnitLP11, 1 > | |
std::shared_ptr< Rw11UnitLP11 > | fspUnit [NU] |
Protected Attributes inherited from Retro::Rw11Cntl | |
Rw11Cpu * | fpCpu |
cpu back pointer | |
std::string | fType |
controller type | |
std::string | fName |
controller name | |
uint16_t | fBase |
controller base address | |
int | fLam |
attn bit number (-1 of none) | |
bool | fEnable |
enable flag | |
bool | fStarted |
true if Start() called | |
Rw11Probe | fProbe |
controller probe context | |
uint32_t | fTraceLevel |
trace level; 0=off;1=cntl | |
RlinkCommandList | fPrimClist |
clist for attn primary info | |
Rstats | fStats |
statistics | |
FIXME_docs.
Definition at line 29 of file Rw11CntlLP11.hpp.
Enumerator | |
---|---|
kStatNQue | queue rblk |
kStatNNull | send null char |
kStatNChar | send char |
kStatNLine | send lines |
kStatNPage | send pages |
kDimStat |
Definition at line 75 of file Rw11CntlLP11.hpp.
Retro::Rw11CntlLP11::Rw11CntlLP11 | ( | ) |
Default constructor.
Definition at line 81 of file Rw11CntlLP11.cpp.
References Retro::Rstats::Define(), Retro::Rw11CntlBase< Rw11UnitLP11, 1 >::fspUnit, Retro::Rw11Cntl::fStats, kStatNChar, kStatNLine, kStatNNull, kStatNPage, and kStatNQue.
Retro::Rw11CntlLP11::~Rw11CntlLP11 | ( | ) |
Destructor.
Definition at line 103 of file Rw11CntlLP11.cpp.
void Retro::Rw11CntlLP11::Config | ( | const std::string & | name, |
uint16_t | base, | ||
int | lam | ||
) |
FIXME_docs.
Definition at line 109 of file Rw11CntlLP11.cpp.
References Retro::Rw11Cntl::ConfigCntl(), kProbeInt, kProbeOff, and kProbeRem.
|
virtual |
FIXME_docs.
Reimplemented from Retro::Rw11Cntl.
Definition at line 118 of file Rw11CntlLP11.cpp.
References Retro::RlinkCommandList::AddAttn(), Retro::RlinkServer::AddAttnHandler(), Retro::Rw11Cpu::AddRbibr(), Retro::Rw11Cpu::AddRibr(), Retro::Rw11Cpu::AllIAddrMapInsert(), AttnHandler(), Retro::Rw11Cntl::Base(), Buffered(), Retro::RlinkCommandList::Clear(), Retro::Rw11Cntl::Cpu(), Retro::Rw11Probe::DataRem(), Retro::Rw11Cntl::fBase, Retro::Rw11Cntl::fEnable, fFsize, fItype, Retro::Rw11Cntl::fLam, Retro::Rw11Probe::Found(), fPC_buf, Retro::Rw11Cntl::fPrimClist, Retro::Rw11Cntl::fProbe, fRblkSize, Retro::Rw11Cntl::fStarted, kBUF, kCSR, kCSR_B_TYPE, kCSR_V_TYPE, Retro::RlinkCommand::kStat_M_RbNak, Retro::RlinkCommand::kStat_M_RbTout, Retro::Rw11Cntl::Name(), Retro::Rw11Cntl::Server(), and Retro::Rw11Cntl::UnitSetupAll().
|
virtual |
FIXME_docs.
Reimplemented from Retro::Rw11Cntl.
Definition at line 158 of file Rw11CntlLP11.cpp.
References Retro::Rw11Cntl::Cpu(), Retro::Rw11VirtStream::Error(), Retro::Rw11Cpu::ExecWibr(), Retro::Rw11Cntl::fBase, fRlim, Retro::Rw11CntlBase< Rw11UnitLP11, 1 >::fspUnit, Retro::Rw11UnitVirt< TV >::HasVirt(), kCSR, kCSR_B_RLIM, kCSR_M_ERROR, kCSR_V_RLIM, and Retro::Rw11UnitVirt< TV >::Virt().
Referenced by SetRlim(), and WriteChar().
void Retro::Rw11CntlLP11::SetRlim | ( | uint16_t | rlim | ) |
FIXME_docs.
Definition at line 171 of file Rw11CntlLP11.cpp.
References fRlim, kCSR_B_RLIM, and UnitSetup().
Referenced by Retro::RtclRw11CntlLP11::RtclRw11CntlLP11().
|
inline |
FIXME_docs.
Definition at line 21 of file Rw11CntlLP11.ipp.
References fRlim.
Referenced by Retro::RtclRw11CntlLP11::RtclRw11CntlLP11().
|
inline |
FIXME_docs.
Definition at line 29 of file Rw11CntlLP11.ipp.
References fItype.
Referenced by Retro::RtclRw11CntlLP11::RtclRw11CntlLP11().
|
inline |
FIXME_docs.
Definition at line 37 of file Rw11CntlLP11.ipp.
References fFsize.
Referenced by AttnHandler(), Retro::RtclRw11CntlLP11::RtclRw11CntlLP11(), and Start().
|
inline |
FIXME_docs.
Definition at line 45 of file Rw11CntlLP11.ipp.
References fFsize.
Referenced by Retro::RtclRw11CntlLP11::RtclRw11CntlLP11().
|
virtual |
FIXME_docs.
Reimplemented from Retro::Rw11CntlBase< Rw11UnitLP11, 1 >.
Definition at line 184 of file Rw11CntlLP11.cpp.
References Retro::Rw11CntlBase< TU, NU >::Dump(), fFsize, fItype, fPC_buf, fQueBusy, fRblkSize, fRlim, and Retro::RosPrintf().
|
protected |
FIXME_docs.
Definition at line 203 of file Rw11CntlLP11.cpp.
References Buffered(), fPC_buf, Retro::Rw11Cntl::fPrimClist, Retro::Rw11Cntl::fStats, Retro::RlinkServer::GetAttnInfo(), Retro::Rstats::Inc(), Retro::Rw11Cntl::kStatNAttnHdl, ProcessBuf(), ProcessUnbuf(), and Retro::Rw11Cntl::Server().
Referenced by Start().
|
protected |
FIXME_docs.
Definition at line 220 of file Rw11CntlLP11.cpp.
References Retro::Rw11Cntl::fTraceLevel, kBUF_M_DATA, kBUF_M_VAL, Retro::Rw11Cntl::LogFile(), Retro::Rw11Cntl::Name(), Retro::RtraceTools::TraceChar(), and WriteChar().
Referenced by AttnHandler().
|
protected |
FIXME_docs.
Definition at line 245 of file Rw11CntlLP11.cpp.
References Retro::Rw11CntlBase< Rw11UnitLP11, 1 >::fspUnit, Retro::Rw11Cntl::fStats, Retro::Rstats::Inc(), kStatNChar, kStatNLine, kStatNNull, kStatNPage, Retro::Rw11Cntl::LogFile(), and UnitSetup().
Referenced by ProcessBuf(), and ProcessUnbuf().
|
protected |
FIXME_docs.
Definition at line 271 of file Rw11CntlLP11.cpp.
References Retro::RlinkCommand::BlockDone(), Retro::RlinkCommand::BlockPointer(), Retro::RlinkCommand::BlockSize(), fPC_buf, Retro::Rw11Cntl::fPrimClist, fQueBusy, fRblkSize, Retro::Rw11Cntl::fStats, Retro::Rw11Cntl::fTraceLevel, Retro::Rstats::Inc(), kBUF_B_FUSE, kBUF_M_DATA, kBUF_V_FUSE, kFifoMaxSize, kStatNQue, Retro::Rw11Cntl::LogFile(), Retro::Rw11Cntl::Name(), Retro::RlinkServer::QueueAction(), RcvHandler(), Retro::RosPrintf(), Retro::Rw11Cntl::Server(), Retro::RtraceTools::TraceBuffer(), and WriteChar().
Referenced by AttnHandler(), and RcvHandler().
|
protected |
FIXME_docs.
Definition at line 349 of file Rw11CntlLP11.cpp.
References Retro::Rw11Cpu::AddRbibr(), Retro::Rw11Cntl::Cpu(), Retro::RlinkServer::Exec(), Retro::Rw11Cntl::fBase, fQueBusy, fRblkSize, kBUF, Retro::RlinkCommand::kStat_M_RbNak, Retro::RlinkCommand::kStat_M_RbTout, ProcessBuf(), and Retro::Rw11Cntl::Server().
Referenced by ProcessBuf().
|
static |
LP11 default address.
Definition at line 52 of file Rw11CntlLP11.hpp.
Referenced by Retro::RtclRw11CntlLP11::FactoryCmdConfig().
|
static |
LP11 default lam.
Definition at line 53 of file Rw11CntlLP11.hpp.
Referenced by Retro::RtclRw11CntlLP11::FactoryCmdConfig().
|
static |
CSR reg offset.
Definition at line 55 of file Rw11CntlLP11.hpp.
Referenced by Start(), and UnitSetup().
|
static |
BUF reg offset.
Definition at line 56 of file Rw11CntlLP11.hpp.
Referenced by RcvHandler(), and Start().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
csr.rlim bit mask
Definition at line 66 of file Rw11CntlLP11.hpp.
Referenced by SetRlim(), and UnitSetup().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
buf data mask
Definition at line 72 of file Rw11CntlLP11.hpp.
Referenced by ProcessBuf(), and ProcessUnbuf().
|
protected |
PrimClist: buf index.
Definition at line 92 of file Rw11CntlLP11.hpp.
Referenced by AttnHandler(), Dump(), ProcessBuf(), and Start().
|
protected |
interrupt rate limit
Definition at line 93 of file Rw11CntlLP11.hpp.
Referenced by Dump(), Rlim(), SetRlim(), and UnitSetup().
|
protected |
interface type
Definition at line 94 of file Rw11CntlLP11.hpp.
|
protected |
fifo size
Definition at line 95 of file Rw11CntlLP11.hpp.
Referenced by Buffered(), Dump(), FifoSize(), and Start().
|
protected |
rblk chunk size
Definition at line 96 of file Rw11CntlLP11.hpp.
Referenced by Dump(), ProcessBuf(), RcvHandler(), and Start().
|
protected |
rcv queue busy
Definition at line 97 of file Rw11CntlLP11.hpp.
Referenced by Dump(), ProcessBuf(), and RcvHandler().