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

Subversion Repositories wishbone_uart_controller

[/] [wishbone_uart_controller/] [branches/] [uartcontroller/] [burst_uart.vhd] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 themassau
----------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer: 
4
-- 
5
-- Create Date:    13:50:17 04/16/2013 
6
-- Design Name: 
7
-- Module Name:    burst_uart - 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
-- Uncomment the following library declaration if using
24
-- arithmetic functions with Signed or Unsigned values
25
--use IEEE.NUMERIC_STD.ALL;
26
 
27
-- Uncomment the following library declaration if instantiating
28
-- any Xilinx primitives in this code.
29
--library UNISIM;
30
--use UNISIM.VComponents.all;
31
 
32
entity burst_uart is
33
    Port ( CLOCK : in  STD_LOGIC;
34
                          DBIN  : in  std_logic_vector(7 downto 0);
35
                          write_strobe: in  STD_LOGIC;
36
                          ack: out std_logic;
37
                          RESET: in  STD_LOGIC;
38
                          DATA_STREAM_OUT_ACK : IN std_logic;
39
                          DATA_OUT : OUT std_logic_vector(7 downto 0);
40
                          DATA_STREAM_OUT_STB : OUT std_logic;
41
                          RX : IN std_logic;
42
                          TX : OUT std_logic
43
                          );
44
end burst_uart;
45
 
46
architecture Behavioral of burst_uart is
47
        COMPONENT uart_queue
48
        PORT(
49
                        clk : IN std_logic;
50
                         DBIN : IN std_logic_vector(7 downto 0);
51
                         write_strobe : IN std_logic;
52
                         read_strobe : IN std_logic;
53
                         DBOUT : OUT std_logic_vector(7 downto 0);
54
                         ack: OUT std_logic:='0';
55
                         WR : OUT std_logic:='0');
56
 
57
        END COMPONENT;
58
 
59
        COMPONENT UART
60
        Generic (
61
        BAUD_RATE           : positive:=230400;-- 9600;-- tijdelijke laage snelheid zal 
62
                  --later opgetrokken worden naar 19200 of 
63
                  --115200 
64
        CLOCK_FREQUENCY     : positive:= 50000000
65
        );
66
        PORT(
67
                CLOCK : IN std_logic;
68
                RESET : IN std_logic;
69
                DATA_STREAM_IN : IN std_logic_vector(7 downto 0);
70
                DATA_STREAM_IN_STB : IN std_logic;
71
                DATA_STREAM_OUT_ACK : IN std_logic;
72
                DATA_STREAM_IN_TBE  :   out       std_logic;
73
                RX : IN std_logic;
74
                DATA_STREAM_IN_ACK : OUT std_logic;
75
                DATA_STREAM_OUT : OUT std_logic_vector(7 downto 0);
76
                DATA_STREAM_OUT_STB : OUT std_logic;
77
                TX : OUT std_logic
78
                );
79
        END COMPONENT;
80
 
81
--
82
--      COMPONENT Rs232RefComp
83
--      PORT(
84
--              RXD : IN std_logic;
85
--              CLK : IN std_logic;
86
--              DBIN : IN std_logic_vector(7 downto 0);
87
--              RD : IN std_logic;
88
--              WR : IN std_logic;
89
--              RST : IN std_logic;          
90
--              TXD : OUT std_logic;
91
--              DBOUT : OUT std_logic_vector(7 downto 0);
92
--              RDA : OUT std_logic;
93
--              TBE : OUT std_logic;
94
--              OE : OUT std_logic
95
--              );
96
--      END COMPONENT;
97
 
98
 
99
signal wr_i :std_logic:='0';
100
signal DBOUT : std_logic_vector(7 downto 0);
101
signal  read_strobe :std_logic;
102
begin
103
 
104
 
105
 
106
        Inst_uart_sync: uart_queue PORT MAP(
107
                clk =>CLOCK ,
108
                write_strobe => write_strobe,
109
                read_strobe=>read_strobe,
110
                DBOUT => DBOUT,
111
                DBIN => DBIN,
112
                ack=>ack,
113
                WR => wr_i
114
        );
115
 
116
        Inst_UART: UART PORT MAP(
117
                CLOCK => CLOCK,
118
                RESET => RESET,
119
                DATA_STREAM_IN => DBOUT,
120
                DATA_STREAM_IN_STB => wr_i,
121
                DATA_STREAM_IN_ACK => read_strobe,
122
                DATA_STREAM_IN_TBE=> open,
123
                DATA_STREAM_OUT => DATA_OUT,
124
                DATA_STREAM_OUT_STB => DATA_STREAM_OUT_STB,
125
                DATA_STREAM_OUT_ACK => DATA_STREAM_OUT_ACK,
126
                TX => TX,
127
                RX => RX
128
        );
129
 
130
end Behavioral;
131
 

powered by: WebSVN 2.1.0

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