1
0
mirror of https://github.com/wfjm/w11.git synced 2026-02-14 12:14:43 +00:00

ibdr_{pc11,dl11}: changes for buffered version compat

- ibdr_dl11
  - now xbuf.val in bit 15 and 8;
  - use rbuf instead xbuf for rdry reporting
  - remove maintenance mode
  - use ib_rlim_slv; add RLIM_CEV, drop CE_USEC
- ibdr_pc11
  - pbuf.pval in bit 15 and 8
  - move rbusy reporting from pbuf to rbuf register
- ibdr_maxisys,ibdr_minisys: adapt to new ibdr_dl11 iface
- tb_rlink_tba_pdp11core_ibdr.dat: adapt to new ibdr_dl11 iface
- tcl/rw11/util.tcl: setup_tt: rename dlrlim to dlrrlim
- oskit/*/*_boot.tcl: use dlrrlim instead of dlrlim
- Rw11CntlDL11,Rw11CntlPC11: adapt to new dl11,pc11 iface
- tools/asm-11/lib/defs_{dl,pc}.mac: added definition file
- tools/oskit/hook/hook_ibmon_{pca,tta}.tcl: added imon hook file
This commit is contained in:
wfjm
2019-04-07 15:43:27 +02:00
parent 895755ef72
commit 2ae1055ee5
27 changed files with 351 additions and 192 deletions

View File

@@ -1,4 +1,4 @@
// $Id: Rw11CntlDL11.cpp 1114 2019-02-23 18:01:55Z mueller $
// $Id: Rw11CntlDL11.cpp 1126 2019-04-06 17:37:40Z mueller $
//
// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
//
@@ -13,6 +13,7 @@
//
// Revision History:
// Date Rev Version Comment
// 2019-04-06 1126 1.4 xbuf.val in msb; rrdy in rbuf (new iface)
// 2019-02-23 1114 1.3.2 use std::bind instead of lambda
// 2018-12-15 1082 1.3.1 use lambda instead of boost::bind
// 2017-05-14 897 1.3 add RcvChar(),TraceChar(); trace received chars
@@ -28,7 +29,6 @@
// ---------------------------------------------------------------------------
/*!
\file
\brief Implemenation of Rw11CntlDL11.
*/
@@ -68,14 +68,25 @@ const uint16_t Rw11CntlDL11::kProbeOff;
const bool Rw11CntlDL11::kProbeInt;
const bool Rw11CntlDL11::kProbeRem;
const uint16_t Rw11CntlDL11::kRCSR_M_RXRLIM;
const uint16_t Rw11CntlDL11::kRCSR_V_RXRLIM;
const uint16_t Rw11CntlDL11::kRCSR_B_RXRLIM;
const uint16_t Rw11CntlDL11::kRCSR_M_RLIM;
const uint16_t Rw11CntlDL11::kRCSR_V_RLIM;
const uint16_t Rw11CntlDL11::kRCSR_B_RLIM;
const uint16_t Rw11CntlDL11::kRCSR_V_TYPE;
const uint16_t Rw11CntlDL11::kRCSR_B_TYPE;
const uint16_t Rw11CntlDL11::kRCSR_M_RDONE;
const uint16_t Rw11CntlDL11::kRCSR_M_FCLR;
const uint16_t Rw11CntlDL11::kRBUF_M_RRDY;
const uint16_t Rw11CntlDL11::kRBUF_V_SIZE;
const uint16_t Rw11CntlDL11::kRBUF_B_SIZE;
const uint16_t Rw11CntlDL11::kRBUF_M_BUF;
const uint16_t Rw11CntlDL11::kXCSR_V_RLIM;
const uint16_t Rw11CntlDL11::kXCSR_B_RLIM;
const uint16_t Rw11CntlDL11::kXCSR_M_XRDY;
const uint16_t Rw11CntlDL11::kXBUF_M_RRDY;
const uint16_t Rw11CntlDL11::kXBUF_M_XVAL;
const uint16_t Rw11CntlDL11::kXBUF_M_XBUF;
const uint16_t Rw11CntlDL11::kXBUF_M_VAL;
const uint16_t Rw11CntlDL11::kXBUF_V_SIZE;
const uint16_t Rw11CntlDL11::kXBUF_B_SIZE;
const uint16_t Rw11CntlDL11::kXBUF_M_BUF;
//------------------------------------------+-----------------------------------
//! Default constructor
@@ -83,6 +94,7 @@ const uint16_t Rw11CntlDL11::kXBUF_M_XBUF;
Rw11CntlDL11::Rw11CntlDL11()
: Rw11CntlBase<Rw11UnitDL11,1>("dl11"),
fPC_xbuf(0),
fPC_rbuf(0),
fRxRlim(0)
{
// must be here because Units have a back-ptr (not available at Rw11CntlBase)
@@ -124,6 +136,7 @@ void Rw11CntlDL11::Start()
fPrimClist.Clear();
fPrimClist.AddAttn();
fPC_xbuf = Cpu().AddRibr(fPrimClist, fBase+kXBUF);
fPC_rbuf = Cpu().AddRibr(fPrimClist, fBase+kRBUF);
// add attn handler
Server().AddAttnHandler(bind(&Rw11CntlDL11::AttnHandler, this, _1),
@@ -138,7 +151,7 @@ void Rw11CntlDL11::Start()
void Rw11CntlDL11::UnitSetup(size_t /*ind*/)
{
Rw11Cpu& cpu = Cpu();
uint16_t rcsr = (fRxRlim<<kRCSR_V_RXRLIM) & kRCSR_M_RXRLIM;
uint16_t rcsr = (fRxRlim<<kRCSR_V_RLIM) & kRCSR_M_RLIM;
RlinkCommandList clist;
cpu.AddWibr(clist, fBase+kRCSR, rcsr);
Server().Exec(clist);
@@ -166,7 +179,7 @@ void Rw11CntlDL11::Wakeup()
void Rw11CntlDL11::SetRxRlim(uint16_t rlim)
{
if (rlim > kRCSR_B_RXRLIM)
if (rlim > kRCSR_B_RLIM)
throw Rexception("Rw11CntlDL11::SetRxRlim","Bad args: rlim too large");
fRxRlim = rlim;
@@ -191,6 +204,7 @@ void Rw11CntlDL11::Dump(std::ostream& os, int ind, const char* text,
RosFill bl(ind);
os << bl << (text?text:"--") << "Rw11CntlDL11 @ " << this << endl;
os << bl << " fPC_xbuf: " << fPC_xbuf << endl;
os << bl << " fPC_rbuf: " << fPC_rbuf << endl;
os << bl << " fRxRlim: " << fRxRlim << endl;
Rw11CntlBase<Rw11UnitDL11,1>::Dump(os, ind, " ^", detail);
@@ -206,10 +220,11 @@ int Rw11CntlDL11::AttnHandler(RlinkServer::AttnArgs& args)
Server().GetAttnInfo(args, fPrimClist);
uint16_t xbuf = fPrimClist[fPC_xbuf].Data();
uint16_t rbuf = fPrimClist[fPC_rbuf].Data();
uint8_t ochr = xbuf & kXBUF_M_XBUF;
bool xval = xbuf & kXBUF_M_XVAL;
bool rrdy = xbuf & kXBUF_M_RRDY;
uint8_t ochr = xbuf & kXBUF_M_BUF;
bool xval = xbuf & kXBUF_M_VAL;
bool rrdy = rbuf & kRBUF_M_RRDY;
if (fTraceLevel>0) TraceChar('t', xbuf, ochr);
if (xval) fspUnit[0]->Snd(&ochr, 1);
@@ -236,14 +251,12 @@ void Rw11CntlDL11::RcvChar()
//! FIXME_docs
void Rw11CntlDL11::TraceChar(char dir, uint16_t xbuf, uint8_t chr)
{
bool xval = xbuf & kXBUF_M_XVAL;
bool rrdy = xbuf & kXBUF_M_RRDY;
bool xval = xbuf & kXBUF_M_VAL;
RlogMsg lmsg(LogFile());
lmsg << "-I " << Name() << ":" << ' ' << dir << 'x';
if (dir == 't') {
lmsg << " xbuf=" << RosPrintBvi(xbuf,8)
<< " xval=" << xval
<< " rrdy=" << rrdy;
<< " xval=" << xval;
} else {
lmsg << " ";
}

View File

@@ -1,6 +1,6 @@
// $Id: Rw11CntlDL11.hpp 983 2018-01-02 20:35:59Z mueller $
// $Id: Rw11CntlDL11.hpp 1126 2019-04-06 17:37:40Z mueller $
//
// Copyright 2013-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
//
// This program is free software; you may redistribute and/or modify it under
// the terms of the GNU General Public License as published by the Free
@@ -13,6 +13,7 @@
//
// Revision History:
// Date Rev Version Comment
// 2019-04-06 1126 1.3 xbuf.val in msb; rrdy in rbuf (new iface)
// 2017-05-14 897 1.2 add RcvChar(),TraceChar()
// 2017-04-02 865 1.1.1 Dump(): add detail arg
// 2014-12-29 623 1.1 adopt to Rlink V4 attn logic
@@ -23,7 +24,6 @@
/*!
\file
\brief Declaration of class Rw11CntlDL11.
*/
@@ -67,14 +67,25 @@ namespace Retro {
static const bool kProbeInt = true; //!< probe int active
static const bool kProbeRem = true; //!< probr rem active
static const uint16_t kRCSR_M_RXRLIM = 0070000;
static const uint16_t kRCSR_V_RXRLIM = 12;
static const uint16_t kRCSR_B_RXRLIM = 007;
static const uint16_t kRCSR_M_RDONE = kWBit07;
static const uint16_t kXCSR_M_XRDY = kWBit07;
static const uint16_t kXBUF_M_RRDY = kWBit09;
static const uint16_t kXBUF_M_XVAL = kWBit08;
static const uint16_t kXBUF_M_XBUF = 0xff;
static const uint16_t kRCSR_M_RLIM = 0070000;
static const uint16_t kRCSR_V_RLIM = 12; //!< rcsr.rlim shift
static const uint16_t kRCSR_B_RLIM = 007; //!< rcsr.rlim bit mask
static const uint16_t kRCSR_V_TYPE = 8; //!< rcsr.type shift
static const uint16_t kRCSR_B_TYPE = 0007; //!< rcsr.type bit mask
static const uint16_t kRCSR_M_RDONE = kWBit07; //!< rcsr.rdone mask
static const uint16_t kRCSR_M_FCLR = kWBit05; //!< rcsr.fclr mask
static const uint16_t kRBUF_M_RRDY = kWBit15; //!< rbuf.rrdy mask
static const uint16_t kRBUF_V_SIZE = 8; //!< rbuf.size shift
static const uint16_t kRBUF_B_SIZE = 0177; //!< rbuf.size bit mask
static const uint16_t kRBUF_M_BUF = 0377; //!< rbuf data mask
static const uint16_t kXCSR_V_RLIM = 12; //!< xcsr.rlim shift
static const uint16_t kXCSR_B_RLIM = 007; //!< xcsr.rlim bit mask
static const uint16_t kXCSR_M_XRDY = kWBit07; //!< xcsr.xrdy mask
static const uint16_t kXBUF_M_VAL = kWBit15; //!< xbuf.val mask
static const uint16_t kXBUF_V_SIZE = 8; //!< xbuf.size shift
static const uint16_t kXBUF_B_SIZE = 0177; //!< xbuf.size bit mask
static const uint16_t kXBUF_M_BUF = 0xff; //!< xbuf data mask
protected:
int AttnHandler(RlinkServer::AttnArgs& args);
@@ -83,6 +94,7 @@ namespace Retro {
protected:
size_t fPC_xbuf; //!< PrimClist: xbuf index
size_t fPC_rbuf; //!< PrimClist: rbuf index
uint16_t fRxRlim; //!< rx interrupt rate limit
};

View File

@@ -1,4 +1,4 @@
// $Id: Rw11CntlPC11.cpp 1114 2019-02-23 18:01:55Z mueller $
// $Id: Rw11CntlPC11.cpp 1126 2019-04-06 17:37:40Z mueller $
//
// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
//
@@ -13,6 +13,8 @@
//
// Revision History:
// Date Rev Version Comment
// 2019-04-06 1126 1.4 pbuf.val in msb; rbusy in rbuf (new unbuf iface)
// Start(): ensure unit offline; BootCode(): 56k top
// 2019-02-23 1114 1.3.4 use std::bind instead of lambda
// 2018-12-15 1082 1.3.3 use lambda instead of boost::bind
// 2018-12-09 1080 1.3.2 use HasVirt(); Virt() returns ref
@@ -26,7 +28,6 @@
// ---------------------------------------------------------------------------
/*!
\file
\brief Implemenation of Rw11CntlPC11.
*/
@@ -70,9 +71,22 @@ const bool Rw11CntlPC11::kProbeInt;
const bool Rw11CntlPC11::kProbeRem;
const uint16_t Rw11CntlPC11::kRCSR_M_ERROR;
const uint16_t Rw11CntlPC11::kRCSR_V_RLIM;
const uint16_t Rw11CntlPC11::kRCSR_B_RLIM;
const uint16_t Rw11CntlPC11::kRCSR_V_TYPE;
const uint16_t Rw11CntlPC11::kRCSR_B_TYPE;
const uint16_t Rw11CntlPC11::kRCSR_M_FCLR;
const uint16_t Rw11CntlPC11::kRBUF_M_RBUSY;
const uint16_t Rw11CntlPC11::kRBUF_V_SIZE;
const uint16_t Rw11CntlPC11::kRBUF_B_SIZE;
const uint16_t Rw11CntlPC11::kRBUF_M_BUF;
const uint16_t Rw11CntlPC11::kPCSR_M_ERROR;
const uint16_t Rw11CntlPC11::kPBUF_M_RBUSY;
const uint16_t Rw11CntlPC11::kPBUF_M_PVAL;
const uint16_t Rw11CntlPC11::kPCSR_V_RLIM;
const uint16_t Rw11CntlPC11::kPCSR_B_RLIM;
const uint16_t Rw11CntlPC11::kPBUF_M_VAL;
const uint16_t Rw11CntlPC11::kPBUF_V_SIZE;
const uint16_t Rw11CntlPC11::kPBUF_B_SIZE;
const uint16_t Rw11CntlPC11::kPBUF_M_BUF;
//------------------------------------------+-----------------------------------
@@ -80,7 +94,8 @@ const uint16_t Rw11CntlPC11::kPBUF_M_BUF;
Rw11CntlPC11::Rw11CntlPC11()
: Rw11CntlBase<Rw11UnitPC11,2>("pc11"),
fPC_pbuf(0)
fPC_pbuf(0),
fPC_rbuf(0)
{
// must be here because Units have a back-ptr (not available at Rw11CntlBase)
for (size_t i=0; i<NUnit(); i++) {
@@ -119,10 +134,15 @@ void Rw11CntlPC11::Start()
Cpu().AllIAddrMapInsert(Name()+".pcsr", Base() + kPCSR);
Cpu().AllIAddrMapInsert(Name()+".pbuf", Base() + kPBUF);
// ensure that reader and puncher are set offline at startup time
SetOnline(0, false);
SetOnline(1, false);
// setup primary info clist
fPrimClist.Clear();
fPrimClist.AddAttn();
fPC_pbuf = Cpu().AddRibr(fPrimClist, fBase+kPBUF);
fPC_rbuf = Cpu().AddRibr(fPrimClist, fBase+kRBUF);
// add attn handler
Server().AddAttnHandler(bind(&Rw11CntlPC11::AttnHandler, this, _1),
@@ -138,7 +158,9 @@ void Rw11CntlPC11::Start()
bool Rw11CntlPC11::BootCode(size_t /*unit*/, std::vector<uint16_t>& code,
uint16_t& aload, uint16_t& astart)
{
uint16_t kBOOT_START = 0017476;
// use 0017476 for 8kB system and 0157476 of 56kB system
// FIXME_code: should be inquired from Cpu() dynamically
uint16_t kBOOT_START = 0157476; // top of 56kB minus code size
uint16_t bootcode[] = { // papertape lda loader, from dec-11-l2pc-po
0000000, // C000: halt
0010706, // astart: mov pc,sp
@@ -243,6 +265,7 @@ void Rw11CntlPC11::Dump(std::ostream& os, int ind, const char* text,
RosFill bl(ind);
os << bl << (text?text:"--") << "Rw11CntlPC11 @ " << this << endl;
os << bl << " fPC_pbuf: " << fPC_pbuf << endl;
os << bl << " fPC_rbuf: " << fPC_rbuf << endl;
Rw11CntlBase<Rw11UnitPC11,2>::Dump(os, ind, " ^", detail);
return;
@@ -257,8 +280,9 @@ int Rw11CntlPC11::AttnHandler(RlinkServer::AttnArgs& args)
Server().GetAttnInfo(args, fPrimClist);
uint16_t pbuf = fPrimClist[fPC_pbuf].Data();
bool pval = pbuf & kPBUF_M_PVAL;
bool rbusy = pbuf & kPBUF_M_RBUSY;
uint16_t rbuf = fPrimClist[fPC_rbuf].Data();
bool rbusy = rbuf & kRBUF_M_RBUSY;
bool pval = pbuf & kPBUF_M_VAL;
uint8_t ochr = pbuf & kPBUF_M_BUF;
if (pval) { // punch valid -------------------

View File

@@ -1,6 +1,6 @@
// $Id: Rw11CntlPC11.hpp 1052 2018-09-30 08:10:52Z mueller $
// $Id: Rw11CntlPC11.hpp 1126 2019-04-06 17:37:40Z mueller $
//
// Copyright 2013-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
//
// This program is free software; you may redistribute and/or modify it under
// the terms of the GNU General Public License as published by the Free
@@ -13,14 +13,14 @@
//
// Revision History:
// Date Rev Version Comment
// 2019-04-06 1126 1.3 pbuf.val in msb; rbusy in rbuf (new iface)
// 2017-04-02 865 1.2.1 Dump(): add detail arg
// 2014-12-29 623 1.1 adopt to Rlink V4 attn logic
// 2014-12-29 623 1.1 adapt to Rlink V4 attn logic
// 2013-05-03 515 1.0 Initial version
// ---------------------------------------------------------------------------
/*!
\file
\brief Declaration of class Rw11CntlPC11.
*/
@@ -66,11 +66,24 @@ namespace Retro {
static const bool kProbeInt = true; //!< probe int active
static const bool kProbeRem = true; //!< probr rem active
static const uint16_t kRCSR_M_ERROR = kWBit15;
static const uint16_t kPCSR_M_ERROR = kWBit15;
static const uint16_t kPBUF_M_RBUSY = kWBit09;
static const uint16_t kPBUF_M_PVAL = kWBit08;
static const uint16_t kPBUF_M_BUF = 0377;
static const uint16_t kRCSR_M_ERROR = kWBit15; //!< rcsr.err mask
static const uint16_t kRCSR_V_RLIM = 12; //!< rcsr.rlim shift
static const uint16_t kRCSR_B_RLIM = 007; //!< rcsr.rlim bit mask
static const uint16_t kRCSR_V_TYPE = 8; //!< rcsr.type shift
static const uint16_t kRCSR_B_TYPE = 0007; //!< rcsr.type bit mask
static const uint16_t kRCSR_M_FCLR = kWBit05; //!< rcsr.fclr mask
static const uint16_t kRBUF_M_RBUSY = kWBit15; //!< rbuf.rbusy mask
static const uint16_t kRBUF_V_SIZE = 8; //!< rbuf.size shift
static const uint16_t kRBUF_B_SIZE = 0177; //!< rbuf.size bit mask
static const uint16_t kRBUF_M_BUF = 0377; //!< rbuf data mask
static const uint16_t kPCSR_M_ERROR = kWBit15; //!< pcsr.err mask
static const uint16_t kPCSR_V_RLIM = 12; //!< pcsr.rlim shift
static const uint16_t kPCSR_B_RLIM = 007; //!< pcsr.rlim bit mask
static const uint16_t kPBUF_M_VAL = kWBit15; //!< pbuf.val mask
static const uint16_t kPBUF_V_SIZE = 8; //!< pbuf.size shift
static const uint16_t kPBUF_B_SIZE = 0177; //!< pbuf.size bit mask
static const uint16_t kPBUF_M_BUF = 0377; //!< pbuf data mask
protected:
int AttnHandler(RlinkServer::AttnArgs& args);
@@ -78,6 +91,7 @@ namespace Retro {
protected:
size_t fPC_pbuf; //!< PrimClist: pbuf index
size_t fPC_rbuf; //!< PrimClist: rbuf index
};
} // end namespace Retro