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

Subversion Repositories mcip_open

[/] [mcip_open/] [trunk/] [MCIPopen_XilinxISEproject/] [LCDapp_MCIPopen.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 mezzah
----------------------------------------------------------------------------------
2
-- Company:        Ferhat Abbas University - Algeria
3
-- Engineer:       Ibrahim MEZZAH
4
-- 
5
-- Create Date:    08:17:48 07/25/2015 
6
-- Design Name:    MCIP open
7
-- Module Name:    LCDapp_MCIPopen - Behavioral 
8
-- Project Name: 
9
-- Target Devices: 
10
-- Tool versions: 
11
-- Description: 
12
--
13
-- Dependencies: 
14
--
15
-- Revision: 
16
-- Revision 0.01 - File Created
17
-- Additional Comments: 
18
--
19
----------------------------------------------------------------------------------
20
library IEEE;
21
use IEEE.STD_LOGIC_1164.ALL;
22
 
23
 
24
entity LCDapp_MCIPopen is
25
         Generic (      STKPTR_length   : integer := 5;         -- Stack Pointer Length --> min = 2, max = 5
26
                                        STVREN                  : std_logic := '1';     -- Stack Overflow/Underflow Reset Enable bit
27
 
28
                                        WDTPS : std_logic_vector(3 downto 0) := "0100"; -- Watchdog Timer Postscale Select bits
29
                                        WDTEN : std_logic := '0'; -- Watchdog Timer enable bit
30
 
31
                                        Banks_number            : integer := 3; -- number of banks, min = 2, max = 16
32
                                        dm_TOPaddr                      : std_logic_vector(11 downto 0) := x"2FF";
33
 
34
                                        IAlength                : integer := 12; -- min = 2, max = 21
35
                                        pm_TOPaddr              : std_logic_vector(20 downto 0) := '0'&x"03FFF"
36
                                        );
37
 
38
    Port ( reset              : in std_logic;
39
           clk50MHz           : in std_logic;
40
                          direction          : in std_logic;    -- must be always '0'
41
                          clock_out          : out std_logic;
42
           PORTA              : in std_logic_vector(7 downto 0);
43
           PORTB              : out std_logic_vector(7 downto 0);
44
           PORTC              : out std_logic_vector(7 downto 0);
45
           PORTD              : out std_logic_vector(7 downto 0) );
46
end LCDapp_MCIPopen;
47
 
48
architecture Behavioral of LCDapp_MCIPopen is
49
 
50
        signal clk25MHz                         : std_logic := '1';
51
        signal nreset                                   : std_logic := '1';
52
        signal PORTAs                                   : std_logic_vector(7 downto 0);
53
        signal PORTBs                                   : std_logic_vector(7 downto 0);
54
        signal PORTCs                                   : std_logic_vector(7 downto 0);
55
        signal PORTDs                                   : std_logic_vector(7 downto 0);
56
 
57
 
58
begin
59
 
60
MCU: entity work.MCIPopen_mcu_example
61
Generic map(    STKPTR_length   => STKPTR_length,
62
                                        STVREN                  => STVREN,
63
 
64
                                        WDTPS                           => WDTPS,
65
                                        WDTEN                           => WDTEN,
66
 
67
                                        Banks_number    => Banks_number,
68
                                        dm_TOPaddr              => dm_TOPaddr,
69
 
70
                                        IAlength                => IAlength,
71
                                        pm_TOPaddr              => pm_TOPaddr
72
                                        )
73
Port map ( nreset             => nreset,
74
           clk25MHz           => clk25MHz,
75
                          Wdt_clock                             => clk25MHz,
76
                          clock_out          => clock_out,
77
           PORTA              => PORTAs,
78
           PORTB              => PORTBs,
79
           PORTC              => PORTCs,
80
           PORTD              => PORTDs);
81
 
82
 
83
 
84
CLOCKpros : process(clk50MHz)
85
begin
86
        if clk50MHz'event and clk50MHz = '1' then
87
                clk25MHz <= not clk25MHz;
88
        end if;
89
end process;
90
 
91
        nreset <= not reset;
92
 
93
        PORTAs <= PORTA when direction = '0' else "ZZZZZZZZ";
94
 
95
        PORTB <= PORTBs;
96
        PORTBs <= x"00" when direction = '1' else "ZZZZZZZZ";
97
 
98
        PORTC <= PORTCs;
99
        PORTCs <= x"00" when direction = '1' else "ZZZZZZZZ";
100
 
101
        PORTD <= PORTDs;
102
        PORTDs <= x"00" when direction = '1' else "ZZZZZZZZ";
103
 
104
end Behavioral;
105
 

powered by: WebSVN 2.1.0

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