1
0
mirror of https://github.com/wfjm/w11.git synced 2026-04-29 13:23:22 +00:00

add ibd_ibtst; tbench code for ibd_ibtst and sdreg

- ibd_ibtst: added, an ibus tester device
- pdp11_sys70: instantiate ibd_ibtst (when sys_conf_ibtst = true)
- Rw11Cpu,RtclRw11Cpu: add ibmon setup and HasIbtst()
- tcl/ibd_ibtst/util.tcl: added, tcl support for ibd_ibtst
- tbench/w11a/test_w11a_sdreg.tcl: added, tbench for sdreg
- tools/tbench/w11a_ibtst/: added tbench for ibd_ibtst
This commit is contained in:
wfjm
2019-03-01 09:05:29 +01:00
parent 8d323848b3
commit 1206e5d938
20 changed files with 1030 additions and 31 deletions

View File

@@ -1,6 +1,6 @@
// $Id: Rw11Cpu.cpp 1091 2018-12-23 12:38:29Z mueller $
// $Id: Rw11Cpu.cpp 1112 2019-02-17 11:10:04Z mueller $
//
// Copyright 2013-2018 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-02-16 1112 1.2.16 add ibmon setup and HasIbtst()
// 2018-12-23 1091 1.2.19 AddWbibr(): add move version
// 2018-12-19 1090 1.2.18 use RosPrintf(bool)
// 2018-12-17 1085 1.2.17 use std::mutex,condition_variable instead of boost
@@ -195,6 +196,7 @@ Rw11Cpu::Rw11Cpu(const std::string& type)
fHasCmon(false),
fHasHbpt(0),
fHasIbmon(false),
fHasIbtst(false),
fHasKw11l(false),
fHasKw11p(false),
fHasIist(false),
@@ -891,6 +893,7 @@ void Rw11Cpu::Dump(std::ostream& os, int ind, const char* text,
os << bl << " fHasCmon: " << RosPrintf(fHasCmon) << endl;
os << bl << " fHasHbpt: " << fHasHbpt << endl;
os << bl << " fHasIbmon: " << RosPrintf(fHasIbmon) << endl;
os << bl << " fHasIbtst: " << RosPrintf(fHasIbtst) << endl;
os << bl << " fHasKw11l: " << RosPrintf(fHasKw11l) << endl;
os << bl << " fHasKw11p: " << RosPrintf(fHasKw11p) << endl;
os << bl << " fHasIist: " << RosPrintf(fHasIist) << endl;
@@ -983,7 +986,7 @@ void Rw11Cpu::SetupStd()
void Rw11Cpu::SetupOpt()
{
// probe optional cpu components: dmscnt, dmcmon, dmhbpt and ibmon
// probe optional cpu components: dmscnt, dmcmon, dmhbpt and ibmon, ibtst
RlinkCommandList clist;
int isc = clist.AddRreg(Base()+kSCBASE+kSCCNTL);
@@ -997,9 +1000,13 @@ void Rw11Cpu::SetupOpt()
ihb[i] = clist.AddRreg(Base()+kHBBASE+i*kHBSIZE+kHBCNTL);
clist.SetLastExpectStatus(0,0);
}
int iim = AddRibr(clist, kIMBASE+kIMCNTL); // ibmon probe rem (no loc resp)
clist.SetLastExpectStatus(0,0);
int iit = AddRibr(clist, kITBASE+kITCNTL); // ibtst probe rem (loc disabled)
clist.SetLastExpectStatus(0,0);
int ipc = clist.AddRreg(Base()+kPCBASE+kPCCNTL);
clist.SetLastExpectStatus(0,0); // disable stat check
@@ -1071,6 +1078,14 @@ void Rw11Cpu::SetupOpt()
AllIAddrMapInsert("im.data", kIMBASE + kIMDATA);
}
fHasIbtst = (clist[iit].Status() & statmsk) == 0;
if (fHasIbtst) {
AllIAddrMapInsert("it.cntl", kITBASE + kITCNTL);
AllIAddrMapInsert("it.stat", kITBASE + kITSTAT);
AllIAddrMapInsert("it.data", kITBASE + kITDATA);
AllIAddrMapInsert("it.fifo", kITBASE + kITFIFO);
}
fHasKw11l = (clist[ikwl].Status() & statmsk) == 0;
if (fHasKw11l) {
AllIAddrMapInsert("kwl.csr", kKWLBASE);

View File

@@ -1,6 +1,6 @@
// $Id: Rw11Cpu.hpp 1091 2018-12-23 12:38:29Z mueller $
// $Id: Rw11Cpu.hpp 1112 2019-02-17 11:10:04Z mueller $
//
// Copyright 2013-2018 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-02-15 1112 1.2.16 add HasIbtst()
// 2018-12-23 1091 1.2.15 AddWbibr(): add move version
// 2018-12-17 1085 1.2.14 use std::mutex,condition_variable instead of boost
// 2018-12-16 1084 1.2.13 use =delete for noncopyable instead of boost
@@ -92,6 +93,7 @@ namespace Retro {
bool HasCmon() const;
uint16_t HasHbpt() const;
bool HasIbmon() const;
bool HasIbtst() const;
bool HasKw11l() const;
bool HasKw11p() const;
bool HasIist() const;
@@ -259,13 +261,19 @@ namespace Retro {
static const uint16_t kPCSTAT = 0x0001; //!< PC.STAT reg offset
static const uint16_t kPCDATA = 0x0002; //!< PC.DATA reg offset
static const uint16_t kIMBASE = 0160000; //!< Ibmon ibus address
static const uint16_t kIMBASE = 0160000; //!< Ibmon ibus address
static const uint16_t kIMCNTL = 0x0000; //!< IM.CNTL reg offset
static const uint16_t kIMSTAT = 0x0002; //!< IM.STAT reg offset
static const uint16_t kIMHILIM = 0x0004; //!< IM.HILIM reg offset
static const uint16_t kIMLOLIM = 0x0006; //!< IM.LOLIM reg offset
static const uint16_t kIMADDR = 0x0008; //!< IM.ADDR reg offset
static const uint16_t kIMDATA = 0x000a; //!< IM.DATA reg offset
static const uint16_t kITBASE = 0170000; //!< Ibtst ibus address
static const uint16_t kITCNTL = 0x0000; //!< IT.CNTL reg offset
static const uint16_t kITSTAT = 0x0002; //!< IT.STAT reg offset
static const uint16_t kITDATA = 0x0004; //!< IT.DATA reg offset
static const uint16_t kITFIFO = 0x0006; //!< IT.FIFO reg offset
// defs for optional w11 aux components
static const uint16_t kKWLBASE = 0177546; //!< KW11-L ibus address
@@ -295,6 +303,7 @@ namespace Retro {
bool fHasCmon; //!< has dmcmon (cpu monitor)
uint16_t fHasHbpt; //!< has dmhbpt (hardware breakpoint)
bool fHasIbmon; //!< has ibmon (ibus monitor)
bool fHasIbtst; //!< has ibtst (ibus tester)
bool fHasKw11l; //!< has kw11-l (line clock)
bool fHasKw11p; //!< has kw11-p (prog clock)
bool fHasIist; //!< has iist (smp comm)

View File

@@ -1,6 +1,6 @@
// $Id: Rw11Cpu.ipp 1066 2018-11-10 11:21:53Z mueller $
// $Id: Rw11Cpu.ipp 1112 2019-02-17 11:10:04Z mueller $
//
// Copyright 2013-2018 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-02-15 1112 1.2.4 add HasIbtst()
// 2018-09-23 1050 1.2.3 add HasPcnt()
// 2017-02-17 851 1.2.2 probe/setup auxilliary devices: kw11l,kw11p,iist
// 2015-07-12 700 1.2.1 use ..CpuAct instead ..CpuGo (new active based lam)
@@ -137,6 +138,14 @@ inline bool Rw11Cpu::HasIbmon() const
//------------------------------------------+-----------------------------------
//! FIXME_docs
inline bool Rw11Cpu::HasIbtst() const
{
return fHasIbtst;
}
//------------------------------------------+-----------------------------------
//! FIXME_docs
inline bool Rw11Cpu::HasKw11l() const
{
return fHasKw11l;

View File

@@ -1,6 +1,6 @@
// $Id: RtclRw11Cpu.cpp 1091 2018-12-23 12:38:29Z mueller $
// $Id: RtclRw11Cpu.cpp 1112 2019-02-17 11:10:04Z mueller $
//
// Copyright 2013-2018 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,8 @@
//
// Revision History:
// Date Rev Version Comment
// 2019-02-15 1112 1.2.25 add HasIbtst() getter
// add return type for lambdas with const type&
// 2018-12-23 1091 1.2.24 use AddWbibr(move),AddWblk(move)
// 2018-12-18 1089 1.2.23 use c++ style casts
// 2018-12-17 1085 1.2.22 use std::lock_guard instead of boost
@@ -1480,7 +1482,8 @@ int RtclRw11Cpu::M_default(RtclArgs& args)
void RtclRw11Cpu::SetupGetSet()
{
Rw11Cpu* pobj = &Obj();
fGets.Add<const string&>("type", [pobj](){ return pobj->Type(); });
fGets.Add<const string&>("type", [pobj]() -> const string&
{ return pobj->Type(); });
fGets.Add<size_t> ("index", [pobj](){ return pobj->Index(); });
fGets.Add<uint16_t> ("base", [pobj](){ return pobj->Base(); });
fGets.Add<uint16_t> ("ibase", [pobj](){ return pobj->IBase(); });
@@ -1489,6 +1492,7 @@ void RtclRw11Cpu::SetupGetSet()
fGets.Add<bool> ("hascmon", [pobj](){ return pobj->HasCmon(); });
fGets.Add<uint16_t> ("hashbpt", [pobj](){ return pobj->HasHbpt(); });
fGets.Add<bool> ("hasibmon", [pobj](){ return pobj->HasIbmon(); });
fGets.Add<bool> ("hasibtst", [pobj](){ return pobj->HasIbtst(); });
fGets.Add<bool> ("haskw11l", [pobj](){ return pobj->HasKw11l(); });
fGets.Add<bool> ("haskw11p", [pobj](){ return pobj->HasKw11p(); });
fGets.Add<bool> ("hasiist", [pobj](){ return pobj->HasIist(); });