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

Subversion Repositories wishbone_uart_controller

[/] [wishbone_uart_controller/] [branches/] [uartcontroller/] [processor.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:    22:50:00 04/16/2013 
6
-- Design Name: 
7
-- Module Name:    processor_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 processor is
33
    Port (
34
                                ACK_I : IN std_logic;
35
                                CLK_I : IN std_logic;
36
                                DAT_I : IN std_logic_vector(7 downto 0);
37
                                RST_I : IN std_logic;
38
                                ADR_O : OUT std_logic_vector(7 downto 0);
39
                                CYC_O : OUT std_logic;
40
                                DAT_O: OUT std_logic_vector(7 downto 0);
41
                                STB_O : OUT std_logic;
42
                                WE_O: OUT std_logic;
43
                                RX : IN std_logic;
44
                                TX : OUT std_logic
45
 
46
                );
47
 
48
 
49
 
50
end processor;
51
 
52
architecture Behavioral of processor is
53
        COMPONENT burst_uart
54
        PORT(
55
                CLOCK : IN std_logic;
56
                DBIN : IN std_logic_vector(7 downto 0);
57
                write_strobe : IN std_logic;
58
                RESET : IN std_logic;
59
                DATA_STREAM_OUT_ACK : IN std_logic;
60
                RX : IN std_logic;
61
                ack : OUT std_logic;
62
                DATA_OUT : OUT std_logic_vector(7 downto 0);
63
                DATA_STREAM_OUT_STB : OUT std_logic;
64
                send_data: in std_logic;
65
                queue_empty:out std_logic;
66
                TX : OUT std_logic
67
                );
68
        END COMPONENT;
69
 
70
 
71
        COMPONENT uart_to_instruction
72
        PORT(
73
                uart_rx_data_out_stb : IN std_logic;
74
                data_in : IN std_logic_vector(7 downto 0);
75
                next_instructie : IN std_logic;
76
                clock : IN std_logic;
77
                queue_empty : IN std_logic;
78
                rd : OUT std_logic;
79
                enable : OUT std_logic;
80
                send_data : OUT std_logic;
81
                opcode : OUT std_logic;
82
                adress : OUT std_logic_vector(7 downto 0);
83
                data : OUT std_logic_vector(7 downto 0)
84
                );
85
        END COMPONENT;
86
 
87
 
88
 
89
-- VHDL Instantiation Created from source file IOALU.vhd -- 10:58:43 05/23/2013
90
--
91
-- Notes: 
92
-- 1) This instantiation template has been automatically generated using types
93
-- std_logic and std_logic_vector for the ports of the instantiated module
94
-- 2) To use this template to instantiate this entity, cut-and-paste and then edit
95
 
96
        COMPONENT IOALU
97
        PORT(
98
                ACK_I : IN std_logic;
99
                CLK_I : IN std_logic;
100
                DAT_I : IN std_logic_vector(7 downto 0);
101
                RST_I : IN std_logic;
102
                enable : IN std_logic;
103
                adress : IN std_logic_vector(7 downto 0);
104
                db_in : IN std_logic_vector(7 downto 0);
105
                queue_ack : IN std_logic;
106
                opcode : IN std_logic;
107
                ADR_O : OUT std_logic_vector(7 downto 0);
108
                CYC_O : OUT std_logic;
109
                DAT_O : OUT std_logic_vector(7 downto 0);
110
                STB_O : OUT std_logic;
111
                WE_O : OUT std_logic;
112
                db_out : OUT std_logic_vector(7 downto 0);
113
                rs232_we : OUT std_logic;
114
                error : OUT std_logic;
115
                next_instructie : OUT std_logic
116
                );
117
        END COMPONENT;
118
 
119
 
120
 
121
        signal db_out,DATA_OUT :std_logic_vector(7 downto 0);
122
        signal uart_rx_data_out_stb,next_instructie: std_logic;
123
        signal rd,enable,send_data,queue_empty,write_strobe: std_logic;
124
        signal opcode,error,queue_ack: std_logic;
125
        signal adress :std_logic_vector(7 downto 0);
126
        signal data : std_logic_vector(7 downto 0);
127
begin
128
 
129
        Inst_uart_to_instruction: uart_to_instruction PORT MAP(
130
                CLOCK => CLK_I,
131
                uart_rx_data_out_stb =>uart_rx_data_out_stb,
132
                data_in=> DATA_OUT,
133
                rd => rd,
134
                enable=>enable,
135
                send_data=>send_data,
136
                queue_empty=>queue_empty,
137
                next_instructie=>next_instructie,
138
                opcode => opcode,
139
                adress => adress,
140
                data => data
141
        );
142
 
143
        Inst_burst_uart: burst_uart PORT MAP(
144
                CLOCK => CLK_I,
145
                DBIN => db_out,
146
                write_strobe => write_strobe,
147
                ack => queue_ack,
148
                RESET => RST_I,
149
                DATA_STREAM_OUT_ACK => rd,
150
                DATA_OUT => DATA_OUT,
151
                DATA_STREAM_OUT_STB => uart_rx_data_out_stb,
152
                send_data=>send_data,
153
                queue_empty=>queue_empty,
154
                RX => RX,
155
                TX => TX
156
        );
157
        Inst_IOALU: IOALU PORT MAP(
158
                ACK_I => ACK_I,
159
                ADR_O => ADR_O,
160
                CLK_I => CLK_I,
161
                CYC_O => CYC_O,
162
                DAT_I => DAT_I,
163
                DAT_O => DAT_O,
164
                RST_I => RST_I,
165
                STB_O => STB_O,
166
                WE_O => WE_O,
167
                enable =>enable ,
168
                adress => adress,
169
                db_in => data,
170
                db_out => db_out,
171
                rs232_we =>write_strobe,
172
                queue_ack => queue_ack,
173
                opcode => opcode,
174
                error => error,
175
                next_instructie => next_instructie
176
        );
177
 
178
end Behavioral;
179
 

powered by: WebSVN 2.1.0

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