Line 1... |
Line 1... |
-- $Id: pdp11_tmu.vhd 333 2010-10-17 21:18:33Z mueller $
|
-- $Id: pdp11_tmu.vhd 427 2011-11-19 21:04:11Z mueller $
|
--
|
--
|
-- Copyright 2008-2010 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
-- Copyright 2008-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 17... |
Line 17... |
--
|
--
|
-- Dependencies: -
|
-- Dependencies: -
|
--
|
--
|
-- Test bench: tb/tb_pdp11_core (implicit)
|
-- Test bench: tb/tb_pdp11_core (implicit)
|
-- Target Devices: generic
|
-- Target Devices: generic
|
-- Tool versions: ghdl 0.18-0.25
|
-- Tool versions: ghdl 0.18-0.29
|
--
|
--
|
-- Revision History:
|
-- Revision History:
|
-- Date Rev Version Comment
|
-- Date Rev Version Comment
|
|
-- 2011-11-18 427 1.0.7 now numeric_std clean
|
-- 2010-10-17 333 1.0.6 use ibus V2 interface
|
-- 2010-10-17 333 1.0.6 use ibus V2 interface
|
-- 2010-06-26 309 1.0.5 add ibmreq.dip,.cacc,.racc to trace
|
-- 2010-06-26 309 1.0.5 add ibmreq.dip,.cacc,.racc to trace
|
-- 2009-05-10 214 1.0.4 add ENA signal (trace enable)
|
-- 2009-05-10 214 1.0.4 add ENA signal (trace enable)
|
-- 2008-12-14 177 1.0.3 write gpr_* of DM_STAT_DP and dp_ireg_we_last
|
-- 2008-12-14 177 1.0.3 write gpr_* of DM_STAT_DP and dp_ireg_we_last
|
-- 2008-12-13 176 1.0.2 write only cycle currently used by tmu_conf
|
-- 2008-12-13 176 1.0.2 write only cycle currently used by tmu_conf
|
Line 32... |
Line 33... |
-- 2008-04-19 137 1.0 Initial version
|
-- 2008-04-19 137 1.0 Initial version
|
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
|
|
library ieee;
|
library ieee;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_arith.all;
|
use ieee.numeric_std.all;
|
use ieee.std_logic_textio.all;
|
use ieee.std_logic_textio.all;
|
use std.textio.all;
|
use std.textio.all;
|
|
|
use work.slvtypes.all;
|
use work.slvtypes.all;
|
use work.simlib.all;
|
use work.simlib.all;
|
Line 74... |
Line 75... |
variable wcycle : boolean := false;
|
variable wcycle : boolean := false;
|
file ofile : text open write_mode is "tmu_ofile";
|
file ofile : text open write_mode is "tmu_ofile";
|
begin
|
begin
|
|
|
|
|
if CLK'event and CLK='1' then
|
if rising_edge(CLK) then
|
|
|
if R_FIRST = '1' then
|
if R_FIRST = '1' then
|
R_FIRST <= '0';
|
R_FIRST <= '0';
|
write(oline, string'("#"));
|
write(oline, string'("#"));
|
write(oline, string'(" clkcycle:d"));
|
write(oline, string'(" clkcycle:d"));
|
Line 165... |
Line 166... |
if ENA = '0' then -- if not enabled
|
if ENA = '0' then -- if not enabled
|
wcycle := false; -- force to not logged...
|
wcycle := false; -- force to not logged...
|
end if;
|
end if;
|
|
|
if wcycle then
|
if wcycle then
|
write(oline, conv_integer(unsigned(SB_CLKCYCLE)), right, 9);
|
write(oline, to_integer(unsigned(SB_CLKCYCLE)), right, 9);
|
write(oline, string'(" 0"));
|
write(oline, string'(" 0"));
|
writeoct(oline, DM_STAT_DP.pc, right, 7);
|
writeoct(oline, DM_STAT_DP.pc, right, 7);
|
writeoct(oline, ipsw, right, 7);
|
writeoct(oline, ipsw, right, 7);
|
writeoct(oline, DM_STAT_DP.ireg, right, 7);
|
writeoct(oline, DM_STAT_DP.ireg, right, 7);
|
write(oline, DM_STAT_DP.ireg_we, right, 2);
|
write(oline, DM_STAT_DP.ireg_we, right, 2);
|