Line 1... |
Line 1... |
-- $Id: pdp11_vmbox.vhd 641 2015-02-01 22:12:15Z mueller $
|
-- $Id: pdp11_vmbox.vhd 677 2015-05-09 21:52:32Z mueller $
|
--
|
--
|
-- Copyright 2006-2011 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
-- Copyright 2006-2015 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 25... |
Line 25... |
-- Target Devices: generic
|
-- Target Devices: generic
|
-- Tool versions: ise 8.2-14.7; viv 2014.4; ghdl 0.18-0.31
|
-- Tool versions: ise 8.2-14.7; viv 2014.4; ghdl 0.18-0.31
|
--
|
--
|
-- Revision History:
|
-- Revision History:
|
-- Date Rev Version Comment
|
-- Date Rev Version Comment
|
|
-- 2015-04-04 662 1.6.4 atowidth now 6 (was 5) to support ibdr_rprm reset
|
-- 2011-11-18 427 1.6.3 now numeric_std clean
|
-- 2011-11-18 427 1.6.3 now numeric_std clean
|
-- 2010-10-23 335 1.6.2 add r.paddr_iopage, use ib_sel
|
-- 2010-10-23 335 1.6.2 add r.paddr_iopage, use ib_sel
|
-- 2010-10-22 334 1.6.1 deassert ibus be's at end-cycle; fix rmw logic
|
-- 2010-10-22 334 1.6.1 deassert ibus be's at end-cycle; fix rmw logic
|
-- 2010-10-17 333 1.6 implement ibus V2 interface
|
-- 2010-10-17 333 1.6 implement ibus V2 interface
|
-- 2010-06-27 310 1.5 redo ibus driver logic, now ibus driven from flops
|
-- 2010-06-27 310 1.5 redo ibus driver logic, now ibus driven from flops
|
Line 72... |
Line 73... |
-- ----------------------------------------------------------------------------
|
-- ----------------------------------------------------------------------------
|
|
|
entity pdp11_vmbox is -- virtual memory
|
entity pdp11_vmbox is -- virtual memory
|
port (
|
port (
|
CLK : in slbit; -- clock
|
CLK : in slbit; -- clock
|
GRESET : in slbit; -- global reset
|
GRESET : in slbit; -- general reset
|
CRESET : in slbit; -- console reset
|
CRESET : in slbit; -- cpu reset
|
BRESET : in slbit; -- ibus reset
|
BRESET : in slbit; -- bus reset
|
CP_ADDR : in cp_addr_type; -- console port address
|
CP_ADDR : in cp_addr_type; -- console port address
|
VM_CNTL : in vm_cntl_type; -- vm control port
|
VM_CNTL : in vm_cntl_type; -- vm control port
|
VM_ADDR : in slv16; -- vm address
|
VM_ADDR : in slv16; -- vm address
|
VM_DIN : in slv16; -- vm data in
|
VM_DIN : in slv16; -- vm data in
|
VM_STAT : out vm_stat_type; -- vm status port
|
VM_STAT : out vm_stat_type; -- vm status port
|
Line 94... |
Line 95... |
end pdp11_vmbox;
|
end pdp11_vmbox;
|
|
|
architecture syn of pdp11_vmbox is
|
architecture syn of pdp11_vmbox is
|
|
|
constant ibaddr_slim : slv16 := slv(to_unsigned(8#177774#,16));
|
constant ibaddr_slim : slv16 := slv(to_unsigned(8#177774#,16));
|
constant atowidth : natural := 5; -- size of access timeout counter
|
constant atowidth : natural := 6; -- size of access timeout counter
|
|
|
type state_type is (
|
type state_type is (
|
s_idle, -- s_idle: wait for vm_cntl request
|
s_idle, -- s_idle: wait for vm_cntl request
|
s_mem_w, -- s_mem_w: check mmu, wait for memory
|
s_mem_w, -- s_mem_w: check mmu, wait for memory
|
s_ib_w, -- s_ib_w: wait for ibus
|
s_ib_w, -- s_ib_w: wait for ibus
|