OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [rtl/] [ibus/] [ib_sel.vhd] - Blame information for rev 24

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 wfjm
-- $Id: ib_sel.vhd 427 2011-11-19 21:04:11Z mueller $
2 8 wfjm
--
3
-- Copyright 2010- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4
--
5
-- This program is free software; you may redistribute and/or modify it under
6
-- the terms of the GNU General Public License as published by the Free
7
-- Software Foundation, either version 2, or at your option any later version.
8
--
9
-- This program is distributed in the hope that it will be useful, but
10
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
-- for complete details.
13
--
14
------------------------------------------------------------------------------
15
-- Module Name:    ib_sel - syn
16
-- Description:    ibus: address select logic
17
--
18
-- Dependencies:   -
19
-- Test bench:     tb/tb_pdp11_core (implicit)
20
-- Target Devices: generic
21
-- Tool versions:  xst 12.1; ghdl 0.29
22
--
23
-- Revision History: 
24
-- Date         Rev Version  Comment
25
-- 2010-10-23   335   1.0    Initial version (derived from rritb_sres_or_mon)
26
------------------------------------------------------------------------------
27
 
28
library ieee;
29
use ieee.std_logic_1164.all;
30
 
31
use work.slvtypes.all;
32
use work.iblib.all;
33
 
34
-- ----------------------------------------------------------------------------
35
 
36
entity ib_sel is                        -- ibus address select logic
37
  generic (
38
    IB_ADDR : slv16;                    -- ibus address base
39
    SAWIDTH : natural := 0);            -- device subaddress space width
40
  port (
41
    CLK : in slbit;                     -- clock
42
    IB_MREQ :  in ib_mreq_type;         -- ibus request
43
    SEL : out slbit                     -- select state bit
44
  );
45
end ib_sel;
46
 
47
architecture syn of ib_sel is
48
  signal R_SEL : slbit := '0';
49
begin
50
 
51
  assert SAWIDTH<=10                    -- at most 1k words devices
52
    report "assert(SAWIDTH<=10)" severity failure;
53
 
54
  proc_regs: process (CLK)
55
    variable isel : slbit := '0';
56
  begin
57 13 wfjm
    if rising_edge(CLK) then
58 8 wfjm
      isel := '0';
59
      if IB_MREQ.aval='1' and
60
        IB_MREQ.addr(12 downto SAWIDTH+1)=IB_ADDR(12 downto SAWIDTH+1) then
61
        isel := '1';
62
      end if;
63
      R_SEL <= isel;
64
    end if;
65
  end process proc_regs;
66
 
67
  SEL <= R_SEL;
68
 
69
end syn;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.