mirror of
https://github.com/wfjm/w11.git
synced 2026-01-19 01:47:47 +00:00
minor code cleanups
This commit is contained in:
parent
d7aa4966bf
commit
f13b1b4900
@ -17,7 +17,15 @@ software or firmware builds or that the documentation is consistent.
|
||||
The full set of tests is only run for tagged releases._
|
||||
|
||||
### Summary
|
||||
- 23 line interrupt mapper now for full system configuration
|
||||
- use Rtime; drop Rtools::TimeOfDayAsDouble()
|
||||
- probe/setup auxilliary devices: kw11l,kw11p,iist
|
||||
- librw11/Rw11Cpu: add ModLalh()
|
||||
- librtools/Rstats: add IncLogHist() and fix + and * operator definition
|
||||
- add Rtime support in RtclGet/RtclSet
|
||||
- add librtools/Rtime: class for absolute and delta times
|
||||
- use -std=c++11 (gcc 4.7 or later)
|
||||
- update probe handling: add probe data, make it tcl getable
|
||||
- 23 line interrupt mapper for full system configuration
|
||||
- man pages now [available online](http://www.retro11.de/manp/w11/man/cat1/).
|
||||
- add `sysmon_rbus` in `sys_tst_sram_n4`
|
||||
- Auto-dection of Digilent boards with `FT2232HQ` interface for
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// $Id: Rw11CntlDL11.cpp 659 2015-03-22 23:15:51Z mueller $
|
||||
// $Id: Rw11CntlDL11.cpp 855 2017-02-25 16:30:37Z mueller $
|
||||
//
|
||||
// Copyright 2013-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2013-2017 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
|
||||
// 2017-02-25 855 1.2.1 shorten ctor code; RcvNext() --> RcvQueueNext()
|
||||
// 2014-12-30 625 1.2 adopt to Rlink V4 attn logic
|
||||
// 2014-12-25 621 1.1 adopt to 4k word ibus window and
|
||||
// 2013-05-04 516 1.0.2 add RxRlim support (receive interrupt rate limit)
|
||||
@ -23,7 +24,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: Rw11CntlDL11.cpp 659 2015-03-22 23:15:51Z mueller $
|
||||
\version $Id: Rw11CntlDL11.cpp 855 2017-02-25 16:30:37Z mueller $
|
||||
\brief Implemenation of Rw11CntlDL11.
|
||||
*/
|
||||
|
||||
@ -80,9 +81,7 @@ Rw11CntlDL11::Rw11CntlDL11()
|
||||
fRxRlim(0)
|
||||
{
|
||||
// must be here because Units have a back-ptr (not available at Rw11CntlBase)
|
||||
for (size_t i=0; i<NUnit(); i++) {
|
||||
fspUnit[i].reset(new Rw11UnitDL11(this, i));
|
||||
}
|
||||
fspUnit[0].reset(new Rw11UnitDL11(this, 0)); // single unit controller
|
||||
}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
@ -152,7 +151,7 @@ void Rw11CntlDL11::Wakeup()
|
||||
Server().Exec(clist);
|
||||
uint16_t rcsr = clist[ircsr].Data();
|
||||
if ((rcsr & kRCSR_M_RDONE) == 0) { // RBUF not full
|
||||
uint8_t ichr = fspUnit[0]->RcvNext();
|
||||
uint8_t ichr = fspUnit[0]->RcvQueueNext();
|
||||
clist.Clear();
|
||||
Cpu().AddWibr(clist, fBase+kRBUF, ichr);
|
||||
Server().Exec(clist);
|
||||
@ -252,7 +251,7 @@ int Rw11CntlDL11::AttnHandler(RlinkServer::AttnArgs& args)
|
||||
}
|
||||
|
||||
if (rrdy && !fspUnit[0]->RcvQueueEmpty()) {
|
||||
uint8_t ichr = fspUnit[0]->RcvNext();
|
||||
uint8_t ichr = fspUnit[0]->RcvQueueNext();
|
||||
RlinkCommandList clist;
|
||||
Cpu().AddWibr(clist, fBase+kRBUF, ichr);
|
||||
Server().Exec(clist);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// $Id: Rw11CntlLP11.cpp 659 2015-03-22 23:15:51Z mueller $
|
||||
// $Id: Rw11CntlLP11.cpp 856 2017-02-25 20:09:10Z mueller $
|
||||
//
|
||||
// Copyright 2013-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2013-2017 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
|
||||
// 2017-02-25 855 1.2.1 shorten ctor code
|
||||
// 2014-12-30 625 1.2 adopt to Rlink V4 attn logic
|
||||
// 2014-12-25 621 1.1 adopt to 4k word ibus window
|
||||
// 2013-05-04 515 1.0 Initial version
|
||||
@ -21,7 +22,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: Rw11CntlLP11.cpp 659 2015-03-22 23:15:51Z mueller $
|
||||
\version $Id: Rw11CntlLP11.cpp 856 2017-02-25 20:09:10Z mueller $
|
||||
\brief Implemenation of Rw11CntlLP11.
|
||||
*/
|
||||
|
||||
@ -70,9 +71,7 @@ Rw11CntlLP11::Rw11CntlLP11()
|
||||
fPC_buf(0)
|
||||
{
|
||||
// must be here because Units have a back-ptr (not available at Rw11CntlBase)
|
||||
for (size_t i=0; i<NUnit(); i++) {
|
||||
fspUnit[i].reset(new Rw11UnitLP11(this, i));
|
||||
}
|
||||
fspUnit[0].reset(new Rw11UnitLP11(this, 0)); // single unit controller
|
||||
}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// $Id: Rw11UnitDL11.hpp 504 2013-04-13 15:37:24Z mueller $
|
||||
// $Id: Rw11UnitDL11.hpp 856 2017-02-25 20:09:10Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@ -20,15 +20,13 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: Rw11UnitDL11.hpp 504 2013-04-13 15:37:24Z mueller $
|
||||
\version $Id: Rw11UnitDL11.hpp 856 2017-02-25 20:09:10Z mueller $
|
||||
\brief Declaration of class Rw11UnitDL11.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_Rw11UnitDL11
|
||||
#define included_Retro_Rw11UnitDL11 1
|
||||
|
||||
#include "Rw11VirtTerm.hpp"
|
||||
|
||||
#include "Rw11UnitTermBase.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// $Id: Rw11UnitLP11.hpp 515 2013-05-04 17:28:59Z mueller $
|
||||
// $Id: Rw11UnitLP11.hpp 856 2017-02-25 20:09:10Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@ -19,15 +19,13 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: Rw11UnitLP11.hpp 515 2013-05-04 17:28:59Z mueller $
|
||||
\version $Id: Rw11UnitLP11.hpp 856 2017-02-25 20:09:10Z mueller $
|
||||
\brief Declaration of class Rw11UnitLP11.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_Rw11UnitLP11
|
||||
#define included_Retro_Rw11UnitLP11 1
|
||||
|
||||
#include "Rw11VirtStream.hpp"
|
||||
|
||||
#include "Rw11UnitStreamBase.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// $Id: Rw11UnitPC11.hpp 515 2013-05-04 17:28:59Z mueller $
|
||||
// $Id: Rw11UnitPC11.hpp 856 2017-02-25 20:09:10Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@ -19,15 +19,13 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: Rw11UnitPC11.hpp 515 2013-05-04 17:28:59Z mueller $
|
||||
\version $Id: Rw11UnitPC11.hpp 856 2017-02-25 20:09:10Z mueller $
|
||||
\brief Declaration of class Rw11UnitPC11.
|
||||
*/
|
||||
|
||||
#ifndef included_Retro_Rw11UnitPC11
|
||||
#define included_Retro_Rw11UnitPC11 1
|
||||
|
||||
#include "Rw11VirtStream.hpp"
|
||||
|
||||
#include "Rw11UnitStreamBase.hpp"
|
||||
|
||||
namespace Retro {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// $Id: Rw11UnitTerm.cpp 516 2013-05-05 21:24:52Z mueller $
|
||||
// $Id: Rw11UnitTerm.cpp 855 2017-02-25 16:30:37Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2013-2017 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
|
||||
// 2017-02-25 855 1.1.1 RcvNext() --> RcvQueueNext(); WakeupCntl() now pure
|
||||
// 2013-05-03 515 1.1 use AttachDone(),DetachCleanup(),DetachDone()
|
||||
// 2013-04-13 504 1.0 Initial version
|
||||
// 2013-02-19 490 0.1 First draft
|
||||
@ -20,7 +21,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: Rw11UnitTerm.cpp 516 2013-05-05 21:24:52Z mueller $
|
||||
\version $Id: Rw11UnitTerm.cpp 855 2017-02-25 16:30:37Z mueller $
|
||||
\brief Implemenation of Rw11UnitTerm.
|
||||
*/
|
||||
|
||||
@ -119,23 +120,7 @@ void Rw11UnitTerm::SetLog(const std::string& fname)
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
bool Rw11UnitTerm::RcvQueueEmpty()
|
||||
{
|
||||
return fRcvQueue.empty();
|
||||
}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
size_t Rw11UnitTerm::RcvQueueSize()
|
||||
{
|
||||
return fRcvQueue.size();
|
||||
}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
uint8_t Rw11UnitTerm::RcvNext()
|
||||
uint8_t Rw11UnitTerm::RcvQueueNext()
|
||||
{
|
||||
if (RcvQueueEmpty()) return 0;
|
||||
uint8_t ochr = fRcvQueue.front();
|
||||
@ -258,14 +243,6 @@ bool Rw11UnitTerm::RcvCallback(const uint8_t* buf, size_t count)
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
void Rw11UnitTerm::WakeupCntl()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
void Rw11UnitTerm::Dump(std::ostream& os, int ind, const char* text) const
|
||||
{
|
||||
RosFill bl(ind);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// $Id: Rw11UnitTerm.hpp 570 2014-07-20 19:05:11Z mueller $
|
||||
// $Id: Rw11UnitTerm.hpp 855 2017-02-25 16:30:37Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2013-2017 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
|
||||
// 2017-02-25 855 1.1.1 RcvNext() --> RcvQueueNext(); WakeupCntl() now pure
|
||||
// 2013-05-03 515 1.1 use AttachDone(),DetachCleanup(),DetachDone()
|
||||
// 2013-04-20 508 1.0.1 add 7bit and non-printable masking; add log file
|
||||
// 2013-04-13 504 1.0 Initial version
|
||||
@ -22,7 +23,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: Rw11UnitTerm.hpp 570 2014-07-20 19:05:11Z mueller $
|
||||
\version $Id: Rw11UnitTerm.hpp 855 2017-02-25 16:30:37Z mueller $
|
||||
\brief Declaration of class Rw11UnitTerm.
|
||||
*/
|
||||
|
||||
@ -56,15 +57,15 @@ namespace Retro {
|
||||
void SetLog(const std::string& fname);
|
||||
const std::string& Log() const;
|
||||
|
||||
virtual bool RcvQueueEmpty();
|
||||
virtual size_t RcvQueueSize();
|
||||
virtual uint8_t RcvNext();
|
||||
virtual bool RcvQueueEmpty();
|
||||
virtual size_t RcvQueueSize();
|
||||
virtual uint8_t RcvQueueNext();
|
||||
virtual size_t Rcv(uint8_t* buf, size_t count);
|
||||
|
||||
virtual bool Snd(const uint8_t* buf, size_t count);
|
||||
|
||||
virtual bool RcvCallback(const uint8_t* buf, size_t count);
|
||||
virtual void WakeupCntl();
|
||||
virtual void WakeupCntl() = 0;
|
||||
|
||||
virtual void Dump(std::ostream& os, int ind=0, const char* text=0) const;
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// $Id: Rw11UnitTerm.ipp 508 2013-04-20 18:43:28Z mueller $
|
||||
// $Id: Rw11UnitTerm.ipp 855 2017-02-25 16:30:37Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Copyright 2013-2017 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
|
||||
// 2017-02-25 855 1.0.2 inline RcvQueueEmpty(),RcvQueueSize()
|
||||
// 2013-04-20 508 1.0.1 add 7bit and non-printable masking; add log file
|
||||
// 2013-04-13 504 1.0 Initial version
|
||||
// 2013-03-02 493 0.1 First draft
|
||||
@ -20,7 +21,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version $Id: Rw11UnitTerm.ipp 508 2013-04-20 18:43:28Z mueller $
|
||||
\version $Id: Rw11UnitTerm.ipp 855 2017-02-25 16:30:37Z mueller $
|
||||
\brief Implemenation (inline) of Rw11UnitTerm.
|
||||
*/
|
||||
|
||||
@ -86,4 +87,21 @@ inline const std::string& Rw11UnitTerm::Log() const
|
||||
return fLogFname;
|
||||
}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
inline bool Rw11UnitTerm::RcvQueueEmpty()
|
||||
{
|
||||
return fRcvQueue.empty();
|
||||
}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
inline size_t Rw11UnitTerm::RcvQueueSize()
|
||||
{
|
||||
return fRcvQueue.size();
|
||||
}
|
||||
|
||||
|
||||
} // end namespace Retro
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user