Line 1... |
Line 1... |
-- $Id: tb_pdp11_core.vhd 314 2010-07-09 17:38:41Z mueller $
|
-- $Id: tb_pdp11core.vhd 352 2011-01-02 13:01:37Z mueller $
|
--
|
--
|
-- Copyright 2006-2010 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
-- Copyright 2006-2011 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
--
|
--
|
-- This program is free software; you may redistribute and/or modify it under
|
-- This program is free software; you may redistribute and/or modify it under
|
-- the terms of the GNU General Public License as published by the Free
|
-- the terms of the GNU General Public License as published by the Free
|
-- Software Foundation, either version 2, or at your option any later version.
|
-- Software Foundation, either version 2, or at your option any later version.
|
--
|
--
|
Line 10... |
Line 10... |
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
-- for complete details.
|
-- for complete details.
|
--
|
--
|
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
-- Module Name: tb_pdp11_core - sim
|
-- Module Name: tb_pdp11core - sim
|
-- Description: Test bench for pdp11_core
|
-- Description: Test bench for pdp11_core
|
--
|
--
|
-- Dependencies: simlib/simclk
|
-- Dependencies: simlib/simclk
|
-- tbd_pdp11_core [UUT]
|
-- tbd_pdp11core [UUT]
|
-- pdp11_intmap
|
-- pdp11_intmap
|
--
|
--
|
-- To test: pdp11_core
|
-- To test: pdp11_core
|
--
|
--
|
-- Target Devices: generic
|
-- Target Devices: generic
|
-- Tool versions: ghdl 0.18-0.29; ISim 11.3
|
-- Tool versions: ghdl 0.18-0.29; ISim 11.3
|
--
|
--
|
-- Verified (with tb_pdp11_core_stim.dat):
|
-- Verified (with tb_pdp11core_stim.dat):
|
-- Date Rev Code ghdl ise Target Comment
|
-- Date Rev Code ghdl ise Target Comment
|
|
-- 2010-12-30 351 - 0.29 - - u:ok
|
|
-- 2010-12-30 351 _ssim 0.29 12.1 M53d xc3s1000 u:ok
|
-- 2010-06-20 308 - 0.29 - - u:ok
|
-- 2010-06-20 308 - 0.29 - - u:ok
|
-- 2009-11-22 252 - 0.26 - - u:ok
|
-- 2009-11-22 252 - 0.26 - - u:ok
|
-- 2007-12-30 107 - 0.25 - - u:ok
|
-- 2007-12-30 107 - 0.25 - - u:ok
|
-- 2007-10-26 92 _tsim 0.26 8.1.03 I27 xc3s1000 c:fail -> blog_ghdl
|
-- 2007-10-26 92 _tsim 0.26 8.1.03 I27 xc3s1000 c:fail -> blog_ghdl
|
-- 2007-10-26 92 _tsim 0.26 9.2.02 J39 xc3s1000 d:ok (full tsim!)
|
-- 2007-10-26 92 _tsim 0.26 9.2.02 J39 xc3s1000 d:ok (full tsim!)
|
Line 42... |
Line 44... |
-- 2007-10-07 88 _ssim 0.26 8.1 I24 xc3s1000 c:fail -> blog_webpack
|
-- 2007-10-07 88 _ssim 0.26 8.1 I24 xc3s1000 c:fail -> blog_webpack
|
-- 2007-10-07 88 - 0.26 - - c:ok
|
-- 2007-10-07 88 - 0.26 - - c:ok
|
--
|
--
|
-- Revision History:
|
-- Revision History:
|
-- Date Rev Version Comment
|
-- Date Rev Version Comment
|
|
-- 2011-01-02 352 1.3.1 rename .cpmon->.rlmon
|
|
-- 2010-12-30 351 1.3 rename tb_pdp11_core -> tb_pdp11core
|
-- 2010-06-20 308 1.2.2 add wibrb, ribr, wibr commands for ibr accesses
|
-- 2010-06-20 308 1.2.2 add wibrb, ribr, wibr commands for ibr accesses
|
-- 2010-06-20 307 1.2.1 add CP_ADDR_racc, CP_ADDR_be to tbd interface
|
-- 2010-06-20 307 1.2.1 add CP_ADDR_racc, CP_ADDR_be to tbd interface
|
-- 2010-06-13 305 1.2 add CP_CNTL_rnum and CP_ADDR_...; emulate old
|
-- 2010-06-13 305 1.2 add CP_CNTL_rnum and CP_ADDR_...; emulate old
|
-- 'sta' behaviour with new 'stapc' command; rename
|
-- 'sta' behaviour with new 'stapc' command; rename
|
-- lal,lah -> wal,wah and implement locally; new
|
-- lal,lah -> wal,wah and implement locally; new
|
Line 81... |
Line 85... |
use work.simlib.all;
|
use work.simlib.all;
|
use work.simbus.all;
|
use work.simbus.all;
|
use work.pdp11_sim.all;
|
use work.pdp11_sim.all;
|
use work.pdp11.all;
|
use work.pdp11.all;
|
|
|
entity tb_pdp11_core is
|
entity tb_pdp11core is
|
end tb_pdp11_core;
|
end tb_pdp11core;
|
|
|
architecture sim of tb_pdp11_core is
|
architecture sim of tb_pdp11core is
|
|
|
signal CLK : slbit := '0';
|
signal CLK : slbit := '0';
|
signal RESET : slbit := '0';
|
signal RESET : slbit := '0';
|
signal UNUSEDSIGNAL : slbit := '0'; -- FIXME: hack to make ISim 11.3 happy
|
signal UNUSEDSIGNAL : slbit := '0'; -- FIXME: hack to make ISim 11.3 happy
|
signal CP_CNTL_req : slbit := '0';
|
signal CP_CNTL_req : slbit := '0';
|
Line 133... |
Line 137... |
CLK => CLK,
|
CLK => CLK,
|
CLK_CYCLE => SB_CLKCYCLE,
|
CLK_CYCLE => SB_CLKCYCLE,
|
CLK_STOP => CLK_STOP
|
CLK_STOP => CLK_STOP
|
);
|
);
|
|
|
UUT: entity work.tbd_pdp11_core
|
UUT: entity work.tbd_pdp11core
|
port map (
|
port map (
|
CLK => CLK,
|
CLK => CLK,
|
RESET => RESET,
|
RESET => RESET,
|
CP_CNTL_req => CP_CNTL_req,
|
CP_CNTL_req => CP_CNTL_req,
|
CP_CNTL_func => CP_CNTL_func,
|
CP_CNTL_func => CP_CNTL_func,
|
Line 158... |
Line 162... |
CP_STAT_cpurust => CP_STAT_cpurust,
|
CP_STAT_cpurust => CP_STAT_cpurust,
|
CP_DOUT => CP_DOUT
|
CP_DOUT => CP_DOUT
|
);
|
);
|
|
|
proc_stim: process
|
proc_stim: process
|
file ifile : text open read_mode is "tb_pdp11_core_stim";
|
file ifile : text open read_mode is "tb_pdp11core_stim";
|
variable iline : line;
|
variable iline : line;
|
variable oline : line;
|
variable oline : line;
|
variable idelta : integer := 0;
|
variable idelta : integer := 0;
|
variable idummy : integer := 0;
|
variable idummy : integer := 0;
|
variable dcycle : integer := 0;
|
variable dcycle : integer := 0;
|
Line 297... |
Line 301... |
when ".merr " => -- .merr
|
when ".merr " => -- .merr
|
read_ea(iline, imerr);
|
read_ea(iline, imerr);
|
|
|
when ".anena" => -- .anena (ignore it)
|
when ".anena" => -- .anena (ignore it)
|
readempty(iline);
|
readempty(iline);
|
when ".cpmon" => -- .cpmon (ignore it)
|
when ".rlmon" => -- .rlmon (ignore it)
|
readempty(iline);
|
readempty(iline);
|
when ".rbmon" => -- .rbmon (ignore it)
|
when ".rbmon" => -- .rbmon (ignore it)
|
readempty(iline);
|
readempty(iline);
|
|
|
when ".scntl" => -- .scntl
|
when ".scntl" => -- .scntl
|