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

Subversion Repositories ahbmaster

[/] [ahbmaster/] [trunk/] [test79_AHBmaster/] [component/] [Actel/] [DirectCore/] [CoreAHBLite/] [5.3.101/] [rtl/] [vhdl/] [core/] [coreahblite_defaultslavesm.vhd] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 uson
-- ********************************************************************/
2
-- Actel Corporation Proprietary and Confidential
3
-- Copyright 2010 Actel Corporation.  All rights reserved.
4
--
5
-- ANY USE OR REDISTRIBUTION IN PART OR IN WHOLE MUST BE HANDLED IN
6
-- ACCORDANCE WITH THE ACTEL LICENSE AGREEMENT AND MUST BE APPROVED
7
-- IN ADVANCE IN WRITING.
8
--
9
-- Description: CoreAHBLite default slave state machine logic for
10
--                              matrix (2 masters by 16 slaves)
11
--
12
--
13
-- SVN Revision Information:
14
-- SVN $Revision: 23120 $
15
-- SVN $Date: 2014-07-17 19:56:23 +0530 (Thu, 17 Jul 2014) $
16
--
17
--
18
-- *********************************************************************/
19
library ieee;
20
use ieee.std_logic_1164.all;
21
use ieee.numeric_std.all;
22
entity COREAHBLITE_DEFAULTSLAVESM is
23
    generic(SYNC_RESET      : integer := 0);
24
    port (
25
        HCLK               : in std_logic;
26
        HRESETN            : in std_logic;
27
        DEFSLAVEDATASEL    : in std_logic;
28
        DEFSLAVEDATAREADY  : out std_logic;
29
        HRESP_DEFAULT      : out std_logic
30
    );
31
end entity COREAHBLITE_DEFAULTSLAVESM;
32
 
33
architecture COREAHBLITE_DEFAULTSLAVESM_arch of COREAHBLITE_DEFAULTSLAVESM is
34
 
35
constant IDLE               :std_logic := '0';
36
constant HRESPEXTEND        :std_logic := '1';
37
 
38
signal defSlaveSMNextState    : std_logic;
39
signal defSlaveSMCurrentState : std_logic;
40
signal aresetn                : std_logic;
41
signal sresetn                : std_logic;
42
 
43
begin
44
aresetn <= '1' WHEN (SYNC_RESET=1) ELSE HRESETN;
45
sresetn <= HRESETN WHEN (SYNC_RESET=1) ELSE '1';
46
 
47
    process (defSlaveSMCurrentState, DEFSLAVEDATASEL)
48
    begin
49
        DEFSLAVEDATAREADY <= '1';
50
        HRESP_DEFAULT <= '0';
51
        case defSlaveSMCurrentState is
52
            when IDLE =>
53
                if (DEFSLAVEDATASEL = '1') then
54
                    DEFSLAVEDATAREADY <= '0';
55
                    HRESP_DEFAULT <= '1';
56
                    defSlaveSMNextState <= HRESPEXTEND;
57
                else
58
                    defSlaveSMNextState <= IDLE;
59
                end if;
60
            when HRESPEXTEND =>
61
                HRESP_DEFAULT <= '1';
62
                defSlaveSMNextState <= IDLE;
63
            when others =>
64
                defSlaveSMNextState <= IDLE;
65
        end case;
66
    end process;
67
 
68
    process (HCLK, aresetn)
69
    begin
70
        if ((not(aresetn)) = '1') then
71
            defSlaveSMCurrentState <= IDLE;
72
        elsif (HCLK'event and HCLK = '1') then
73
            if ((not(sresetn)) = '1') then
74
                defSlaveSMCurrentState <= IDLE;
75
            else
76
                defSlaveSMCurrentState <= defSlaveSMNextState;
77
            end if;
78
        end if;
79
    end process;
80
 
81
 
82
end architecture COREAHBLITE_DEFAULTSLAVESM_arch;

powered by: WebSVN 2.1.0

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