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

Subversion Repositories avr_hp

[/] [avr_hp/] [trunk/] [rtl/] [rtl_s3_cm2/] [avr_core_cm2_top.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 tobil
--************************************************************************************************
2
--  Top entity for AVR core
3
--  Version 1.82? (Special version for the JTAG OCD)
4
--  Designed by Ruslan Lepetenok 
5
--  Modified 31.08.2006
6
--  SLEEP and CLRWDT instructions support was added
7
--  BREAK instructions support was added 
8
--  PM clock enable was added
9
--************************************************************************************************
10
 
11
library IEEE;
12
use IEEE.std_logic_1164.all;
13
 
14
 
15
entity AVR_Core_cm2_top is port(
16
 
17
                        --Clock and reset
18
                            cp2         : in  std_logic;
19
                                                cp2en       : in  std_logic;
20
                        ireset      : in  std_logic;
21
                                            -- JTAG OCD support
22
                                            valid_instr : out std_logic;
23
                                                insert_nop  : in  std_logic;
24
                                                block_irq   : in  std_logic;
25
                                                change_flow : out std_logic;
26
                        -- Program Memory
27
                        pc          : out std_logic_vector(15 downto 0);
28
                        inst        : in  std_logic_vector(15 downto 0);
29
                        -- I/O control
30
                        adr         : out std_logic_vector(5 downto 0);
31
                        iore        : out std_logic;
32
                        iowe        : out std_logic;
33
                        -- Data memory control
34
                        ramadr      : out std_logic_vector(15 downto 0);
35
                        ramre       : out std_logic;
36
                        ramwe       : out std_logic;
37
                                                cpuwait     : in  std_logic;
38
                                                -- Data paths
39
                        dbusin      : in  std_logic_vector(7 downto 0);
40
                        dbusout     : out std_logic_vector(7 downto 0);
41
                        -- Interrupt
42
                        irqlines    : in  std_logic_vector(22 downto 0);
43
                        irqack      : out std_logic;
44
                        irqackad    : out std_logic_vector(4 downto 0);
45
                        --Sleep Control
46
                        sleepi      : out std_logic;
47
                        irqok       : out std_logic;
48
                        globint     : out std_logic;
49
                        --Watchdog
50
                        wdri        : out std_logic
51
                                                );
52
end AVR_Core_cm2_top;
53
 
54
architecture Struct of avr_core_cm2_top is
55
 
56
component AVR_Core_cm2 is port(
57
                cp2_cml_1 : in std_logic;
58
 
59
                        --Clock and reset
60
                            cp2         : in  std_logic;
61
                                                cp2en       : in  std_logic;
62
                        ireset      : in  std_logic;
63
                                            -- JTAG OCD support
64
                                            valid_instr : out std_logic;
65
                                                insert_nop  : in  std_logic;
66
                                                block_irq   : in  std_logic;
67
                                                change_flow : out std_logic;
68
                        -- Program Memory
69
                        pc          : out std_logic_vector(15 downto 0);
70
                        inst        : in  std_logic_vector(15 downto 0);
71
                        -- I/O control
72
                        adr         : out std_logic_vector(5 downto 0);
73
                        iore        : out std_logic;
74
                        iowe        : out std_logic;
75
                        -- Data memory control
76
                        ramadr      : out std_logic_vector(15 downto 0);
77
                        ramre       : out std_logic;
78
                        ramwe       : out std_logic;
79
                                                cpuwait     : in  std_logic;
80
                                                -- Data paths
81
                        dbusin      : in  std_logic_vector(7 downto 0);
82
                        dbusout     : out std_logic_vector(7 downto 0);
83
                        -- Interrupt
84
                        irqlines    : in  std_logic_vector(22 downto 0);
85
                        irqack      : out std_logic;
86
                        irqackad    : out std_logic_vector(4 downto 0);
87
                        --Sleep Control
88
                        sleepi      : out std_logic;
89
                        irqok       : out std_logic;
90
                        globint     : out std_logic;
91
                        --Watchdog
92
                        wdri        : out std_logic
93
                                                );
94
end component;
95
 
96
 
97
 
98
begin
99
 
100
AVR_Core_cm2_Inst:component AVR_Core_cm2 port map (
101
                cp2_cml_1 => cp2,
102
            -- Clock and reset
103
            cp2      => cp2,
104
                cp2en    => cp2en,
105
            ireset   => ireset,
106
                -- JTAG OCD support
107
                valid_instr => valid_instr,
108
                insert_nop  => insert_nop,
109
                block_irq   => block_irq,
110
                change_flow => change_flow,
111
                        -- Program Memory
112
                        pc  => pc, --        : out std_logic_vector(15 downto 0);   
113
                        inst  => inst  , --                : in  std_logic_vector(15 downto 0);
114
                        -- I/O control
115
                        adr  => adr  , --                 : out std_logic_vector(5 downto 0);   
116
                        iore  => iore  , --                : out std_logic;                       
117
                        iowe  => iowe  , --                : out std_logic;                                             
118
                        -- Data memory control
119
                        ramadr  => ramadr  , --              : out std_logic_vector(15 downto 0);
120
                        ramre  => ramre  , --               : out std_logic;
121
                        ramwe  => ramwe  , --               : out std_logic;
122
                                cpuwait  => cpuwait  , --             : in  std_logic;
123
                                -- Data paths
124
                        dbusin  => dbusin  , --              : in  std_logic_vector(7 downto 0);
125
                        dbusout  => dbusout  , --             : out std_logic_vector(7 downto 0);
126
                        -- Interrupt
127
                        irqlines  => irqlines  , --            : in  std_logic_vector(22 downto 0);
128
                        irqack  => irqack  , --              : out std_logic;
129
                        irqackad  => irqackad  , --            : out std_logic_vector(4 downto 0);
130
                        --Sleep Control
131
                        sleepi  => sleepi  , --             : out std_logic;
132
                        irqok  => irqok  , --               : out std_logic;
133
                        globint  => globint  , --                   : out std_logic;
134
                        --Watchdog
135
                        wdri  => wdri);
136
 
137
end Struct;

powered by: WebSVN 2.1.0

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