w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
ib_sel.vhd
Go to the documentation of this file.
1-- $Id: ib_sel.vhd 1181 2019-07-08 17:00:50Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2010- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: ib_sel - syn
7-- Description: ibus: address select logic
8--
9-- Dependencies: -
10-- Test bench: tb/tb_pdp11_core (implicit)
11-- Target Devices: generic
12-- Tool versions: ise 12.1-14.7; viv 2014.4; ghdl 0.29-0.31
13--
14-- Revision History:
15-- Date Rev Version Comment
16-- 2010-10-23 335 1.0 Initial version (derived from rritb_sres_or_mon)
17------------------------------------------------------------------------------
18
19library ieee;
20use ieee.std_logic_1164.all;
21
22use work.slvtypes.all;
23use work.iblib.all;
24
25-- ----------------------------------------------------------------------------
26
27entity ib_sel is -- ibus address select logic
28 generic (
29 IB_ADDR : slv16; -- ibus address base
30 SAWIDTH : natural := 0); -- device subaddress space width
31 port (
32 CLK : in slbit; -- clock
33 IB_MREQ : in ib_mreq_type; -- ibus request
34 SEL : out slbit -- select state bit
35 );
36end ib_sel;
37
38architecture syn of ib_sel is
39 signal R_SEL : slbit := '0';
40begin
41
42 assert SAWIDTH<=10 -- at most 1k words devices
43 report "assert(SAWIDTH<=10)" severity failure;
44
45 proc_regs: process (CLK)
46 variable isel : slbit := '0';
47 begin
48 if rising_edge(CLK) then
49 isel := '0';
50 if IB_MREQ.aval='1' and
51 IB_MREQ.addr(12 downto SAWIDTH+1)=IB_ADDR(12 downto SAWIDTH+1) then
52 isel := '1';
53 end if;
54 R_SEL <= isel;
55 end if;
56 end process proc_regs;
57
58 SEL <= R_SEL;
59
60end syn;
slbit := '0' R_SEL
Definition: ib_sel.vhd:39
out SEL slbit
Definition: ib_sel.vhd:35
IB_ADDR slv16
Definition: ib_sel.vhd:29
SAWIDTH natural := 0
Definition: ib_sel.vhd:30
in CLK slbit
Definition: ib_sel.vhd:32
in IB_MREQ ib_mreq_type
Definition: ib_sel.vhd:33
Definition: iblib.vhd:33
std_logic_vector( 15 downto 0) slv16
Definition: slvtypes.vhd:48
std_logic slbit
Definition: slvtypes.vhd:30