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

Subversion Repositories avr_hp

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

powered by: WebSVN 2.1.0

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