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

Subversion Repositories wb_vga

[/] [wb_vga/] [tags/] [a01/] [vga_chip.vhd] - Blame information for rev 8

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 tantos
--
2
--  File: vga_chip.vhd
3
--
4
--  (c) Copyright Andras Tantos <andras_tantos@yahoo.com> 2001/03/31
5
--  This code is distributed under the terms and conditions of the GNU General Public Lince.
6
--
7
 
8
library IEEE;
9
use IEEE.std_logic_1164.all;
10
 
11
-- same as VGA_CORE but without generics. Suited for post-layout simulation.
12
entity vga_chip is
13
        port (
14
                clk_i: in std_logic;
15
                clk_en: in std_logic := '1';
16
                rst_i: in std_logic := '0';
17
 
18
                -- CPU bus interface
19
                dat_i: in std_logic_vector (8-1 downto 0);
20
                dat_oi: in std_logic_vector (8-1 downto 0);
21
                dat_o: out std_logic_vector (8-1 downto 0);
22
                cyc_i: in std_logic;
23
                ack_o: out std_logic;
24
                ack_oi: in std_logic;
25
                we_i: in std_logic;
26
                vmem_stb_i: in std_logic;
27
                reg_stb_i: in std_logic;
28
                adr_i: in std_logic_vector (20 downto 0);
29
 
30
                -- video memory SRAM interface
31
                s_data : inout std_logic_vector((16-1) downto 0);
32
                s_addr : out std_logic_vector((20-1) downto 0);
33
                s_oen : out std_logic;
34
                s_wrhn : out std_logic;
35
                s_wrln : out std_logic;
36
                s_cen : out std_logic;
37
 
38
                -- sync blank and video signal outputs
39
                h_sync: out std_logic;
40
                h_blank: out std_logic;
41
                v_sync: out std_logic;
42
                v_blank: out std_logic;
43
                h_tc: out std_logic;
44
                v_tc: out std_logic;
45
                blank: out std_logic;
46
                video_out: out std_logic_vector (7 downto 0);   -- video output binary signal (unused bits are forced to 0)
47
 
48
        -- TEST SIGNALS
49
            T_v_we_o: out std_logic;
50
            T_v_stb_o: out std_logic;
51
            T_v_ack_i: out std_logic;
52
            T_v_adr_o : out std_logic_vector((20-1) downto 0);
53
            T_v_sel_o : out std_logic_vector((16/8)-1 downto 0);
54
            T_v_dat_o : out std_logic_vector((16-1) downto 0);
55
            T_v_dat_i : out std_logic_vector((16-1) downto 0)
56
        );
57
end vga_chip;
58
 
59
architecture vga_chip of vga_chip is
60
        component vga_core
61
        generic (
62
                -- cannot be overwritten at the moment...
63
                v_mem_width: positive := 16;
64
                fifo_size: positive := 256;
65
                v_addr_width : positive := 20;
66
                bus_width: positive := 8
67
        );
68
        port (
69
                clk_i: in std_logic;
70
                clk_en: in std_logic := '1';
71
                rst_i: in std_logic := '0';
72
 
73
                -- CPU bus interface
74
                dat_i: in std_logic_vector (bus_width-1 downto 0);
75
                dat_oi: in std_logic_vector (bus_width-1 downto 0);
76
                dat_o: out std_logic_vector (bus_width-1 downto 0);
77
                cyc_i: in std_logic;
78
                ack_o: out std_logic;
79
                ack_oi: in std_logic;
80
                we_i: in std_logic;
81
                vmem_stb_i: in std_logic;
82
                reg_stb_i: in std_logic;
83
                adr_i: in std_logic_vector (v_addr_width downto 0);
84
 
85
                -- video memory SRAM interface
86
                s_data : inout std_logic_vector((v_mem_width-1) downto 0);
87
                s_addr : out std_logic_vector((v_addr_width-1) downto 0);
88
                s_oen : out std_logic;
89
                s_wrhn : out std_logic;
90
                s_wrln : out std_logic;
91
                s_cen : out std_logic;
92
 
93
                -- sync blank and video signal outputs
94
                h_sync: out std_logic;
95
                h_blank: out std_logic;
96
                v_sync: out std_logic;
97
                v_blank: out std_logic;
98
                h_tc: out std_logic;
99
                v_tc: out std_logic;
100
                blank: out std_logic;
101
                video_out: out std_logic_vector (7 downto 0);  -- video output binary signal (unused bits are forced to 0)
102
 
103
            -- TEST SIGNALS
104
            T_v_we_o: out std_logic;
105
            T_v_stb_o: out std_logic;
106
            T_v_ack_i: out std_logic;
107
            T_v_adr_o : out std_logic_vector((v_addr_width-1) downto 0);
108
            T_v_sel_o : out std_logic_vector((v_addr_width/8)-1 downto 0);
109
            T_v_dat_o : out std_logic_vector((v_mem_width-1) downto 0);
110
            T_v_dat_i : out std_logic_vector((v_mem_width-1) downto 0)
111
        );
112
        end component;
113
begin
114
        Core : vga_core
115
                port map (
116
                clk_i => clk_i,
117
                    clk_en => clk_en,
118
                    rst_i => rst_i,
119
                dat_i => dat_i,
120
                    dat_oi => dat_oi,
121
                    dat_o => dat_o,
122
                cyc_i => cyc_i,
123
                    ack_o => ack_o,
124
                    ack_oi => ack_oi,
125
                    we_i => we_i,
126
                    vmem_stb_i => vmem_stb_i,
127
                    reg_stb_i => reg_stb_i,
128
                    adr_i => adr_i,
129
                s_data => s_data,
130
                    s_addr => s_addr,
131
                    s_oen => s_oen,
132
                    s_wrhn => s_wrhn,
133
                    s_wrln => s_wrln,
134
                    s_cen => s_cen,
135
                h_sync => h_sync,
136
                    h_blank => h_blank,
137
                    v_sync => v_sync,
138
                    v_blank => v_blank,
139
                    h_tc => h_tc,
140
                    v_tc => v_tc,
141
                    blank => blank,
142
                video_out => video_out,
143
 
144
            T_v_we_o  =>  T_v_we_o,
145
            T_v_stb_o =>  T_v_stb_o,
146
            T_v_ack_i =>  T_v_ack_i,
147
            T_v_adr_o =>  T_v_adr_o,
148
            T_v_sel_o =>  T_v_sel_o,
149
            T_v_dat_o =>  T_v_dat_o,
150
            T_v_dat_i =>  T_v_dat_i
151
                );
152
end vga_chip;

powered by: WebSVN 2.1.0

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