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

Subversion Repositories avr_hp

[/] [avr_hp/] [trunk/] [rtl/] [rtl_v5_cm3/] [avr_core_cm3_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_cm3_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_cm3_top;
53
 
54
architecture Struct of avr_core_cm3_top is
55
 
56
component AVR_Core_cm3 is port(
57
                cp2_cml_1 : in std_logic;
58
                cp2_cml_2 : in std_logic;
59
 
60
                        --Clock and reset
61
                            cp2         : in  std_logic;
62
                                                cp2en       : in  std_logic;
63
                        ireset      : in  std_logic;
64
                                            -- JTAG OCD support
65
                                            valid_instr : out std_logic;
66
                                                insert_nop  : in  std_logic;
67
                                                block_irq   : in  std_logic;
68
                                                change_flow : out std_logic;
69
                        -- Program Memory
70
                        pc          : out std_logic_vector(15 downto 0);
71
                        inst        : in  std_logic_vector(15 downto 0);
72
                        -- I/O control
73
                        adr         : out std_logic_vector(5 downto 0);
74
                        iore        : out std_logic;
75
                        iowe        : out std_logic;
76
                        -- Data memory control
77
                        ramadr      : out std_logic_vector(15 downto 0);
78
                        ramre       : out std_logic;
79
                        ramwe       : out std_logic;
80
                                                cpuwait     : in  std_logic;
81
                                                -- Data paths
82
                        dbusin      : in  std_logic_vector(7 downto 0);
83
                        dbusout     : out std_logic_vector(7 downto 0);
84
                        -- Interrupt
85
                        irqlines    : in  std_logic_vector(22 downto 0);
86
                        irqack      : out std_logic;
87
                        irqackad    : out std_logic_vector(4 downto 0);
88
                        --Sleep Control
89
                        sleepi      : out std_logic;
90
                        irqok       : out std_logic;
91
                        globint     : out std_logic;
92
                        --Watchdog
93
                        wdri        : out std_logic
94
                                                );
95
end component;
96
 
97
 
98
 
99
begin
100
 
101
AVR_Core_cm3_Inst:component AVR_Core_cm3 port map (
102
                cp2_cml_1 => cp2,
103
                cp2_cml_2 => cp2,
104
            -- Clock and reset
105
            cp2      => cp2,
106
                cp2en    => cp2en,
107
            ireset   => ireset,
108
                -- JTAG OCD support
109
                valid_instr => valid_instr,
110
                insert_nop  => insert_nop,
111
                block_irq   => block_irq,
112
                change_flow => change_flow,
113
                        -- Program Memory
114
                        pc  => pc, --        : out std_logic_vector(15 downto 0);   
115
                        inst  => inst  , --                : in  std_logic_vector(15 downto 0);
116
                        -- I/O control
117
                        adr  => adr  , --                 : out std_logic_vector(5 downto 0);   
118
                        iore  => iore  , --                : out std_logic;                       
119
                        iowe  => iowe  , --                : out std_logic;                                             
120
                        -- Data memory control
121
                        ramadr  => ramadr  , --              : out std_logic_vector(15 downto 0);
122
                        ramre  => ramre  , --               : out std_logic;
123
                        ramwe  => ramwe  , --               : out std_logic;
124
                                cpuwait  => cpuwait  , --             : in  std_logic;
125
                                -- Data paths
126
                        dbusin  => dbusin  , --              : in  std_logic_vector(7 downto 0);
127
                        dbusout  => dbusout  , --             : out std_logic_vector(7 downto 0);
128
                        -- Interrupt
129
                        irqlines  => irqlines  , --            : in  std_logic_vector(22 downto 0);
130
                        irqack  => irqack  , --              : out std_logic;
131
                        irqackad  => irqackad  , --            : out std_logic_vector(4 downto 0);
132
                        --Sleep Control
133
                        sleepi  => sleepi  , --             : out std_logic;
134
                        irqok  => irqok  , --               : out std_logic;
135
                        globint  => globint  , --                   : out std_logic;
136
                        --Watchdog
137
                        wdri  => wdri);
138
 
139
end Struct;

powered by: WebSVN 2.1.0

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