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

Subversion Repositories uart2bus

[/] [uart2bus/] [trunk/] [vhdl/] [rtl/] [uartTop.vhd] - Blame information for rev 11

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 6 smuller
-----------------------------------------------------------------------------------------
2
-- uart top level module  
3
--
4
-----------------------------------------------------------------------------------------
5 11 smuller
library ieee;
6
use ieee.std_logic_1164.all;
7 6 smuller
 
8 11 smuller
library work;
9
use work.uart2BusTop_pkg.all;
10
 
11 6 smuller
entity uartTop is
12
  port ( -- global signals
13
         clr       : in  std_logic;                     -- global reset input
14
         clk       : in  std_logic;                     -- global clock input
15
         -- uart serial signals
16
         serIn     : in  std_logic;                     -- serial data input
17
         serOut    : out std_logic;                     -- serial data output
18
         -- transmit and receive internal interface signals
19
         txData    : in  std_logic_vector(7 downto 0);  -- data byte to transmit
20
         newTxData : in  std_logic;                     -- asserted to indicate that there is a new data byte for transmission
21
         txBusy    : out std_logic;                     -- signs that transmitter is busy
22
         rxData    : out std_logic_vector(7 downto 0);  -- data byte received
23
         newRxData : out std_logic;                     -- signs that a new byte was received
24
         -- baud rate configuration register - see baudGen.vhd for details
25
         baudFreq  : in  std_logic_vector(11 downto 0); -- baud rate setting registers - see header description
26
         baudLimit : in  std_logic_vector(15 downto 0); -- baud rate setting registers - see header description
27
         baudClk   : out std_logic);                    -- 
28
end uartTop;
29
 
30
architecture Behavioral of uartTop is
31
 
32
  signal ce16 : std_logic; -- clock enable at bit rate
33
 
34
  begin
35
    -- baud rate generator module
36
    bg : baudGen
37
      port map (
38
        clr => clr,
39
        clk => clk,
40
        baudFreq => baudFreq,
41
        baudLimit => baudLimit,
42
        ce16 => ce16);
43
    -- uart receiver
44
    ut : uartTx
45
      port map (
46
        clr => clr,
47
        clk => clk,
48
        ce16 => ce16,
49
        txData => txData,
50
        newTxData => newTxData,
51
        serOut => serOut,
52
        txBusy => txBusy);
53
    -- uart transmitter
54
    ur : uartRx
55
      port map (
56
        clr => clr,
57
        clk => clk,
58
        ce16 => ce16,
59
        serIn => serIn,
60
        rxData => rxData,
61
        newRxData => newRxData);
62
    baudClk <= ce16;
63
  end Behavioral;

powered by: WebSVN 2.1.0

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