1
0
mirror of https://github.com/wfjm/w11.git synced 2026-04-10 23:40:26 +00:00

Integrate dmpcnt in all w11 designs and backend

- pdp11_sequencer: add DM_STAT_SE.(cpbusy,idec)
- pdp11_sys70: only preliminary set of signals, cache signals kludged
This commit is contained in:
wfjm
2018-09-30 09:28:27 +02:00
parent f838fc3b4d
commit 1be14ad15f
30 changed files with 436 additions and 59 deletions

View File

@@ -20,15 +20,40 @@ software or firmware builds or that the documentation is consistent.
The full set of tests is only run for tagged releases.
### Summary
- add Travis CI integration (phase 1), see [Travis CI project wfjm/w11](https://travis-ci.org/wfjm/w11)
- add Coverity Scan (manual scan upload, not via Travis) see [Coverity project wfjm/w11](https://scan.coverity.com/projects/wfjm-w11).
- fixes for coverity detected defects, most uncritical, but some real bugs
- use for C++ compiles -Wpedantic
- add KW11-P (programmable clock) to all w11 systems
- sys_w11_n4: reduce cache from 64 to 32 kB to keep timing closure
- add continuous integration support via [Travis CI](https://travis-ci.org),
add [project wfjm/w11](https://travis-ci.org/wfjm/w11), and setup
a `.travis.yml`.
- use static source code analysis [Coverity Scan](https://scan.coverity.com),
add [project wfjm/w11](https://scan.coverity.com/projects/wfjm-w11).
The scans are manually uploaded, not automated via Travis (w11 is a `vhdl`
project after all, so C++ backend code doesn't change so often). Coverity
found a modest number of defects, most uncritical, but some real bugs.
- the Coverity results triggered a general backend code review
- fix coverity detected defects
- get backend code `-Wall -Wextra -Wpedantic` clean
- add KW11-P (programmable clock) to all w11 systems. It is usefull in test
benches (fast interrupt source) and enables on the long run to port the
2.10BSD kernel profiling code to 2.11BSD.
- stay with vivado 2017.2 as default tool, 2017.2 to 2018.2 exhibit much
longer build times for w11 designs (see Xilinx Forum post [884858](https://forums.xilinx.com/t5/Synthesis/vivado-2018-2-much-slower-than-2017-2-at-least-for-small-designs/m-p/884858))
longer build times for w11 designs (see Xilinx Forum post
[884858](https://forums.xilinx.com/t5/Synthesis/vivado-2018-2-much-slower-than-2017-2-at-least-for-small-designs/m-p/884858))
### New features
- travis support via `.travis.yml`
- compiles the C++ backend
- download the `ghdl` based test benches (can't be build under Travis)
- execute the test benches with `tbrun`
- add KW11-P support, enable it in all w11a systems
- add pdp11_dmpcnt: performance counters
### Changes
- use for C++ compiles also `-Wpedantic`
- sys_w11_n4: reduce cache from 64 to 32 kB to keep timing closure
- RtclRw11Unit: fix for clang: M_virt() now public
- backend code review:
- fixes for uninitialized variables (coverity, all uncritical)
- now -Wunused-parameter clean (comment unused params)
- now -Wunused-variable clean (comment so far unused code)
### Bug Fixes
- RtclArgs.hpp: BUGFIX: get *_min limits correct (gcc -Wpedantic)
@@ -39,6 +64,8 @@ The full set of tests is only run for tagged releases.
- BUGFIX: Open(): resource leak (coverity)
- BUGFIX: Rewind(): bad constant expression (coverity)
### Known issues
<!-- --------------------------------------------------------------------- -->
---
## <a id="w11a_V0.752">2018-08-26: [w11a_V0.752](https://github.com/wfjm/w11/releases/tag/w11a_V0.752) - rev 1041(wfjm)</a>

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf.vhd 1043 2018-09-09 10:20:12Z mueller $
-- $Id: sys_conf.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2016-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,6 +19,7 @@
-- Tool versions: viv 2015.4-2018.2; ghdl 0.33-0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1050 1.3.7 add sys_conf_dmpcnt
-- 2018-09-08 1043 1.3.6 add sys_conf_ibd_kw11p
-- 2017-03-04 858 1.3.5 enable deuna
-- 2017-01-29 847 1.3.4 add sys_conf_ibd_deuna
@@ -61,6 +62,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 0; -- no rbmon to save BRAMs
constant sys_conf_ibmon_awidth : integer := 0; -- no ibmon to save BRAMs
constant sys_conf_dmscnt : boolean := false;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 0; -- no dmcmon to save BRAMs
constant sys_conf_rbd_sysmon : boolean := true; -- SYSMON(XADC)

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf_sim.vhd 1043 2018-09-09 10:20:12Z mueller $
-- $Id: sys_conf_sim.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2016-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,6 +19,7 @@
-- Tool versions: viv 2015.4-2018.2; ghdl 0.33-0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1050 1.3.6 add sys_conf_dmpcnt
-- 2018-09-08 1043 1.3.5 add sys_conf_ibd_kw11p
-- 2017-01-29 847 1.3.4 add sys_conf_ibd_deuna
-- 2016-06-18 775 1.3.3 use PLL for clkser_gentype
@@ -60,6 +61,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 0; -- no rbmon to save BRAMs
constant sys_conf_ibmon_awidth : integer := 0; -- no ibmon to save BRAMs
constant sys_conf_dmscnt : boolean := false;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 0; -- no dmcmon to save BRAMs
constant sys_conf_rbd_sysmon : boolean := true; -- SYSMON(XADC)

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf.vhd 1043 2018-09-09 10:20:12Z mueller $
-- $Id: sys_conf.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2018- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,6 +19,7 @@
-- Tool versions: viv 2017.2-2018.2; ghdl 0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1050 1.0.2 add sys_conf_dmpcnt
-- 2018-09-08 1043 1.0.1 add sys_conf_ibd_kw11p
-- 2018-08-11 1038 1.0 Initial version (derived from _aa7 version)
------------------------------------------------------------------------------
@@ -53,6 +54,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 0; -- no rbmon to save BRAMs
constant sys_conf_ibmon_awidth : integer := 0; -- no ibmon to save BRAMs
constant sys_conf_dmscnt : boolean := false;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 0; -- no dmcmon to save BRAMs
constant sys_conf_rbd_sysmon : boolean := true; -- SYSMON(XADC)

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf_sim.vhd 1043 2018-09-09 10:20:12Z mueller $
-- $Id: sys_conf_sim.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2018- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,6 +19,7 @@
-- Tool versions: viv 2017.2-2018.2; ghdl 0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1050 1.0.2 add sys_conf_dmpcnt
-- 2018-09-08 1043 1.0.1 add sys_conf_ibd_kw11p
-- 2018-08-11 1038 1.0 Initial version
------------------------------------------------------------------------------
@@ -53,6 +54,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 0; -- no rbmon to save BRAMs
constant sys_conf_ibmon_awidth : integer := 0; -- no ibmon to save BRAMs
constant sys_conf_dmscnt : boolean := false;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 0; -- no dmcmon to save BRAMs
constant sys_conf_rbd_sysmon : boolean := true; -- SYSMON(XADC)

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf.vhd 1043 2018-09-09 10:20:12Z mueller $
-- $Id: sys_conf.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2015-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,6 +19,7 @@
-- Tool versions: viv 2014.4-2018.2; ghdl 0.31-0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1050 1.3.7 add sys_conf_dmpcnt
-- 2018-09-08 1043 1.3.6 add sys_conf_ibd_kw11p
-- 2017-03-04 858 1.3.5 enable deuna
-- 2017-01-29 847 1.3.4 add sys_conf_ibd_deuna
@@ -63,6 +64,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 0; -- no rbmon to save BRAMs
constant sys_conf_ibmon_awidth : integer := 0; -- no ibmon to save BRAMs
constant sys_conf_dmscnt : boolean := false;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 0; -- no dmcmon to save BRAMs
constant sys_conf_rbd_sysmon : boolean := true; -- SYSMON(XADC)

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf_sim.vhd 1043 2018-09-09 10:20:12Z mueller $
-- $Id: sys_conf_sim.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2015-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,6 +19,7 @@
-- Tool versions: viv 2014.4-2018.2; ghdl 0.31-0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1050 1.3.6 add sys_conf_dmpcnt
-- 2018-09-08 1043 1.3.5 add sys_conf_ibd_kw11p
-- 2017-01-29 847 1.3.4 add sys_conf_ibd_deuna
-- 2016-06-18 775 1.3.3 use PLL for clkser_gentype
@@ -62,6 +63,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 0; -- no rbmon to save BRAMs
constant sys_conf_ibmon_awidth : integer := 0; -- no ibmon to save BRAMs
constant sys_conf_dmscnt : boolean := false;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 0; -- no dmcmon to save BRAMs
constant sys_conf_rbd_sysmon : boolean := false; -- SYSMON(XADC)

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf.vhd 1043 2018-09-09 10:20:12Z mueller $
-- $Id: sys_conf.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2017-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,6 +19,7 @@
-- Tool versions: viv 2017.1-2018.2; ghdl 0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1050 1.0.2 add sys_conf_dmpcnt
-- 2018-09-08 1043 1.0.1 add sys_conf_ibd_kw11p
-- 2017-06-24 914 1.0 Initial version (derived from _n4 version)
------------------------------------------------------------------------------
@@ -53,6 +54,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_ibmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_dmscnt : boolean := false;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 8; -- use 0 to disable, 8 to use
constant sys_conf_rbd_sysmon : boolean := true; -- SYSMON(XADC)

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf_sim.vhd 1043 2018-09-09 10:20:12Z mueller $
-- $Id: sys_conf_sim.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2017-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,6 +19,7 @@
-- Tool versions: viv 2017.1-2018.2; ghdl 0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1050 1.0.2 add sys_conf_dmpcnt
-- 2018-09-08 1043 1.0.1 add sys_conf_ibd_kw11p
-- 2017-06-24 914 1.0 Initial version (cloned from _n4)
------------------------------------------------------------------------------
@@ -53,6 +54,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_ibmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_dmscnt : boolean := false;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 8; -- use 0 to disable, 8 to use
constant sys_conf_rbd_sysmon : boolean := true; -- SYSMON(XADC)

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf.vhd 1043 2018-09-09 10:20:12Z mueller $
-- $Id: sys_conf.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2010-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,6 +19,7 @@
-- Tool versions: xst 11.4-14.7; ghdl 0.26-0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1050 1.6.5 add sys_conf_dmpcnt
-- 2018-09-08 1043 1.6.4 add sys_conf_ibd_kw11p
-- 2017-04-22 884 1.6.3 use sys_conf_dmcmon_awidth=8 (proper value)
-- 2017-03-04 858 1.6.2 enable deuna
@@ -62,6 +63,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_ibmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_dmscnt : boolean := true;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 8; -- use 0 to disable

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf_sim.vhd 1043 2018-09-09 10:20:12Z mueller $
-- $Id: sys_conf_sim.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2010-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,6 +19,7 @@
-- Tool versions: xst 11.4-14.7; ghdl 0.26-0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1050 1.6.4 add sys_conf_dmpcnt
-- 2018-09-08 1043 1.6.3 add sys_conf_ibd_kw11p
-- 2017-04-22 884 1.6.2 use sys_conf_dmcmon_awidth=8 (proper value)
-- 2017-01-29 847 1.6.1 add sys_conf_ibd_deuna
@@ -64,6 +65,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_ibmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_dmscnt : boolean := true;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 8; -- use 0 to disable

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf.vhd 1043 2018-09-09 10:20:12Z mueller $
-- $Id: sys_conf.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2011-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,6 +19,7 @@
-- Tool versions: xst 13.1-14.7; ghdl 0.29-0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1050 1.7.5 add sys_conf_dmpcnt
-- 2018-09-08 1043 1.7.4 add sys_conf_ibd_kw11p
-- 2017-04-22 884 1.7.3 use sys_conf_dmcmon_awidth=8 (proper value)
-- 2017-03-04 858 1.7.2 enable deuna
@@ -69,6 +70,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_ibmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_dmscnt : boolean := true;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 8; -- use 0 to disable

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf_sim.vhd 1043 2018-09-09 10:20:12Z mueller $
-- $Id: sys_conf_sim.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2011-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,6 +19,7 @@
-- Tool versions: xst 13.1-14.7; ghdl 0.29-0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1050 1.7.4 add sys_conf_dmpcnt
-- 2018-09-08 1043 1.7.3 add sys_conf_ibd_kw11p
-- 2017-04-22 884 1.7.2 use sys_conf_dmcmon_awidth=8 (proper value)
-- 2017-01-29 847 1.7.1 add sys_conf_ibd_deuna
@@ -64,6 +65,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_ibmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_dmscnt : boolean := true;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 8; -- use 0 to disable

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf.vhd 1044 2018-09-15 11:12:07Z mueller $
-- $Id: sys_conf.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2013-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,6 +19,7 @@
-- Tool versions: ise 14.5-14.7; viv 2014.4-2018.2; ghdl 0.29-0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1050 1.5.6 add sys_conf_dmpcnt
-- 2018-09-09 1044 1.5.5 use _cache_twidth TW=7 (32 kByte), timing issues
-- 2018-09-08 1043 1.5.4 add sys_conf_ibd_kw11p
-- 2017-04-22 884 1.5.3 re-enable dmcmon
@@ -69,6 +70,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_ibmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_dmscnt : boolean := false;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 8; -- use 0 to disable, 8 to use
constant sys_conf_rbd_sysmon : boolean := true; -- SYSMON(XADC)

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf_sim.vhd 1044 2018-09-15 11:12:07Z mueller $
-- $Id: sys_conf_sim.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2013-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,6 +19,7 @@
-- Tool versions: xst 14.5-14.7; viv 2016.1-2018.2; ghdl 0.29-0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1050 1.5.6 add sys_conf_dmpcnt
-- 2018-09-09 1044 1.5.5 use _cache_twidth TW=7 (32 kByte), timing issues
-- 2018-09-08 1043 1.5.3 add sys_conf_ibd_kw11p
-- 2017-04-22 884 1.5.2 re-enable dmcmon
@@ -68,6 +69,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_ibmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_dmscnt : boolean := false;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 8; -- use 0 to disable, 8 to use
constant sys_conf_rbd_sysmon : boolean := true; -- SYSMON(XADC)

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf.vhd 1043 2018-09-09 10:20:12Z mueller $
-- $Id: sys_conf.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2017-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,6 +19,7 @@
-- Tool versions: viv 2016.2-2018.2; ghdl 0.33-0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1050 1.0.4 add sys_conf_dmpcnt
-- 2018-09-08 1043 1.0.3 add sys_conf_ibd_kw11p
-- 2017-03-04 858 1.0.2 enable deuna
-- 2017-01-29 847 1.0.1 add sys_conf_ibd_deuna
@@ -55,6 +56,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 0; -- no rbmon to save BRAMs
constant sys_conf_ibmon_awidth : integer := 0; -- no ibmon to save BRAMs
constant sys_conf_dmscnt : boolean := false;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 0; -- no dmcmon to save BRAMs
constant sys_conf_rbd_sysmon : boolean := true; -- SYSMON(XADC)

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf_sim.vhd 1043 2018-09-09 10:20:12Z mueller $
-- $Id: sys_conf_sim.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2017-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,6 +19,7 @@
-- Tool versions: viv 2016.2-2018.2; ghdl 0.33-0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1050 1.0.3 add sys_conf_dmpcnt
-- 2018-09-08 1043 1.0.2 add sys_conf_ibd_kw11p
-- 2017-01-29 847 1.0.1 add sys_conf_ibd_deuna
-- 2017-01-04 644 1.0 Initial version (cloned from _br_n4)
@@ -54,6 +55,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 0; -- no rbmon to save BRAMs
constant sys_conf_ibmon_awidth : integer := 0; -- no ibmon to save BRAMs
constant sys_conf_dmscnt : boolean := false;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 0; -- no dmcmon to save BRAMs
constant sys_conf_rbd_sysmon : boolean := true; -- SYSMON(XADC)

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf.vhd 1043 2018-09-09 10:20:12Z mueller $
-- $Id: sys_conf.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2007-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,7 +19,8 @@
-- Tool versions: xst 8.1-14.7; ghdl 0.18-0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-08 1043 1.3.4 add sys_conf_ibd_kw11p
-- 2018-09-22 1050 1.3.6 add sys_conf_dmpcnt
-- 2018-09-08 1043 1.3.5 add sys_conf_ibd_kw11p
-- 2017-04-22 884 1.3.4 use sys_conf_dmcmon_awidth=8 (proper value)
-- 2017-03-04 858 1.3.3 enable deuna
-- 2017-01-29 847 1.3.2 add sys_conf_ibd_deuna
@@ -48,6 +49,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_ibmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_dmscnt : boolean := true;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 8; -- use 0 to disable

View File

@@ -1,4 +1,4 @@
-- $Id: sys_conf_sim.vhd 1043 2018-09-09 10:20:12Z mueller $
-- $Id: sys_conf_sim.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2007-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -19,6 +19,7 @@
-- Tool versions: xst 8.1-14.7; ghdl 0.18-0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1050 1.3.5 add sys_conf_dmpcnt
-- 2018-09-08 1043 1.3.4 add sys_conf_ibd_kw11p
-- 2017-04-22 884 1.3.3 use sys_conf_dmcmon_awidth=8 (proper value)
-- 2017-01-29 847 1.3.2 add sys_conf_ibd_deuna
@@ -47,6 +48,7 @@ package sys_conf is
constant sys_conf_rbmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_ibmon_awidth : integer := 9; -- use 0 to disable
constant sys_conf_dmscnt : boolean := true;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 8; -- use 0 to disable

View File

@@ -1,6 +1,6 @@
-- $Id: pdp11.vhd 984 2018-01-02 20:56:27Z mueller $
-- $Id: pdp11.vhd 1051 2018-09-29 15:29:11Z mueller $
--
-- Copyright 2006-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
-- Copyright 2006-2018 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
@@ -16,10 +16,11 @@
-- Description: Definitions for pdp11 components
--
-- Dependencies: -
-- Tool versions: ise 8.2-14.7; viv 2016.2-2017.1; ghdl 0.18-0.34
-- Tool versions: ise 8.2-14.7; viv 2016.2-2018.2; ghdl 0.18-0.34
--
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-29 1051 1.6.8 add pdp11_dmpcnt; add DM_STAT_SE.(cpbusy,idec)
-- 2017-04-22 884 1.6.7 dm_stat_se: add idle; pdp11_dmcmon: add SNUM generic
-- 2016-12-26 829 1.6.6 BUGFIX: psw init with pri=0, as on real 11/70
-- 2015-11-01 712 1.6.5 define sbcntl_sbf_tmu := 12; use for pdp11_tmu_sb
@@ -605,14 +606,16 @@ package pdp11 is
type dm_stat_se_type is record -- debug and monitor status - sequencer
idle : slbit; -- sequencer ideling
cpbusy : slbit; -- in cp states
istart : slbit; -- instruction start
idec : slbit; -- instruction decode
idone : slbit; -- instruction done
vfetch : slbit; -- vector fetch
snum : slv8; -- current state number
end record dm_stat_se_type;
constant dm_stat_se_init : dm_stat_se_type := (
'0','0','0','0', -- idle,istart,idone,vfetch
'0','0','0','0','0','0', -- idle,cpbusy,istart,idec,idone,vfetch
(others=>'0') -- snum
);
@@ -1358,6 +1361,21 @@ component pdp11_dmhbpt_unit is -- dmhbpt - indivitial unit
);
end component;
component pdp11_dmpcnt is -- debug&moni: performance counters
generic (
RB_ADDR : slv16 := slv(to_unsigned(16#0060#,16)); -- rbus address
VERS : slv8 := slv(to_unsigned(0, 8)); -- counter layout version
CENA : slv32 := (others=>'1')); -- counter enables
port (
CLK : in slbit; -- clock
RESET : in slbit; -- reset
RB_MREQ : in rb_mreq_type; -- rbus: request
RB_SRES : out rb_sres_type; -- rbus: response
PERFSIG : in slv32 -- signals to count
);
end component;
-- ----- move later to pdp11_conf --------------------------------------------
constant conf_vect_pirq : integer := 8#240#;

View File

@@ -1,4 +1,4 @@
-- $Id: pdp11_dmscnt.vhd 984 2018-01-02 20:56:27Z mueller $
-- $Id: pdp11_dmscnt.vhd 1050 2018-09-23 15:46:42Z mueller $
--
-- Copyright 2015-2016 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
@@ -30,7 +30,7 @@
-- 2016-05-22 767 1.1.1 don't init N_REGS (vivado fix for fsm inference)
-- 2015-12-28 721 1.1 use laddr/waddr; use ena instead of cnt;
-- 2015-07-19 702 1.0 Initial version
-- 2015-06-26 695 1.0 First draft
-- 2015-06-26 695 0.1 First draft
------------------------------------------------------------------------------
--
-- rbus registers:

View File

@@ -1,6 +1,6 @@
-- $Id: pdp11_sequencer.vhd 984 2018-01-02 20:56:27Z mueller $
-- $Id: pdp11_sequencer.vhd 1051 2018-09-29 15:29:11Z mueller $
--
-- Copyright 2006-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
-- Copyright 2006-2018 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
@@ -18,10 +18,11 @@
-- Dependencies: ib_sel
-- Test bench: tb/tb_pdp11_core (implicit)
-- Target Devices: generic
-- Tool versions: ise 8.2-14.7; viv 2014.4-2017.1; ghdl 0.18-0.34
-- Tool versions: ise 8.2-14.7; viv 2014.4-2018.2; ghdl 0.18-0.34
--
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-29 1051 1.6.10 add DM_STAT_SE.(cpbusy,idec)
-- 2017-04-23 885 1.6.9 not sys_conf_dmscnt: set SNUM from state category;
-- change waitsusp logic; add WAIT to idm_idone
-- 2016-12-27 831 1.6.8 CPUERR now cleared with creset
@@ -370,6 +371,8 @@ begin
variable int_pending : slbit := '0'; -- an interrupt is pending
variable idm_idle : slbit := '0'; -- idle for dm_stat_se
variable idm_cpbusy : slbit := '0'; -- cpbusy for dm_stat_se
variable idm_idec : slbit := '0'; -- idec for dm_stat_se
variable idm_idone : slbit := '0'; -- idone for dm_stat_se
variable idm_vfetch : slbit := '0'; -- vfetch for dm_stat_se
@@ -620,6 +623,8 @@ begin
end if;
idm_idle := '0';
idm_cpbusy := '0';
idm_idec := '0';
idm_idone := '0';
idm_vfetch := '0';
@@ -722,6 +727,7 @@ begin
idm_idle := '1'; -- signal sequencer idle
if R_STATUS.cmdbusy = '1' then
idm_cpbusy := '1'; -- signal cp busy
case R_STATUS.cpfunc is
when c_cpfunc_noop => -- noop : no operation -------
@@ -856,6 +862,7 @@ begin
end if;
when s_cp_regread => -- -----------------------------------
idm_cpbusy := '1'; -- signal cp busy
ndpcntl.ounit_asel := c_ounit_asel_ddst; -- OUNIT A = DDST
ndpcntl.ounit_bsel := c_ounit_bsel_const; -- OUNIT B = const(0)
ndpcntl.dres_sel := c_dpath_res_ounit; -- DRES = OUNIT
@@ -863,6 +870,7 @@ begin
nstate := s_idle;
when s_cp_rps => -- -----------------------------------
idm_cpbusy := '1'; -- signal cp busy
ndpcntl.ounit_asel := c_ounit_asel_dtmp; -- OUNIT A = DTMP
ndpcntl.ounit_bsel := c_ounit_bsel_const; -- OUNIT B = const(0)
ndpcntl.dres_sel := c_dpath_res_ounit; -- DRES = OUNIT
@@ -870,6 +878,7 @@ begin
nstate := s_idle;
when s_cp_memr_w => -- -----------------------------------
idm_cpbusy := '1'; -- signal cp busy
nstate := s_cp_memr_w;
ndpcntl.dres_sel := c_dpath_res_vmdout; -- DRES = VMDOUT
if (VM_STAT.ack or VM_STAT.err or VM_STAT.fail)='1' then
@@ -881,6 +890,7 @@ begin
end if;
when s_cp_memw_w => -- -----------------------------------
idm_cpbusy := '1'; -- signal cp busy
nstate := s_cp_memw_w;
if (VM_STAT.ack or VM_STAT.err or VM_STAT.fail)='1' then
nstatus.cmdack := '1';
@@ -905,7 +915,8 @@ begin
end if;
when s_idecode => -- -----------------------------------
nstatus.itimer := '1'; -- signal instruction started
idm_idec := '1'; -- signal instruction started
nstatus.itimer := '1'; -- itimer counts each decode
nidstat := ID_STAT; -- register decode status
if ID_STAT.force_srcsp = '1' then
ndpcntl.gpr_asrc := c_gpr_sp;
@@ -2410,7 +2421,9 @@ begin
MMU_MONI <= nmmumoni;
DM_STAT_SE.idle <= idm_idle;
DM_STAT_SE.cpbusy <= idm_cpbusy;
DM_STAT_SE.istart <= nmmumoni.istart;
DM_STAT_SE.idec <= idm_idec;
DM_STAT_SE.idone <= idm_idone;
DM_STAT_SE.vfetch <= idm_vfetch;

View File

@@ -14,7 +14,9 @@ pdp11_mem70.vbom
pdp11_dmscnt.vbom
pdp11_dmcmon.vbom
pdp11_dmhbpt.vbom
pdp11_dmpcnt.vbom
../vlib/rbus/rb_sres_or_4.vbom
../vlib/rbus/rb_sres_or_2.vbom
[sim]pdp11_tmu_sb.vbom
# design
pdp11_sys70.vhd

View File

@@ -1,6 +1,6 @@
-- $Id: pdp11_sys70.vhd 984 2018-01-02 20:56:27Z mueller $
-- $Id: pdp11_sys70.vhd 1051 2018-09-29 15:29:11Z mueller $
--
-- Copyright 2015-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
-- Copyright 2015-2018 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
@@ -22,15 +22,20 @@
-- ibus/ibd_ibmon
-- ibus/ib_sres_or_3
-- w11a/pdp11_dmscnt
-- w11a/pdp11_dmcmon
-- w11a/pdp11_dmhpbt
-- w11a/pdp11_dmpcnt
-- rbus/rb_sres_or_4
-- rbus/rb_sres_or_2
-- w11a/pdp11_tmu_sb [sim only]
--
-- Test bench: tb/tb_pdp11_core (implicit)
-- Target Devices: generic
-- Tool versions: ise 14.7; viv 2014.4-2015.5; ghdl 0.33
-- Tool versions: ise 14.7; viv 2014.4-2018.2; ghdl 0.33-0.34
--
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-29 1051 1.2.2 add pdp11_dmpcnt
-- 2017-04-22 884 1.2.1 pdp11_dmcmon: use SNUM and AWIDTH generics
-- 2016-03-22 750 1.2 pdp11_cache now configurable size
-- 2015-11-01 712 1.1.4 use sbcntl_sbf_tmu
@@ -87,14 +92,19 @@ architecture syn of pdp11_sys70 is
signal RB_SRES_CORE : rb_sres_type := rb_sres_init;
signal RB_SRES_DMSCNT : rb_sres_type := rb_sres_init;
signal RB_SRES_DMPCNT : rb_sres_type := rb_sres_init;
signal RB_SRES_DMHBPT : rb_sres_type := rb_sres_init;
signal RB_SRES_DMCMON : rb_sres_type := rb_sres_init;
signal RB_SRES_DM : rb_sres_type := rb_sres_init;
signal RB_SRES_L : rb_sres_type := rb_sres_init;
signal CP_CNTL : cp_cntl_type := cp_cntl_init;
signal CP_ADDR : cp_addr_type := cp_addr_init;
signal CP_DIN : slv16 := (others=>'0');
signal CP_STAT_L : cp_stat_type := cp_stat_init;
signal CP_DOUT : slv16 := (others=>'0');
signal EI_ACKM_L : slbit := '0';
signal EM_MREQ : em_mreq_type := em_mreq_init;
signal EM_SRES : em_sres_type := em_sres_init;
@@ -160,7 +170,7 @@ begin
HBPT => HBPT,
EI_PRI => EI_PRI,
EI_VECT => EI_VECT,
EI_ACKM => EI_ACKM,
EI_ACKM => EI_ACKM_L,
EM_MREQ => EM_MREQ,
EM_SRES => EM_SRES,
CRESET => CRESET_L,
@@ -284,20 +294,126 @@ begin
);
end generate DMHBPT;
RB_SRES_OR : rb_sres_or_4
DMPCNT : if sys_conf_dmpcnt generate
signal PERFSIG : slv32 := (others=>'0');
begin
proc_sig: process (CP_STAT_L, DM_STAT_SE, DM_STAT_DP_L, DM_STAT_DP_L.psw,
DM_STAT_VM.vmcntl, DM_STAT_VM.vmstat, RB_MREQ, RB_SRES_L,
DM_STAT_VM.ibmreq, DM_STAT_VM.ibsres)
variable isig : slv32 := (others=>'0');
begin
isig := (others=>'0');
if DM_STAT_SE.cpbusy = '1' then
isig(0) := '1'; -- cpu_cpbusy
elsif CP_STAT_L.cpugo = '1' then
case DM_STAT_DP_L.psw.cmode is
when c_psw_kmode =>
if CP_STAT_L.cpuwait = '1' then
isig(3) := '1'; -- cpu_km_wait
elsif unsigned(DM_STAT_DP_L.psw.pri) = 0 then
isig(2) := '1'; -- cpu_km_pri0
else
isig(1) := '1'; -- cpu_km_prix
end if;
when c_psw_smode =>
isig(4) := '1'; -- cpu_sm
when c_psw_umode =>
isig(5) := '1'; -- cpu_um
when others => null;
end case;
end if;
isig(6) := DM_STAT_SE.idec; -- cpu_idec
isig(7) := DM_STAT_SE.vfetch; -- cpu_vfetch
isig(8) := EI_ACKM_L; -- cpu_irupt (not counting PIRQ!)
if DM_STAT_DP_L.gpr_adst = c_gpr_pc and DM_STAT_DP_L.gpr_we = '1' then
isig(9) := '1'; -- cpu_pcload
end if;
-- hack to roughly emulate cache request data
isig(10) := DM_STAT_VM.vmcntl.req and not DM_STAT_VM.vmcntl.wacc;-- ca_rd
isig(11) := DM_STAT_VM.vmcntl.req and DM_STAT_VM.vmcntl.wacc;-- ca_wr
isig(12) := CACHE_CHIT; -- ca_rdhit
isig(13) := '0'; -- ca_wrhit
isig(14) := '0'; -- ca_rdmem
isig(15) := '0'; -- ca_wrmem
isig(16) := '0'; -- ca_rdwait
isig(17) := '0'; -- ca_wrwait
if DM_STAT_VM.ibmreq.aval='1' then
if DM_STAT_VM. ibsres.busy='0' then
isig(18) := DM_STAT_VM.ibmreq.re; -- ib_rd
isig(19) := DM_STAT_VM.ibmreq.we; -- ib_wr
else
isig(20) := DM_STAT_VM.ibmreq.re or DM_STAT_VM.ibmreq.we; -- ib_busy
end if;
end if;
-- a hack too, for 1 core systems is addr(15)='0' when CPU addressed
if RB_MREQ.aval='1' and RB_MREQ.addr(15)='0' then
if RB_SRES_L.busy='0' then
isig(21) := RB_MREQ.re; -- rb_rd
isig(22) := RB_MREQ.we; -- rb_wr
else
isig(23) := RB_MREQ.re or RB_MREQ.we; -- rb_busy
end if;
end if;
isig(24) := '0'; -- ext_rdrhit
isig(25) := '0'; -- ext_wrrhit
isig(26) := '0'; -- ext_wrflush
isig(27) := '0'; -- ext_rlrdbusy
isig(28) := '0'; -- ext_rlrdback
isig(29) := '0'; -- ext_rlwrbusy
isig(30) := '0'; -- ext_rlwrback
isig(31) := '1'; -- usec
PERFSIG <= isig;
end process proc_sig;
I0: pdp11_dmpcnt
generic map (
RB_ADDR => slv(to_unsigned(16#0060#,16)), -- rbus address
VERS => slv(to_unsigned(1, 8)), -- counter layout version
-- 33222222222211111111110000000000
-- 10987654321098765432109876543210
CENA => "10000000111111000001111111111111") -- counter enables
port map (
CLK => CLK,
RESET => RESET,
RB_MREQ => RB_MREQ,
RB_SRES => RB_SRES_DMPCNT,
PERFSIG => PERFSIG
);
end generate DMPCNT;
RB_SRES_DMOR : rb_sres_or_4
port map (
RB_SRES_1 => RB_SRES_CORE,
RB_SRES_2 => RB_SRES_DMSCNT,
RB_SRES_1 => RB_SRES_DMSCNT,
RB_SRES_2 => RB_SRES_DMPCNT,
RB_SRES_3 => RB_SRES_DMHBPT,
RB_SRES_4 => RB_SRES_DMCMON,
RB_SRES_OR => RB_SRES
RB_SRES_OR => RB_SRES_DM
);
RB_SRES_OR : rb_sres_or_2
port map (
RB_SRES_1 => RB_SRES_CORE,
RB_SRES_2 => RB_SRES_DM,
RB_SRES_OR => RB_SRES_L
);
IB_MREQ <= IB_MREQ_M; -- setup output signals
RB_SRES <= RB_SRES_L; -- setup output signals
IB_MREQ <= IB_MREQ_M;
GRESET <= GRESET_L;
CRESET <= CRESET_L;
BRESET <= BRESET_L;
CP_STAT <= CP_STAT_L;
EI_ACKM <= EI_ACKM_L;
DM_STAT_DP <= DM_STAT_DP_L;
DM_STAT_SY.chit <= CACHE_CHIT;

View File

@@ -1,6 +1,6 @@
-- $Id: sys_conf.vhd 984 2018-01-02 20:56:27Z mueller $
-- $Id: sys_conf.vhd 1051 2018-09-29 15:29:11Z mueller $
--
-- Copyright 2007-2016 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
-- Copyright 2007-2018 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
@@ -16,9 +16,10 @@
-- Description: Default definitions
--
-- Dependencies: -
-- Tool versions: xst 8.1-14.7; viv 2014.4-2016.1; ghdl 0.18-0.33
-- Tool versions: xst 8.1-14.7; viv 2014.4-2018.2; ghdl 0.18-0.34
-- Revision History:
-- Date Rev Version Comment
-- 2018-09-22 1051 1.1.3 add missing config's
-- 2016-05-28 770 1.1.2 sys_conf_mem_losize now type natural
-- 2015-06-26 695 1.1.1 add sys_conf_dmscnt
-- 2015-05-01 672 1.1 adopt to pdp11_sys70
@@ -33,12 +34,16 @@ use work.slvtypes.all;
package sys_conf is
constant sys_conf_cache_fmiss : slbit := '0'; -- cache enabled
constant sys_conf_cache_twidth : integer := 9; -- 8kB cache
constant sys_conf_bram_awidth : integer := 15; -- 32 kB BRAM
constant sys_conf_mem_losize : natural := 8#000777#;-- 32 kByte
constant sys_conf_ibmon_awidth : integer := 9; -- use 0 to disable ibmon
constant sys_conf_dmscnt : boolean := true;
constant sys_conf_ibmon_awidth : integer := 9; -- use 0 to disable ibmon
constant sys_conf_dmscnt : boolean := true;
constant sys_conf_dmpcnt : boolean := true;
constant sys_conf_dmhbpt_nunit : integer := 2; -- use 0 to disable
constant sys_conf_dmcmon_awidth : integer := 8; -- use 0 to disable, 8 to use
end package sys_conf;

View File

@@ -1,4 +1,4 @@
// $Id: Rw11Cpu.cpp 1048 2018-09-22 07:41:46Z mueller $
// $Id: Rw11Cpu.cpp 1050 2018-09-23 15:46:42Z mueller $
//
// Copyright 2013-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
//
@@ -13,6 +13,7 @@
//
// Revision History:
// Date Rev Version Comment
// 2019-09-23 1050 1.2.14 add HasPcnt()
// 2018-09-22 1048 1.2.13 coverity fixup (drop unreachable code)
// 2017-04-07 868 1.2.12 Dump(): add detail arg
// 2017-02-26 857 1.2.11 add kCPAH_M_UBM22
@@ -153,6 +154,11 @@ const uint16_t Rw11Cpu::kHBSTAT;
const uint16_t Rw11Cpu::kHBHILIM;
const uint16_t Rw11Cpu::kHBLOLIM;
const uint16_t Rw11Cpu::kPCBASE;
const uint16_t Rw11Cpu::kPCCNTL;
const uint16_t Rw11Cpu::kPCSTAT;
const uint16_t Rw11Cpu::kPCDATA;
const uint16_t Rw11Cpu::kIMBASE;
const uint16_t Rw11Cpu::kIMCNTL;
const uint16_t Rw11Cpu::kIMSTAT;
@@ -180,6 +186,7 @@ Rw11Cpu::Rw11Cpu(const std::string& type)
fBase(0),
fIBase(0x4000),
fHasScnt(false),
fHasPcnt(false),
fHasCmon(false),
fHasHbpt(0),
fHasIbmon(false),
@@ -870,6 +877,7 @@ void Rw11Cpu::Dump(std::ostream& os, int ind, const char* text,
os << bl << " fBase: " << RosPrintf(fBase,"$x0",4) << endl;
os << bl << " fIBase: " << RosPrintf(fIBase,"$x0",4) << endl;
os << bl << " fHasScnt: " << fHasScnt << endl;
os << bl << " fHasPcnt: " << fHasPcnt << endl;
os << bl << " fHasCmon: " << fHasCmon << endl;
os << bl << " fHasHbpt: " << fHasHbpt << endl;
os << bl << " fHasIbmon: " << fHasIbmon << endl;
@@ -977,7 +985,10 @@ void Rw11Cpu::SetupOpt()
clist.SetLastExpectStatus(0,0);
}
int iim = AddRibr(clist, kIMBASE+kIMCNTL); // ibmon probe rem (no loc resp)
clist.SetLastExpectStatus(0,0);
clist.SetLastExpectStatus(0,0);
int ipc = clist.AddRreg(Base()+kPCBASE+kPCCNTL);
clist.SetLastExpectStatus(0,0); // disable stat check
// probe auxilliary cpu components: kw11-l, kw11-p, iist
int ikwl= AddRibr(clist, kKWLBASE); // kw11-l probe rem
@@ -1028,6 +1039,14 @@ void Rw11Cpu::SetupOpt()
AllRAddrMapInsert(pref+".hilim" , base + kHBHILIM);
AllRAddrMapInsert(pref+".lolim" , base + kHBLOLIM);
}
fHasPcnt = (clist[ipc].Status() & statmsk) == 0;
if (fHasPcnt) {
uint16_t base = Base() + kPCBASE;
AllRAddrMapInsert("pc.cntl" , base + kPCCNTL);
AllRAddrMapInsert("pc.stat" , base + kPCSTAT);
AllRAddrMapInsert("pc.data" , base + kPCDATA);
}
fHasIbmon = (clist[iim].Status() & statmsk) == 0;
if (fHasIbmon) {

View File

@@ -1,6 +1,6 @@
// $Id: Rw11Cpu.hpp 1044 2018-09-15 11:12:07Z mueller $
// $Id: Rw11Cpu.hpp 1050 2018-09-23 15:46:42Z mueller $
//
// Copyright 2013-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
// Copyright 2013-2018 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-09-23 1050 1.2.11 add HasPcnt()
// 2017-04-07 868 1.2.10 Dump(): add detail arg
// 2017-02-26 857 1.2.9 add kCPAH_M_UBM22
// 2017-02-19 853 1.2.8 use Rtime
@@ -86,6 +87,7 @@ namespace Retro {
uint16_t IBase() const;
bool HasScnt() const;
bool HasPcnt() const;
bool HasCmon() const;
uint16_t HasHbpt() const;
bool HasIbmon() const;
@@ -249,7 +251,12 @@ namespace Retro {
static const uint16_t kHBHILIM = 0x0002; //!< HB.HILIM reg offset
static const uint16_t kHBLOLIM = 0x0003; //!< HB.LOLIM reg offset
static const uint16_t kIMBASE = 0160000; //!< Ibmon ibus address
static const uint16_t kPCBASE = 0x0060; //!< DMPCNT reg base offset
static const uint16_t kPCCNTL = 0x0000; //!< PC.CNTL reg offset
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 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
@@ -281,6 +288,7 @@ namespace Retro {
uint16_t fBase;
uint16_t fIBase;
bool fHasScnt; //!< has dmscnt (state counter)
bool fHasPcnt; //!< has dmpcnt (perf counters)
bool fHasCmon; //!< has dmcmon (cpu monitor)
uint16_t fHasHbpt; //!< has dmhbpt (hardware breakpoint)
bool fHasIbmon; //!< has ibmon (ibus monitor)

View File

@@ -1,6 +1,6 @@
// $Id: Rw11Cpu.ipp 983 2018-01-02 20:35:59Z mueller $
// $Id: Rw11Cpu.ipp 1050 2018-09-23 15:46:42Z mueller $
//
// Copyright 2013-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
// Copyright 2013-2018 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-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)
// 2015-03-21 659 1.2 add RAddrMap
@@ -104,6 +105,14 @@ inline bool Rw11Cpu::HasScnt() const
//------------------------------------------+-----------------------------------
//! FIXME_docs
inline bool Rw11Cpu::HasPcnt() const
{
return fHasPcnt;
}
//------------------------------------------+-----------------------------------
//! FIXME_docs
inline bool Rw11Cpu::HasCmon() const
{
return fHasCmon;

View File

@@ -1,4 +1,4 @@
// $Id: RtclRw11Cpu.cpp 1048 2018-09-22 07:41:46Z mueller $
// $Id: RtclRw11Cpu.cpp 1050 2018-09-23 15:46:42Z mueller $
//
// Copyright 2013-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
//
@@ -13,6 +13,7 @@
//
// Revision History:
// Date Rev Version Comment
// 2019-09-23 1050 1.2.18 add HasPcnt()
// 2018-09-21 1048 1.2.18 coverity fixup (uninitialized scalar)
// 2017-04-22 883 1.2.17 M_(imap|rmap): -testname optional addr check
// 2017-04-15 876 1.2.16 add ControllerCommands()
@@ -1486,6 +1487,7 @@ void RtclRw11Cpu::SetupGetSet()
fGets.Add<uint16_t> ("base", boost::bind(&Rw11Cpu::Base, pobj));
fGets.Add<uint16_t> ("ibase", boost::bind(&Rw11Cpu::IBase, pobj));
fGets.Add<bool> ("hasscnt", boost::bind(&Rw11Cpu::HasScnt, pobj));
fGets.Add<bool> ("haspcnt", boost::bind(&Rw11Cpu::HasPcnt, pobj));
fGets.Add<bool> ("hascmon", boost::bind(&Rw11Cpu::HasCmon, pobj));
fGets.Add<uint16_t> ("hashbpt", boost::bind(&Rw11Cpu::HasHbpt, pobj));
fGets.Add<bool> ("hasibmon", boost::bind(&Rw11Cpu::HasIbmon, pobj));

122
tools/tcl/rw11/dmpcnt.tcl Normal file
View File

@@ -0,0 +1,122 @@
# $Id: dmpcnt.tcl 1051 2018-09-29 15:29:11Z mueller $
#
# Copyright 2018- 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
# Software Foundation, either version 3, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for complete details.
#
# Revision History:
# Date Rev Version Comment
# 2018-09-29 1051 1.0 Initial version
# 2018-09-23 1050 0.1 First draft
#
package provide rw11 1.0
package require rlink
package require rwxxtpp
namespace eval rw11 {
#
# setup dmpcnt unit register descriptions for w11a -------------------------
#
regdsc PC_CNTL {ainc 15} {caddr 13 5} \
{func 2 3 "s:NOOP:NOOP1:NOOP2:NOOP3:STO:STA:CLR:LOA"}
regdsc PC_STAT {ainc 15} {caddr 13 5} {waddr 8} {run 0}
# preliminary handling of counter names, hack in first version
variable pcnt_cnames {cpu_cpbusy cpu_km_prix cpu_km_pri0 cpu_km_wait \
cpu_sm cpu_um cpu_idec cpu_vfetch \
cpu_irupt cpu_pcload ca_rd ca_wr \
ca_rdhit -ca_wrhit -ca_rdmem -ca_wrmem \
-ca_rdwait -ca_wrwait ib_rd ib_wr \
ib_busy rb_rd rb_wr rb_busy \
-ext_rdrhit -ext_wrrhit -ext_wrflush -ext_rlrdbusy \
-ext_rlrdback -ext_rlwrbusy -ext_rlwrback clock}
#
# pc_setup: rmap definitions for dmpcnt
#
proc pc_setup {{cpu "cpu0"}} {
set base [$cpu get base]
if {[$cpu rmap -testname pc.cntl [expr {$base + 0x60}]]} {return}
$cpu rmap -insert pc.cntl [expr {$base + 0x60}]
$cpu rmap -insert pc.stat [expr {$base + 0x61}]
$cpu rmap -insert pc.data [expr {$base + 0x62}]
}
#
# pc_start: start the dmpcnt
#
proc pc_start {{cpu "cpu0"} args} {
$cpu cp -wreg pc.cntl [regbldkv rw11::PC_CNTL func "STA" ]
}
#
# pc_stop: stop the dmpcnt
#
proc pc_stop {{cpu "cpu0"}} {
$cpu cp -wreg pc.cntl [regbld rw11::PC_CNTL {func "STO"}]
}
#
# pc_clear: clear the dmpcnt
#
proc pc_clear {{cpu "cpu0"}} {
$cpu cp -wreg pc.cntl [regbld rw11::PC_CNTL {func "CLR"}]
}
#
# pc_read: read dmpcnt data
# returns a list of 32 float values in range 0...2^32-1
#
proc pc_read {{cpu "cpu0"}} {
$cpu cp -wreg pc.cntl [regbldkv rw11::PC_CNTL func "LOA" caddr 0 ainc 1 ] \
-rblk pc.data [expr {2*32}] blk
set rval {}
foreach {d0 d1} $blk {
lappend rval [expr {$d0 + 65536.*$d1}]
}
return $rval
}
#
# pc_print: print dmpcnt data
#
proc pc_print {pclist} {
set sn 0
set rval ""
append rval "#cn count"
foreach {pc} $pclist {
set cname [lindex $rw11::pcnt_cnames $sn]
append rval [format "\n%3d %10.0f %s" $sn $pc $cname]
incr sn
}
return $rval
}
#
# pc_printraw: read and print dmpcnt raw data
#
proc pc_printraw {{cpu "cpu0"}} {
$cpu cp -wreg pc.cntl [regbldkv rw11::PC_CNTL func "LOA" caddr 0 ainc 1 ] \
-rblk pc.data [expr {2*32}] blk
set sn 0
set rval {}
append rval "#cn msb lsb count"
foreach {d0 d1} $blk {
set cnt [expr {$d0 + 65536.*$d1}]
set cname [lindex $rw11::pcnt_cnames $sn]
append rval [format "\n%3d %4.4x %4.4x %10.0f %s" \
$sn $d1 $d0 $cnt $cname]
incr sn
}
return $rval
}
}