mirror of
https://github.com/wfjm/w11.git
synced 2026-03-06 19:42:03 +00:00
finalize lp11 and minor updates
- RlinkServer: trace now with timestamp and selective - Rw11CntlLP11: add fQueBusy and queue protection; fix logic; better trace - test_lp11_all.tcl: check csr.err and csr.rlim not changed by breset - rw11/asm.tcl: asmwait: allow alternate stop symbol
This commit is contained in:
@@ -38,6 +38,7 @@ The full set of tests is only run for tagged releases.
|
||||
|
||||
### Changes
|
||||
- tools changes
|
||||
- RlinkServer: trace now with timestamp and selective
|
||||
- Rw11Cpu,RtclRw11Cpu: add ibmon setup and HasIbtst()
|
||||
- RtclGet.ipp: use const& for oper() of string& and Rtime&
|
||||
- RlinkCommand: add BlockDoneAll()
|
||||
@@ -47,6 +48,7 @@ The full set of tests is only run for tagged releases.
|
||||
- RlinkConnect: DecodeResponse(): rblk expect check over BlockDone
|
||||
- RtclRlinkConnect: M_exec(): tranfer BlockDone values after rblk
|
||||
- RtclRw11Cpu: M_cp(): tranfer BlockDone values after rblk
|
||||
- RtimerFd,ReventFd: move to librtools
|
||||
- firmware changes
|
||||
- rbd_rbmon: more robust ack,err trace when busy
|
||||
- rbd_tester: use now fifo_simple_dram
|
||||
|
||||
@@ -152,6 +152,6 @@ The recipe was tested
|
||||
login: {root}
|
||||
|
||||
- when done with exploring 2.11BSD do proper system shutdown
|
||||
- in 211bsd session type `shutdown`
|
||||
- in 211bsd session type `shutdown -h now`
|
||||
- in ti_w11 session wait for `CPU attention` and `H:cpu0` prompt,
|
||||
than exit with `^D`.
|
||||
|
||||
@@ -7,6 +7,20 @@ This file descibes general issues.
|
||||
|
||||
The case id indicates the release when the issue was first recognized.
|
||||
|
||||
### V0.50-6 {[issue #26](https://github.com/wfjm/w11/issues/26)} -- CPU: SSR0 trap bit set when access aborted
|
||||
|
||||
The MMU should set the 'trap bit' in `SSR0` only when the access is not
|
||||
aborted. The current pdp11_mmu implementation sets the bit even when the
|
||||
access is aborted.
|
||||
|
||||
This is the reason why test 064 of the `ekbee1` diagnostics currently fails.
|
||||
|
||||
Since the MMU trap mechanism is is only available on 11/45 and 11/70, but
|
||||
not in the J11, it is not used by common operating systems.
|
||||
|
||||
Therefore this is considered a to be a minor deficit. Will be fixed in an
|
||||
upcoming release.
|
||||
|
||||
### V0.50-5 {[issue #25](https://github.com/wfjm/w11/issues/25)} -- CPU: The AIB bit in MMU SDR register set independant of ACF field
|
||||
|
||||
The MMU should set the AIB A bit in the the SDR only when _"trap condition is
|
||||
@@ -30,7 +44,6 @@ in the J11, it is not used by common operating systems.
|
||||
Therefore this is considered a to be a minor deficit. Will be fixed in an
|
||||
upcoming release.
|
||||
|
||||
|
||||
### V0.50-4 {[issue #24](https://github.com/wfjm/w11/issues/24)} -- CPU: src+dst deltas summed in ssr1 if register identical
|
||||
|
||||
Test 12 of maindec `ekbee1` fails because it expects after a
|
||||
|
||||
@@ -68,9 +68,6 @@ behaviour of the real drive.
|
||||
started. In a real RK05 drive `DRY` went to 0 after a short delay. Some
|
||||
basic hardware tests are sensitive to this.
|
||||
|
||||
- **TCK-030 pri=L: CPU: `SSR0` trap bit set when access aborted**
|
||||
The 'trap bit' (bit 12: 10000) is set even when the access is aborted.
|
||||
|
||||
- **TCK-025 pri=L: CPU: no mmu trap when bit9 clearing instruction traps**
|
||||
In the 11/70 the instruction which affects mmu trap can cause a trap
|
||||
already, in w11a only the next instruction will trap.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- $Id: ibdr_lp11.vhd 1121 2019-03-11 08:59:12Z mueller $
|
||||
-- $Id: ibdr_lp11.vhd 1126 2019-04-06 17:37:40Z mueller $
|
||||
--
|
||||
-- Copyright 2009-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
--
|
||||
@@ -152,7 +152,7 @@ begin
|
||||
idout(csr_ibf_err) := r.err;
|
||||
idout(csr_ibf_done) := r.done;
|
||||
idout(csr_ibf_ie) := r.ie;
|
||||
if IB_MREQ.racc = '0' then -- cpu
|
||||
if IB_MREQ.racc = '0' then -- cpu ---------------------
|
||||
if ibw0 = '1' then
|
||||
n.ie := IB_MREQ.din(csr_ibf_ie);
|
||||
if IB_MREQ.din(csr_ibf_ie) = '1' then
|
||||
@@ -163,7 +163,7 @@ begin
|
||||
n.intreq := '0';
|
||||
end if;
|
||||
end if;
|
||||
else -- rri
|
||||
else -- rri ---------------------
|
||||
if ibw1 = '1' then
|
||||
n.err := IB_MREQ.din(csr_ibf_err);
|
||||
if IB_MREQ.din(csr_ibf_err) = '1' then
|
||||
@@ -174,7 +174,7 @@ begin
|
||||
end if;
|
||||
|
||||
when ibaddr_buf => -- BUF -- data buffer ----------------
|
||||
if IB_MREQ.racc = '0' then -- cpu
|
||||
if IB_MREQ.racc = '0' then -- cpu ---------------------
|
||||
if ibw0 = '1' then
|
||||
if r.done = '1' then -- ignore buf write when done=0
|
||||
n.buf := IB_MREQ.din(n.buf'range);
|
||||
@@ -190,7 +190,7 @@ begin
|
||||
end if; -- r.err = '0'
|
||||
end if; -- r.done = '1'
|
||||
end if; -- ibw0 = '1'
|
||||
else -- rri
|
||||
else -- rri ---------------------
|
||||
idout(r.buf'range) := r.buf;
|
||||
idout(buf_ibf_val) := not r.done;
|
||||
idout(buf_ibf_val8) := not r.done;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// $Id: RlinkServer.cpp 1114 2019-02-23 18:01:55Z mueller $
|
||||
// $Id: RlinkServer.cpp 1127 2019-04-07 10:59:07Z 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-07 1127 2.2.10 trace now with timestamp and selective
|
||||
// 2019-02-23 1114 2.2.9 use std::bind instead of lambda
|
||||
// 2018-12-17 1088 2.2.8 use std::lock_guard, std::thread instead of boost
|
||||
// 2018-12-15 1083 2.2.7 for std::function setups: use rval ref and move
|
||||
@@ -33,7 +34,6 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
\file
|
||||
\brief Implemenation of RlinkServer.
|
||||
*/
|
||||
|
||||
@@ -445,18 +445,18 @@ void RlinkServer::StartOrResume(bool resume)
|
||||
void RlinkServer::CallAttnHandler()
|
||||
{
|
||||
fStats.Inc(kStatNAttnHdl);
|
||||
if (fTraceLevel>0) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << "-I attnhdl-beg: patt=" << RosPrintBvi(fAttnPatt,8);
|
||||
if (fTraceLevel > 1) {
|
||||
RlogMsg lmsg(LogFile(),'I');
|
||||
lmsg << "attnhdl-beg: patt=" << RosPrintBvi(fAttnPatt,8);
|
||||
}
|
||||
|
||||
// if notifier pending, transfer it to current attn pattern
|
||||
if (fAttnNotiPatt) {
|
||||
lock_guard<RlinkConnect> lock(*fspConn);
|
||||
fStats.Inc(kStatNAttnNoti);
|
||||
if (fTraceLevel>0) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << "-I attnhdl-add: patt=" << RosPrintBvi(fAttnPatt,8)
|
||||
if (fTraceLevel > 1) {
|
||||
RlogMsg lmsg(LogFile(),'I');
|
||||
lmsg << "attnhdl-add: patt=" << RosPrintBvi(fAttnPatt,8)
|
||||
<< " noti=" << RosPrintBvi(fAttnNotiPatt,8);
|
||||
}
|
||||
fAttnPatt |= fAttnNotiPatt;
|
||||
@@ -477,11 +477,11 @@ void RlinkServer::CallAttnHandler()
|
||||
AttnArgs args(fAttnPatt, fAttnDsc[i].fId.fMask);
|
||||
lock_guard<RlinkConnect> lock(*fspConn);
|
||||
|
||||
if (fTraceLevel>0) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << "-I attnhdl-bef: patt=" << RosPrintBvi(fAttnPatt,8)
|
||||
if (fTraceLevel > 0) {
|
||||
RlogMsg lmsg(LogFile(),'I');
|
||||
lmsg << "attnhdl-bef: patt=" << RosPrintBvi(fAttnPatt,8)
|
||||
<< " hmat=" << RosPrintBvi(hmatch,8);
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME_code: return code not used, yet
|
||||
fAttnDsc[i].fHandler(args);
|
||||
@@ -496,9 +496,9 @@ void RlinkServer::CallAttnHandler()
|
||||
// ok for now, but will not work in general !!
|
||||
hdone |= hmatch;
|
||||
|
||||
if (fTraceLevel>0) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << "-I attnhdl-aft: patt=" << RosPrintBvi(fAttnPatt,8)
|
||||
if (fTraceLevel > 1) {
|
||||
RlogMsg lmsg(LogFile(),'I');
|
||||
lmsg << "attnhdl-aft: patt=" << RosPrintBvi(fAttnPatt,8)
|
||||
<< " done=" << RosPrintBvi(hdone,8)
|
||||
<< " next=" << RosPrintBvi(hnext,8);
|
||||
}
|
||||
@@ -513,7 +513,7 @@ void RlinkServer::CallAttnHandler()
|
||||
AttnArgs args(fAttnPatt, fAttnPatt);
|
||||
GetAttnInfo(args);
|
||||
hnext |= args.fAttnHarvest & ~fAttnPatt;
|
||||
if (fTraceLevel>0) {
|
||||
if (fTraceLevel > 0) {
|
||||
RlogMsg lmsg(LogFile(), 'I');
|
||||
lmsg << "eloop: unhandled attn, mask="
|
||||
<< RosPrintBvi(fAttnPatt,16) << endl;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// $Id: Rw11CntlLP11.cpp 1123 2019-03-17 17:55:12Z mueller $
|
||||
// $Id: Rw11CntlLP11.cpp 1127 2019-04-07 10:59:07Z 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-07 1127 1.3.1 add fQueBusy, queue protection; fix logic;
|
||||
// Start(): ensure unit offline; better tracing
|
||||
// 2019-03-17 1123 1.3 add lp11_buf readout
|
||||
// 2019-02-23 1114 1.2.6 use std::bind instead of lambda
|
||||
// 2018-12-15 1082 1.2.5 use lambda instead of boost::bind
|
||||
@@ -31,6 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
|
||||
#include "librtools/RosFill.hpp"
|
||||
#include "librtools/RosPrintBvi.hpp"
|
||||
@@ -83,7 +86,8 @@ Rw11CntlLP11::Rw11CntlLP11()
|
||||
fRlim(0),
|
||||
fItype(0),
|
||||
fFsize(0),
|
||||
fRblkSize(4)
|
||||
fRblkSize(4),
|
||||
fQueBusy(false)
|
||||
{
|
||||
// must be here because Units have a back-ptr (not available at Rw11CntlBase)
|
||||
fspUnit[0].reset(new Rw11UnitLP11(this, 0)); // single unit controller
|
||||
@@ -124,6 +128,9 @@ void Rw11CntlLP11::Start()
|
||||
Cpu().AllIAddrMapInsert(Name()+".csr", Base() + kCSR);
|
||||
Cpu().AllIAddrMapInsert(Name()+".buf", Base() + kBUF);
|
||||
|
||||
// ensure that printer is set offline at startup time
|
||||
SetOnline(false);
|
||||
|
||||
// detect device type
|
||||
fItype = (fProbe.DataRem()>>kCSR_V_TYPE) & kCSR_B_TYPE;
|
||||
fFsize = (1<<fItype) - 1;
|
||||
@@ -199,9 +206,9 @@ int Rw11CntlLP11::AttnHandler(RlinkServer::AttnArgs& args)
|
||||
Server().GetAttnInfo(args, fPrimClist);
|
||||
|
||||
if (!Buffered()) { // un-buffered iface -------------
|
||||
ProcessChar(fPrimClist[fPC_buf].Data());
|
||||
ProcessUnbuf(fPrimClist[fPC_buf].Data());
|
||||
} else { // buffered iface ----------------
|
||||
ProcessCmd(fPrimClist[fPC_buf], true);
|
||||
ProcessBuf(fPrimClist[fPC_buf], true);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -224,18 +231,18 @@ void Rw11CntlLP11::SetOnline(bool online)
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
void Rw11CntlLP11::ProcessChar(uint16_t buf)
|
||||
void Rw11CntlLP11::ProcessUnbuf(uint16_t buf)
|
||||
{
|
||||
bool val = buf & kBUF_M_VAL;
|
||||
uint16_t size = (buf>>kBUF_V_SIZE) & kBUF_B_SIZE;
|
||||
uint8_t ochr = buf & kBUF_M_BUF;
|
||||
bool val = buf & kBUF_M_VAL;
|
||||
uint8_t ochr = buf & kBUF_M_BUF;
|
||||
|
||||
if (val) WriteChar(ochr);
|
||||
|
||||
if (fTraceLevel>0) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << "-I " << Name() << ":"
|
||||
<< " buf=" << RosPrintBvi(buf,8)
|
||||
<< " val=" << val;
|
||||
if (Buffered()) lmsg << " size=" << RosPrintf(size,"d",3);
|
||||
if (val) {
|
||||
lmsg << " char=";
|
||||
if (ochr>=040 && ochr<0177) {
|
||||
@@ -245,56 +252,125 @@ void Rw11CntlLP11::ProcessChar(uint16_t buf)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (val) { // valid chars
|
||||
if (ochr == 0) { // count NULL char
|
||||
fStats.Inc(kStatNNull);
|
||||
} else { // forward only non-NULL char
|
||||
fStats.Inc(kStatNChar);
|
||||
RerrMsg emsg;
|
||||
bool rc = fspUnit[0]->VirtWrite(&ochr, 1, emsg);
|
||||
if (!rc) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << emsg;
|
||||
SetOnline(false);
|
||||
}
|
||||
if (ochr == '\f') { // ^L = FF = FormFeed seen ?
|
||||
fStats.Inc(kStatNPage);
|
||||
rc = fspUnit[0]->VirtFlush(emsg);
|
||||
} else if (ochr == '\n') { // ^J = LF = LineFeed seen ?
|
||||
fStats.Inc(kStatNLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
void Rw11CntlLP11::ProcessCmd(const RlinkCommand& cmd, bool prim)
|
||||
|
||||
void Rw11CntlLP11::WriteChar(uint8_t ochr)
|
||||
{
|
||||
if (ochr == 0) { // count NULL char
|
||||
fStats.Inc(kStatNNull);
|
||||
return;
|
||||
}
|
||||
|
||||
fStats.Inc(kStatNChar);
|
||||
RerrMsg emsg;
|
||||
bool rc = fspUnit[0]->VirtWrite(&ochr, 1, emsg);
|
||||
if (!rc) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << emsg;
|
||||
SetOnline(false);
|
||||
}
|
||||
if (ochr == '\f') { // ^L = FF = FormFeed seen ?
|
||||
fStats.Inc(kStatNPage);
|
||||
rc = fspUnit[0]->VirtFlush(emsg);
|
||||
} else if (ochr == '\n') { // ^J = LF = LineFeed seen ?
|
||||
fStats.Inc(kStatNLine);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
void Rw11CntlLP11::ProcessBuf(const RlinkCommand& cmd, bool prim)
|
||||
{
|
||||
const uint16_t* pbuf = cmd.BlockPointer();
|
||||
size_t done = cmd.BlockDone();
|
||||
for (size_t i=0; i < done; i++) {
|
||||
ProcessChar(pbuf[i]);
|
||||
|
||||
if (fQueBusy && prim) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << "-E " << Name()
|
||||
<< ": prim=1 call and queue busy";
|
||||
}
|
||||
|
||||
// determine next chunk size from fifo 'size' field of first item
|
||||
uint16_t buf = pbuf[0];
|
||||
uint16_t size = (buf>>kBUF_V_SIZE) & kBUF_B_SIZE;
|
||||
fRblkSize = size; // use last size
|
||||
if (fRblkSize < 4) fRblkSize = 4;
|
||||
if (fRblkSize > fFsize) fRblkSize = fFsize;
|
||||
uint16_t fbeg = 0;
|
||||
uint16_t fend = 0;
|
||||
uint16_t fdel = 0;
|
||||
uint16_t smin = 0;
|
||||
uint16_t smax = 0;
|
||||
|
||||
if (done > 0) {
|
||||
fbeg = (pbuf[0] >>kBUF_V_SIZE) & kBUF_B_SIZE;
|
||||
fend = (pbuf[done-1]>>kBUF_V_SIZE) & kBUF_B_SIZE;
|
||||
fdel = fbeg-fend+1;
|
||||
smin = 128;
|
||||
}
|
||||
|
||||
// check whether last entry emptied fifo -> check whether 'size=1'
|
||||
buf = pbuf[done-1];
|
||||
size = (buf>>kBUF_V_SIZE) & kBUF_B_SIZE;
|
||||
if (size > 1) { // fifo not emptied, continue
|
||||
fStats.Inc(kStatNQue);
|
||||
Server().QueueAction(bind(&Rw11CntlLP11::RcvHandler, this));
|
||||
for (size_t i=0; i < done; i++) {
|
||||
uint8_t ochr = pbuf[i] & kBUF_M_BUF;
|
||||
uint16_t size = (pbuf[i]>>kBUF_V_SIZE) & kBUF_B_SIZE;
|
||||
smin = min(smin,size);
|
||||
smax = max(smax,size);
|
||||
WriteChar(ochr);
|
||||
}
|
||||
|
||||
// determine next chunk size from highest fifo 'size' field, at least 4
|
||||
fRblkSize = max(uint16_t(4), max(uint16_t(done),smax));
|
||||
|
||||
// queue further reads when fifo not emptied
|
||||
// check for 'size==1' not seen in current read
|
||||
if (smin > 1) { // if smin>1 no size==1 seen
|
||||
if (fQueBusy) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << "-E " << Name()
|
||||
<< ": queue attempt while queue busy, prim=" << prim;
|
||||
} else {
|
||||
fStats.Inc(kStatNQue);
|
||||
fQueBusy = true;
|
||||
Server().QueueAction(bind(&Rw11CntlLP11::RcvHandler, this));
|
||||
}
|
||||
}
|
||||
|
||||
if (fTraceLevel > 0) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << "-I " << Name() << ":"
|
||||
<< " prim=" << prim
|
||||
<< " size=" << RosPrintf(cmd.BlockSize(),"d",3)
|
||||
<< " done=" << RosPrintf(done,"d",3)
|
||||
<< " fifo=" << RosPrintf(fbeg,"d",3)
|
||||
<< "," << RosPrintf(fend,"d",3)
|
||||
<< ";" << RosPrintf(fdel,"d",3)
|
||||
<< "," << RosPrintf(done-fdel,"d",3)
|
||||
<< ";" << RosPrintf(smax,"d",3)
|
||||
<< "," << RosPrintf(smin,"d",3)
|
||||
<< " que=" << fQueBusy;
|
||||
|
||||
if (fTraceLevel > 1 && done > 0) {
|
||||
size_t nchar = 0;
|
||||
for (size_t i=0; i < done; i++) {
|
||||
uint8_t ochr = pbuf[i] & kBUF_M_BUF;
|
||||
if (ochr>=040 && ochr<0177) {
|
||||
if (nchar == 0) lmsg << "\n '";
|
||||
lmsg << char(ochr);
|
||||
nchar += 1;
|
||||
if (nchar >= 64) {
|
||||
lmsg << "'";
|
||||
nchar = 0;
|
||||
}
|
||||
} else {
|
||||
if (nchar > 0) lmsg << "'";
|
||||
lmsg << "\n " << RosPrintBvi(ochr,8);
|
||||
nchar = 0;
|
||||
}
|
||||
}
|
||||
if (nchar > 0) lmsg << "'";
|
||||
}
|
||||
}
|
||||
|
||||
// re-sizing the prim rblk invalidates pbuf -> so must be done last
|
||||
if (prim) { // if primary list
|
||||
fPrimClist[fPC_buf].SetBlockRead(fRblkSize); // setup size for next attn
|
||||
@@ -307,12 +383,13 @@ void Rw11CntlLP11::ProcessCmd(const RlinkCommand& cmd, bool prim)
|
||||
//! FIXME_docs
|
||||
int Rw11CntlLP11::RcvHandler()
|
||||
{
|
||||
fQueBusy = false;
|
||||
RlinkCommandList clist;
|
||||
Cpu().AddRbibr(clist, fBase+kBUF, fRblkSize);
|
||||
clist[0].SetExpectStatus(0, RlinkCommand::kStat_M_RbTout |
|
||||
RlinkCommand::kStat_M_RbNak);
|
||||
Server().Exec(clist);
|
||||
ProcessCmd(clist[0], false);
|
||||
ProcessBuf(clist[0], false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// $Id: Rw11CntlLP11.hpp 1123 2019-03-17 17:55:12Z mueller $
|
||||
// $Id: Rw11CntlLP11.hpp 1127 2019-04-07 10:59:07Z 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-07 1127 1.2.1 add fQueBusy and queue protection
|
||||
// 2019-03-17 1123 1.2 buf.val in msb; add lp11_buf readout
|
||||
// 2017-04-02 865 1.1.1 Dump(): add detail arg
|
||||
// 2014-12-29 623 1.1 adopt to Rlink V4 attn logic
|
||||
@@ -88,8 +89,9 @@ namespace Retro {
|
||||
protected:
|
||||
int AttnHandler(RlinkServer::AttnArgs& args);
|
||||
void SetOnline(bool online);
|
||||
void ProcessChar(uint16_t buf);
|
||||
void ProcessCmd(const RlinkCommand& cmd, bool prim);
|
||||
void ProcessUnbuf(uint16_t buf);
|
||||
void WriteChar(uint8_t ochr);
|
||||
void ProcessBuf(const RlinkCommand& cmd, bool prim);
|
||||
int RcvHandler();
|
||||
|
||||
protected:
|
||||
@@ -98,7 +100,7 @@ namespace Retro {
|
||||
uint16_t fItype; //!< interface type
|
||||
uint16_t fFsize; //!< fifo size
|
||||
uint16_t fRblkSize; //!< rblk chunk size
|
||||
|
||||
bool fQueBusy; //!< rcv queue busy
|
||||
};
|
||||
|
||||
} // end namespace Retro
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# $Id: test_lp11_all.tcl 1123 2019-03-17 17:55:12Z mueller $
|
||||
# $Id: test_lp11_all.tcl 1126 2019-04-06 17:37:40Z mueller $
|
||||
#
|
||||
# Copyright 2019- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
# License disclaimer see License.txt in $RETROBASE directory
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-04-06 1126 1.0.1 check csr.err and csr.rlim not changed by breset
|
||||
# 2019-03-17 1123 1.0 Initial version
|
||||
# 2019-03-11 1121 0.1 First draft
|
||||
#
|
||||
@@ -32,6 +33,7 @@ rlc log " A1.1: csr err, done --------------------------------"
|
||||
# rem ERR=1 --> test ERR=1,DONE=1,IE=0 (DONE not rem writable)
|
||||
# loc ERR=0 --> test ERR=1,DONE=1,IE=0 (ERR not loc writable)
|
||||
# rem ERR=0 --> test ERR=0,DONE=1,IE=0
|
||||
# breset --> test ERR=0 (not set by breset)
|
||||
set rcsrmask [regbld ibd_lp11::RCSR err done ie]
|
||||
|
||||
$cpu cp \
|
||||
@@ -46,7 +48,9 @@ $cpu cp \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR err done] \
|
||||
-wibr lpa.csr 0x0 \
|
||||
-ribr lpa.csr -edata [regbld ibd_lp11::RCSR done] $rcsrmask \
|
||||
-rma lpa.csr lpcsr -edata [regbld ibd_lp11::CSR done]
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR done] \
|
||||
-breset \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR done]
|
||||
|
||||
# remember 'type' retrieved from csr for later tests
|
||||
set type [regget ibd_lp11::RCSR(type) $lprcsr]
|
||||
@@ -70,6 +74,7 @@ if {$type > 0} { # if buffered test rlim
|
||||
rlc log " A1.3: csr rlim -------------------------------------"
|
||||
# rem write rlim --> seen rem, not loc
|
||||
# loc write rlim --> stays, rlim not loc writable
|
||||
# breset --> rlim not cleared
|
||||
set rcsrmaskbuf [regbld ibd_lp11::RCSR err {rlim -1} done ie]
|
||||
$cpu cp \
|
||||
-wibr lpa.csr [regbld ibd_lp11::RCSR {rlim 1}] \
|
||||
@@ -79,6 +84,8 @@ if {$type > 0} { # if buffered test rlim
|
||||
-ribr lpa.csr -edata [regbld ibd_lp11::RCSR {rlim 7} done] $rcsrmaskbuf \
|
||||
-wma lpa.csr 0x0 \
|
||||
-ribr lpa.csr -edata [regbld ibd_lp11::RCSR {rlim 7} done] $rcsrmaskbuf \
|
||||
-breset \
|
||||
-ribr lpa.csr -edata [regbld ibd_lp11::RCSR {rlim 7} done] $rcsrmaskbuf \
|
||||
-wibr lpa.csr [regbld ibd_lp11::RCSR {rlim 0}] \
|
||||
-ribr lpa.csr -edata [regbld ibd_lp11::RCSR {rlim 0} done] $rcsrmaskbuf
|
||||
}
|
||||
@@ -445,6 +452,7 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
# AWIDTH 7 127+31 = 158
|
||||
set nchar [expr {$fsize + ($fsize>>2)}]
|
||||
set rsize [expr {$fsize>>2}]
|
||||
set wttout 10.; # wtlam timeout
|
||||
|
||||
set fstatmsk [regbld rw11::STAT cmderr rbtout rbnak]; # don't check err !!
|
||||
|
||||
@@ -453,7 +461,7 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
|
||||
rw11::asmrun $cpu sym r0 $nchar
|
||||
while (1) {
|
||||
if {[rlc wtlam 10.] >= 10.} { break }
|
||||
if {[rlc wtlam $wttout] >= $wttout} { break }; # quit on timeout
|
||||
rlc exec -attn attnpat
|
||||
|
||||
if {$attnpat & $attncpu} { # cpu attn
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# $Id: asm.tcl 985 2018-01-03 08:59:40Z mueller $
|
||||
# $Id: asm.tcl 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.0.6 asmwait: allow alternate stop symbol
|
||||
# 2017-02-04 784 1.0.5 asmrun: allow 'ps' in initializer list
|
||||
# 2015-07-25 704 1.0.4 asmrun,asmtreg,asmtmem: use args in proc definition
|
||||
# 2014-07-26 575 1.0.3 add asmwait_tout variable, use in asmwait
|
||||
@@ -76,15 +77,15 @@ namespace eval rw11 {
|
||||
#
|
||||
# asmwait: wait for completion of a program loaded with ldasm
|
||||
#
|
||||
proc asmwait {cpu symName {tout 0.}} {
|
||||
proc asmwait {cpu symName {tout 0.} {symstop "stop"}} {
|
||||
upvar 1 $symName sym
|
||||
variable asmwait_tout
|
||||
if {$tout <= 0.} { # if not specified
|
||||
set tout $asmwait_tout; # use default value
|
||||
}
|
||||
set dt [$cpu wtcpu -reset $tout]
|
||||
if {$dt >= 0 && [info exists sym(stop)]} {
|
||||
$cpu cp -rpc -edata $sym(stop)
|
||||
if {$dt >= 0 && [info exists sym($symstop)]} {
|
||||
$cpu cp -rpc -edata $sym($symstop)
|
||||
}
|
||||
return $dt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user