mirror of
https://github.com/wfjm/w11.git
synced 2026-03-10 12:58:23 +00:00
consolidate DL,LP,PC after lessons learned in DZ
- ibdr_{dl,lp,pc}11_buf: size->fuse rename; re-organize rlim handling
- ibd_{dl,lp,pc}11/util.tcl: size->fuse rename
- tbench/{dl,lp,pc}11/test_*.tcl: size->fuse rename
- librw11/Rw11CntlDL11: size->fuse rename; use unit.StatInc[RT]x
- librw11/Rw11Cntl{LP,LP}11: size->fuse rename
This commit is contained in:
@@ -46,6 +46,9 @@ The full set of tests is only run for tagged releases.
|
||||
- dz11/dz11echo.mac: port multiplexer echo tester and traffic generator
|
||||
|
||||
### Changes
|
||||
- consolidate DL,LP,PC after lessons learned in DZ implementation
|
||||
- use 'fuse' for fifo usage instead of 'size'
|
||||
- re-organize rlim handling (move to r.ibsel = '0' section)
|
||||
- tools changes
|
||||
- RtraceTools: TraceBuffer: add level 5 (full word dump)
|
||||
- Rw11Cntl: UnitSetupAll(): now virtual
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- $Id: ibdr_dl11_buf.vhd 1144 2019-05-01 18:39:26Z mueller $
|
||||
-- $Id: ibdr_dl11_buf.vhd 1156 2019-05-31 18:22:40Z mueller $
|
||||
--
|
||||
-- Copyright 2019- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
--
|
||||
@@ -23,6 +23,7 @@
|
||||
--
|
||||
-- Revision History:
|
||||
-- Date Rev Version Comment
|
||||
-- 2019-05-31 1156 1.0.1 size->fuse rename; re-organize rlim handling
|
||||
-- 2019-04-26 1139 1.0 Initial version (derived from ibdr_{dl11,pc11_buf})
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
@@ -69,8 +70,8 @@ architecture syn of ibdr_dl11_buf is
|
||||
constant rcsr_ibf_rlb : integer := 4;
|
||||
constant rcsr_ibf_fclr : integer := 1;
|
||||
|
||||
subtype rbuf_ibf_rsize is integer range AWIDTH-1+8 downto 8;
|
||||
subtype rbuf_ibf_xsize is integer range AWIDTH-1 downto 0;
|
||||
subtype rbuf_ibf_rfuse is integer range AWIDTH-1+8 downto 8;
|
||||
subtype rbuf_ibf_xfuse is integer range AWIDTH-1 downto 0;
|
||||
subtype rbuf_ibf_data is integer range 7 downto 0;
|
||||
|
||||
subtype xcsr_ibf_xrlim is integer range 14 downto 12;
|
||||
@@ -81,7 +82,7 @@ architecture syn of ibdr_dl11_buf is
|
||||
constant xcsr_ibf_fclr : integer := 1;
|
||||
|
||||
constant xbuf_ibf_xval : integer := 15;
|
||||
subtype xbuf_ibf_size is integer range AWIDTH-1+8 downto 8;
|
||||
subtype xbuf_ibf_fuse is integer range AWIDTH-1+8 downto 8;
|
||||
subtype xbuf_ibf_data is integer range 7 downto 0;
|
||||
|
||||
type regs_type is record -- state registers
|
||||
@@ -106,7 +107,7 @@ architecture syn of ibdr_dl11_buf is
|
||||
'0' -- xintreq
|
||||
);
|
||||
|
||||
constant c_size1 : slv(AWIDTH-1 downto 0) := slv(to_unsigned(1,AWIDTH));
|
||||
constant c_fuse1 : slv(AWIDTH-1 downto 0) := slv(to_unsigned(1,AWIDTH));
|
||||
|
||||
signal R_REGS : regs_type := regs_init;
|
||||
signal N_REGS : regs_type := regs_init;
|
||||
@@ -117,7 +118,7 @@ architecture syn of ibdr_dl11_buf is
|
||||
signal RBUF_RESET : slbit := '0';
|
||||
signal RBUF_EMPTY : slbit := '0';
|
||||
signal RBUF_FULL : slbit := '0';
|
||||
signal RBUF_SIZE : slv(AWIDTH-1 downto 0) := (others=>'0');
|
||||
signal RBUF_FUSE : slv(AWIDTH-1 downto 0) := (others=>'0');
|
||||
|
||||
signal XBUF_CE : slbit := '0';
|
||||
signal XBUF_WE : slbit := '0';
|
||||
@@ -125,7 +126,7 @@ architecture syn of ibdr_dl11_buf is
|
||||
signal XBUF_RESET : slbit := '0';
|
||||
signal XBUF_EMPTY : slbit := '0';
|
||||
signal XBUF_FULL : slbit := '0';
|
||||
signal XBUF_SIZE : slv(AWIDTH-1 downto 0) := (others=>'0');
|
||||
signal XBUF_FUSE : slv(AWIDTH-1 downto 0) := (others=>'0');
|
||||
|
||||
signal RRLIM_START : slbit := '0';
|
||||
signal RRLIM_BUSY : slbit := '0';
|
||||
@@ -151,7 +152,7 @@ begin
|
||||
DO => RBUF_DO,
|
||||
EMPTY => RBUF_EMPTY,
|
||||
FULL => RBUF_FULL,
|
||||
SIZE => RBUF_SIZE
|
||||
SIZE => RBUF_FUSE
|
||||
);
|
||||
|
||||
XBUF : fifo_simple_dram
|
||||
@@ -167,7 +168,7 @@ begin
|
||||
DO => XBUF_DO,
|
||||
EMPTY => XBUF_EMPTY,
|
||||
FULL => XBUF_FULL,
|
||||
SIZE => XBUF_SIZE
|
||||
SIZE => XBUF_FUSE
|
||||
);
|
||||
|
||||
RRLIM : ib_rlim_slv
|
||||
@@ -210,8 +211,8 @@ begin
|
||||
end process proc_regs;
|
||||
|
||||
proc_next : process (R_REGS, IB_MREQ, EI_ACK_RX, EI_ACK_TX, RESET,
|
||||
RBUF_DO, RBUF_EMPTY, RBUF_FULL, RBUF_SIZE, RRLIM_BUSY,
|
||||
XBUF_DO, XBUF_EMPTY, XBUF_FULL, XBUF_SIZE, XRLIM_BUSY)
|
||||
RBUF_DO, RBUF_EMPTY, RBUF_FULL, RBUF_FUSE, RRLIM_BUSY,
|
||||
XBUF_DO, XBUF_EMPTY, XBUF_FULL, XBUF_FUSE, XRLIM_BUSY)
|
||||
variable r : regs_type := regs_init;
|
||||
variable n : regs_type := regs_init;
|
||||
variable idout : slv16 := (others=>'0');
|
||||
@@ -258,7 +259,7 @@ begin
|
||||
end if;
|
||||
|
||||
-- ibus transactions
|
||||
if r.ibsel = '1' then
|
||||
if r.ibsel = '1' then -- ibus selected ---------------------
|
||||
case IB_MREQ.addr(2 downto 1) is
|
||||
|
||||
when ibaddr_rcsr => -- RCSR -- receive control status ----
|
||||
@@ -299,20 +300,20 @@ begin
|
||||
if IB_MREQ.racc = '0' then -- cpu ---------------------
|
||||
idout(rbuf_ibf_data) := RBUF_DO;
|
||||
if ibrd = '1' then -- rbuf read
|
||||
n.rdone := '0'; -- clear done
|
||||
n.rintreq := '0'; -- cancel interrupt
|
||||
end if;
|
||||
if ibrd='1' and r.rdone='1' then -- rbuf write
|
||||
irbufce := '1'; -- read next value from fifo
|
||||
irbufwe := '0';
|
||||
if RBUF_SIZE = c_size1 then -- last value (size=1)
|
||||
ilam := '1'; -- rri lam
|
||||
if r.rdone='1' then -- data available ?
|
||||
irbufce := '1'; -- read next from fifo
|
||||
irbufwe := '0';
|
||||
if RBUF_FUSE = c_fuse1 then -- last value (fuse=1) ?
|
||||
ilam := '1'; -- rri lam
|
||||
end if;
|
||||
end if;
|
||||
irrlimsta := '1'; -- start rx timer
|
||||
end if;
|
||||
|
||||
else -- rri ---------------------
|
||||
idout(rbuf_ibf_rsize) := RBUF_SIZE;
|
||||
idout(rbuf_ibf_xsize) := XBUF_SIZE;
|
||||
idout(rbuf_ibf_rfuse) := RBUF_FUSE;
|
||||
idout(rbuf_ibf_xfuse) := XBUF_FUSE;
|
||||
if ibw0 = '1' then
|
||||
if RBUF_FULL = '0' then -- fifo not full
|
||||
irbufce := '1'; -- write to fifo
|
||||
@@ -359,8 +360,9 @@ begin
|
||||
|
||||
if IB_MREQ.racc = '0' then -- cpu ---------------------
|
||||
if ibw0 = '1' then
|
||||
ixrlimsta := '1'; -- start transmitter timer
|
||||
if r.xrdy = '1' then -- ignore buf write when rdy=0
|
||||
n.xrdy := '0'; -- clear ready
|
||||
n.xintreq := '0'; -- cancel interrupt
|
||||
if XBUF_FULL = '0' then -- fifo not full
|
||||
ixbufce := '1'; -- write to fifo
|
||||
ixbufwe := '1';
|
||||
@@ -373,7 +375,7 @@ begin
|
||||
|
||||
else -- rri ---------------------
|
||||
idout(xbuf_ibf_xval) := not XBUF_EMPTY;
|
||||
idout(xbuf_ibf_size) := XBUF_SIZE;
|
||||
idout(xbuf_ibf_fuse) := XBUF_FUSE;
|
||||
idout(xbuf_ibf_data) := XBUF_DO;
|
||||
if ibrd = '1' then
|
||||
if XBUF_EMPTY = '0' then -- fifo not empty
|
||||
@@ -387,8 +389,30 @@ begin
|
||||
|
||||
when others => null;
|
||||
end case;
|
||||
|
||||
else -- ibus not selected -----------------
|
||||
-- handle rx done, timer and interrupt
|
||||
if RBUF_EMPTY='0' and RRLIM_BUSY='0' then -- not empty and not busy ?
|
||||
if r.rdone = '0' then -- done not set ?
|
||||
n.rdone := '1'; -- set done
|
||||
irrlimsta := '1'; -- start timer
|
||||
if r.rie = '1' then -- irupts enabled ?
|
||||
n.rintreq := '1'; -- request rx interrupt
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
|
||||
end if;
|
||||
-- handle tx ready, timer and interrupt
|
||||
if XBUF_FULL='0' and XRLIM_BUSY='0' then -- not full and not busy ?
|
||||
if r.xrdy = '0' then -- ready not set ?
|
||||
n.xrdy := '1'; -- set ready
|
||||
ixrlimsta := '1'; -- start timer
|
||||
if r.xie = '1' then -- irupts enabled ?
|
||||
n.xintreq := '1'; -- request tx interrupt
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
end if; -- else r.ibsel='1'
|
||||
|
||||
-- other state changes
|
||||
|
||||
@@ -399,25 +423,6 @@ begin
|
||||
n.xintreq := '0';
|
||||
end if;
|
||||
|
||||
if (RRLIM_BUSY or RBUF_EMPTY) = '1' then -- busy or fifo empty
|
||||
n.rdone := '0'; -- clear done
|
||||
else -- not busy and data valid
|
||||
n.rdone := '1'; -- set 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;
|
||||
|
||||
if (XRLIM_BUSY or XBUF_FULL) ='1' then -- busy or fifo full
|
||||
n.xrdy := '0'; -- clear ready
|
||||
n.xintreq := '0'; -- clear interrupt
|
||||
else -- not busy and fifo not full
|
||||
n.xrdy := '1'; -- set ready
|
||||
if r.xrdy='0' and r.xie='1' then -- ready going 0->1 and ie=1
|
||||
n.xintreq := '1'; -- request interrupt
|
||||
end if;
|
||||
end if;
|
||||
|
||||
N_REGS <= n;
|
||||
|
||||
RBUF_RESET <= irbufrst;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- $Id: ibdr_lp11_buf.vhd 1138 2019-04-26 08:14:56Z mueller $
|
||||
-- $Id: ibdr_lp11_buf.vhd 1156 2019-05-31 18:22:40Z mueller $
|
||||
--
|
||||
-- Copyright 2019- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
--
|
||||
@@ -23,6 +23,7 @@
|
||||
--
|
||||
-- Revision History:
|
||||
-- Date Rev Version Comment
|
||||
-- 2019-05-31 1156 1.0.4 size->fuse rename; re-organize rlim handling
|
||||
-- 2019-04-24 1138 1.0.3 add csr.ir (intreq monitor)
|
||||
-- 2019-04-20 1134 1.0.2 remove fifo clear on BRESET
|
||||
-- 2019-04-14 1131 1.0.1 RLIM_CEV now slv8
|
||||
@@ -76,7 +77,7 @@ architecture syn of ibdr_lp11_buf is
|
||||
constant csr_ibf_ie : integer := 6;
|
||||
constant csr_ibf_ir : integer := 5;
|
||||
constant buf_ibf_val : integer := 15;
|
||||
subtype buf_ibf_size is integer range AWIDTH-1+8 downto 8;
|
||||
subtype buf_ibf_fuse is integer range AWIDTH-1+8 downto 8;
|
||||
subtype buf_ibf_data is integer range 6 downto 0;
|
||||
|
||||
type regs_type is record -- state registers
|
||||
@@ -106,7 +107,7 @@ architecture syn of ibdr_lp11_buf is
|
||||
signal PBUF_RESET : slbit := '0';
|
||||
signal PBUF_EMPTY : slbit := '0';
|
||||
signal PBUF_FULL : slbit := '0';
|
||||
signal PBUF_SIZE : slv(AWIDTH-1 downto 0) := (others=>'0');
|
||||
signal PBUF_FUSE : slv(AWIDTH-1 downto 0) := (others=>'0');
|
||||
|
||||
signal RLIM_START : slbit := '0';
|
||||
signal RLIM_BUSY : slbit := '0';
|
||||
@@ -130,7 +131,7 @@ begin
|
||||
DO => PBUF_DO,
|
||||
EMPTY => PBUF_EMPTY,
|
||||
FULL => PBUF_FULL,
|
||||
SIZE => PBUF_SIZE
|
||||
SIZE => PBUF_FUSE
|
||||
);
|
||||
|
||||
RLIM : ib_rlim_slv
|
||||
@@ -161,7 +162,7 @@ begin
|
||||
end process proc_regs;
|
||||
|
||||
proc_next : process (R_REGS, IB_MREQ, EI_ACK, RESET, BRESET,
|
||||
PBUF_DO, PBUF_EMPTY, PBUF_FULL, PBUF_SIZE, RLIM_BUSY)
|
||||
PBUF_DO, PBUF_EMPTY, PBUF_FULL, PBUF_FUSE, RLIM_BUSY)
|
||||
variable r : regs_type := regs_init;
|
||||
variable n : regs_type := regs_init;
|
||||
variable idout : slv16 := (others=>'0');
|
||||
@@ -198,7 +199,7 @@ begin
|
||||
end if;
|
||||
|
||||
-- ibus transactions
|
||||
if r.ibsel = '1' then
|
||||
if r.ibsel = '1' then -- ibus selected ---------------------
|
||||
case IB_MREQ.addr(1 downto 1) is
|
||||
|
||||
when ibaddr_csr => -- CSR -- control status -------------
|
||||
@@ -236,8 +237,9 @@ begin
|
||||
|
||||
if IB_MREQ.racc = '0' then -- cpu
|
||||
if ibw0 = '1' then
|
||||
irlimsta := '1'; -- in all cases start timer
|
||||
if r.done = '1' then -- ignore buf write when done=0
|
||||
n.done := '0'; -- clear done
|
||||
n.intreq := '0'; -- clear interrupt
|
||||
if r.err = '0' then -- if online (handle via rbus)
|
||||
if PBUF_FULL = '0' then -- fifo not full
|
||||
ipbufce := '1'; -- write to fifo
|
||||
@@ -254,7 +256,7 @@ begin
|
||||
|
||||
else -- rri
|
||||
idout(buf_ibf_val) := not PBUF_EMPTY;
|
||||
idout(buf_ibf_size) := PBUF_SIZE;
|
||||
idout(buf_ibf_fuse) := PBUF_FUSE;
|
||||
idout(buf_ibf_data) := PBUF_DO;
|
||||
if ibrd = '1' then
|
||||
if PBUF_EMPTY = '0' then -- fifo not empty
|
||||
@@ -269,24 +271,24 @@ begin
|
||||
when others => null;
|
||||
end case;
|
||||
|
||||
end if;
|
||||
else -- ibus not selected -----------------
|
||||
-- handle done, timer and interrupt
|
||||
if PBUF_FULL='0' and RLIM_BUSY='0' then -- not full and not busy ?
|
||||
if r.done = '0' then -- done not set ?
|
||||
n.done := '1'; -- set done
|
||||
irlimsta := '1'; -- start timer
|
||||
if r.err='0' and r.ie='1' then -- err=0 and irupt enabled ?
|
||||
n.intreq := '1'; -- request interrupt
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
end if; -- else r.ibsel='1'
|
||||
|
||||
-- other state changes
|
||||
if EI_ACK = '1' then
|
||||
n.intreq := '0';
|
||||
end if;
|
||||
|
||||
if (RLIM_BUSY or PBUF_FULL) ='1' then -- busy or fifo full
|
||||
n.done := '0'; -- clear done
|
||||
n.intreq := '0'; -- clear interrupt
|
||||
else -- not busy and fifo not full
|
||||
n.done := '1'; -- set done
|
||||
if r.done='0' and -- done going 0->1
|
||||
r.err='0' and r.ie='1' then -- and err=0 and interrupt enabled
|
||||
n.intreq := '1'; -- request interrupt
|
||||
end if;
|
||||
end if;
|
||||
|
||||
N_REGS <= n;
|
||||
|
||||
PBUF_RESET <= RESET or r.err;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- $Id: ibdr_pc11_buf.vhd 1139 2019-04-27 14:00:38Z mueller $
|
||||
-- $Id: ibdr_pc11_buf.vhd 1156 2019-05-31 18:22:40Z mueller $
|
||||
--
|
||||
-- Copyright 2019- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
--
|
||||
@@ -23,6 +23,7 @@
|
||||
--
|
||||
-- Revision History:
|
||||
-- Date Rev Version Comment
|
||||
-- 2019-05-31 1156 1.0.1 size->fuse rename; re-organize rlim handling
|
||||
-- 2019-04-24 1137 1.0 Initial version
|
||||
-- 2019-04-07 1129 0.1 First draft (derived from ibdr_pc11)
|
||||
------------------------------------------------------------------------------
|
||||
@@ -78,8 +79,8 @@ architecture syn of ibdr_pc11_buf is
|
||||
constant rcsr_ibf_renb : integer := 0;
|
||||
|
||||
constant rbuf_ibf_rbusy : integer := 15;
|
||||
subtype rbuf_ibf_rsize is integer range AWIDTH-1+8 downto 8;
|
||||
subtype rbuf_ibf_psize is integer range AWIDTH-1 downto 0;
|
||||
subtype rbuf_ibf_rfuse is integer range AWIDTH-1+8 downto 8;
|
||||
subtype rbuf_ibf_pfuse is integer range AWIDTH-1 downto 0;
|
||||
subtype rbuf_ibf_data is integer range 7 downto 0;
|
||||
|
||||
constant pcsr_ibf_perr : integer := 15;
|
||||
@@ -90,7 +91,7 @@ architecture syn of ibdr_pc11_buf is
|
||||
constant pcsr_ibf_rlb : integer := 4;
|
||||
|
||||
constant pbuf_ibf_pval : integer := 15;
|
||||
subtype pbuf_ibf_size is integer range AWIDTH-1+8 downto 8;
|
||||
subtype pbuf_ibf_fuse is integer range AWIDTH-1+8 downto 8;
|
||||
subtype pbuf_ibf_data is integer range 7 downto 0;
|
||||
|
||||
type regs_type is record -- state registers
|
||||
@@ -123,7 +124,7 @@ architecture syn of ibdr_pc11_buf is
|
||||
'0' -- pintreq
|
||||
);
|
||||
|
||||
constant c_size1 : slv(AWIDTH-1 downto 0) := slv(to_unsigned(1,AWIDTH));
|
||||
constant c_fuse1 : slv(AWIDTH-1 downto 0) := slv(to_unsigned(1,AWIDTH));
|
||||
|
||||
signal R_REGS : regs_type := regs_init;
|
||||
signal N_REGS : regs_type := regs_init;
|
||||
@@ -134,7 +135,7 @@ architecture syn of ibdr_pc11_buf is
|
||||
signal RBUF_RESET : slbit := '0';
|
||||
signal RBUF_EMPTY : slbit := '0';
|
||||
signal RBUF_FULL : slbit := '0';
|
||||
signal RBUF_SIZE : slv(AWIDTH-1 downto 0) := (others=>'0');
|
||||
signal RBUF_FUSE : slv(AWIDTH-1 downto 0) := (others=>'0');
|
||||
|
||||
signal PBUF_CE : slbit := '0';
|
||||
signal PBUF_WE : slbit := '0';
|
||||
@@ -142,7 +143,7 @@ architecture syn of ibdr_pc11_buf is
|
||||
signal PBUF_RESET : slbit := '0';
|
||||
signal PBUF_EMPTY : slbit := '0';
|
||||
signal PBUF_FULL : slbit := '0';
|
||||
signal PBUF_SIZE : slv(AWIDTH-1 downto 0) := (others=>'0');
|
||||
signal PBUF_FUSE : slv(AWIDTH-1 downto 0) := (others=>'0');
|
||||
|
||||
signal RRLIM_START : slbit := '0';
|
||||
signal RRLIM_BUSY : slbit := '0';
|
||||
@@ -168,7 +169,7 @@ begin
|
||||
DO => RBUF_DO,
|
||||
EMPTY => RBUF_EMPTY,
|
||||
FULL => RBUF_FULL,
|
||||
SIZE => RBUF_SIZE
|
||||
SIZE => RBUF_FUSE
|
||||
);
|
||||
|
||||
PBUF : fifo_simple_dram
|
||||
@@ -184,7 +185,7 @@ begin
|
||||
DO => PBUF_DO,
|
||||
EMPTY => PBUF_EMPTY,
|
||||
FULL => PBUF_FULL,
|
||||
SIZE => PBUF_SIZE
|
||||
SIZE => PBUF_FUSE
|
||||
);
|
||||
|
||||
RRLIM : ib_rlim_slv
|
||||
@@ -229,8 +230,8 @@ begin
|
||||
end process proc_regs;
|
||||
|
||||
proc_next : process (R_REGS, IB_MREQ, EI_ACK_PTR, EI_ACK_PTP, RESET,
|
||||
RBUF_DO, RBUF_EMPTY, RBUF_FULL, RBUF_SIZE, RRLIM_BUSY,
|
||||
PBUF_DO, PBUF_EMPTY, PBUF_FULL, PBUF_SIZE, PRLIM_BUSY)
|
||||
RBUF_DO, RBUF_EMPTY, RBUF_FULL, RBUF_FUSE, RRLIM_BUSY,
|
||||
PBUF_DO, PBUF_EMPTY, PBUF_FULL, PBUF_FUSE, PRLIM_BUSY)
|
||||
variable r : regs_type := regs_init;
|
||||
variable n : regs_type := regs_init;
|
||||
variable idout : slv16 := (others=>'0');
|
||||
@@ -275,7 +276,7 @@ begin
|
||||
end if;
|
||||
|
||||
-- ibus transactions
|
||||
if r.ibsel = '1' then
|
||||
if r.ibsel = '1' then -- ibus selected ---------------------
|
||||
case IB_MREQ.addr(2 downto 1) is
|
||||
|
||||
when ibaddr_rcsr => -- RCSR -- reader control status -----
|
||||
@@ -300,11 +301,11 @@ begin
|
||||
end if;
|
||||
if IB_MREQ.din(rcsr_ibf_renb) = '1' then -- set RENB
|
||||
if r.rerr = '0' then -- if not in error state
|
||||
n.rbusy := '1'; -- set busy
|
||||
n.rbusy := '1'; -- set busy
|
||||
n.rdone := '0'; -- clear done
|
||||
n.rintreq := '0'; -- cancel interrupt
|
||||
n.rique := '0'; -- and que flag
|
||||
n.riack := '0'; -- and ack flag
|
||||
irrlimsta := '1'; -- start reader timer
|
||||
n.rique := '0'; -- and que flag
|
||||
n.riack := '0'; -- and ack flag
|
||||
else -- if in error state
|
||||
if r.rie = '1' then -- if interrupts on
|
||||
n.rintreq := '1'; -- request interrupt
|
||||
@@ -352,7 +353,7 @@ begin
|
||||
if r.rdone = '1' then -- data available
|
||||
irbufce := '1'; -- read next value from fifo
|
||||
irbufwe := '0';
|
||||
if RBUF_SIZE = c_size1 then -- last value (size=1)
|
||||
if RBUF_FUSE = c_fuse1 then -- last value (fuse=1)
|
||||
ilam := '1'; -- rri lam
|
||||
end if;
|
||||
end if;
|
||||
@@ -360,8 +361,8 @@ begin
|
||||
|
||||
else -- rri ---------------------
|
||||
idout(rbuf_ibf_rbusy) := r.rbusy;
|
||||
idout(rbuf_ibf_rsize) := RBUF_SIZE;
|
||||
idout(rbuf_ibf_psize) := PBUF_SIZE;
|
||||
idout(rbuf_ibf_rfuse) := RBUF_FUSE;
|
||||
idout(rbuf_ibf_pfuse) := PBUF_FUSE;
|
||||
if ibw0 = '1' then
|
||||
if RBUF_FULL = '0' then -- fifo not full
|
||||
irbufce := '1'; -- write to fifo
|
||||
@@ -414,8 +415,9 @@ begin
|
||||
if IB_MREQ.racc = '0' then -- cpu ---------------------
|
||||
if ibw0 = '1' then
|
||||
if r.perr = '0' then -- if not in error state
|
||||
iprlimsta := '1'; -- start puncher timer
|
||||
if r.prdy = '1' then -- ignore buf write when rdy=0
|
||||
if r.prdy = '1' then -- ignore buf write when rdy=0
|
||||
n.prdy := '0'; -- clear ready
|
||||
n.pintreq := '0'; -- cancel interrupt
|
||||
if PBUF_FULL = '0' then -- fifo not full
|
||||
ipbufce := '1'; -- write to fifo
|
||||
ipbufwe := '1';
|
||||
@@ -433,7 +435,7 @@ begin
|
||||
|
||||
else -- rri ---------------------
|
||||
idout(pbuf_ibf_pval) := not PBUF_EMPTY;
|
||||
idout(pbuf_ibf_size) := PBUF_SIZE;
|
||||
idout(pbuf_ibf_fuse) := PBUF_FUSE;
|
||||
idout(pbuf_ibf_data) := PBUF_DO;
|
||||
if ibrd = '1' then
|
||||
if PBUF_EMPTY = '0' then -- fifo not empty
|
||||
@@ -448,7 +450,32 @@ begin
|
||||
when others => null;
|
||||
end case;
|
||||
|
||||
end if;
|
||||
else -- ibus not selected -----------------
|
||||
-- handle pr done, timer and interrupt
|
||||
if RBUF_EMPTY='0' and RRLIM_BUSY='0' then -- not empty and not busy ?
|
||||
if r.rbusy = '1' then -- reader enabled ?
|
||||
n.rbusy := '0'; -- clear busy
|
||||
n.rdone := '1'; -- set done
|
||||
irrlimsta := '1'; -- start timer
|
||||
if r.rdone='0' and -- done going 0->1
|
||||
r.rerr='0' and r.rie='1' then -- and err=0 and ie=1
|
||||
n.rintreq := '1'; -- request interrupt
|
||||
n.rique := '1'; -- and set que flag
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
|
||||
-- handle pp ready, timer and interrupt
|
||||
if PBUF_FULL='0' and PRLIM_BUSY='0' then -- not full and not busy ?
|
||||
if r.prdy = '0' then -- ready not set ?
|
||||
n.prdy := '1'; -- set ready
|
||||
iprlimsta := '1'; -- start timer
|
||||
if r.perr='0' and r.pie='1' then -- err=0 and irupt enabled
|
||||
n.pintreq := '1'; -- request interrupt
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
end if; -- else r.ibsel='1'
|
||||
|
||||
-- other state changes
|
||||
if EI_ACK_PTR = '1' then
|
||||
@@ -458,31 +485,6 @@ begin
|
||||
if EI_ACK_PTP = '1' then
|
||||
n.pintreq := '0';
|
||||
end if;
|
||||
|
||||
if (RRLIM_BUSY or RBUF_EMPTY) ='1' then -- timer busy or fifo empty
|
||||
n.rdone := '0'; -- clear done
|
||||
else -- timer not busy and fifo not empty
|
||||
if r.rbusy = '1' then -- reader enabled ?
|
||||
n.rbusy := '0'; -- clear busy
|
||||
n.rdone := '1'; -- set done
|
||||
if r.rdone='0' and -- done going 0->1
|
||||
r.rerr='0' and r.rie='1' then -- and err=0 and ie=1
|
||||
n.rintreq := '1'; -- request interrupt
|
||||
n.rique := '1'; -- and set que flag
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
|
||||
if (PRLIM_BUSY or PBUF_FULL) ='1' then -- busy or fifo full
|
||||
n.prdy := '0'; -- clear ready
|
||||
n.pintreq := '0'; -- clear interrupt
|
||||
else -- not busy and fifo not full
|
||||
n.prdy := '1'; -- set ready
|
||||
if r.prdy='0' and -- ready going 0->1
|
||||
r.perr='0' and r.pie='1' then -- and err=0 and interrupt enabled
|
||||
n.pintreq := '1'; -- request interrupt
|
||||
end if;
|
||||
end if;
|
||||
|
||||
N_REGS <= n;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// $Id: Rw11CntlDL11.cpp 1148 2019-05-12 10:10:44Z mueller $
|
||||
// $Id: Rw11CntlDL11.cpp 1157 2019-05-31 18:32:14Z mueller $
|
||||
//
|
||||
// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2019-05-31 1156 1.5.1 size->fuse rename; use unit.StatInc[RT]x
|
||||
// 2019-04-27 1139 1.5 add dl11_buf readout
|
||||
// 2019-04-19 1133 1.4.2 use ExecWibr(),ExecRibr()
|
||||
// 2019-04-14 1131 1.4.1 proper unit init, call UnitSetupAll() in Start()
|
||||
@@ -81,18 +82,18 @@ 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_V_RSIZE;
|
||||
const uint16_t Rw11CntlDL11::kRBUF_B_RSIZE;
|
||||
const uint16_t Rw11CntlDL11::kRBUF_M_BUF;
|
||||
const uint16_t Rw11CntlDL11::kRBUF_V_RFUSE;
|
||||
const uint16_t Rw11CntlDL11::kRBUF_B_RFUSE;
|
||||
const uint16_t Rw11CntlDL11::kRBUF_M_DATA;
|
||||
|
||||
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::kXCSR_M_FCLR;
|
||||
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;
|
||||
const uint16_t Rw11CntlDL11::kXBUF_V_FUSE;
|
||||
const uint16_t Rw11CntlDL11::kXBUF_B_FUSE;
|
||||
const uint16_t Rw11CntlDL11::kXBUF_M_DATA;
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Default constructor
|
||||
@@ -107,17 +108,14 @@ Rw11CntlDL11::Rw11CntlDL11()
|
||||
fItype(0),
|
||||
fFsize(0),
|
||||
fTxRblkSize(4),
|
||||
fTxQueBusy(false)
|
||||
fTxQueBusy(false),
|
||||
fLastRbuf(0)
|
||||
{
|
||||
// must be here because Units have a back-ptr (not available at Rw11CntlBase)
|
||||
fspUnit[0].reset(new Rw11UnitDL11(this, 0)); // single unit controller
|
||||
|
||||
fStats.Define(kStatNRxBlk, "NRxBlk" , "wblk done");
|
||||
fStats.Define(kStatNTxQue, "NTxQue" , "rblk queued");
|
||||
fStats.Define(kStatNRxChar, "NRxChar", "input char");
|
||||
fStats.Define(kStatNRxLine, "NRxLine", "input lines");
|
||||
fStats.Define(kStatNTxChar, "NTxChar", "output char");
|
||||
fStats.Define(kStatNTxLine, "NTxLine", "output lines");
|
||||
}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
@@ -198,11 +196,16 @@ void Rw11CntlDL11::Wakeup()
|
||||
{
|
||||
if (fspUnit[0]->RcvQueueEmpty()) return; // spurious call
|
||||
|
||||
uint16_t rbuf = Cpu().ExecRibr(fBase+kRBUF);
|
||||
if (!Buffered()) {
|
||||
RxProcessUnbuf();
|
||||
uint16_t rbuf = Cpu().ExecRibr(fBase+kRBUF);
|
||||
uint16_t rfuse = (rbuf >>kRBUF_V_RFUSE) & kRBUF_B_RFUSE;
|
||||
if (rfuse == 0) RxProcessUnbuf();
|
||||
} else {
|
||||
RxProcessBuf(rbuf);
|
||||
uint16_t rfuse = (fLastRbuf>>kRBUF_V_RFUSE) & kRBUF_B_RFUSE;
|
||||
if (rfuse > fFsize/2) {
|
||||
fLastRbuf = Cpu().ExecRibr(fBase+kRBUF);
|
||||
}
|
||||
RxProcessBuf(fLastRbuf);
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -265,6 +268,7 @@ void Rw11CntlDL11::Dump(std::ostream& os, int ind, const char* text,
|
||||
os << bl << " fFsize: " << RosPrintf(fFsize,"d",3) << endl;
|
||||
os << bl << " fTxRblkSize: " << RosPrintf(fTxRblkSize,"d",3) << endl;
|
||||
os << bl << " fTxQueBusy: " << RosPrintf(fTxQueBusy) << endl;
|
||||
os << bl << " fTLastRbuf: " << RosPrintf(fLastRbuf) << endl;
|
||||
|
||||
Rw11CntlBase<Rw11UnitDL11,1>::Dump(os, ind, " ^", detail);
|
||||
return;
|
||||
@@ -282,8 +286,9 @@ int Rw11CntlDL11::AttnHandler(RlinkServer::AttnArgs& args)
|
||||
ProcessUnbuf(fPrimClist[fPC_rbuf].Data(),
|
||||
fPrimClist[fPC_xbuf].Data());
|
||||
} else { // buffered iface ----------------
|
||||
RxProcessBuf(fPrimClist[fPC_rbuf].Data());
|
||||
TxProcessBuf(fPrimClist[fPC_xbuf], true, fPrimClist[fPC_rbuf].Data());
|
||||
fLastRbuf = fPrimClist[fPC_rbuf].Data();
|
||||
TxProcessBuf(fPrimClist[fPC_xbuf], true, fLastRbuf);
|
||||
RxProcessBuf(fLastRbuf);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -294,17 +299,16 @@ int Rw11CntlDL11::AttnHandler(RlinkServer::AttnArgs& args)
|
||||
|
||||
void Rw11CntlDL11::ProcessUnbuf(uint16_t rbuf, uint16_t xbuf)
|
||||
{
|
||||
uint8_t ochr = xbuf & kXBUF_M_BUF;
|
||||
uint16_t rsize = (rbuf >>kRBUF_V_RSIZE) & kRBUF_B_RSIZE;
|
||||
uint8_t ochr = xbuf & kXBUF_M_DATA;
|
||||
uint16_t rfuse = (rbuf >>kRBUF_V_RFUSE) & kRBUF_B_RFUSE;
|
||||
bool xval = xbuf & kXBUF_M_VAL;
|
||||
|
||||
if (fTraceLevel>0) TraceChar('t', xbuf, ochr);
|
||||
if (xval) {
|
||||
fspUnit[0]->Snd(&ochr, 1);
|
||||
fStats.Inc(kStatNTxChar);
|
||||
if (ochr == '\n') fStats.Inc(kStatNTxLine); // for output count LF
|
||||
fspUnit[0]->StatIncTx(ochr);
|
||||
}
|
||||
if (rsize==0 && !fspUnit[0]->RcvQueueEmpty()) RxProcessUnbuf();
|
||||
if (rfuse==0 && !fspUnit[0]->RcvQueueEmpty()) RxProcessUnbuf();
|
||||
}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
@@ -314,8 +318,7 @@ void Rw11CntlDL11::ProcessUnbuf(uint16_t rbuf, uint16_t xbuf)
|
||||
void Rw11CntlDL11::RxProcessUnbuf()
|
||||
{
|
||||
uint8_t ichr = fspUnit[0]->RcvQueueNext();
|
||||
fStats.Inc(kStatNRxChar);
|
||||
if (ichr == '\r') fStats.Inc(kStatNRxLine); // on input count CR
|
||||
fspUnit[0]->StatIncRx(ichr);
|
||||
if (fTraceLevel>0) TraceChar('r', 0, ichr);
|
||||
Cpu().ExecWibr(fBase+kRBUF, ichr);
|
||||
return;
|
||||
@@ -326,28 +329,27 @@ void Rw11CntlDL11::RxProcessUnbuf()
|
||||
|
||||
void Rw11CntlDL11::RxProcessBuf(uint16_t rbuf)
|
||||
{
|
||||
uint16_t rsize = (rbuf >>kRBUF_V_RSIZE) & kRBUF_B_RSIZE;
|
||||
uint16_t rfuse = (rbuf >>kRBUF_V_RFUSE) & kRBUF_B_RFUSE;
|
||||
|
||||
if (rsize >= fRxQlim) return; // no space in fifo -> quit
|
||||
if (rfuse >= fRxQlim) return; // no space in fifo -> quit
|
||||
if (fspUnit[0]->RcvQueueEmpty()) return; // no data available -> quit
|
||||
|
||||
uint16_t qsiz = fspUnit[0]->RcvQueueSize();
|
||||
uint16_t nmax = fRxQlim - rsize; // limit is fifo space
|
||||
uint16_t nmax = fRxQlim - rfuse; // limit is fifo space
|
||||
if (qsiz < nmax) nmax = qsiz; // or avail data
|
||||
|
||||
vector<uint16_t> iblock;
|
||||
iblock.reserve(nmax);
|
||||
for (uint16_t i = 0; i<nmax; i++) {
|
||||
uint8_t ichr = fspUnit[0]->RcvQueueNext();
|
||||
if (ichr == '\r') fStats.Inc(kStatNRxLine); // on input count CR
|
||||
iblock.push_back(uint16_t(ichr));
|
||||
fspUnit[0]->StatIncRx(ichr);
|
||||
}
|
||||
fStats.Inc(kStatNRxChar,double(nmax));
|
||||
|
||||
if (fTraceLevel > 0) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << "-I " << Name() << ":"
|
||||
<< " rsize=" << RosPrintf(rsize,"d",3)
|
||||
lmsg << "-I " << Name() << ": rx"
|
||||
<< " rfuse=" << RosPrintf(rfuse,"d",3)
|
||||
<< " size=" << RosPrintf(iblock.size(),"d",3);
|
||||
if (fTraceLevel > 1) RtraceTools::TraceBuffer(lmsg, iblock.data(),
|
||||
iblock.size(), fTraceLevel);
|
||||
@@ -356,7 +358,10 @@ void Rw11CntlDL11::RxProcessBuf(uint16_t rbuf)
|
||||
fStats.Inc(kStatNRxBlk);
|
||||
RlinkCommandList clist;
|
||||
Cpu().AddWbibr(clist, fBase+kRBUF, move(iblock));
|
||||
int irbuf = Cpu().AddRibr(clist, fBase+kRBUF);
|
||||
Server().Exec(clist);
|
||||
|
||||
fLastRbuf = clist[irbuf].Data(); // remember rbuf after fifo write
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -369,37 +374,35 @@ void Rw11CntlDL11::TxProcessBuf(const RlinkCommand& cmd, bool prim,
|
||||
{
|
||||
const uint16_t* xbuf = cmd.BlockPointer();
|
||||
size_t done = cmd.BlockDone();
|
||||
if (done == 0) return;
|
||||
|
||||
uint16_t fbeg = 0;
|
||||
uint16_t fend = 0;
|
||||
uint16_t fdel = 0;
|
||||
uint16_t smin = 0;
|
||||
uint16_t smax = 0;
|
||||
uint16_t fumin = 0;
|
||||
uint16_t fumax = 0;
|
||||
|
||||
if (done > 0) {
|
||||
fbeg = (xbuf[0] >>kXBUF_V_SIZE) & kXBUF_B_SIZE;
|
||||
fend = (xbuf[done-1]>>kXBUF_V_SIZE) & kXBUF_B_SIZE;
|
||||
fdel = fbeg-fend+1;
|
||||
smin = kFifoMaxSize;
|
||||
fbeg = (xbuf[0] >>kXBUF_V_FUSE) & kXBUF_B_FUSE;
|
||||
fend = (xbuf[done-1]>>kXBUF_V_FUSE) & kXBUF_B_FUSE;
|
||||
fdel = fbeg-fend+1;
|
||||
fumin = kFifoMaxSize;
|
||||
|
||||
uint8_t ochr[kFifoMaxSize];
|
||||
for (size_t i=0; i < done; i++) {
|
||||
uint16_t size = (xbuf[i]>>kXBUF_V_SIZE) & kXBUF_B_SIZE;
|
||||
ochr[i] = xbuf[i] & kXBUF_M_BUF;
|
||||
if (ochr[i] == '\n') fStats.Inc(kStatNTxLine); // for output count LF
|
||||
smin = min(smin,size);
|
||||
smax = max(smax,size);
|
||||
}
|
||||
fStats.Inc(kStatNTxChar,double(done));
|
||||
fspUnit[0]->Snd(ochr, done);
|
||||
uint8_t ochr[kFifoMaxSize];
|
||||
for (size_t i=0; i < done; i++) {
|
||||
uint16_t fuse = (xbuf[i]>>kXBUF_V_FUSE) & kXBUF_B_FUSE;
|
||||
ochr[i] = xbuf[i] & kXBUF_M_DATA;
|
||||
fumin = min(fumin,fuse);
|
||||
fumax = max(fumax,fuse);
|
||||
fspUnit[0]->StatIncTx(ochr[i]);
|
||||
}
|
||||
fspUnit[0]->Snd(ochr, done);
|
||||
|
||||
// determine next chunk size from highest fifo 'size' field, at least 4
|
||||
fTxRblkSize = max(uint16_t(4), max(uint16_t(done),smax));
|
||||
// determine next chunk size from highest fifo 'fuse' field, at least 4
|
||||
fTxRblkSize = max(uint16_t(4), max(uint16_t(done),fumax));
|
||||
|
||||
// queue further reads when queue idle and fifo not emptied
|
||||
// check for 'size==1' not seen in current read
|
||||
if ((!fTxQueBusy) && smin > 1) { // if smin>1 no size==1 seen
|
||||
if ((!fTxQueBusy) && fumin > 1) { // if fumin>1 no fuse==1 seen
|
||||
fStats.Inc(kStatNTxQue);
|
||||
fTxQueBusy = true;
|
||||
Server().QueueAction(bind(&Rw11CntlDL11::TxRcvHandler, this));
|
||||
@@ -407,20 +410,20 @@ void Rw11CntlDL11::TxProcessBuf(const RlinkCommand& cmd, bool prim,
|
||||
|
||||
if (fTraceLevel > 0) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << "-I " << Name() << ":"
|
||||
<< " prim=" << prim
|
||||
<< " size=" << RosPrintf(cmd.BlockSize(),"d",3)
|
||||
<< " done=" << RosPrintf(done,"d",3)
|
||||
lmsg << "-I " << Name() << ": tx"
|
||||
<< " pr,si,do=" << prim
|
||||
<< "," << RosPrintf(cmd.BlockSize(),"d",3)
|
||||
<< "," << RosPrintf(done,"d",3)
|
||||
<< " fifo=" << RosPrintf(fbeg,"d",3)
|
||||
<< "," << RosPrintf(fend,"d",3)
|
||||
<< ";" << RosPrintf(fdel,"d",3)
|
||||
<< "," << RosPrintf(done-fdel,"d",3)
|
||||
<< ";" << RosPrintf(smax,"d",3)
|
||||
<< "," << RosPrintf(smin,"d",3)
|
||||
<< ";" << RosPrintf(fumax,"d",3)
|
||||
<< "," << RosPrintf(fumin,"d",3)
|
||||
<< " que=" << fTxQueBusy;
|
||||
if (prim) {
|
||||
uint16_t rsize = (rbuf >>kRBUF_V_RSIZE) & kRBUF_B_RSIZE;
|
||||
lmsg << " rsize=" << RosPrintf(rsize,"d",3);
|
||||
uint16_t rfuse = (rbuf >>kRBUF_V_RFUSE) & kRBUF_B_RFUSE;
|
||||
lmsg << " rfuse=" << RosPrintf(rfuse,"d",3);
|
||||
}
|
||||
|
||||
if (fTraceLevel > 1) RtraceTools::TraceBuffer(lmsg, xbuf,
|
||||
@@ -444,8 +447,12 @@ int Rw11CntlDL11::TxRcvHandler()
|
||||
Cpu().AddRbibr(clist, fBase+kXBUF, fTxRblkSize);
|
||||
clist[0].SetExpectStatus(0, RlinkCommand::kStat_M_RbTout |
|
||||
RlinkCommand::kStat_M_RbNak);
|
||||
int irbuf = Cpu().AddRibr(clist, fBase+kRBUF);
|
||||
|
||||
Server().Exec(clist);
|
||||
TxProcessBuf(clist[0], false, 0);
|
||||
|
||||
fLastRbuf = clist[irbuf].Data();
|
||||
TxProcessBuf(clist[0], false, fLastRbuf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// $Id: Rw11CntlDL11.hpp 1140 2019-04-28 10:21:21Z mueller $
|
||||
// $Id: Rw11CntlDL11.hpp 1156 2019-05-31 18:22:40Z mueller $
|
||||
//
|
||||
// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2019-05-30 1155 1.4.1 size->fuse rename; use unit.StatInc[RT]x
|
||||
// 2019-04-26 1139 1.4 add dl11_buf readout
|
||||
// 2019-04-06 1126 1.3 xbuf.val in msb; rrdy in rbuf (new iface)
|
||||
// 2017-05-14 897 1.2 add RcvChar(),TraceChar()
|
||||
@@ -84,27 +85,23 @@ namespace Retro {
|
||||
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 = kWBit01; //!< rcsr.fclr mask
|
||||
static const uint16_t kRBUF_V_RSIZE = 8; //!< rbuf.rsize shift
|
||||
static const uint16_t kRBUF_B_RSIZE = 0177; //!< rbuf.rsize bit mask
|
||||
static const uint16_t kRBUF_M_BUF = 0377; //!< rbuf data mask
|
||||
static const uint16_t kRBUF_V_RFUSE = 8; //!< rbuf.rfuse shift
|
||||
static const uint16_t kRBUF_B_RFUSE = 0177; //!< rbuf.rfuse bit mask
|
||||
static const uint16_t kRBUF_M_DATA = 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 kXCSR_M_FCLR = kWBit01; //!< xcsr.fclr 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
|
||||
static const uint16_t kXBUF_V_FUSE = 8; //!< xbuf.fuse shift
|
||||
static const uint16_t kXBUF_B_FUSE = 0177; //!< xbuf.fuse bit mask
|
||||
static const uint16_t kXBUF_M_DATA = 0xff; //!< xbuf data mask
|
||||
|
||||
// statistics counter indices
|
||||
enum stats {
|
||||
kStatNRxBlk= Rw11Cntl::kDimStat, //!< done wblk
|
||||
kStatNTxQue, //!< queue rblk
|
||||
kStatNRxChar, //!< input char
|
||||
kStatNRxLine, //!< input lines
|
||||
kStatNTxChar, //!< output char
|
||||
kStatNTxLine, //!< output lines
|
||||
kDimStat
|
||||
};
|
||||
|
||||
@@ -128,6 +125,7 @@ namespace Retro {
|
||||
uint16_t fFsize; //!< fifo size
|
||||
uint16_t fTxRblkSize; //!< tx rblk chunk size
|
||||
bool fTxQueBusy; //!< tx queue busy
|
||||
uint16_t fLastRbuf; //!< last seen rbuf
|
||||
};
|
||||
|
||||
} // end namespace Retro
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// $Id: Rw11CntlLP11.cpp 1140 2019-04-28 10:21:21Z mueller $
|
||||
// $Id: Rw11CntlLP11.cpp 1156 2019-05-31 18:22:40Z mueller $
|
||||
//
|
||||
// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2019-05-30 1155 1.3.5 size->fuse rename
|
||||
// 2019-04-27 1140 1.3.4 use RtraceTools::
|
||||
// 2019-04-19 1133 1.3.3 use ExecWibr()
|
||||
// 2019-04-14 1131 1.3.2 remove SetOnline(), use UnitSetup()
|
||||
@@ -79,9 +80,9 @@ const uint16_t Rw11CntlLP11::kCSR_B_RLIM;
|
||||
const uint16_t Rw11CntlLP11::kCSR_V_TYPE;
|
||||
const uint16_t Rw11CntlLP11::kCSR_B_TYPE;
|
||||
const uint16_t Rw11CntlLP11::kBUF_M_VAL;
|
||||
const uint16_t Rw11CntlLP11::kBUF_V_SIZE;
|
||||
const uint16_t Rw11CntlLP11::kBUF_B_SIZE;
|
||||
const uint16_t Rw11CntlLP11::kBUF_M_BUF;
|
||||
const uint16_t Rw11CntlLP11::kBUF_V_FUSE;
|
||||
const uint16_t Rw11CntlLP11::kBUF_B_FUSE;
|
||||
const uint16_t Rw11CntlLP11::kBUF_M_DATA;
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Default constructor
|
||||
@@ -228,7 +229,7 @@ int Rw11CntlLP11::AttnHandler(RlinkServer::AttnArgs& args)
|
||||
void Rw11CntlLP11::ProcessUnbuf(uint16_t buf)
|
||||
{
|
||||
bool val = buf & kBUF_M_VAL;
|
||||
uint8_t ochr = buf & kBUF_M_BUF;
|
||||
uint8_t ochr = buf & kBUF_M_DATA;
|
||||
|
||||
if (val) WriteChar(ochr);
|
||||
|
||||
@@ -287,33 +288,33 @@ void Rw11CntlLP11::ProcessBuf(const RlinkCommand& cmd, bool prim)
|
||||
<< ": prim=1 call and queue busy";
|
||||
}
|
||||
|
||||
uint16_t fbeg = 0;
|
||||
uint16_t fend = 0;
|
||||
uint16_t fdel = 0;
|
||||
uint16_t smin = 0;
|
||||
uint16_t smax = 0;
|
||||
uint16_t fbeg = 0;
|
||||
uint16_t fend = 0;
|
||||
uint16_t fdel = 0;
|
||||
uint16_t fumin = 0;
|
||||
uint16_t fumax = 0;
|
||||
|
||||
if (done > 0) {
|
||||
fbeg = (pbuf[0] >>kBUF_V_SIZE) & kBUF_B_SIZE;
|
||||
fend = (pbuf[done-1]>>kBUF_V_SIZE) & kBUF_B_SIZE;
|
||||
fdel = fbeg-fend+1;
|
||||
smin = kFifoMaxSize;
|
||||
fbeg = (pbuf[0] >>kBUF_V_FUSE) & kBUF_B_FUSE;
|
||||
fend = (pbuf[done-1]>>kBUF_V_FUSE) & kBUF_B_FUSE;
|
||||
fdel = fbeg-fend+1;
|
||||
fumin = kFifoMaxSize;
|
||||
}
|
||||
|
||||
for (size_t i=0; i < done; i++) {
|
||||
uint8_t ochr = pbuf[i] & kBUF_M_BUF;
|
||||
uint16_t size = (pbuf[i]>>kBUF_V_SIZE) & kBUF_B_SIZE;
|
||||
smin = min(smin,size);
|
||||
smax = max(smax,size);
|
||||
uint8_t ochr = pbuf[i] & kBUF_M_DATA;
|
||||
uint16_t fuse = (pbuf[i]>>kBUF_V_FUSE) & kBUF_B_FUSE;
|
||||
fumin = min(fumin,fuse);
|
||||
fumax = max(fumax,fuse);
|
||||
WriteChar(ochr);
|
||||
}
|
||||
|
||||
// determine next chunk size from highest fifo 'size' field, at least 4
|
||||
fRblkSize = max(uint16_t(4), max(uint16_t(done),smax));
|
||||
// determine next chunk size from highest fifo 'fuse' field, at least 4
|
||||
fRblkSize = max(uint16_t(4), max(uint16_t(done),fumax));
|
||||
|
||||
// queue further reads when fifo not emptied
|
||||
// check for 'size==1' not seen in current read
|
||||
if (smin > 1) { // if smin>1 no size==1 seen
|
||||
// check for 'fuse==1' not seen in current read
|
||||
if (fumin > 1) { // if fumin>1 no fuse==1 seen
|
||||
if (fQueBusy) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << "-E " << Name()
|
||||
@@ -328,15 +329,15 @@ void Rw11CntlLP11::ProcessBuf(const RlinkCommand& cmd, bool prim)
|
||||
if (fTraceLevel > 0) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << "-I " << Name() << ":"
|
||||
<< " prim=" << prim
|
||||
<< " size=" << RosPrintf(cmd.BlockSize(),"d",3)
|
||||
<< " done=" << RosPrintf(done,"d",3)
|
||||
<< " pr,si,do=" << prim
|
||||
<< "," << RosPrintf(cmd.BlockSize(),"d",3)
|
||||
<< "," << RosPrintf(done,"d",3)
|
||||
<< " fifo=" << RosPrintf(fbeg,"d",3)
|
||||
<< "," << RosPrintf(fend,"d",3)
|
||||
<< ";" << RosPrintf(fdel,"d",3)
|
||||
<< "," << RosPrintf(done-fdel,"d",3)
|
||||
<< ";" << RosPrintf(smax,"d",3)
|
||||
<< "," << RosPrintf(smin,"d",3)
|
||||
<< ";" << RosPrintf(fumax,"d",3)
|
||||
<< "," << RosPrintf(fumin,"d",3)
|
||||
<< " que=" << fQueBusy;
|
||||
|
||||
if (fTraceLevel > 1) RtraceTools::TraceBuffer(lmsg, pbuf,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// $Id: Rw11CntlLP11.hpp 1140 2019-04-28 10:21:21Z mueller $
|
||||
// $Id: Rw11CntlLP11.hpp 1155 2019-05-31 06:38:06Z mueller $
|
||||
//
|
||||
// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2019-05-30 1155 1.2.3 size->fuse rename
|
||||
// 2019-04-14 1131 1.2.2 remove SetOnline(), use UnitSetup()
|
||||
// 2019-04-07 1127 1.2.1 add fQueBusy and queue protection
|
||||
// 2019-03-17 1123 1.2 buf.val in msb; add lp11_buf readout
|
||||
@@ -75,9 +76,9 @@ namespace Retro {
|
||||
static const uint16_t kCSR_V_TYPE = 8; //!< csr.type shift
|
||||
static const uint16_t kCSR_B_TYPE = 0007; //!< csr.type bit mask
|
||||
static const uint16_t kBUF_M_VAL = kWBit15; //!< buf.val mask
|
||||
static const uint16_t kBUF_V_SIZE = 8; //!< buf.size shift
|
||||
static const uint16_t kBUF_B_SIZE = 0177; //!< buf.size bit mask
|
||||
static const uint16_t kBUF_M_BUF = 0177; //!< buf data mask
|
||||
static const uint16_t kBUF_V_FUSE = 8; //!< buf.fuse shift
|
||||
static const uint16_t kBUF_B_FUSE = 0177; //!< buf.fuse bit mask
|
||||
static const uint16_t kBUF_M_DATA = 0177; //!< buf data mask
|
||||
|
||||
// statistics counter indices
|
||||
enum stats {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// $Id: Rw11CntlPC11.cpp 1140 2019-04-28 10:21:21Z mueller $
|
||||
// $Id: Rw11CntlPC11.cpp 1157 2019-05-31 18:32:14Z mueller $
|
||||
//
|
||||
// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2019-05-31 1156 1.5.2 size->fuse rename
|
||||
// 2019-04-27 1140 1.5.1 use RtraceTools::
|
||||
// 2019-04-20 1134 1.5 add pc11_buf readout
|
||||
// 2019-04-13 1131 1.4.1 BootCode(): boot loader rewritten
|
||||
@@ -86,17 +87,17 @@ 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::kRBUF_V_FUSE;
|
||||
const uint16_t Rw11CntlPC11::kRBUF_B_FUSE;
|
||||
const uint16_t Rw11CntlPC11::kRBUF_M_DATA;
|
||||
|
||||
const uint16_t Rw11CntlPC11::kPCSR_M_ERROR;
|
||||
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;
|
||||
const uint16_t Rw11CntlPC11::kPBUF_V_FUSE;
|
||||
const uint16_t Rw11CntlPC11::kPBUF_B_FUSE;
|
||||
const uint16_t Rw11CntlPC11::kPBUF_M_DATA;
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! Default constructor
|
||||
@@ -331,7 +332,7 @@ void Rw11CntlPC11::AttachDone(size_t ind)
|
||||
// if reader is attached pre-fill the fifo
|
||||
if (ind == kUnit_PR && Buffered()) {
|
||||
fPrDrain = kPrDrain_Idle; // clear drain state
|
||||
PrProcessBuf(0); // and pre-fill
|
||||
PrProcessBuf(kRBUF_M_RBUSY); // and pre-fill
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -377,8 +378,8 @@ int Rw11CntlPC11::AttnHandler(RlinkServer::AttnArgs& args)
|
||||
ProcessUnbuf(fPrimClist[fPC_rbuf].Data(),
|
||||
fPrimClist[fPC_pbuf].Data());
|
||||
} else { // buffered iface ----------------
|
||||
PrProcessBuf(fPrimClist[fPC_rbuf].Data());
|
||||
PpProcessBuf(fPrimClist[fPC_pbuf], true, fPrimClist[fPC_rbuf].Data());
|
||||
PrProcessBuf(fPrimClist[fPC_rbuf].Data());
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -391,7 +392,7 @@ void Rw11CntlPC11::ProcessUnbuf(uint16_t rbuf, uint16_t pbuf)
|
||||
{
|
||||
bool rbusy = rbuf & kRBUF_M_RBUSY;
|
||||
bool pval = pbuf & kPBUF_M_VAL;
|
||||
uint8_t ochr = pbuf & kPBUF_M_BUF;
|
||||
uint8_t ochr = pbuf & kPBUF_M_DATA;
|
||||
|
||||
if (pval) { // punch valid -------------------
|
||||
if (pval) PpWriteChar(ochr);
|
||||
@@ -458,12 +459,15 @@ void Rw11CntlPC11::PpWriteChar(uint8_t ochr)
|
||||
|
||||
void Rw11CntlPC11::PrProcessBuf(uint16_t rbuf)
|
||||
{
|
||||
uint16_t rsize = (rbuf >>kRBUF_V_SIZE) & kRBUF_B_SIZE;
|
||||
bool rbusy = rbuf & kRBUF_M_RBUSY;
|
||||
uint16_t rfuse = (rbuf >>kRBUF_V_FUSE) & kRBUF_B_FUSE;
|
||||
uint8_t ichr = 0;
|
||||
RerrMsg emsg;
|
||||
|
||||
if (! rbusy) return; // quit if no data requested
|
||||
|
||||
if (fPrDrain == kPrDrain_Pend) { // eof/err seen and draining
|
||||
if (rsize == 0) { // draining done, last char read
|
||||
if (rfuse == 0) { // draining done, last char read
|
||||
if (fTraceLevel>0) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << "-I " << Name() << ": set reader offline after fifo drained";
|
||||
@@ -476,9 +480,9 @@ void Rw11CntlPC11::PrProcessBuf(uint16_t rbuf)
|
||||
|
||||
if (fPrDrain == kPrDrain_Pend || // draining ongoing or done -> quit
|
||||
fPrDrain == kPrDrain_Done) return;
|
||||
if (rsize >= fPrQlim) return; // no space in fifo -> quit
|
||||
if (rfuse >= fPrQlim) return; // no space in fifo -> quit
|
||||
|
||||
uint16_t nmax = fPrQlim - rsize;
|
||||
uint16_t nmax = fPrQlim - rfuse;
|
||||
vector<uint16_t> iblock;
|
||||
iblock.reserve(nmax);
|
||||
for (uint16_t i = 0; i<nmax; i++) {
|
||||
@@ -502,8 +506,8 @@ void Rw11CntlPC11::PrProcessBuf(uint16_t rbuf)
|
||||
if (iblock.size() > 0) {
|
||||
if (fTraceLevel > 0) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << "-I " << Name() << ":"
|
||||
<< " rsize=" << RosPrintf(rsize,"d",3)
|
||||
lmsg << "-I " << Name() << ": pr"
|
||||
<< " rfuse=" << RosPrintf(rfuse,"d",3)
|
||||
<< " drain=" << fPrDrain
|
||||
<< " size=" << RosPrintf(iblock.size(),"d",3);
|
||||
if (fTraceLevel > 1) RtraceTools::TraceBuffer(lmsg, iblock.data(),
|
||||
@@ -517,7 +521,7 @@ void Rw11CntlPC11::PrProcessBuf(uint16_t rbuf)
|
||||
|
||||
} else {
|
||||
// if no byte to send, eof seen, and fifo empty --> go offline immediately
|
||||
if (rsize == 0 && fPrDrain == kPrDrain_Pend) {
|
||||
if (rfuse == 0 && fPrDrain == kPrDrain_Pend) {
|
||||
if (fTraceLevel>0) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << "-I " << Name() << ": set reader offline immediately";
|
||||
@@ -538,34 +542,33 @@ void Rw11CntlPC11::PpProcessBuf(const RlinkCommand& cmd, bool prim,
|
||||
{
|
||||
const uint16_t* pbuf = cmd.BlockPointer();
|
||||
size_t done = cmd.BlockDone();
|
||||
if (done == 0) return;
|
||||
|
||||
uint16_t fbeg = 0;
|
||||
uint16_t fend = 0;
|
||||
uint16_t fdel = 0;
|
||||
uint16_t smin = 0;
|
||||
uint16_t smax = 0;
|
||||
uint16_t fbeg = 0;
|
||||
uint16_t fend = 0;
|
||||
uint16_t fdel = 0;
|
||||
uint16_t fumin = 0;
|
||||
uint16_t fumax = 0;
|
||||
|
||||
if (done > 0) {
|
||||
fbeg = (pbuf[0] >>kPBUF_V_SIZE) & kPBUF_B_SIZE;
|
||||
fend = (pbuf[done-1]>>kPBUF_V_SIZE) & kPBUF_B_SIZE;
|
||||
fdel = fbeg-fend+1;
|
||||
smin = kFifoMaxSize;
|
||||
}
|
||||
fbeg = (pbuf[0] >>kPBUF_V_FUSE) & kPBUF_B_FUSE;
|
||||
fend = (pbuf[done-1]>>kPBUF_V_FUSE) & kPBUF_B_FUSE;
|
||||
fdel = fbeg-fend+1;
|
||||
fumin = kFifoMaxSize;
|
||||
|
||||
for (size_t i=0; i < done; i++) {
|
||||
uint8_t ochr = pbuf[i] & kPBUF_M_BUF;
|
||||
uint16_t size = (pbuf[i]>>kPBUF_V_SIZE) & kPBUF_B_SIZE;
|
||||
smin = min(smin,size);
|
||||
smax = max(smax,size);
|
||||
uint8_t ochr = pbuf[i] & kPBUF_M_DATA;
|
||||
uint16_t fuse = (pbuf[i]>>kPBUF_V_FUSE) & kPBUF_B_FUSE;
|
||||
fumin = min(fumin,fuse);
|
||||
fumax = max(fumax,fuse);
|
||||
PpWriteChar(ochr);
|
||||
}
|
||||
|
||||
// determine next chunk size from highest fifo 'size' field, at least 4
|
||||
fPpRblkSize = max(uint16_t(4), max(uint16_t(done),smax));
|
||||
// determine next chunk size from highest fifo 'fuse' field, at least 4
|
||||
fPpRblkSize = max(uint16_t(4), max(uint16_t(done),fumax));
|
||||
|
||||
// queue further reads when queue idle and fifo not emptied
|
||||
// check for 'size==1' not seen in current read
|
||||
if ((!fPpQueBusy) && smin > 1) { // if smin>1 no size==1 seen
|
||||
// check for 'fuse==1' not seen in current read
|
||||
if ((!fPpQueBusy) && fumin > 1) { // if fumin>1 no fuse==1 seen
|
||||
fStats.Inc(kStatNPpQue);
|
||||
fPpQueBusy = true;
|
||||
Server().QueueAction(bind(&Rw11CntlPC11::PpRcvHandler, this));
|
||||
@@ -573,20 +576,20 @@ void Rw11CntlPC11::PpProcessBuf(const RlinkCommand& cmd, bool prim,
|
||||
|
||||
if (fTraceLevel > 0) {
|
||||
RlogMsg lmsg(LogFile());
|
||||
lmsg << "-I " << Name() << ":"
|
||||
<< " prim=" << prim
|
||||
<< " size=" << RosPrintf(cmd.BlockSize(),"d",3)
|
||||
<< " done=" << RosPrintf(done,"d",3)
|
||||
lmsg << "-I " << Name() << ": pp"
|
||||
<< " pr,si,do=" << prim
|
||||
<< "," << RosPrintf(cmd.BlockSize(),"d",3)
|
||||
<< "," << RosPrintf(done,"d",3)
|
||||
<< " fifo=" << RosPrintf(fbeg,"d",3)
|
||||
<< "," << RosPrintf(fend,"d",3)
|
||||
<< ";" << RosPrintf(fdel,"d",3)
|
||||
<< "," << RosPrintf(done-fdel,"d",3)
|
||||
<< ";" << RosPrintf(smax,"d",3)
|
||||
<< "," << RosPrintf(smin,"d",3)
|
||||
<< ";" << RosPrintf(fumax,"d",3)
|
||||
<< "," << RosPrintf(fumin,"d",3)
|
||||
<< " que=" << fPpQueBusy;
|
||||
if (prim) {
|
||||
uint16_t rsize = (rbuf >>kRBUF_V_SIZE) & kRBUF_B_SIZE;
|
||||
lmsg << " rsize=" << RosPrintf(rsize,"d",3);
|
||||
uint16_t rfuse = (rbuf >>kRBUF_V_FUSE) & kRBUF_B_FUSE;
|
||||
lmsg << " rfuse=" << RosPrintf(rfuse,"d",3);
|
||||
}
|
||||
|
||||
if (fTraceLevel > 1) RtraceTools::TraceBuffer(lmsg, pbuf,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// $Id: Rw11CntlPC11.hpp 1140 2019-04-28 10:21:21Z mueller $
|
||||
// $Id: Rw11CntlPC11.hpp 1155 2019-05-31 06:38:06Z mueller $
|
||||
//
|
||||
// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2019-05-30 1155 1.4.1 size->fuse rename
|
||||
// 2019-04-20 1134 1.4 add pc11_buf readout
|
||||
// 2019-04-14 1131 1.3.1 remove SetOnline(), use UnitSetup()
|
||||
// 2019-04-06 1126 1.3 pbuf.val in msb; rbusy in rbuf (new iface)
|
||||
@@ -90,17 +91,17 @@ namespace Retro {
|
||||
static const uint16_t kRCSR_B_TYPE = 0007; //!< rcsr.type bit mask
|
||||
static const uint16_t kRCSR_M_FCLR = kWBit01; //!< 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 kRBUF_V_FUSE = 8; //!< rbuf.fuse shift
|
||||
static const uint16_t kRBUF_B_FUSE = 0177; //!< rbuf.fuse bit mask
|
||||
static const uint16_t kRBUF_M_DATA = 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
|
||||
static const uint16_t kPBUF_V_FUSE = 8; //!< pbuf.fuse shift
|
||||
static const uint16_t kPBUF_B_FUSE = 0177; //!< pbuf.fuse bit mask
|
||||
static const uint16_t kPBUF_M_DATA = 0377; //!< pbuf data mask
|
||||
|
||||
// statistics counter indices
|
||||
enum stats {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# $Id: test_dl11_loop.tcl 1139 2019-04-27 14:00:38Z mueller $
|
||||
# $Id: test_dl11_loop.tcl 1155 2019-05-31 06:38:06Z mueller $
|
||||
#
|
||||
# Copyright 2019- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
# License disclaimer see License.txt in $RETROBASE directory
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-05-30 1155 1.0.1 size->fuse rename
|
||||
# 2019-04-26 1139 1.0 Initial version (derived from test_pc11_loop.tcl)
|
||||
#
|
||||
# Test DL11 combined receiver + transmitter response
|
||||
@@ -95,7 +96,7 @@ set pdata {}
|
||||
for {set i 0} { $i < $nbyte } {incr i} {
|
||||
set v [expr {$nbyte-$i-1}]
|
||||
lappend rdata $v
|
||||
lappend pdata [regbldkv ibd_dl11::RXBUF val 1 size [expr {$nbyte-$i}] data $v]
|
||||
lappend pdata [regbldkv ibd_dl11::RXBUF val 1 fuse [expr {$nbyte-$i}] data $v]
|
||||
}
|
||||
|
||||
rw11::asmrun $cpu sym
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# $Id: test_dl11_rx.tcl 1140 2019-04-28 10:21:21Z mueller $
|
||||
# $Id: test_dl11_rx.tcl 1155 2019-05-31 06:38:06Z mueller $
|
||||
#
|
||||
# Copyright 2019- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
# License disclaimer see License.txt in $RETROBASE directory
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-05-30 1155 1.0.1 size->fuse rename
|
||||
# 2019-04-26 1139 1.0 Initial version (derived from test_pc11_pr.tcl)
|
||||
#
|
||||
# Test DL11 receiver response
|
||||
@@ -70,18 +71,18 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
rlc log " A2: test data response (unbuffered) -----------------------"
|
||||
rlc log " A2.1: rem write, loc read ------------------------"
|
||||
|
||||
# test RSIZE=0
|
||||
# rem wr buf --> test DONE=1 RSIZE=1 (1 cmd delay)
|
||||
# loc rd buf --> test DONE=0 RSIZE=0;
|
||||
# test RFUSE=0
|
||||
# rem wr buf --> test DONE=1 RFUSE=1 (1 cmd delay)
|
||||
# loc rd buf --> test DONE=0 RFUSE=0;
|
||||
$cpu cp \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rsize 0}] \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rfuse 0}] \
|
||||
-wibr tta.rbuf 0107 \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rsize 1}] \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rfuse 1}] \
|
||||
-rma tta.rcsr \
|
||||
-rma tta.rcsr -edata [regbld ibd_dl11::RCSR done] \
|
||||
-rma tta.rbuf -edata 0107 \
|
||||
-rma tta.rcsr -edata [regbld ibd_dl11::RCSR ] \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rsize 0}]
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rfuse 0}]
|
||||
|
||||
# expect and harvest attn (drop other attn potentially triggered by breset)
|
||||
rlc wtlam 1.
|
||||
@@ -108,25 +109,25 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
rlc exec -attn -edata $attndl $attndl
|
||||
|
||||
rlc log " A2.2: test fifo csr.fclr clears and breset doesn't"
|
||||
# rem wr buf --> test rbuf.size=1
|
||||
# rem wr buf --> test rbuf.size=2
|
||||
# 2* rem wr buf --> test rbuf.size=4
|
||||
# breset --> test rbuf.size=4
|
||||
# 3* rem wr buf --> test rbuf.size=7
|
||||
# csr.fclr --> test rbuf.size=0
|
||||
# rem wr buf --> test rbuf.fuse=1
|
||||
# rem wr buf --> test rbuf.fuse=2
|
||||
# 2* rem wr buf --> test rbuf.fuse=4
|
||||
# breset --> test rbuf.fuse=4
|
||||
# 3* rem wr buf --> test rbuf.fuse=7
|
||||
# csr.fclr --> test rbuf.fuse=0
|
||||
$cpu cp \
|
||||
-wibr tta.rbuf 0xaa \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rsize 1}] \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rfuse 1}] \
|
||||
-wibr tta.rbuf 0x55 \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rsize 2}] \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rfuse 2}] \
|
||||
-wbibr tta.rbuf {0x11 0x22} \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rsize 4}] \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rfuse 4}] \
|
||||
-breset \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rsize 4}] \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rfuse 4}] \
|
||||
-wbibr tta.rbuf {0x33 0x44 0x55} \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rsize 7}] \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rfuse 7}] \
|
||||
-wibr tta.rcsr [regbld ibd_dl11::RRCSR fclr] \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rsize 0}]
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rfuse 0}]
|
||||
# harvest breset/creset triggered attn's
|
||||
rlc exec -attn
|
||||
rlc wtlam 0.
|
||||
@@ -135,34 +136,34 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
rlc log " A3.1: fill and overfill fifo ---------------------"
|
||||
set rdata {}
|
||||
for {set i 0} { $i < $fsize } {incr i} { lappend rdata [expr {$i+0100}] }
|
||||
# rem wr fsize bytes --> test rbuf.size=fsize
|
||||
# rem wr buf --> test error and rbuf.size=fsize
|
||||
# rem wr fsize bytes --> test rbuf.fuse=fsize
|
||||
# rem wr buf --> test error and rbuf.fuse=fsize
|
||||
# csr.fclr to discard data
|
||||
$cpu cp \
|
||||
-wbibr tta.rbuf $rdata \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF rsize $fsize] \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF rfuse $fsize] \
|
||||
-wibr tta.rbuf 0xff -estaterr \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF rsize $fsize] \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF rfuse $fsize] \
|
||||
-wibr tta.rcsr [regbld ibd_dl11::RRCSR fclr]
|
||||
|
||||
rlc log " A3.2: fill and empty fifo, attn on last read -----"
|
||||
# rem wr 2 bytes --> test rbuf.size=2
|
||||
# loc rd buf --> test data; test rbuf.size=1; test no attn
|
||||
# rem wr 2 bytes --> test rbuf.fuse=2
|
||||
# loc rd buf --> test data; test rbuf.fuse=1; test no attn
|
||||
$cpu cp \
|
||||
-wbibr tta.rbuf {0x55 0xaa} \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rsize 2}] \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rfuse 2}] \
|
||||
-rma tta.rcsr \
|
||||
-rma tta.rcsr -edata [regbld ibd_dl11::RCSR done] \
|
||||
-rma tta.rbuf -edata 0x55 \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rsize 1}]
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rfuse 1}]
|
||||
# test that no attn send
|
||||
rlc exec -attn -edata 0x0
|
||||
# loc rd buf --> test data; test rbuf.size=0; test attn seen
|
||||
# loc rd buf --> test data; test rbuf.fuse=0; test attn seen
|
||||
$cpu cp \
|
||||
-rma tta.rcsr \
|
||||
-rma tta.rcsr -edata [regbld ibd_dl11::RCSR done] \
|
||||
-rma tta.rbuf -edata 0xaa \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rsize 0}]
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {rfuse 0}]
|
||||
# expect and harvest attn
|
||||
rlc wtlam 1.
|
||||
rlc exec -attn -edata $attndl $attndl
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# $Id: test_dl11_tx.tcl 1140 2019-04-28 10:21:21Z mueller $
|
||||
# $Id: test_dl11_tx.tcl 1155 2019-05-31 06:38:06Z mueller $
|
||||
#
|
||||
# Copyright 2019- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
# License disclaimer see License.txt in $RETROBASE directory
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-05-30 1155 1.0.1 size->fuse rename
|
||||
# 2019-04-26 1139 1.0 Initial version (derived from test_pc11_pp.tcl)
|
||||
#
|
||||
# Test DL11 transmitter response
|
||||
@@ -74,19 +75,19 @@ if {$type > 0} { # if buffered test rlim
|
||||
if {$type == 0} { # unbuffered --------------------------
|
||||
rlc log " A2: test data response (unbuffered) -----------------------"
|
||||
rlc log " A2.1: loc write, rem read ------------------------"
|
||||
# --> test XSIZE=0
|
||||
# loc wr buf --> test RDY=0 XSIZE=1
|
||||
# --> test XFUSE=0
|
||||
# loc wr buf --> test RDY=0 XFUSE=1
|
||||
# loc rd buf --> test RDY=0 (loc read is noop); test attn send
|
||||
# rem wr buf --> test RDY=1 XSIZE=0
|
||||
# rem wr buf --> test RDY=1 XFUSE=0
|
||||
$cpu cp \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {xsize 0}] \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {xfuse 0}] \
|
||||
-wma tta.xbuf 0107 \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {xsize 1}] \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {xfuse 1}] \
|
||||
-rma tta.xcsr -edata [regbld ibd_dl11::XCSR] \
|
||||
-rma tta.xbuf \
|
||||
-rma tta.xcsr -edata [regbld ibd_dl11::XCSR] \
|
||||
-ribr tta.xbuf -edata [regbld ibd_dl11::RXBUF val {size 1} {data 0107} ] \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {xsize 0}] \
|
||||
-ribr tta.xbuf -edata [regbld ibd_dl11::RXBUF val {fuse 1} {data 0107} ] \
|
||||
-ribr tta.rbuf -edata [regbld ibd_dl11::RRBUF {xfuse 0}] \
|
||||
-rma tta.xcsr -edata [regbld ibd_dl11::XCSR rdy]
|
||||
# expect and harvest attn (drop other attn potentially triggered by breset)
|
||||
rlc wtlam 1.
|
||||
@@ -95,7 +96,7 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
rlc log " A2.2: 8 bit data; rdy set on breset --------------"
|
||||
$cpu cp \
|
||||
-wma tta.xbuf 0370 \
|
||||
-ribr tta.xbuf -edata [regbld ibd_dl11::RXBUF val {size 1} {data 0370} ] \
|
||||
-ribr tta.xbuf -edata [regbld ibd_dl11::RXBUF val {fuse 1} {data 0370} ] \
|
||||
-wma tta.xbuf 040 \
|
||||
-rma tta.xcsr -edata [regbld ibd_dl11::XCSR] \
|
||||
-breset \
|
||||
@@ -108,32 +109,32 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
set fsize [expr {(1<<$type)-1}]
|
||||
|
||||
rlc log " A2: test data response (basic fifo; AWIDTH=$type) --"
|
||||
rlc log " A2.1: loc write, rem read; rbuf.xsize check -------"
|
||||
# loc wr buf --> test RDY=1 rbuf.xsize=1
|
||||
rlc log " A2.1: loc write, rem read; rbuf.xfuse check -------"
|
||||
# loc wr buf --> test RDY=1 rbuf.xfuse=1
|
||||
# loc rd buf --> test RDY=1 (loc read is noop); test attn send
|
||||
# loc wr buf --> test RDY=1 rbuf.xsize=2
|
||||
# loc wr buf --> test RDY=1 rbuf.xsize=3
|
||||
# rem wr buf --> test VAL=1,SIZE=3 rbuf.xsize=2
|
||||
# rem wr buf --> test VAL=1,SIZE=2 rbuf.xsize=1
|
||||
# rem wr buf --> test VAL=1,SIZE=1 rbuf.xsize=0
|
||||
# loc wr buf --> test RDY=1 rbuf.xfuse=2
|
||||
# loc wr buf --> test RDY=1 rbuf.xfuse=3
|
||||
# rem wr buf --> test VAL=1,FUSE=3 rbuf.xfuse=2
|
||||
# rem wr buf --> test VAL=1,FUSE=2 rbuf.xfuse=1
|
||||
# rem wr buf --> test VAL=1,FUSE=1 rbuf.xfuse=0
|
||||
$cpu cp \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF xsize 0] \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF xfuse 0] \
|
||||
-wma tta.xbuf 031 \
|
||||
-rma tta.xcsr -edata [regbld ibd_dl11::XCSR rdy] \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF xsize 1] \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF xfuse 1] \
|
||||
-rma tta.xbuf \
|
||||
-wma tta.xbuf 032 \
|
||||
-rma tta.xcsr -edata [regbld ibd_dl11::XCSR rdy] \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF xsize 2] \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF xfuse 2] \
|
||||
-wma tta.xbuf 033 \
|
||||
-rma tta.xcsr -edata [regbld ibd_dl11::XCSR rdy] \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF xsize 3] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 size 3 data 031] \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF xsize 2] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 size 2 data 032] \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF xsize 1] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 size 1 data 033] \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF xsize 0] \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF xfuse 3] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 fuse 3 data 031] \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF xfuse 2] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 fuse 2 data 032] \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF xfuse 1] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 fuse 1 data 033] \
|
||||
-ribr tta.rbuf -edata [regbldkv ibd_dl11::RRBUF xfuse 0] \
|
||||
-rma tta.xcsr -edata [regbld ibd_dl11::XCSR rdy]
|
||||
# expect and harvest attn (drop other attn potentially triggered by breset)
|
||||
rlc wtlam 1.
|
||||
@@ -146,8 +147,8 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
-wma tta.xbuf 0340 \
|
||||
-wma tta.xbuf 0037 \
|
||||
-rbibr tta.xbuf 4 -estaterr -edone 2 -edata \
|
||||
[list [regbldkv ibd_dl11::RXBUF val 1 size 2 data 0340] \
|
||||
[regbldkv ibd_dl11::RXBUF val 1 size 1 data 0037] ]
|
||||
[list [regbldkv ibd_dl11::RXBUF val 1 fuse 2 data 0340] \
|
||||
[regbldkv ibd_dl11::RXBUF val 1 fuse 1 data 0037] ]
|
||||
# expect and harvest attn
|
||||
rlc wtlam 1.
|
||||
rlc exec -attn -edata $attndl
|
||||
@@ -158,8 +159,8 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
-wma tta.xbuf 042 \
|
||||
-breset \
|
||||
-rbibr tta.xbuf 3 -estaterr -edata \
|
||||
[list [regbldkv ibd_dl11::RXBUF val 1 size 2 data 0041] \
|
||||
[regbldkv ibd_dl11::RXBUF val 1 size 1 data 0042] ]
|
||||
[list [regbldkv ibd_dl11::RXBUF val 1 fuse 2 data 0041] \
|
||||
[regbldkv ibd_dl11::RXBUF val 1 fuse 1 data 0042] ]
|
||||
# expect and harvest attn (drop other attn potentially triggered by breset)
|
||||
rlc wtlam 1.
|
||||
rlc exec -attn -edata $attndl $attndl
|
||||
@@ -186,13 +187,13 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
# 1 loc wr -> no attn (2 in fifo; RDY=1)
|
||||
# 1 rem rd (1 in fifo; RDY=1)
|
||||
$cpu cp \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 size 2 data 051] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 fuse 2 data 051] \
|
||||
-wma tta.xbuf 053 \
|
||||
-rma tta.xcsr -edata [regbld ibd_dl11::XCSR rdy]
|
||||
|
||||
rlc exec -attn -edata 0x0
|
||||
$cpu cp \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 size 2 data 052] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 fuse 2 data 052] \
|
||||
-rma tta.xcsr -edata [regbld ibd_dl11::XCSR rdy]
|
||||
|
||||
rlc log " A3.4: fill fifo, RDY 1->0 on $fsize char ---------"
|
||||
@@ -224,8 +225,8 @@ stop:
|
||||
|
||||
$cpu cp \
|
||||
-rma tta.xcsr -edata [regbld ibd_dl11::XCSR rdy] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 size $fs1 data 053] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 size $fs2 data 066] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 fuse $fs1 data 053] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 fuse $fs2 data 066] \
|
||||
-rma tta.xcsr -edata [regbld ibd_dl11::XCSR rdy]
|
||||
|
||||
# 1 loc wr -> (x-2 in fifo; RDY=1)
|
||||
@@ -246,9 +247,9 @@ stop:
|
||||
# 1 rem rd -> (x-1 in fifo; RDY=1)
|
||||
# 1 rem rd -> (x-2 in fifo; RDY=1)
|
||||
$cpu cp \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 size $fs0 data 066] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 fuse $fs0 data 066] \
|
||||
-rma tta.xcsr -edata [regbld ibd_dl11::XCSR rdy] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 size $fs1 data 066] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 fuse $fs1 data 066] \
|
||||
-rma tta.xcsr -edata [regbld ibd_dl11::XCSR rdy]
|
||||
|
||||
rlc log " A3.6: full fifo read -----------------------------"
|
||||
@@ -258,13 +259,13 @@ stop:
|
||||
# 1 rem rd -> error
|
||||
set edata {}
|
||||
for {set i 0} { $i < $fs4 } {incr i} {
|
||||
lappend edata [regbldkv ibd_dl11::RXBUF val 1 size [expr {$fs2-$i}] data 066]
|
||||
lappend edata [regbldkv ibd_dl11::RXBUF val 1 fuse [expr {$fs2-$i}] data 066]
|
||||
}
|
||||
$cpu cp \
|
||||
-rbibr tta.xbuf $fs4 -edata $edata \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 size 2 data 066] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 fuse 2 data 066] \
|
||||
-rma tta.xcsr -edata [regbld ibd_dl11::XCSR rdy] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 size 1 data 066] \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF val 1 fuse 1 data 066] \
|
||||
-rma tta.xcsr -edata [regbld ibd_dl11::XCSR rdy] \
|
||||
-ribr tta.xbuf -estaterr
|
||||
}
|
||||
@@ -363,7 +364,7 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
if {$attnpat & $attndl} { # dl attn
|
||||
$cpu cp \
|
||||
-ribr tta.xbuf -edata [regbldkv ibd_dl11::RXBUF \
|
||||
val 1 size 1 data $charcur]
|
||||
val 1 fuse 1 data $charcur]
|
||||
set charcur [expr { ($charcur+1) & 0377 }]
|
||||
incr charseen
|
||||
}
|
||||
@@ -377,7 +378,7 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
# AWIDTH 6 63+15 = 78
|
||||
# AWIDTH 7 127+31 = 158
|
||||
set nchar [expr {$fsize + ($fsize>>2)}]
|
||||
set rsize [expr {$fsize>>2}]
|
||||
set rfuse [expr {$fsize>>2}]
|
||||
set wttout 10.; # wtlam timeout
|
||||
|
||||
set fstatmsk [regbld rw11::STAT cmderr rbtout rbnak]; # don't check err !!
|
||||
@@ -396,22 +397,22 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
if {$attnpat & $attndl} { # dl attn
|
||||
while (1) {
|
||||
$cpu cp \
|
||||
-rbibr tta.xbuf $rsize fdata -estat 0x0 $fstatmsk
|
||||
-rbibr tta.xbuf $rfuse fdata -estat 0x0 $fstatmsk
|
||||
for {set i 0} { $i < [llength $fdata] } {incr i} {
|
||||
set rbuf [lindex $fdata $i]
|
||||
set val [regget ibd_dl11::RXBUF(val) $rbuf]
|
||||
set size [regget ibd_dl11::RXBUF(size) $rbuf]
|
||||
set fuse [regget ibd_dl11::RXBUF(fuse) $rbuf]
|
||||
set data [regget ibd_dl11::RXBUF(data) $rbuf]
|
||||
if {$val != 1 || $data != $charcur} {
|
||||
rlc log "FAIL: bad data: val: $val; data: $data, exp: $charcur"
|
||||
rlc errcnt -inc
|
||||
}
|
||||
if {$i == 0} { set rsize $size }
|
||||
if {$i == 0} { set rfuse $fuse }
|
||||
set charcur [expr { ($charcur+1) & 0177 }]
|
||||
incr charseen
|
||||
}
|
||||
if {$size <= 1} {
|
||||
rlc log " rbibr chain ends with size=1 after $charseen"
|
||||
if {$fuse <= 1} {
|
||||
rlc log " rbibr chain ends with fuse=1 after $charseen"
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# $Id: test_lp11_all.tcl 1138 2019-04-26 08:14:56Z mueller $
|
||||
# $Id: test_lp11_all.tcl 1155 2019-05-31 06:38:06Z mueller $
|
||||
#
|
||||
# Copyright 2019- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
# License disclaimer see License.txt in $RETROBASE directory
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-05-30 1155 1.0.3 size->fuse rename
|
||||
# 2019-04-19 1134 1.0.2 fifo not longer cleared by breset
|
||||
# 2019-04-06 1126 1.0.1 check csr.err and csr.rlim not changed by breset
|
||||
# 2019-03-17 1123 1.0 Initial version
|
||||
@@ -102,7 +103,7 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR] \
|
||||
-rma lpa.buf \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR] \
|
||||
-ribr lpa.buf -edata [regbld ibd_lp11::RBUF val {size 1} {data 0107} ] \
|
||||
-ribr lpa.buf -edata [regbld ibd_lp11::RBUF val {fuse 1} {data 0107} ] \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR done]
|
||||
# expect and harvest attn (drop other attn potentially triggered by breset)
|
||||
rlc wtlam 1.
|
||||
@@ -116,14 +117,14 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR err done] \
|
||||
-wibr lpa.csr 0x0 \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR done] \
|
||||
-ribr lpa.buf -edata [regbld ibd_lp11::RBUF {size 0} {data 031} ]
|
||||
-ribr lpa.buf -edata [regbld ibd_lp11::RBUF {fuse 0} {data 031} ]
|
||||
# test that no attn send
|
||||
rlc exec -attn -edata 0x0
|
||||
|
||||
rlc log " A2.3: 7 bit data; done set on breset ---------------"
|
||||
$cpu cp \
|
||||
-wma lpa.buf 0370 \
|
||||
-ribr lpa.buf -edata [regbld ibd_lp11::RBUF val {size 1} {data 0170} ] \
|
||||
-ribr lpa.buf -edata [regbld ibd_lp11::RBUF val {fuse 1} {data 0170} ] \
|
||||
-wma lpa.buf 040 \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR] \
|
||||
-breset \
|
||||
@@ -139,7 +140,7 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
-wibr lpa.csr [regbld ibd_lp11::RCSR err] \
|
||||
-wibr lpa.csr 0x0 \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR done] \
|
||||
-ribr lpa.buf -edata [regbld ibd_lp11::RBUF {size 0} {data 032} ]
|
||||
-ribr lpa.buf -edata [regbld ibd_lp11::RBUF {fuse 0} {data 032} ]
|
||||
# expect and harvest attn
|
||||
rlc wtlam 1.
|
||||
rlc exec -attn -edata $attnlp
|
||||
@@ -153,9 +154,9 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
# loc rd buf --> test DONE=1 (loc read is noop); test attn send
|
||||
# loc wr buf --> test DONE=1
|
||||
# loc wr buf --> test DONE=1
|
||||
# rem wr buf --> test VAL=1,SIZE=3
|
||||
# rem wr buf --> test VAL=1,SIZE=2
|
||||
# rem wr buf --> test VAL=1,SIZE=1
|
||||
# rem wr buf --> test VAL=1,FUSE=3
|
||||
# rem wr buf --> test VAL=1,FUSE=2
|
||||
# rem wr buf --> test VAL=1,FUSE=1
|
||||
$cpu cp \
|
||||
-wma lpa.buf 031 \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR done] \
|
||||
@@ -164,9 +165,9 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR done] \
|
||||
-wma lpa.buf 033 \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR done] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 size 3 data 031] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 size 2 data 032] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 size 1 data 033] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 fuse 3 data 031] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 fuse 2 data 032] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 fuse 1 data 033] \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR done]
|
||||
# expect and harvest attn (drop other attn potentially triggered by breset)
|
||||
rlc wtlam 1.
|
||||
@@ -188,8 +189,8 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
-wma lpa.buf 0340 \
|
||||
-wma lpa.buf 0037 \
|
||||
-rbibr lpa.buf 4 -estaterr -edone 2 -edata \
|
||||
[list [regbldkv ibd_lp11::RBUF val 1 size 2 data 0140] \
|
||||
[regbldkv ibd_lp11::RBUF val 1 size 1 data 0037] ]
|
||||
[list [regbldkv ibd_lp11::RBUF val 1 fuse 2 data 0140] \
|
||||
[regbldkv ibd_lp11::RBUF val 1 fuse 1 data 0037] ]
|
||||
# expect and harvest attn
|
||||
rlc wtlam 1.
|
||||
rlc exec -attn -edata $attnlp
|
||||
@@ -200,8 +201,8 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
-wma lpa.buf 042 \
|
||||
-breset \
|
||||
-rbibr lpa.buf 3 -estaterr -edata \
|
||||
[list [regbldkv ibd_lp11::RBUF val 1 size 2 data 0041] \
|
||||
[regbldkv ibd_lp11::RBUF val 1 size 1 data 0042] ]
|
||||
[list [regbldkv ibd_lp11::RBUF val 1 fuse 2 data 0041] \
|
||||
[regbldkv ibd_lp11::RBUF val 1 fuse 1 data 0042] ]
|
||||
# expect and harvest attn (drop other attn potentially triggered by breset)
|
||||
rlc wtlam 1.
|
||||
rlc exec -attn -edata $attnlp $attnlp
|
||||
@@ -239,13 +240,13 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
# 1 loc wr -> no attn (2 in fifo; DONE=1)
|
||||
# 1 rem rd (1 in fifo; DONE=1)
|
||||
$cpu cp \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 size 2 data 051] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 fuse 2 data 051] \
|
||||
-wma lpa.buf 053 \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR done]
|
||||
|
||||
rlc exec -attn -edata 0x0
|
||||
$cpu cp \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 size 2 data 052] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 fuse 2 data 052] \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR done]
|
||||
|
||||
rlc log " A3.4: fill fifo, DONE 1->0 on $fsize char -------------"
|
||||
@@ -277,8 +278,8 @@ stop:
|
||||
|
||||
$cpu cp \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR done] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 size $fs1 data 053] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 size $fs2 data 066] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 fuse $fs1 data 053] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 fuse $fs2 data 066] \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR done]
|
||||
|
||||
# 1 loc wr -> (x-2 in fifo; DONE=1)
|
||||
@@ -299,9 +300,9 @@ stop:
|
||||
# 1 rem rd -> (x-1 in fifo; DONE=1)
|
||||
# 1 rem rd -> (x-2 in fifo; DONE=1)
|
||||
$cpu cp \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 size $fs0 data 066] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 fuse $fs0 data 066] \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR done] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 size $fs1 data 066] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 fuse $fs1 data 066] \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR done]
|
||||
|
||||
rlc log " A3.6: full fifo read -------------------------------"
|
||||
@@ -311,13 +312,13 @@ stop:
|
||||
# 1 rem rd -> error
|
||||
set edata {}
|
||||
for {set i 0} { $i < $fs4 } {incr i} {
|
||||
lappend edata [regbldkv ibd_lp11::RBUF val 1 size [expr {$fs2-$i}] data 066]
|
||||
lappend edata [regbldkv ibd_lp11::RBUF val 1 fuse [expr {$fs2-$i}] data 066]
|
||||
}
|
||||
$cpu cp \
|
||||
-rbibr lpa.buf $fs4 -edata $edata \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 size 2 data 066] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 fuse 2 data 066] \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR done] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 size 1 data 066] \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 fuse 1 data 066] \
|
||||
-rma lpa.csr -edata [regbld ibd_lp11::CSR done] \
|
||||
-ribr lpa.buf -estaterr
|
||||
}
|
||||
@@ -415,7 +416,7 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
}
|
||||
if {$attnpat & $attnlp} { # lp attn
|
||||
$cpu cp \
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 size 1 data $charcur]
|
||||
-ribr lpa.buf -edata [regbldkv ibd_lp11::RBUF val 1 fuse 1 data $charcur]
|
||||
set charcur [expr { ($charcur+1) & 0177 }]
|
||||
incr charseen
|
||||
}
|
||||
@@ -429,7 +430,7 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
# AWIDTH 6 63+15 = 78
|
||||
# AWIDTH 7 127+31 = 158
|
||||
set nchar [expr {$fsize + ($fsize>>2)}]
|
||||
set rsize [expr {$fsize>>2}]
|
||||
set rfuse [expr {$fsize>>2}]
|
||||
set wttout 10.; # wtlam timeout
|
||||
|
||||
set fstatmsk [regbld rw11::STAT cmderr rbtout rbnak]; # don't check err !!
|
||||
@@ -448,22 +449,22 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
if {$attnpat & $attnlp} { # lp attn
|
||||
while (1) {
|
||||
$cpu cp \
|
||||
-rbibr lpa.buf $rsize fdata -estat 0x0 $fstatmsk
|
||||
-rbibr lpa.buf $rfuse fdata -estat 0x0 $fstatmsk
|
||||
for {set i 0} { $i < [llength $fdata] } {incr i} {
|
||||
set rbuf [lindex $fdata $i]
|
||||
set val [regget ibd_lp11::RBUF(val) $rbuf]
|
||||
set size [regget ibd_lp11::RBUF(size) $rbuf]
|
||||
set fuse [regget ibd_lp11::RBUF(fuse) $rbuf]
|
||||
set data [regget ibd_lp11::RBUF(data) $rbuf]
|
||||
if {$val != 1 || $data != $charcur} {
|
||||
rlc log "FAIL: bad data: val: $val; data: $data, exp: $charcur"
|
||||
rlc errcnt -inc
|
||||
}
|
||||
if {$i == 0} { set rsize $size }
|
||||
if {$i == 0} { set rfuse $fuse }
|
||||
set charcur [expr { ($charcur+1) & 0177 }]
|
||||
incr charseen
|
||||
}
|
||||
if {$size <= 1} {
|
||||
rlc log " rbibr chain ends with size=1 after $charseen"
|
||||
if {$fuse <= 1} {
|
||||
rlc log " rbibr chain ends with fuse=1 after $charseen"
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# $Id: test_pc11_loop.tcl 1139 2019-04-27 14:00:38Z mueller $
|
||||
# $Id: test_pc11_loop.tcl 1155 2019-05-31 06:38:06Z mueller $
|
||||
#
|
||||
# Copyright 2019- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
# License disclaimer see License.txt in $RETROBASE directory
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-05-30 1155 1.0.1 size->fuse rename
|
||||
# 2019-04-20 1134 1.0 Initial version
|
||||
# 2019-04-07 1129 0.1 First draft
|
||||
#
|
||||
@@ -104,7 +105,7 @@ set pdata {}
|
||||
for {set i 0} { $i < $nbyte } {incr i} {
|
||||
set v [expr {$nbyte-$i-1}]
|
||||
lappend rdata $v
|
||||
lappend pdata [regbldkv ibd_pc11::RPBUF val 1 size [expr {$nbyte-$i}] data $v]
|
||||
lappend pdata [regbldkv ibd_pc11::RPBUF val 1 fuse [expr {$nbyte-$i}] data $v]
|
||||
}
|
||||
|
||||
# ensure pr and pp err=0
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# $Id: test_pc11_pp.tcl 1140 2019-04-28 10:21:21Z mueller $
|
||||
# $Id: test_pc11_pp.tcl 1155 2019-05-31 06:38:06Z mueller $
|
||||
#
|
||||
# Copyright 2019- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
# License disclaimer see License.txt in $RETROBASE directory
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-05-30 1155 1.0.1 size->fuse rename
|
||||
# 2019-04-21 1134 1.0 Initial version
|
||||
# 2019-04-07 1129 0.1 First draft
|
||||
#
|
||||
@@ -92,19 +93,19 @@ if {$type > 0} { # if buffered test rlim
|
||||
if {$type == 0} { # unbuffered --------------------------
|
||||
rlc log " A2: test data response (unbuffered) -----------------------"
|
||||
rlc log " A2.1: loc write, rem read ------------------------"
|
||||
# --> test PSIZE=0
|
||||
# loc wr buf --> test RDY=0 PSIZE=1
|
||||
# --> test PFUSE=0
|
||||
# loc wr buf --> test RDY=0 PFUSE=1
|
||||
# loc rd buf --> test RDY=0 (loc read is noop); test attn send
|
||||
# rem wr buf --> test RDY=1 PSIZE=0
|
||||
# rem wr buf --> test RDY=1 PFUSE=0
|
||||
$cpu cp \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {psize 0}] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {pfuse 0}] \
|
||||
-wma pca.pbuf 0107 \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {psize 1}] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {pfuse 1}] \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR] \
|
||||
-rma pca.pbuf \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR] \
|
||||
-ribr pca.pbuf -edata [regbld ibd_pc11::RPBUF val {size 1} {data 0107} ] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {psize 0}] \
|
||||
-ribr pca.pbuf -edata [regbld ibd_pc11::RPBUF val {fuse 1} {data 0107} ] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {pfuse 0}] \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR rdy]
|
||||
# expect and harvest attn (drop other attn potentially triggered by breset)
|
||||
rlc wtlam 1.
|
||||
@@ -118,14 +119,14 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR err rdy] \
|
||||
-wibr pca.pcsr 0x0 \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR rdy] \
|
||||
-ribr pca.pbuf -edata [regbld ibd_pc11::RPBUF {size 0} {data 0107} ]
|
||||
-ribr pca.pbuf -edata [regbld ibd_pc11::RPBUF {fuse 0} {data 0107} ]
|
||||
# test that no attn send
|
||||
rlc exec -attn -edata 0x0
|
||||
|
||||
rlc log " A2.3: 8 bit data; rdy set on breset --------------"
|
||||
$cpu cp \
|
||||
-wma pca.pbuf 0370 \
|
||||
-ribr pca.pbuf -edata [regbld ibd_pc11::RPBUF val {size 1} {data 0370} ] \
|
||||
-ribr pca.pbuf -edata [regbld ibd_pc11::RPBUF val {fuse 1} {data 0370} ] \
|
||||
-wma pca.pbuf 040 \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR] \
|
||||
-breset \
|
||||
@@ -141,7 +142,7 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
-wibr pca.pcsr [regbld ibd_pc11::RPCSR err] \
|
||||
-wibr pca.pcsr 0x0 \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR rdy] \
|
||||
-ribr pca.pbuf -edata [regbld ibd_pc11::RPBUF {size 0} {data 032} ]
|
||||
-ribr pca.pbuf -edata [regbld ibd_pc11::RPBUF {fuse 0} {data 032} ]
|
||||
# expect and harvest attn
|
||||
rlc wtlam 1.
|
||||
rlc exec -attn -edata $attnpc
|
||||
@@ -150,32 +151,32 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
set fsize [expr {(1<<$type)-1}]
|
||||
|
||||
rlc log " A2: test data response (basic fifo; AWIDTH=$type) --"
|
||||
rlc log " A2.1: loc write, rem read; rbuf.psize check -------"
|
||||
# loc wr buf --> test RDY=1 rbuf.psize=1
|
||||
rlc log " A2.1: loc write, rem read; rbuf.pfuse check -------"
|
||||
# loc wr buf --> test RDY=1 rbuf.pfuse=1
|
||||
# loc rd buf --> test RDY=1 (loc read is noop); test attn send
|
||||
# loc wr buf --> test RDY=1 rbuf.psize=2
|
||||
# loc wr buf --> test RDY=1 rbuf.psize=3
|
||||
# rem wr buf --> test VAL=1,SIZE=3 rbuf.psize=2
|
||||
# rem wr buf --> test VAL=1,SIZE=2 rbuf.psize=1
|
||||
# rem wr buf --> test VAL=1,SIZE=1 rbuf.psize=0
|
||||
# loc wr buf --> test RDY=1 rbuf.pfuse=2
|
||||
# loc wr buf --> test RDY=1 rbuf.pfuse=3
|
||||
# rem wr buf --> test VAL=1,FUSE=3 rbuf.pfuse=2
|
||||
# rem wr buf --> test VAL=1,FUSE=2 rbuf.pfuse=1
|
||||
# rem wr buf --> test VAL=1,FUSE=1 rbuf.pfuse=0
|
||||
$cpu cp \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF psize 0] \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF pfuse 0] \
|
||||
-wma pca.pbuf 031 \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR rdy] \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF psize 1] \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF pfuse 1] \
|
||||
-rma pca.pbuf \
|
||||
-wma pca.pbuf 032 \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR rdy] \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF psize 2] \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF pfuse 2] \
|
||||
-wma pca.pbuf 033 \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR rdy] \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF psize 3] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 size 3 data 031] \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF psize 2] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 size 2 data 032] \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF psize 1] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 size 1 data 033] \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF psize 0] \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF pfuse 3] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 fuse 3 data 031] \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF pfuse 2] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 fuse 2 data 032] \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF pfuse 1] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 fuse 1 data 033] \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF pfuse 0] \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR rdy]
|
||||
# expect and harvest attn (drop other attn potentially triggered by breset)
|
||||
rlc wtlam 1.
|
||||
@@ -197,8 +198,8 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
-wma pca.pbuf 0340 \
|
||||
-wma pca.pbuf 0037 \
|
||||
-rbibr pca.pbuf 4 -estaterr -edone 2 -edata \
|
||||
[list [regbldkv ibd_pc11::RPBUF val 1 size 2 data 0340] \
|
||||
[regbldkv ibd_pc11::RPBUF val 1 size 1 data 0037] ]
|
||||
[list [regbldkv ibd_pc11::RPBUF val 1 fuse 2 data 0340] \
|
||||
[regbldkv ibd_pc11::RPBUF val 1 fuse 1 data 0037] ]
|
||||
# expect and harvest attn
|
||||
rlc wtlam 1.
|
||||
rlc exec -attn -edata $attnpc
|
||||
@@ -209,8 +210,8 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
-wma pca.pbuf 042 \
|
||||
-breset \
|
||||
-rbibr pca.pbuf 3 -estaterr -edata \
|
||||
[list [regbldkv ibd_pc11::RPBUF val 1 size 2 data 0041] \
|
||||
[regbldkv ibd_pc11::RPBUF val 1 size 1 data 0042] ]
|
||||
[list [regbldkv ibd_pc11::RPBUF val 1 fuse 2 data 0041] \
|
||||
[regbldkv ibd_pc11::RPBUF val 1 fuse 1 data 0042] ]
|
||||
# expect and harvest attn (drop other attn potentially triggered by breset)
|
||||
rlc wtlam 1.
|
||||
rlc exec -attn -edata $attnpc $attnpc
|
||||
@@ -248,13 +249,13 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
# 1 loc wr -> no attn (2 in fifo; RDY=1)
|
||||
# 1 rem rd (1 in fifo; RDY=1)
|
||||
$cpu cp \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 size 2 data 051] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 fuse 2 data 051] \
|
||||
-wma pca.pbuf 053 \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR rdy]
|
||||
|
||||
rlc exec -attn -edata 0x0
|
||||
$cpu cp \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 size 2 data 052] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 fuse 2 data 052] \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR rdy]
|
||||
|
||||
rlc log " A3.4: fill fifo, RDY 1->0 on $fsize char ---------"
|
||||
@@ -286,8 +287,8 @@ stop:
|
||||
|
||||
$cpu cp \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR rdy] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 size $fs1 data 053] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 size $fs2 data 066] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 fuse $fs1 data 053] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 fuse $fs2 data 066] \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR rdy]
|
||||
|
||||
# 1 loc wr -> (x-2 in fifo; RDY=1)
|
||||
@@ -308,9 +309,9 @@ stop:
|
||||
# 1 rem rd -> (x-1 in fifo; RDY=1)
|
||||
# 1 rem rd -> (x-2 in fifo; RDY=1)
|
||||
$cpu cp \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 size $fs0 data 066] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 fuse $fs0 data 066] \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR rdy] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 size $fs1 data 066] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 fuse $fs1 data 066] \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR rdy]
|
||||
|
||||
rlc log " A3.6: full fifo read -----------------------------"
|
||||
@@ -320,13 +321,13 @@ stop:
|
||||
# 1 rem rd -> error
|
||||
set edata {}
|
||||
for {set i 0} { $i < $fs4 } {incr i} {
|
||||
lappend edata [regbldkv ibd_pc11::RPBUF val 1 size [expr {$fs2-$i}] data 066]
|
||||
lappend edata [regbldkv ibd_pc11::RPBUF val 1 fuse [expr {$fs2-$i}] data 066]
|
||||
}
|
||||
$cpu cp \
|
||||
-rbibr pca.pbuf $fs4 -edata $edata \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 size 2 data 066] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 fuse 2 data 066] \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR rdy] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 size 1 data 066] \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF val 1 fuse 1 data 066] \
|
||||
-rma pca.pcsr -edata [regbld ibd_pc11::PCSR rdy] \
|
||||
-ribr pca.pbuf -estaterr
|
||||
}
|
||||
@@ -451,7 +452,7 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
if {$attnpat & $attnpc} { # pc attn
|
||||
$cpu cp \
|
||||
-ribr pca.pbuf -edata [regbldkv ibd_pc11::RPBUF \
|
||||
val 1 size 1 data $charcur]
|
||||
val 1 fuse 1 data $charcur]
|
||||
set charcur [expr { ($charcur+1) & 0377 }]
|
||||
incr charseen
|
||||
}
|
||||
@@ -465,7 +466,7 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
# AWIDTH 6 63+15 = 78
|
||||
# AWIDTH 7 127+31 = 158
|
||||
set nchar [expr {$fsize + ($fsize>>2)}]
|
||||
set rsize [expr {$fsize>>2}]
|
||||
set rfuse [expr {$fsize>>2}]
|
||||
set wttout 10.; # wtlam timeout
|
||||
|
||||
set fstatmsk [regbld rw11::STAT cmderr rbtout rbnak]; # don't check err !!
|
||||
@@ -484,22 +485,22 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
if {$attnpat & $attnpc} { # pc attn
|
||||
while (1) {
|
||||
$cpu cp \
|
||||
-rbibr pca.pbuf $rsize fdata -estat 0x0 $fstatmsk
|
||||
-rbibr pca.pbuf $rfuse fdata -estat 0x0 $fstatmsk
|
||||
for {set i 0} { $i < [llength $fdata] } {incr i} {
|
||||
set rbuf [lindex $fdata $i]
|
||||
set val [regget ibd_pc11::RPBUF(val) $rbuf]
|
||||
set size [regget ibd_pc11::RPBUF(size) $rbuf]
|
||||
set fuse [regget ibd_pc11::RPBUF(fuse) $rbuf]
|
||||
set data [regget ibd_pc11::RPBUF(data) $rbuf]
|
||||
if {$val != 1 || $data != $charcur} {
|
||||
rlc log "FAIL: bad data: val: $val; data: $data, exp: $charcur"
|
||||
rlc errcnt -inc
|
||||
}
|
||||
if {$i == 0} { set rsize $size }
|
||||
if {$i == 0} { set rfuse $fuse }
|
||||
set charcur [expr { ($charcur+1) & 0177 }]
|
||||
incr charseen
|
||||
}
|
||||
if {$size <= 1} {
|
||||
rlc log " rbibr chain ends with size=1 after $charseen"
|
||||
if {$fuse <= 1} {
|
||||
rlc log " rbibr chain ends with fuse=1 after $charseen"
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# $Id: test_pc11_pr.tcl 1140 2019-04-28 10:21:21Z mueller $
|
||||
# $Id: test_pc11_pr.tcl 1155 2019-05-31 06:38:06Z mueller $
|
||||
#
|
||||
# Copyright 2019- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
# License disclaimer see License.txt in $RETROBASE directory
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-05-30 1155 1.0.1 size->fuse rename
|
||||
# 2019-04-21 1134 1.0 Initial version
|
||||
# 2019-04-12 1131 0.1 First draft
|
||||
#
|
||||
@@ -94,24 +95,24 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
rlc log " A2.1: rem write, loc read ------------------------"
|
||||
# loc wr csr.ena --> test BUSY=1; test rem rbuf.busy; test attn send
|
||||
$cpu cp \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rsize 0}] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rfuse 0}] \
|
||||
-wma pca.rcsr [regbld ibd_pc11::RCSR ena] \
|
||||
-rma pca.rcsr -edata [regbld ibd_pc11::RCSR busy] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF rbusy {rsize 0}]
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF rbusy {rfuse 0}]
|
||||
# expect and harvest attn (drop other attn potentially triggered by breset)
|
||||
rlc wtlam 1.
|
||||
rlc exec -attn -edata $attnpc $attnpc
|
||||
# rem wr buf --> test DONE=1 RSIZE=1 (1 cmd delay)
|
||||
# rem wr buf --> test DONE=1 RFUSE=1 (1 cmd delay)
|
||||
# loc rd buf --> test DONE=0 RRIZE=0 test rem rbuf.busy=0
|
||||
# loc rd buf --> test that buf cleared
|
||||
$cpu cp \
|
||||
-wibr pca.rbuf 0107 \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rsize 1}] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rfuse 1}] \
|
||||
-rma pca.rcsr \
|
||||
-rma pca.rcsr -edata [regbld ibd_pc11::RCSR done] \
|
||||
-rma pca.rbuf -edata 0107 \
|
||||
-rma pca.rcsr -edata [regbld ibd_pc11::RCSR ] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rsize 0}] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rfuse 0}] \
|
||||
-rma pca.rbuf -edata 0x0
|
||||
|
||||
rlc log " A2.2: rem write, loc write (discards data) -------"
|
||||
@@ -192,79 +193,79 @@ if {$type == 0} { # unbuffered --------------------------
|
||||
rlc exec -attn -edata $attnpc $attnpc
|
||||
|
||||
rlc log " A2.3: test fifo csr.fclr clears and breset doesn't"
|
||||
# rem wr buf --> test rbuf.size=1
|
||||
# rem wr buf --> test rbuf.size=2
|
||||
# 2* rem wr buf --> test rbuf.size=4
|
||||
# breset --> test rbuf.size=4
|
||||
# 3* rem wr buf --> test rbuf.size=7
|
||||
# csr.fclr --> test rbuf.size=0
|
||||
# rem wr buf --> test rbuf.fuse=1
|
||||
# rem wr buf --> test rbuf.fuse=2
|
||||
# 2* rem wr buf --> test rbuf.fuse=4
|
||||
# breset --> test rbuf.fuse=4
|
||||
# 3* rem wr buf --> test rbuf.fuse=7
|
||||
# csr.fclr --> test rbuf.fuse=0
|
||||
$cpu cp \
|
||||
-wibr pca.rbuf 0xaa \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rsize 1}] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rfuse 1}] \
|
||||
-wibr pca.rbuf 0x55 \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rsize 2}] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rfuse 2}] \
|
||||
-wbibr pca.rbuf {0x11 0x22} \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rsize 4}] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rfuse 4}] \
|
||||
-breset \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rsize 4}] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rfuse 4}] \
|
||||
-wbibr pca.rbuf {0x33 0x44 0x55} \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rsize 7}] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rfuse 7}] \
|
||||
-wibr pca.rcsr [regbld ibd_pc11::RRCSR fclr] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rsize 0}]
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rfuse 0}]
|
||||
# harvest breset/creset triggered attn's
|
||||
rlc exec -attn
|
||||
rlc wtlam 0.
|
||||
|
||||
rlc log " A2.4: test fifo clear on csr.err=1 ---------------"
|
||||
# 2* rem wr buf --> test rbuf.size=2
|
||||
# csr.err=1 --> test rbuf.size=0
|
||||
# rem wr buf --> test rbuf.size=0
|
||||
# 2* rem wr buf --> test rbuf.fuse=2
|
||||
# csr.err=1 --> test rbuf.fuse=0
|
||||
# rem wr buf --> test rbuf.fuse=0
|
||||
# csr.err=0
|
||||
$cpu cp \
|
||||
-wbibr pca.rbuf {0x66 0x77} \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rsize 2}] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rfuse 2}] \
|
||||
-wibr pca.rcsr [regbld ibd_pc11::RRCSR err] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rsize 0}] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rfuse 0}] \
|
||||
-wibr pca.rbuf 0x88 \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rsize 0}] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rfuse 0}] \
|
||||
-wibr pca.rcsr 0x0
|
||||
|
||||
rlc log " A3: test fifo logic -------------------------------------"
|
||||
rlc log " A3.1: fill and overfill fifo ---------------------"
|
||||
set rdata {}
|
||||
for {set i 0} { $i < $fsize } {incr i} { lappend rdata [expr {$i+0100}] }
|
||||
# rem wr fsize bytes --> test rbuf.size=fsize
|
||||
# rem wr buf --> test error and rbuf.size=fsize
|
||||
# rem wr fsize bytes --> test rbuf.fuse=fsize
|
||||
# rem wr buf --> test error and rbuf.fuse=fsize
|
||||
# csr.fclr to discard data
|
||||
$cpu cp \
|
||||
-wbibr pca.rbuf $rdata \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF rsize $fsize] \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF rfuse $fsize] \
|
||||
-wibr pca.rbuf 0xff -estaterr \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF rsize $fsize] \
|
||||
-ribr pca.rbuf -edata [regbldkv ibd_pc11::RRBUF rfuse $fsize] \
|
||||
-wibr pca.rcsr [regbld ibd_pc11::RRCSR fclr]
|
||||
|
||||
rlc log " A3.2: fill and empty fifo, attn on last read -----"
|
||||
# rem wr 2 bytes --> test rbuf.size=2
|
||||
# rem wr 2 bytes --> test rbuf.fuse=2
|
||||
# loc wr csr.ena --> test DONE=1 (1 cmd delay)
|
||||
# loc rd buf --> test data; test rbuf.size=1; test no attn
|
||||
# loc rd buf --> test data; test rbuf.fuse=1; test no attn
|
||||
$cpu cp \
|
||||
-wbibr pca.rbuf {0x55 0xaa} \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rsize 2}] \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rfuse 2}] \
|
||||
-wma pca.rcsr [regbld ibd_pc11::RCSR ena] \
|
||||
-rma pca.rcsr \
|
||||
-rma pca.rcsr -edata [regbld ibd_pc11::RCSR done] \
|
||||
-rma pca.rbuf -edata 0x55 \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rsize 1}]
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rfuse 1}]
|
||||
# test that no attn send
|
||||
rlc exec -attn -edata 0x0
|
||||
# loc wr csr.ena --> test DONE=1 (1 cmd delay)
|
||||
# loc rd buf --> test data; test rbuf.size=0; test attn seen
|
||||
# loc rd buf --> test data; test rbuf.fuse=0; test attn seen
|
||||
$cpu cp \
|
||||
-wma pca.rcsr [regbld ibd_pc11::RCSR ena] \
|
||||
-rma pca.rcsr \
|
||||
-rma pca.rcsr -edata [regbld ibd_pc11::RCSR done] \
|
||||
-rma pca.rbuf -edata 0xaa \
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rsize 0}]
|
||||
-ribr pca.rbuf -edata [regbld ibd_pc11::RRBUF {rfuse 0}]
|
||||
# expect and harvest attn
|
||||
rlc wtlam 1.
|
||||
rlc exec -attn -edata $attnpc $attnpc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: util.tcl 1140 2019-04-28 10:21:21Z mueller $
|
||||
# $Id: util.tcl 1155 2019-05-31 06:38:06Z mueller $
|
||||
#
|
||||
# Copyright 2015-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
@@ -13,6 +13,7 @@
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-05-30 1155 1.1.1 size->fuse rename
|
||||
# 2019-04-24 1138 1.1 updates for buffered dl11
|
||||
# 2015-12-26 719 1.0 Initial version
|
||||
#
|
||||
@@ -30,11 +31,11 @@ namespace eval ibd_dl11 {
|
||||
|
||||
regdsc RCSR {done 7} {ie 6}
|
||||
regdsc RRCSR {rlim 14 3} {type 10 3} {done 7} {ie 6} {ir 5} {rlb 4} {fclr 1}
|
||||
regdsc RRBUF {rsize 14 7 "d"} {xsize 6 7 "d"}
|
||||
regdsc RRBUF {rfuse 14 7 "d"} {xfuse 6 7 "d"}
|
||||
|
||||
regdsc XCSR {rdy 7} {ie 6}
|
||||
regdsc RXCSR {rlim 14 3} {rdy 7} {ie 6} {ir 5} {rlb 4}
|
||||
regdsc RXBUF {val 15} {size 14 7 "d"} {data 7 8 "o"}
|
||||
regdsc RXBUF {val 15} {fuse 14 7 "d"} {data 7 8 "o"}
|
||||
|
||||
rw11util::regmap_add ibd_dl11 tt?.rcsr {l? RCSR r? RRCSR}
|
||||
rw11util::regmap_add ibd_dl11 tt?.rbuf {r? RRBUF}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: util.tcl 1138 2019-04-26 08:14:56Z mueller $
|
||||
# $Id: util.tcl 1155 2019-05-31 06:38:06Z mueller $
|
||||
#
|
||||
# Copyright 2015-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
@@ -13,6 +13,7 @@
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-05-30 1155 1.1.1 size->fuse rename
|
||||
# 2019-03-17 1123 1.1.1 add print formats for RBUF; add RCSR.rlim
|
||||
# 2019-03-09 1120 1.1 add setup proc; add regdsc for RCSR,RBUF
|
||||
# 2015-12-26 719 1.0 Initial version
|
||||
@@ -31,7 +32,7 @@ namespace eval ibd_lp11 {
|
||||
|
||||
regdsc CSR {err 15} {done 7} {ie 6}
|
||||
regdsc RCSR {err 15} {rlim 14 3} {type 10 3} {done 7} {ie 6} {ir 5}
|
||||
regdsc RBUF {val 15} {size 14 7 "d"} {data 6 7 "o"}
|
||||
regdsc RBUF {val 15} {fuse 14 7 "d"} {data 6 7 "o"}
|
||||
|
||||
rw11util::regmap_add ibd_lp11 lp?.csr {l? CSR r? RCSR}
|
||||
rw11util::regmap_add ibd_lp11 lp?.buf {r? RBUF}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: util.tcl 1135 2019-04-23 12:56:23Z mueller $
|
||||
# $Id: util.tcl 1155 2019-05-31 06:38:06Z mueller $
|
||||
#
|
||||
# Copyright 2015-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
@@ -13,6 +13,7 @@
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-05-30 1155 1.1.1 size->fuse rename;
|
||||
# 2019-04-22 1135 1.1 updates for buffered pc11
|
||||
# 2015-12-26 719 1.0 Initial version
|
||||
#
|
||||
@@ -31,12 +32,12 @@ namespace eval ibd_pc11 {
|
||||
regdsc RCSR {err 15} {busy 11} {done 7} {ie 6} {ena 0}
|
||||
regdsc RRCSR {err 15} {rlim 14 3} {busy 11} {type 10 3} \
|
||||
{done 7} {ie 6} {ir 5} {rlb 4} {ique 3} {iack 2} {fclr 1}
|
||||
regdsc RRBUF {rbusy 15} {rsize 14 7 "d"} {psize 6 7 "d"}
|
||||
regdsc RRBUF {rbusy 15} {rfuse 14 7 "d"} {pfuse 6 7 "d"}
|
||||
|
||||
regdsc PCSR {err 15} {rdy 7} {ie 6}
|
||||
regdsc RPCSR {err 15} {rlim 14 3} {rdy 7} {ie 6} {ir 5} {rlb 4}
|
||||
|
||||
regdsc RPBUF {val 15} {size 14 7 "d"} {data 7 8 "o"}
|
||||
regdsc RPBUF {val 15} {fuse 14 7 "d"} {data 7 8 "o"}
|
||||
|
||||
rw11util::regmap_add ibd_pc11 pc?.rcsr {l? RCSR r? RRCSR}
|
||||
rw11util::regmap_add ibd_pc11 pc?.rbuf {r? RRBUF}
|
||||
|
||||
Reference in New Issue
Block a user