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

Subversion Repositories uart_block

[/] [uart_block/] [trunk/] [hdl/] [iseProject/] [INTERCON_P2P.vhd] - Blame information for rev 35

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 leonardoar
 
2
library IEEE;
3
use IEEE.STD_LOGIC_1164.ALL;
4
 
5
entity INTERCON_P2P is
6
port (
7
            -- External (non-WISHBONE) inputs
8
            EXTCLK: in std_logic;
9
            EXTRST: in std_logic;
10
            -- External signals for simulation purposes
11
            byte_out: out std_logic_vector(7 downto 0);
12
                                data_avaible : out std_logic;
13
            tx: out std_logic;
14
                           rx : in std_logic
15
        );
16
end INTERCON_P2P;
17
 
18
architecture Behavioral of INTERCON_P2P is
19
component SYC0001a
20
    port(
21
            -- WISHBONE Interface
22
            CLK_O:  out std_logic;
23
            RST_O:  out std_logic;
24
            -- NON-WISHBONE Signals
25
            EXTCLK: in  std_logic;
26
            EXTRST: in  std_logic
27
         );
28
end component SYC0001a;
29
 
30
component SERIALMASTER is
31
        port(
32
            -- WISHBONE Signals
33
            ACK_I:  in  std_logic;
34
            ADR_O:  out std_logic_vector( 1 downto 0 );
35
            CLK_I:  in  std_logic;
36
            CYC_O:  out std_logic;
37
            DAT_I:  in  std_logic_vector( 31 downto 0 );
38
            DAT_O:  out std_logic_vector( 31 downto 0 );
39
            RST_I:  in  std_logic;
40
            SEL_O:  out std_logic;
41
            STB_O:  out std_logic;
42
            WE_O:   out std_logic;
43
 
44
                                -- NON-WISHBONE Signals
45
                                byte_rec : out std_logic_vector(7 downto 0)
46
         );
47
end component;
48
 
49
component uart_wishbone_slave is
50
    Port ( RST_I : in  STD_LOGIC;
51
           CLK_I : in  STD_LOGIC;
52
           ADR_I0 : in  STD_LOGIC_VECTOR (1 downto 0);
53
           DAT_I0 : in  STD_LOGIC_VECTOR (31 downto 0);
54
           DAT_O0 : out  STD_LOGIC_VECTOR (31 downto 0);
55
           WE_I : in  STD_LOGIC;
56
           STB_I : in  STD_LOGIC;
57
           ACK_O : out  STD_LOGIC;
58
                          serial_in : in std_logic;
59
                          data_Avaible : out std_logic;
60
                          serial_out : out std_logic
61
                          );
62
end component;
63
signal CLK : std_logic;
64
signal RST : std_logic;
65
signal ACK : std_logic;
66
signal WE  : std_logic;
67
signal STB  : std_logic;
68
signal ADR : std_logic_vector(  1 downto 0 );
69
signal dataI : std_logic_vector (31 downto 0);
70
signal dataO : std_logic_vector (31 downto 0);
71
begin
72
        uSysCon: component SYC0001a
73
    port map(
74
                 CLK_O   =>  CLK,
75
                 RST_O   =>  RST,
76
                 EXTCLK  =>  EXTCLK,
77
                 EXTRST  =>  EXTRST
78
    );
79
 
80
        uMasterSerial : component SERIALMASTER
81
        port map(
82
                ACK_I => ACK,
83
                ADR_O => ADR,
84
                CLK_I => CLK,
85
                CYC_O => open,
86
                DAT_I => dataI,
87
                DAT_O => dataO,
88
                RST_I => RST,
89
                SEL_O => open,
90
                STB_O => STB,
91
                byte_rec => byte_out,
92
                WE_O => WE
93
        );
94
 
95
        uUartWishboneSlave: component uart_wishbone_slave
96
        port map(
97
                RST_I => RST,
98
                CLK_I => CLK,
99
                ADR_I0 => ADR,
100
                DAT_I0 => dataO,
101
                DAT_O0 => dataI,
102
                WE_I => WE,
103
                STB_I => STB,
104
                ACK_O => ACK,
105
                serial_in => rx,
106
                data_Avaible => open,
107
                serial_out => tx
108
   );
109
 
110
end Behavioral;
111
 

powered by: WebSVN 2.1.0

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