Line 1... |
Line 1... |
-- $Id: pdp11_mmu.vhd 335 2010-10-24 22:24:23Z mueller $
|
-- $Id: pdp11_mmu.vhd 427 2011-11-19 21:04:11Z 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 20... |
Line 20... |
-- ibus/ib_sres_or_3
|
-- ibus/ib_sres_or_3
|
-- ibus/ib_sel
|
-- ibus/ib_sel
|
--
|
--
|
-- Test bench: tb/tb_pdp11_core (implicit)
|
-- Test bench: tb/tb_pdp11_core (implicit)
|
-- Target Devices: generic
|
-- Target Devices: generic
|
-- Tool versions: xst 8.1, 8.2, 9.1, 9.2, 12.1; ghdl 0.18-0.29
|
-- Tool versions: xst 8.2, 9.1, 9.2, 12.1, 13.1; ghdl 0.18-0.29
|
--
|
--
|
-- Revision History:
|
-- Revision History:
|
-- Date Rev Version Comment
|
-- Date Rev Version Comment
|
|
-- 2011-11-18 427 1.4.2 now numeric_std clean
|
-- 2010-10-23 335 1.4.1 use ib_sel
|
-- 2010-10-23 335 1.4.1 use ib_sel
|
-- 2010-10-17 333 1.4 use ibus V2 interface
|
-- 2010-10-17 333 1.4 use ibus V2 interface
|
-- 2010-06-20 307 1.3.7 rename cpacc to cacc in mmu_cntl_type
|
-- 2010-06-20 307 1.3.7 rename cpacc to cacc in mmu_cntl_type
|
-- 2009-05-30 220 1.3.6 final removal of snoopers (were already commented)
|
-- 2009-05-30 220 1.3.6 final removal of snoopers (were already commented)
|
-- 2009-05-09 213 1.3.5 BUGFIX: tie inst_compl permanentely '0'
|
-- 2009-05-09 213 1.3.5 BUGFIX: tie inst_compl permanentely '0'
|
Line 47... |
Line 48... |
-- 2007-05-12 26 1.0 Initial version
|
-- 2007-05-12 26 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 work.slvtypes.all;
|
use work.slvtypes.all;
|
use work.iblib.all;
|
use work.iblib.all;
|
use work.pdp11.all;
|
use work.pdp11.all;
|
|
|
Line 72... |
Line 73... |
);
|
);
|
end pdp11_mmu;
|
end pdp11_mmu;
|
|
|
architecture syn of pdp11_mmu is
|
architecture syn of pdp11_mmu is
|
|
|
constant ibaddr_ssr0 : slv16 := conv_std_logic_vector(8#177572#,16);
|
constant ibaddr_ssr0 : slv16 := slv(to_unsigned(8#177572#,16));
|
constant ibaddr_ssr3 : slv16 := conv_std_logic_vector(8#172516#,16);
|
constant ibaddr_ssr3 : slv16 := slv(to_unsigned(8#172516#,16));
|
|
|
constant ssr0_ibf_abo_nonres : integer := 15;
|
constant ssr0_ibf_abo_nonres : integer := 15;
|
constant ssr0_ibf_abo_length : integer := 14;
|
constant ssr0_ibf_abo_length : integer := 14;
|
constant ssr0_ibf_abo_rdonly : integer := 13;
|
constant ssr0_ibf_abo_rdonly : integer := 13;
|
constant ssr0_ibf_trap_mmu : integer := 12;
|
constant ssr0_ibf_trap_mmu : integer := 12;
|
Line 198... |
Line 199... |
|
|
end process proc_ibres;
|
end process proc_ibres;
|
|
|
proc_ssr0 : process (CLK)
|
proc_ssr0 : process (CLK)
|
begin
|
begin
|
if CLK'event and CLK='1' then
|
if rising_edge(CLK) then
|
if BRESET = '1' then
|
if BRESET = '1' then
|
R_SSR0 <= mmu_ssr0_init;
|
R_SSR0 <= mmu_ssr0_init;
|
else
|
else
|
R_SSR0 <= N_SSR0;
|
R_SSR0 <= N_SSR0;
|
end if;
|
end if;
|
end if;
|
end if;
|
end process proc_ssr0;
|
end process proc_ssr0;
|
|
|
proc_ssr3 : process (CLK)
|
proc_ssr3 : process (CLK)
|
begin
|
begin
|
if CLK'event and CLK='1' then
|
if rising_edge(CLK) then
|
if BRESET = '1' then
|
if BRESET = '1' then
|
R_SSR3 <= mmu_ssr3_init;
|
R_SSR3 <= mmu_ssr3_init;
|
elsif IBSEL_SSR3='1' and IB_MREQ.we='1' then
|
elsif IBSEL_SSR3='1' and IB_MREQ.we='1' then
|
if IB_MREQ.be0 = '1' then
|
if IB_MREQ.be0 = '1' then
|
R_SSR3.ena_ubmap <= IB_MREQ.din(ssr3_ibf_ena_ubmap);
|
R_SSR3.ena_ubmap <= IB_MREQ.din(ssr3_ibf_ena_ubmap);
|
Line 250... |
Line 251... |
dspace_ok := CNTL.dspace and dspace_en;
|
dspace_ok := CNTL.dspace and dspace_en;
|
|
|
iasn(3) := dspace_ok;
|
iasn(3) := dspace_ok;
|
iasn(2 downto 0) := asf;
|
iasn(2 downto 0) := asf;
|
|
|
ipaddrh := unsigned("000000000"&bn) + unsigned(SARSDR.saf);
|
ipaddrh := slv(unsigned("000000000"&bn) + unsigned(SARSDR.saf));
|
|
|
DSPACE <= dspace_ok;
|
DSPACE <= dspace_ok;
|
ASN <= iasn;
|
ASN <= iasn;
|
PADDRH <= ipaddrh;
|
PADDRH <= ipaddrh;
|
|
|