From 2ae1055ee5640ecc29f8d64e9c4ee9701228488b Mon Sep 17 00:00:00 2001 From: wfjm Date: Sun, 7 Apr 2019 15:43:27 +0200 Subject: [PATCH] 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 --- doc/CHANGELOG.md | 2 + rtl/ibus/ibdlib.vhd | 5 +- rtl/ibus/ibdr_dl11.vbom | 2 + rtl/ibus/ibdr_dl11.vhd | 148 +++++++----------- rtl/ibus/ibdr_maxisys.vhd | 7 +- rtl/ibus/ibdr_minisys.vbom | 1 + rtl/ibus/ibdr_minisys.vhd | 22 ++- rtl/ibus/ibdr_pc11.vhd | 19 ++- rtl/w11a/tb/tb_rlink_tba_pdp11core_ibdr.dat | 14 +- tools/asm-11/lib/defs_dl.mac | 29 ++++ tools/asm-11/lib/defs_pc.mac | 33 ++++ tools/oskit/hook/hook_ibmon_pca.tcl | 7 + tools/oskit/hook/hook_ibmon_tta.tcl | 7 + .../oskit/rsx11m-31_rk/rsx11m-31_rk_boot.tcl | 4 +- .../oskit/rsx11m-40_rk/rsx11m-40_rk_boot.tcl | 4 +- .../rsx11mp-30_rp/rsx11mp-30_rp_boot.tcl | 5 +- tools/oskit/rt11-40_rk/rt11-40_rk_boot.tcl | 4 +- tools/oskit/rt11-53_rl/rt11-53_rl_boot.tcl | 4 +- tools/oskit/xxdp_rl/xxdp22_rl_boot.tcl | 4 +- tools/oskit/xxdp_rl/xxdp25_rl_boot.tcl | 4 +- tools/src/librw11/Rw11CntlDL11.cpp | 47 ++++-- tools/src/librw11/Rw11CntlDL11.hpp | 34 ++-- tools/src/librw11/Rw11CntlPC11.cpp | 40 ++++- tools/src/librw11/Rw11CntlPC11.hpp | 32 ++-- tools/tcl/ibd_dl11/util.tcl | 26 ++- tools/tcl/ibd_pc11/util.tcl | 28 +++- tools/tcl/rw11/util.tcl | 11 +- 27 files changed, 351 insertions(+), 192 deletions(-) create mode 100644 tools/asm-11/lib/defs_dl.mac create mode 100644 tools/asm-11/lib/defs_pc.mac create mode 100644 tools/oskit/hook/hook_ibmon_pca.tcl create mode 100644 tools/oskit/hook/hook_ibmon_tta.tcl diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index ec560bb4..95a9fcd4 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -53,7 +53,9 @@ The full set of tests is only run for tagged releases. - rbd_rbmon: more robust ack,err trace when busy - rbd_tester: use now fifo_simple_dram - ibd_ibtst: rename dly[rw]->bsy[rw]; datto for write; add datab + - ibdr_dl11: changes for ibdr_dl11_buf compatibility (val in msb, ib_rlim_slv) - ibdr_lp11: move valid bit to msb of buf (for ibdr_lp11_buf compatibility) + - ibdr_pc11: changes for ibdr_pc11_buf compatibility - sys_w11a_s3: set BTOWIDTH 7 (was 6, must be > vmbox atowidth (6)) - pdp11_sys70: instantiate ibd_ibtst (when sys_conf_ibtst = true) - ibdr_maxisys,sys_conf ready for buffered DL,PC and dz11 diff --git a/rtl/ibus/ibdlib.vhd b/rtl/ibus/ibdlib.vhd index 6b273090..24d5b256 100644 --- a/rtl/ibus/ibdlib.vhd +++ b/rtl/ibus/ibdlib.vhd @@ -1,4 +1,4 @@ --- $Id: ibdlib.vhd 1123 2019-03-17 17:55:12Z mueller $ +-- $Id: ibdlib.vhd 1128 2019-04-07 13:12:47Z mueller $ -- -- Copyright 2008-2019 by Walter F.J. Mueller -- @@ -19,6 +19,7 @@ -- Tool versions: ise 8.2-14.7; viv 2014.4-2018.3; ghdl 0.18-0.35 -- Revision History: -- Date Rev Version Comment +-- 2019-04-07 1128 1.3.4 ibdr_dl11: use RLIM_CEV, drop CE_USEC -- 2019-03-09 1121 1.3.3 add ibdr_lp11_buf -- 2018-10-13 1055 1.3.2 update ibdr_maxisys (add IDEC port) -- 2018-09-08 1043 1.3.1 update ibd_kw11p @@ -224,9 +225,9 @@ component ibdr_dl11 is -- ibus dev(rem): DL11-A/B IB_ADDR : slv16 := ibaddr_dl11); port ( CLK : in slbit; -- clock - CE_USEC : in slbit; -- usec pulse RESET : in slbit; -- system reset BRESET : in slbit; -- ibus reset + RLIM_CEV : in slv7; -- clock enable vector RB_LAM : out slbit; -- remote attention IB_MREQ : in ib_mreq_type; -- ibus request IB_SRES : out ib_sres_type; -- ibus response diff --git a/rtl/ibus/ibdr_dl11.vbom b/rtl/ibus/ibdr_dl11.vbom index 487e1fd0..1fe7a20f 100644 --- a/rtl/ibus/ibdr_dl11.vbom +++ b/rtl/ibus/ibdr_dl11.vbom @@ -1,5 +1,7 @@ # libs ../vlib/slvtypes.vhd iblib.vhd +# components +ib_rlim_slv.vbom # design ibdr_dl11.vhd diff --git a/rtl/ibus/ibdr_dl11.vhd b/rtl/ibus/ibdr_dl11.vhd index a955290e..85eeb002 100644 --- a/rtl/ibus/ibdr_dl11.vhd +++ b/rtl/ibus/ibdr_dl11.vhd @@ -1,6 +1,6 @@ --- $Id: ibdr_dl11.vhd 984 2018-01-02 20:56:27Z mueller $ +-- $Id: ibdr_dl11.vhd 1128 2019-04-07 13:12:47Z mueller $ -- --- Copyright 2008-2011 by Walter F.J. Mueller +-- Copyright 2008-2019 by Walter F.J. Mueller -- -- 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 @@ -15,10 +15,10 @@ -- Module Name: ibdr_dl11 - syn -- Description: ibus dev(rem): DL11-A/B -- --- Dependencies: - +-- Dependencies: ib_rlim_slv -- Test bench: - -- Target Devices: generic --- Tool versions: ise 8.2-14.7; viv 2014.4; ghdl 0.18-0.31 +-- Tool versions: ise 8.2-14.7; viv 2017.2; ghdl 0.18-0.35 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri @@ -28,6 +28,9 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2019-04-07 1127 1.3 for dl11_buf compat: xbuf.val in bit 15 and 8; +-- use rbuf instead xbuf for rdry reporting; remove +-- maintenance mode; use ib_rlim_slv; drop CE_USEC -- 2011-11-18 427 1.2.2 now numeric_std clean -- 2010-10-23 335 1.2.1 rename RRI_LAM->RB_LAM; -- 2010-10-17 333 1.2 use ibus V2 interface @@ -56,9 +59,9 @@ entity ibdr_dl11 is -- ibus dev(rem): DL11-A/B IB_ADDR : slv16 := slv(to_unsigned(8#177560#,16))); port ( CLK : in slbit; -- clock - CE_USEC : in slbit; -- usec pulse RESET : in slbit; -- system reset BRESET : in slbit; -- ibus reset + RLIM_CEV : in slv7; -- clock enable vector RB_LAM : out slbit; -- remote attention IB_MREQ : in ib_mreq_type; -- ibus request IB_SRES : out ib_sres_type; -- ibus response @@ -80,12 +83,13 @@ architecture syn of ibdr_dl11 is constant rcsr_ibf_rdone : integer := 7; constant rcsr_ibf_rie : integer := 6; + constant rbuf_ibf_rrdy : integer := 15; + constant xcsr_ibf_xrdy : integer := 7; constant xcsr_ibf_xie : integer := 6; - constant xcsr_ibf_xmaint: integer := 2; - constant xbuf_ibf_xval : integer := 8; - constant xbuf_ibf_rrdy : integer := 9; + constant xbuf_ibf_xval : integer := 15; + constant xbuf_ibf_xval8 : integer := 8; type regs_type is record -- state registers ibsel : slbit; -- ibus select @@ -95,11 +99,8 @@ architecture syn of ibdr_dl11 is rbuf : slv8; -- rbuf: rval : slbit; -- rx rbuf valid rintreq : slbit; -- rx interrupt request - rdlybsy : slbit; -- rx delay busy - rdlycnt : slv10; -- rx delay counter xrdy : slbit; -- xcsr: transmitter ready xie : slbit; -- xcsr: transmitter interrupt enable - xmaint : slbit; -- xcsr: maintenance mode xbuf : slv8; -- xbuf: xintreq : slbit; -- tx interrupt request end record regs_type; @@ -109,28 +110,40 @@ architecture syn of ibdr_dl11 is (others=>'0'), -- rrlim '0','0', -- rdone, rie (others=>'0'), -- rbuf - '0','0','0', -- rval,rintreq,rdlybsy - (others=>'0'), -- rdlycnt + '0','0', -- rval,rintreq '1', -- xrdy !! is set !! - '0','0', -- xie,xmaint + '0', -- xie (others=>'0'), -- xbuf '0' -- xintreq ); signal R_REGS : regs_type := regs_init; signal N_REGS : regs_type := regs_init; + + signal RRLIM_START : slbit := '0'; + signal RRLIM_BUSY : slbit := '0'; begin + RRLIM : ib_rlim_slv + port map ( + CLK => CLK, + RESET => RESET, + RLIM_CEV => RLIM_CEV, + SEL => R_REGS.rrlim, + START => RRLIM_START, + STOP => BRESET, + DONE => open, + BUSY => RRLIM_BUSY + ); + proc_regs: process (CLK) begin if rising_edge(CLK) then if BRESET = '1' then R_REGS <= regs_init; if RESET = '0' then -- if RESET=0 we do just an ibus reset - R_REGS.rrlim <= N_REGS.rrlim; -- don't reset rx rate limit - R_REGS.rdlybsy <= N_REGS.rdlybsy; -- don't reset rx delay busy - R_REGS.rdlycnt <= N_REGS.rdlycnt; -- don't reset rx delay counter + R_REGS.rrlim <= N_REGS.rrlim; -- keep RLIM flag end if; else R_REGS <= N_REGS; @@ -138,7 +151,7 @@ begin end if; end process proc_regs; - proc_next : process (CE_USEC, R_REGS, IB_MREQ, EI_ACK_RX, EI_ACK_TX) + proc_next : process (R_REGS, IB_MREQ, EI_ACK_RX, EI_ACK_TX, RRLIM_BUSY) variable r : regs_type := regs_init; variable n : regs_type := regs_init; variable idout : slv16 := (others=>'0'); @@ -147,8 +160,7 @@ begin variable ibw0 : slbit := '0'; variable ibw1 : slbit := '0'; variable ilam : slbit := '0'; - variable rdlystart : slbit := '0'; - variable rdlyinit : slv10 := (others=>'0'); + variable irrlimsta : slbit := '0'; begin r := R_REGS; @@ -160,7 +172,7 @@ begin ibw0 := IB_MREQ.we and IB_MREQ.be0; ibw1 := IB_MREQ.we and IB_MREQ.be1; ilam := '0'; - rdlystart := '0'; + irrlimsta := '0'; -- ibus address decoder n.ibsel := '0'; @@ -201,26 +213,17 @@ begin idout(r.rbuf'range) := r.rbuf; if IB_MREQ.racc = '0' then -- cpu --------------------- - if ibrd = '1' then - n.rdone := '0'; -- clear DONE + if ibrd='1' and r.rdone='1' then n.rval := '0'; -- clear rbuf valid - n.rintreq := '0'; -- clear pending interrupts - rdlystart := '1'; -- start rx delay counter - if r.xmaint = '0' then -- if not in loop-back - ilam := '1'; -- request rb attention - end if; + irrlimsta := '1'; -- start rx timer + ilam := '1'; -- request rb attention end if; else -- rri --------------------- + idout(rbuf_ibf_rrdy) := not r.rval; if ibw0 = '1' then n.rbuf := IB_MREQ.din(n.rbuf'range); n.rval := '1'; -- set rbuf valid - if r.rdlybsy = '0' then -- if rdly timer not running - n.rdone := '1'; -- set DONE - if r.rie = '1' then -- if rx interrupt enabled - n.rintreq := '1'; -- request interrupt - end if; - end if; end if; end if; @@ -228,7 +231,6 @@ begin idout(xcsr_ibf_xrdy) := r.xrdy; idout(xcsr_ibf_xie) := r.xie; - idout(xcsr_ibf_xmaint):= r.xmaint; if IB_MREQ.racc = '0' then -- cpu --------------------- if ibw0 = '1' then @@ -240,7 +242,6 @@ begin else n.xintreq := '0'; end if; - n.xmaint := IB_MREQ.din(xcsr_ibf_xmaint); end if; end if; @@ -251,17 +252,13 @@ begin n.xbuf := IB_MREQ.din(n.xbuf'range); n.xrdy := '0'; n.xintreq := '0'; - if r.xmaint = '0' then - ilam := '1'; - end if; + ilam := '1'; end if; else -- rri --------------------- - idout(r.xbuf'range) := r.xbuf; - if r.xmaint = '0' then -- if not in maintenace mode - idout(xbuf_ibf_xval) := not r.xrdy; - idout(xbuf_ibf_rrdy) := not r.rval; - end if; + idout(r.xbuf'range) := r.xbuf; + idout(xbuf_ibf_xval) := not r.xrdy; + idout(xbuf_ibf_xval8) := not r.xrdy; if ibrd = '1' then n.xrdy := '1'; if r.xie = '1' then @@ -273,59 +270,10 @@ begin when others => null; end case; - else -- if unselected handle loop-back - if r.xmaint = '1' and -- if in maintenace mode - r.xrdy='0' and -- and transmit pending - r.rdone='0' and -- and receive buffer empty - r.rdlybsy='0' then -- and rdly timer not running - n.rbuf := r.xbuf; -- copy transmit to receive buffer - n.xrdy := '1'; -- mark transmit done - n.rdone := '1'; -- make receive done - if r.rie = '1' then -- if rx interrupt enabled - n.rintreq := '1'; -- request it - end if; - if r.xie = '1' then -- if tx interrupt enabled - n.xintreq := '1'; -- request it - end if; - end if; - end if; -- other state changes - - rdlyinit := (others=>'0'); - case r.rrlim is - when "000" => rdlyinit := "0000000000"; -- rlim=0 -> disabled - when "001" => rdlyinit := "0000000011"; -- rlim=1 -> delay by 3+ usec - when "010" => rdlyinit := "0000001111"; -- rlim=2 -> delay by 15+ usec - when "011" => rdlyinit := "0000111111"; -- rlim=3 -> delay by 63+ usec - when "100" => rdlyinit := "0001111111"; -- rlim=4 -> delay by 127+ usec - when "101" => rdlyinit := "0011111111"; -- rlim=5 -> delay by 255+ usec - when "110" => rdlyinit := "0111111111"; -- rlim=6 -> delay by 511+ usec - when "111" => rdlyinit := "1111111111"; -- rlim=7 -> delay by 1023+ usec - when others => null; - end case; - - if rdlystart = '1' then -- if rdly timer start requested - n.rdlycnt := rdlyinit; -- init counter - if r.rrlim /= "000" then -- rate limiter enabled ? - n.rdlybsy := '1'; -- set busy - end if; - elsif CE_USEC = '1' then -- if end-of-usec - n.rdlycnt := slv(unsigned(r.rdlycnt) - 1); -- decrement - if r.rdlybsy='1' and -- if delay busy - unsigned(r.rdlycnt) = 0 then -- and counter at zero - n.rdlybsy := '0'; -- clear busy - if n.rval = '1' then -- if rbuf is valid or is set - -- valid this cycle (use n.!!) - n.rdone := '1'; -- set DONE - if r.rie = '1' then -- if rx interrupt enabled - n.rintreq := '1'; -- request interrupt - end if; - end if; - end if; - end if; - + if EI_ACK_RX = '1' then n.rintreq := '0'; end if; @@ -333,7 +281,19 @@ begin n.xintreq := '0'; end if; + if (RRLIM_BUSY or (not r.rval)) = '1' then -- busy or no data + n.rdone := '0'; -- clear done + n.rintreq := '0'; -- clear pending interrupts + else -- not busy and data valid + n.rdone := '1'; -- clear done + if r.rdone='0' and r.rie='1' then -- done going 0->1 and ie=1 + n.rintreq := '1'; -- request rx interrupt + end if; + end if; + N_REGS <= n; + + RRLIM_START <= irrlimsta; IB_SRES.dout <= idout; IB_SRES.ack <= r.ibsel and ibreq; diff --git a/rtl/ibus/ibdr_maxisys.vhd b/rtl/ibus/ibdr_maxisys.vhd index dba2b90e..17d1f13c 100644 --- a/rtl/ibus/ibdr_maxisys.vhd +++ b/rtl/ibus/ibdr_maxisys.vhd @@ -1,4 +1,4 @@ --- $Id: ibdr_maxisys.vhd 1123 2019-03-17 17:55:12Z mueller $ +-- $Id: ibdr_maxisys.vhd 1128 2019-04-07 13:12:47Z mueller $ -- -- Copyright 2009-2019 by Walter F.J. Mueller -- @@ -51,6 +51,7 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2019-04-07 1127 1.6.3 ibdr_dl11: use RLIM_CEV, drop CE_USEC -- 2019-03-17 1123 1.6.2 add ib_rlim_gen, use with ibdr_lp11_buf -- 2019-03-09 1121 1.6.1 add ibdr_lp11_buf -- 2019-02-10 1111 1.6 use typ for DL,PC,LP @@ -380,9 +381,9 @@ begin DL11_0 : ibdr_dl11 port map ( CLK => CLK, - CE_USEC => CE_USEC, RESET => RESET, BRESET => BRESET, + RLIM_CEV => RLIM_CEV, RB_LAM => RB_LAM_DL11_0, IB_MREQ => IB_MREQ, IB_SRES => IB_SRES_DL11_0, @@ -399,9 +400,9 @@ begin IB_ADDR => slv(to_unsigned(8#176500#,16))) port map ( CLK => CLK, - CE_USEC => CE_USEC, RESET => RESET, BRESET => BRESET, + RLIM_CEV => RLIM_CEV, RB_LAM => RB_LAM_DL11_1, IB_MREQ => IB_MREQ, IB_SRES => IB_SRES_DL11_1, diff --git a/rtl/ibus/ibdr_minisys.vbom b/rtl/ibus/ibdr_minisys.vbom index f1ce9806..2496fda3 100644 --- a/rtl/ibus/ibdr_minisys.vbom +++ b/rtl/ibus/ibdr_minisys.vbom @@ -3,6 +3,7 @@ iblib.vhd ibdlib.vhd # components +ib_rlim_gen.vbom ibdr_sdreg.vbom ibd_kw11l.vbom ibdr_dl11.vbom diff --git a/rtl/ibus/ibdr_minisys.vhd b/rtl/ibus/ibdr_minisys.vhd index b0e4dbd9..9ce31027 100644 --- a/rtl/ibus/ibdr_minisys.vhd +++ b/rtl/ibus/ibdr_minisys.vhd @@ -1,6 +1,6 @@ --- $Id: ibdr_minisys.vhd 984 2018-01-02 20:56:27Z mueller $ +-- $Id: ibdr_minisys.vhd 1129 2019-04-07 13:27:35Z mueller $ -- --- Copyright 2008-2011 by Walter F.J. Mueller +-- Copyright 2008-2019 by Walter F.J. Mueller -- -- 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 @@ -15,7 +15,8 @@ -- Module Name: ibdr_minisys - syn -- Description: ibus(rem) devices for minimal system:SDR+KW+DL+RK -- --- Dependencies: ibdr_sdreg +-- Dependencies: ib_rlim_gen +-- ibdr_sdreg -- ibd_kw11l -- ibdr_dl11 -- ibdr_rk11 @@ -23,7 +24,7 @@ -- ib_intmap -- Test bench: - -- Target Devices: generic --- Tool versions: ise 8.2-14.7; viv 2014.4; ghdl 0.18-0.31 +-- Tool versions: ise 8.2-14.7; viv 2014.4-2017.2; ghdl 0.18-0.35 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri @@ -32,6 +33,7 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2019-04-07 1129 1.1.3 ibdr_dl11: use RLIM_CEV, drop CE_USEC -- 2011-11-18 427 1.1.2 now numeric_std clean -- 2010-10-23 335 1.1.1 rename RRI_LAM->RB_LAM; -- 2010-06-11 303 1.1 use IB_MREQ.racc instead of RRI_REQ @@ -124,9 +126,19 @@ architecture syn of ibdr_minisys is signal EI_ACK_DL11RX : slbit := '0'; signal EI_ACK_DL11TX : slbit := '0'; signal EI_ACK_RK11 : slbit := '0'; + + signal RLIM_CEV : slv7 := (others=>'0'); begin + RLIM : ib_rlim_gen + port map ( + CLK => CLK, + CE_USEC => CE_USEC, + RESET => '0', + RLIM_CEV => RLIM_CEV + ); + SDREG : ibdr_sdreg port map ( CLK => CLK, @@ -152,9 +164,9 @@ begin DL11 : ibdr_dl11 port map ( CLK => CLK, - CE_USEC => CE_USEC, RESET => RESET, BRESET => BRESET, + RLIM_CEV => RLIM_CEV, RB_LAM => RB_LAM_DL11, IB_MREQ => IB_MREQ, IB_SRES => IB_SRES_DL11, diff --git a/rtl/ibus/ibdr_pc11.vhd b/rtl/ibus/ibdr_pc11.vhd index 6169801c..7df75043 100644 --- a/rtl/ibus/ibdr_pc11.vhd +++ b/rtl/ibus/ibdr_pc11.vhd @@ -1,6 +1,6 @@ --- $Id: ibdr_pc11.vhd 984 2018-01-02 20:56:27Z mueller $ +-- $Id: ibdr_pc11.vhd 1126 2019-04-06 17:37:40Z mueller $ -- --- Copyright 2009-2013 by Walter F.J. Mueller +-- Copyright 2009-2019 by Walter F.J. Mueller -- -- 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,7 +18,7 @@ -- Dependencies: - -- Test bench: xxdp: zpcae0 -- Target Devices: generic --- Tool versions: ise 8.2-14.7; viv 2014.4; ghdl 0.18-0.31 +-- Tool versions: ise 8.2-14.7; viv 2014.4-2017.2; ghdl 0.18-0.35 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri @@ -27,6 +27,8 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2019-04-06 1126 1.4 for pc11_buf compat: pbuf.pval in bit 15 and 8; +-- move rbusy reporting from pbuf to rbuf register -- 2013-05-04 515 1.3 BUGFIX: r.rbuf was immediately cleared ! Was broken -- since ibus V2 update, never tested afterwards... -- 2011-11-18 427 1.2.2 now numeric_std clean @@ -76,13 +78,15 @@ architecture syn of ibdr_pc11 is constant rcsr_ibf_rdone : integer := 7; constant rcsr_ibf_rie : integer := 6; constant rcsr_ibf_renb : integer := 0; - + + constant rbuf_ibf_rbusy : integer := 15; + constant pcsr_ibf_perr : integer := 15; constant pcsr_ibf_prdy : integer := 7; constant pcsr_ibf_pie : integer := 6; - constant pbuf_ibf_pval : integer := 8; - constant pbuf_ibf_rbusy : integer := 9; + constant pbuf_ibf_pval : integer := 15; + constant pbuf_ibf_pval8 : integer := 8; type regs_type is record -- state registers ibsel : slbit; -- ibus select @@ -224,6 +228,7 @@ begin end if; else -- rri --------------------- + idout(rbuf_ibf_rbusy) := r.rbusy; if ibw0 = '1' then n.rbuf := IB_MREQ.din(n.rbuf'range); n.rbusy := '0'; @@ -285,7 +290,7 @@ begin else -- rri --------------------- idout(r.pbuf'range) := r.pbuf; idout(pbuf_ibf_pval) := not r.prdy; - idout(pbuf_ibf_rbusy) := r.rbusy; + idout(pbuf_ibf_pval8) := not r.prdy; if ibrd = '1' then n.prdy := '1'; if r.pie = '1' then diff --git a/rtl/w11a/tb/tb_rlink_tba_pdp11core_ibdr.dat b/rtl/w11a/tb/tb_rlink_tba_pdp11core_ibdr.dat index 07efe713..634e22b7 100644 --- a/rtl/w11a/tb/tb_rlink_tba_pdp11core_ibdr.dat +++ b/rtl/w11a/tb/tb_rlink_tba_pdp11core_ibdr.dat @@ -1,9 +1,10 @@ -# $Id: tb_rlink_tba_pdp11core_ibdr.dat 675 2015-05-08 21:05:08Z mueller $ +# $Id: tb_rlink_tba_pdp11core_ibdr.dat 1126 2019-04-06 17:37:40Z mueller $ # # Revision History: # Date Rev Version Comment +# 2019-04-06 1126 1.6 adapt to new dl11 iface # 2015-05-03 674 1.5 start/stop/suspend overhaul -# 2014-12-26 621 1.4 adopt wmembe,ribr,wibr testing to new 4k window +# 2014-12-26 621 1.4 adapt wmembe,ribr,wibr testing to new 4k window # 2014-09-27 595 1.3 now for rlink v4 iface # 2014-08-15 583 1.2 rb_mreq addr now 16 bit # 2010-06-18 306 1.1 adapt to new rri<->cp implementation @@ -44,11 +45,13 @@ # ibus -> ibr mapping: (addr-160000)/2 + 40000 # RKWC: 177406 -> ibr 047603 # RKBA: 177410 -> ibr 047604 +# RBUF: 177562 -> ibr 047671 # XCSR: 177564 -> ibr 047672 # XBUF: 177566 -> ibr 047673 # .amdef RKWC o"047603" .amdef RKBA o"047604" +.amdef RBUF o"047671" .amdef XCSR o"047672" .amdef XBUF o"047673" # @@ -140,12 +143,13 @@ C ----------------------------------------------------------------------------- C test device attention (use DL11 XCSR/XBUF [177564/177566]) # rreg .XCSR d=o"000200" -- read XCSR via RRI: XRDY=1 -rreg .XBUF d=o"001000" -- read XBUF via RRI: RRDY=1,XDONE=0 +rreg .RBUF d=o"100000" -- read RBUF via RRI: RRDY=1 +rreg .XBUF d=o"000000" -- read XBUF via RRI: XDONE=0 wreg .al o"177566" -- #XBUF wreg .mem o"000123" s=00001000 -- write XBUF via CPU rreg .XCSR d=o"000000" s=00001000 -- read XCSR via RRI: XRDY=0 -rreg .XBUF d=o"001523" s=00001000 -- read XBUF via RRI: RRDY=1,XDONE=1 -rreg .XBUF d=o"001123" s=00001000 -- read2 XBUF via RRI: RRDY=1,XDONE=0 +rreg .XBUF d=o"100523" s=00001000 -- read XBUF via RRI: VAL,VAL8=1 +rreg .XBUF d=o"000123" s=00001000 -- read2 XBUF via RRI: VAL,VAL8=0 rreg .XCSR d=o"000200" s=00001000 -- read XCSR via RRI: XRDY=1 attn d=o"000002" s=00000000 -- read/clean LAM's: lam(1) used by DL11 # diff --git a/tools/asm-11/lib/defs_dl.mac b/tools/asm-11/lib/defs_dl.mac new file mode 100644 index 00000000..7babb386 --- /dev/null +++ b/tools/asm-11/lib/defs_dl.mac @@ -0,0 +1,29 @@ +; $Id: defs_dl.mac 1127 2019-04-07 10:59:07Z mueller $ +; Copyright 2019- by Walter F.J. Mueller +; License disclaimer see License.txt in $RETROBASE directory +; +; definitions for primary DL11 controler (console) (as in defs_cons.das) +; +; vector address/priority definition +; + va.tti=000060 + vp.tti=4 + va.tto=000064 + vp.tto=4 +; +; register addresses +; + pr.csr=177560 + pr.buf=177562 + pp.csr=177564 + pp.buf=177566 +; +; symbol definitions for ti.csr +; + ti.don=000200 + ti.ie=000100 +; +; symbol definitions for to.csr +; + to.rdy=000200 + to.ie=000100 diff --git a/tools/asm-11/lib/defs_pc.mac b/tools/asm-11/lib/defs_pc.mac new file mode 100644 index 00000000..73a190d7 --- /dev/null +++ b/tools/asm-11/lib/defs_pc.mac @@ -0,0 +1,33 @@ +; $Id: defs_pc.mac 1122 2019-03-17 08:15:42Z mueller $ +; Copyright 2019- by Walter F.J. Mueller +; License disclaimer see License.txt in $RETROBASE directory +; +; definitions for PC11 controler (as in defs_pc.das) +; +; vector address/priority definition +; + va.ptr=000070 + vp.ptr=4 + va.ptp=000074 + vp.ptp=4 +; +; register addresses +; + pr.csr=177550 + pr.buf=177552 + pp.csr=177554 + pp.buf=177556 +; +; symbol definitions for pr.csr +; + pr.err=100000 + pr.bsy=004000 + pr.don=000200 + pr.ie=000100 + pr.ena=000001 +; +; symbol definitions for pp.csr +; + pp.err=100000 + pp.rdy=000200 + pp.ie=000100 diff --git a/tools/oskit/hook/hook_ibmon_pca.tcl b/tools/oskit/hook/hook_ibmon_pca.tcl new file mode 100644 index 00000000..bc0dc966 --- /dev/null +++ b/tools/oskit/hook/hook_ibmon_pca.tcl @@ -0,0 +1,7 @@ +# $Id: hook_ibmon_pca.tcl 1126 2019-04-06 17:37:40Z mueller $ +puts "hook: start ibmon for pca" +package require ibd_ibmon +ibd_ibmon::stop +cpu0 cp -wibr im.lolim [cpu0 imap pca.rcsr] \ + -wibr im.hilim [cpu0 imap pca.pbuf] +ibd_ibmon::start diff --git a/tools/oskit/hook/hook_ibmon_tta.tcl b/tools/oskit/hook/hook_ibmon_tta.tcl new file mode 100644 index 00000000..a76a240e --- /dev/null +++ b/tools/oskit/hook/hook_ibmon_tta.tcl @@ -0,0 +1,7 @@ +# $Id: hook_ibmon_tta.tcl 1126 2019-04-06 17:37:40Z mueller $ +puts "hook: start ibmon for tta" +package require ibd_ibmon +ibd_ibmon::stop +cpu0 cp -wibr im.lolim [cpu0 imap tta.rcsr] \ + -wibr im.hilim [cpu0 imap tta.xbuf] +ibd_ibmon::start diff --git a/tools/oskit/rsx11m-31_rk/rsx11m-31_rk_boot.tcl b/tools/oskit/rsx11m-31_rk/rsx11m-31_rk_boot.tcl index 5a447ac7..67fea5b4 100644 --- a/tools/oskit/rsx11m-31_rk/rsx11m-31_rk_boot.tcl +++ b/tools/oskit/rsx11m-31_rk/rsx11m-31_rk_boot.tcl @@ -1,4 +1,4 @@ -# $Id: rsx11m-31_rk_boot.tcl 835 2016-12-31 10:00:14Z mueller $ +# $Id: rsx11m-31_rk_boot.tcl 1128 2019-04-07 13:12:47Z mueller $ # # Setup file for RSX11-M V3.1 RK05 based system # @@ -14,7 +14,7 @@ rutil::dohook "preinithook" puts [rlw] # setup tt,lp,pp (enable rx rate limiter on old DEC OS) -rw11::setup_tt "cpu0" dlrlim 5 +rw11::setup_tt "cpu0" dlrrlim 5 rw11::setup_lp rw11::setup_pp diff --git a/tools/oskit/rsx11m-40_rk/rsx11m-40_rk_boot.tcl b/tools/oskit/rsx11m-40_rk/rsx11m-40_rk_boot.tcl index 1839ebca..110f8860 100644 --- a/tools/oskit/rsx11m-40_rk/rsx11m-40_rk_boot.tcl +++ b/tools/oskit/rsx11m-40_rk/rsx11m-40_rk_boot.tcl @@ -1,4 +1,4 @@ -# $Id: rsx11m-40_rk_boot.tcl 835 2016-12-31 10:00:14Z mueller $ +# $Id: rsx11m-40_rk_boot.tcl 1128 2019-04-07 13:12:47Z mueller $ # # Setup file for RSX11-M V4.0 RK05 based system # @@ -14,7 +14,7 @@ rutil::dohook "preinithook" puts [rlw] # setup tt,lp,pp (enable rx rate limiter on old DEC OS) -rw11::setup_tt "cpu0" dlrlim 5 +rw11::setup_tt "cpu0" dlrrlim 5 rw11::setup_lp rw11::setup_pp diff --git a/tools/oskit/rsx11mp-30_rp/rsx11mp-30_rp_boot.tcl b/tools/oskit/rsx11mp-30_rp/rsx11mp-30_rp_boot.tcl index 39a3d899..bb2ae25a 100644 --- a/tools/oskit/rsx11mp-30_rp/rsx11mp-30_rp_boot.tcl +++ b/tools/oskit/rsx11mp-30_rp/rsx11mp-30_rp_boot.tcl @@ -1,4 +1,4 @@ -# $Id: rsx11mp-30_rp_boot.tcl 835 2016-12-31 10:00:14Z mueller $ +# $Id: rsx11mp-30_rp_boot.tcl 1126 2019-04-06 17:37:40Z mueller $ # # Setup file for RSX11-M+ V3.0 RP06 based system # @@ -13,9 +13,10 @@ rutil::dohook "preinithook" puts [rlw] -# setup tt,lp (211bsd uses parity -> use 7 bit mode) +# setup tt,lp,pp rw11::setup_tt "cpu0" to7bit 1 rw11::setup_lp +rw11::setup_pp # mount disks cpu0rpa0 set type rp06 diff --git a/tools/oskit/rt11-40_rk/rt11-40_rk_boot.tcl b/tools/oskit/rt11-40_rk/rt11-40_rk_boot.tcl index bd97812d..e0c852e8 100644 --- a/tools/oskit/rt11-40_rk/rt11-40_rk_boot.tcl +++ b/tools/oskit/rt11-40_rk/rt11-40_rk_boot.tcl @@ -1,4 +1,4 @@ -# $Id: rt11-40_rk_boot.tcl 835 2016-12-31 10:00:14Z mueller $ +# $Id: rt11-40_rk_boot.tcl 1128 2019-04-07 13:12:47Z mueller $ # # Setup file for RT-11 V4.0 RK05 based system # @@ -13,7 +13,7 @@ rutil::dohook "preinithook" puts [rlw] # setup tt,lp,pp (single console; enable rx rate limiter on old DEC OS) -rw11::setup_tt "cpu0" ndl 1 dlrlim 5 +rw11::setup_tt "cpu0" ndl 1 dlrrlim 5 rw11::setup_lp rw11::setup_pp diff --git a/tools/oskit/rt11-53_rl/rt11-53_rl_boot.tcl b/tools/oskit/rt11-53_rl/rt11-53_rl_boot.tcl index f5e2399f..c4ed9957 100644 --- a/tools/oskit/rt11-53_rl/rt11-53_rl_boot.tcl +++ b/tools/oskit/rt11-53_rl/rt11-53_rl_boot.tcl @@ -1,4 +1,4 @@ -# $Id: rt11-53_rl_boot.tcl 835 2016-12-31 10:00:14Z mueller $ +# $Id: rt11-53_rl_boot.tcl 1128 2019-04-07 13:12:47Z mueller $ # # Setup file for RT-11 V5.3 RL02 based system # @@ -13,7 +13,7 @@ rutil::dohook "preinithook" puts [rlw] # setup tt,lp,pp (single console; enable rx rate limiter on old DEC OS) -rw11::setup_tt "cpu0" ndl 1 dlrlim 5 +rw11::setup_tt "cpu0" ndl 1 dlrrlim 5 rw11::setup_lp rw11::setup_pp diff --git a/tools/oskit/xxdp_rl/xxdp22_rl_boot.tcl b/tools/oskit/xxdp_rl/xxdp22_rl_boot.tcl index 97a1987b..401afcd1 100644 --- a/tools/oskit/xxdp_rl/xxdp22_rl_boot.tcl +++ b/tools/oskit/xxdp_rl/xxdp22_rl_boot.tcl @@ -1,4 +1,4 @@ -# $Id: xxdp22_rl_boot.tcl 835 2016-12-31 10:00:14Z mueller $ +# $Id: xxdp22_rl_boot.tcl 1128 2019-04-07 13:12:47Z mueller $ # # Setup file for XXDP V2.2 RL02 based system # @@ -13,7 +13,7 @@ rutil::dohook "preinithook" puts [rlw] # setup tt,lp,pp (single console; enable rx rate limiter on old DEC OS) -rw11::setup_tt "cpu0" ndl 1 dlrlim 5 to7bit 1 +rw11::setup_tt "cpu0" ndl 1 dlrrlim 5 to7bit 1 rw11::setup_lp rw11::setup_pp diff --git a/tools/oskit/xxdp_rl/xxdp25_rl_boot.tcl b/tools/oskit/xxdp_rl/xxdp25_rl_boot.tcl index 5289c8de..920ac9ae 100644 --- a/tools/oskit/xxdp_rl/xxdp25_rl_boot.tcl +++ b/tools/oskit/xxdp_rl/xxdp25_rl_boot.tcl @@ -1,4 +1,4 @@ -# $Id: xxdp25_rl_boot.tcl 835 2016-12-31 10:00:14Z mueller $ +# $Id: xxdp25_rl_boot.tcl 1128 2019-04-07 13:12:47Z mueller $ # # Setup file for XXDP V2.5 RL02 based system # @@ -13,7 +13,7 @@ rutil::dohook "preinithook" puts [rlw] # setup tt,lp,pp (single console; enable rx rate limiter on old DEC OS) -rw11::setup_tt "cpu0" ndl 1 dlrlim 5 to7bit 1 +rw11::setup_tt "cpu0" ndl 1 dlrrlim 5 to7bit 1 rw11::setup_lp rw11::setup_pp diff --git a/tools/src/librw11/Rw11CntlDL11.cpp b/tools/src/librw11/Rw11CntlDL11.cpp index 453f6d39..cca56c7e 100644 --- a/tools/src/librw11/Rw11CntlDL11.cpp +++ b/tools/src/librw11/Rw11CntlDL11.cpp @@ -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 // @@ -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("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_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::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 << " "; } diff --git a/tools/src/librw11/Rw11CntlDL11.hpp b/tools/src/librw11/Rw11CntlDL11.hpp index 7c47c0d1..5dd6adba 100644 --- a/tools/src/librw11/Rw11CntlDL11.hpp +++ b/tools/src/librw11/Rw11CntlDL11.hpp @@ -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 +// Copyright 2013-2019 by Walter F.J. Mueller // // 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 }; diff --git a/tools/src/librw11/Rw11CntlPC11.cpp b/tools/src/librw11/Rw11CntlPC11.cpp index 68c50e46..1e65d448 100644 --- a/tools/src/librw11/Rw11CntlPC11.cpp +++ b/tools/src/librw11/Rw11CntlPC11.cpp @@ -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 // @@ -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("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& 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::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 ------------------- diff --git a/tools/src/librw11/Rw11CntlPC11.hpp b/tools/src/librw11/Rw11CntlPC11.hpp index 27b7fff5..e3d91925 100644 --- a/tools/src/librw11/Rw11CntlPC11.hpp +++ b/tools/src/librw11/Rw11CntlPC11.hpp @@ -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 +// Copyright 2013-2019 by Walter F.J. Mueller // // 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 diff --git a/tools/tcl/ibd_dl11/util.tcl b/tools/tcl/ibd_dl11/util.tcl index 7377f5d6..e1261ad2 100644 --- a/tools/tcl/ibd_dl11/util.tcl +++ b/tools/tcl/ibd_dl11/util.tcl @@ -1,6 +1,6 @@ -# $Id: util.tcl 985 2018-01-03 08:59:40Z mueller $ +# $Id: util.tcl 1126 2019-04-06 17:37:40Z mueller $ # -# Copyright 2015- by Walter F.J. Mueller +# Copyright 2015-2019 by Walter F.J. Mueller # # 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.1 updates for buffered dl11 # 2015-12-26 719 1.0 Initial version # @@ -27,12 +28,25 @@ namespace eval ibd_dl11 { # setup register descriptions for ibd_dl11 --------------------------------- # - regdsc RCSR {done 7} {ie 6} - regdsc RRCSR {done 7} {ie 6} {rlim 14 3} + regdsc RCSR {done 7} {ie 6} + regdsc RRCSR {rlim 14 3} {type 10 3} {done 7} {ie 6} {fclr 5} + regdsc RRBUF {rrdy 15} {size 14 7 "d"} - regdsc XCSR {done 7} {ie 6} {maint 2} + regdsc XCSR {done 7} {ie 6} + regdsc RXCSR {rlim 14 3} {done 7} {ie 6} + regdsc RXBUF {val 15} {size 14 7 "d"} {data 7 8 "o"} rw11util::regmap_add ibd_dl11 tt?.rcsr {l? RCSR r? RRCSR} - rw11util::regmap_add ibd_dl11 tt?.xcsr {?? XCSR} + rw11util::regmap_add ibd_dl11 tt?.rbuf {r? RRBUF} + rw11util::regmap_add ibd_dl11 tt?.xcsr {l? XCSR r? RXCSR} + rw11util::regmap_add ibd_dl11 tt?.xbuf {r? RXBUF} + + variable ANUM 1; # 1st DL11 + # + # setup: create controller with default attributes ------------------------- + # + proc setup {{cpu "cpu0"}} { + return [rw11::setup_cntl $cpu "dl11" "tta"] + } } diff --git a/tools/tcl/ibd_pc11/util.tcl b/tools/tcl/ibd_pc11/util.tcl index 5fd7876f..7a4587a6 100644 --- a/tools/tcl/ibd_pc11/util.tcl +++ b/tools/tcl/ibd_pc11/util.tcl @@ -1,6 +1,6 @@ -# $Id: util.tcl 985 2018-01-03 08:59:40Z mueller $ +# $Id: util.tcl 1126 2019-04-06 17:37:40Z mueller $ # -# Copyright 2015- by Walter F.J. Mueller +# Copyright 2015-2019 by Walter F.J. Mueller # # 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.1 updates for buffered pc11 # 2015-12-26 719 1.0 Initial version # @@ -27,12 +28,27 @@ namespace eval ibd_pc11 { # setup register descriptions for ibd_pc11 --------------------------------- # - regdsc RCSR {err 15} {busy 11} {done 7} {ie 6} {enb 0} + regdsc RCSR {err 15} {busy 11} {done 7} {ie 6} {enb 0} + regdsc RRCSR {err 15} {rlim 14 3} {busy 11} {type 10 3} \ + {done 7} {ie 6} {fclr 5} + regdsc RRBUF {rbusy 15} {size 14 7 "d"} - regdsc PCSR {err 15} {done 7} {ie 6} + regdsc PCSR {err 15} {done 7} {ie 6} + regdsc RPCSR {err 15} {rlim 14 3} {done 7} {ie 6} + + regdsc RPBUF {val 15} {size 14 7 "d"} {data 7 8 "o"} - rw11util::regmap_add ibd_pc11 pc?.rcsr {?? RCSR} - rw11util::regmap_add ibd_pc11 pc?.xcsr {?? PCSR} + rw11util::regmap_add ibd_pc11 pc?.rcsr {l? RCSR r? RRCSR} + rw11util::regmap_add ibd_pc11 pc?.rbuf {r? RRBUF} + rw11util::regmap_add ibd_pc11 pc?.pcsr {l? PCSR r? RPCSR} + rw11util::regmap_add ibd_pc11 pc?.pbuf {r? RPBUF} variable ANUM 10 + + # + # setup: create controller with default attributes ------------------------- + # + proc setup {{cpu "cpu0"}} { + return [rw11::setup_cntl $cpu "pc11" "pca"] + } } diff --git a/tools/tcl/rw11/util.tcl b/tools/tcl/rw11/util.tcl index 72521212..db0b851e 100644 --- a/tools/tcl/rw11/util.tcl +++ b/tools/tcl/rw11/util.tcl @@ -1,6 +1,6 @@ -# $Id: util.tcl 1044 2018-09-15 11:12:07Z mueller $ +# $Id: util.tcl 1128 2019-04-07 13:12:47Z mueller $ # -# Copyright 2013-2017 by Walter F.J. Mueller +# Copyright 2013-2019 by Walter F.J. Mueller # # 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-07 1128 1.3.9 setup_tt: rename dlrlim to dlrrlim # 2017-04-22 883 1.3.8 move in imap_reg2addr; add imap_range2addr # 2017-02-04 848 1.3.7 add DEUNA; setup_cntl: handle not found devices # 2015-12-30 721 1.3.6 BUGFIX: setup_ostr: adopt to use args2opts @@ -87,7 +88,7 @@ namespace eval rw11 { # proc setup_tt {{cpu "cpu0"} args} { # process and check options - args2opts opt {ndl 2 dlrlim 0 ndz 0 to7bit 0 app 0 nbck 1} {*}$args + args2opts opt {ndl 2 dlrrlim 0 ndz 0 to7bit 0 app 0 nbck 1} {*}$args # check option values if {$opt(ndl) < 1 || $opt(ndl) > 2} { @@ -118,8 +119,8 @@ namespace eval rw11 { set unit "${cntl}0" ${cpu}${unit} att "tcp:?port=${port}" ${cpu}${unit} set log "tirri_${unit}.log${urlopt}" - if {$opt(dlrlim) != 0} { - ${cpu}${cntl} set rxrlim 7 + if {$opt(dlrrlim) != 0} { + ${cpu}${cntl} set rxrlim $opt(dlrrlim) } if {$opt(to7bit) != 0} { ${cpu}${unit} set to7bit 1