Line 1... |
Line 1... |
-- $Id: pdp11_mmu_sadr.vhd 351 2010-12-30 21:50:54Z mueller $
|
-- $Id: pdp11_mmu_sadr.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 17... |
Line 17... |
--
|
--
|
-- Dependencies: memlib/ram_1swar_gen
|
-- Dependencies: memlib/ram_1swar_gen
|
--
|
--
|
-- 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.3.3 now numeric_std clean
|
-- 2010-12-30 351 1.3.2 BUGFIX: fix sensitivity list of proc_eaddr
|
-- 2010-12-30 351 1.3.2 BUGFIX: fix sensitivity list of proc_eaddr
|
-- 2010-10-23 335 1.3.1 change proc_eaddr logic, shorten logic path
|
-- 2010-10-23 335 1.3.1 change proc_eaddr logic, shorten logic path
|
-- 2010-10-17 333 1.3 use ibus V2 interface
|
-- 2010-10-17 333 1.3 use ibus V2 interface
|
-- 2008-08-22 161 1.2.2 rename ubf_ -> ibf_; use iblib
|
-- 2008-08-22 161 1.2.2 rename ubf_ -> ibf_; use iblib
|
-- 2008-01-05 110 1.2.1 rename _mmu_regs -> _mmu_sadr
|
-- 2008-01-05 110 1.2.1 rename _mmu_regs -> _mmu_sadr
|
Line 38... |
Line 39... |
-- 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.memlib.all;
|
use work.memlib.all;
|
use work.iblib.all;
|
use work.iblib.all;
|
use work.pdp11.all;
|
use work.pdp11.all;
|
Line 75... |
Line 76... |
-- umdr 177600 -> 1 111 111 110 000 000
|
-- umdr 177600 -> 1 111 111 110 000 000
|
-- umar 177640 -> 1 111 111 110 100 000
|
-- umar 177640 -> 1 111 111 110 100 000
|
--
|
--
|
-- mode => (addr(8), not addr(6)) [Note: km "00" sm "01" um "11"]
|
-- mode => (addr(8), not addr(6)) [Note: km "00" sm "01" um "11"]
|
|
|
constant ibaddr_kmdar : slv16 := conv_std_logic_vector(8#172300#,16);
|
constant ibaddr_kmdar : slv16 := slv(to_unsigned(8#172300#,16));
|
constant ibaddr_smdar : slv16 := conv_std_logic_vector(8#172200#,16);
|
constant ibaddr_smdar : slv16 := slv(to_unsigned(8#172200#,16));
|
constant ibaddr_umdar : slv16 := conv_std_logic_vector(8#177600#,16);
|
constant ibaddr_umdar : slv16 := slv(to_unsigned(8#177600#,16));
|
|
|
subtype sdr_ibf_slf is integer range 14 downto 8;
|
subtype sdr_ibf_slf is integer range 14 downto 8;
|
subtype sdr_ibf_aib is integer range 7 downto 6;
|
subtype sdr_ibf_aib is integer range 7 downto 6;
|
subtype sdr_ibf_acf is integer range 3 downto 0;
|
subtype sdr_ibf_acf is integer range 3 downto 0;
|
|
|
Line 163... |
Line 164... |
|
|
proc_ibsel: process (CLK)
|
proc_ibsel: process (CLK)
|
variable ibsel_dr : slbit := '0';
|
variable ibsel_dr : slbit := '0';
|
variable ibsel_ar : slbit := '0';
|
variable ibsel_ar : slbit := '0';
|
begin
|
begin
|
if CLK'event and CLK='1' then
|
if rising_edge(CLK) then
|
ibsel_dr := '0';
|
ibsel_dr := '0';
|
ibsel_ar := '0';
|
ibsel_ar := '0';
|
if IB_MREQ.aval = '1' then
|
if IB_MREQ.aval = '1' then
|
if IB_MREQ.addr(12 downto 6)=ibaddr_kmdar(12 downto 6) or
|
if IB_MREQ.addr(12 downto 6)=ibaddr_kmdar(12 downto 6) or
|
IB_MREQ.addr(12 downto 6)=ibaddr_smdar(12 downto 6) or
|
IB_MREQ.addr(12 downto 6)=ibaddr_smdar(12 downto 6) or
|