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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.74/] [rtl/] [vlib/] [rbus/] [rb_sel.vhd] - Blame information for rev 40

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 36 wfjm
-- $Id: rb_sel.vhd 758 2016-04-02 18:01:39Z mueller $
2 27 wfjm
--
3 36 wfjm
-- Copyright 2010-2016 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 27 wfjm
--
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:    rb_sel - syn
16
-- Description:    rbus: address select logic
17
--
18
-- Dependencies:   -
19
-- Test bench:     -
20
-- Target Devices: generic
21 36 wfjm
-- Tool versions:  ise 12.1-14.7; viv 2014.4-2015.4; ghdl 0.29-0.33
22 27 wfjm
--
23
-- Revision History: 
24
-- Date         Rev Version  Comment
25 36 wfjm
-- 2016-04-02   758   4.1    streamline code
26 27 wfjm
-- 2014-08-15   583   4.0    rb_mreq addr now 16 bit
27
-- 2010-12-26   349   1.0    Initial version (cloned from ibus/ib_sel)
28
------------------------------------------------------------------------------
29
 
30
library ieee;
31
use ieee.std_logic_1164.all;
32
 
33
use work.slvtypes.all;
34
use work.rblib.all;
35
 
36
-- ----------------------------------------------------------------------------
37
 
38
entity rb_sel is                        -- rbus address select logic
39
  generic (
40
    RB_ADDR : slv16;                    -- rbus address base
41
    SAWIDTH : natural := 0);            -- device subaddress space width
42
  port (
43
    CLK : in slbit;                     -- clock
44
    RB_MREQ :  in rb_mreq_type;         -- ibus request
45
    SEL : out slbit                     -- select state bit
46
  );
47
end rb_sel;
48
 
49
architecture syn of rb_sel is
50
  signal R_SEL : slbit := '0';
51
begin
52
 
53
  assert SAWIDTH<=15                    -- at most 32k word devices
54
    report "assert(SAWIDTH<=15)" severity failure;
55
 
56
  proc_regs: process (CLK)
57
  begin
58
    if rising_edge(CLK) then
59
      if RB_MREQ.aval='1' and
60
        RB_MREQ.addr(15 downto SAWIDTH)=RB_ADDR(15 downto SAWIDTH) then
61 36 wfjm
        R_SEL <= '1';
62
      else
63
        R_SEL <= '0';
64 27 wfjm
      end if;
65
    end if;
66
  end process proc_regs;
67
 
68
  SEL <= R_SEL;
69
 
70
end syn;

powered by: WebSVN 2.1.0

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