URL
https://opencores.org/ocsvn/wf3d/wf3d/trunk
Subversion Repositories wf3d
[/] [wf3d/] [trunk/] [implement/] [rtl/] [fm_hvc/] [fm_hvc.v] - Rev 2
Go to most recent revision | Compare with Previous | Blame | View Log
//======================================================================= // Project Monophony // Wire-Frame 3D Graphics Accelerator IP Core // // File: // fm_hvc.v // // Abstract: // VGA LCD Controller // // Author: // Kenji Ishimaru (kenji.ishimaru@prtissimo.com) // //====================================================================== // // Copyright (c) 2015, Kenji Ishimaru // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // -Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // -Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Revision History module fm_hvc ( clk_core, clk_vi, rst_x, // configuration registers i_video_start, i_fb0_offset, i_fb0_ms_offset, i_fb1_offset, i_fb1_ms_offset, i_color_mode, i_front_buffer, i_aa_en, i_fb_blend_en, // status out o_vint_x, o_vint_edge, // dram if o_req, o_adrs, o_len, i_ack, i_rstr, i_rd, // video out clk_vo, o_r, o_g, o_b, o_vsync_x, o_hsync_x, o_blank_x, o_de ); ////////////////////////////////// // I/O port definition ////////////////////////////////// input clk_core; input clk_vi; // 25MHz input rst_x; // configuration registers input i_video_start; input [6:0] i_fb0_offset; input [3:0] i_fb0_ms_offset; input [6:0] i_fb1_offset; input [3:0] i_fb1_ms_offset; input [1:0] i_color_mode; input i_front_buffer; input [2:0] i_aa_en; input i_fb_blend_en; // status out output o_vint_x; output o_vint_edge; // dram if output o_req; output [23:0] o_adrs; output [5:0] o_len; input i_ack; input i_rstr; input [31:0] i_rd; output clk_vo; output [7:0] o_r; output [7:0] o_g; output [7:0] o_b; output o_vsync_x; output o_hsync_x; output o_blank_x; output o_de; ////////////////////////////////// // wire ////////////////////////////////// wire [7:0] w_test_r; wire [7:0] w_test_g; wire [7:0] w_test_b; wire w_vsync_i; wire w_hsync_i; wire w_active; wire w_first_line; wire w_fifo_available; wire w_fifo_available_ack; ////////////////////////////////// // assign ////////////////////////////////// assign clk_vo = clk_vi; /////////////////////////// // module instance ////////////////////////// fm_hvc_core fm_hvc_core ( .clk_vi(clk_vi), .rst_x(rst_x), // configuration registers .i_video_start(i_video_start), // control out (only for internal use) .o_vsync_i(w_vsync_i), .o_hsync_i(w_hsync_i), // video out timing .o_active(w_active), .o_first_line(w_first_line), .o_r(w_test_r), .o_g(w_test_g), .o_b(w_test_b), .o_vsync_x(o_vsync_x), .o_hsync_x(o_hsync_x), .o_blank_x(o_blank_x), .o_de(o_de) ); fm_hvc_dma fm_hvc_dma ( .clk_core(clk_core), .rst_x(rst_x), .i_color_mode(i_color_mode), .i_video_start(i_video_start), .i_vsync(w_vsync_i), .i_hsync(w_hsync_i), .i_fb0_offset(i_fb0_offset), .i_fb0_ms_offset(i_fb0_ms_offset), .i_fb1_offset(i_fb1_offset), .i_fb1_ms_offset(i_fb1_ms_offset), .i_front_buffer(i_front_buffer), .i_aa_en(i_aa_en[0]), .i_fifo_available(w_fifo_available), .o_fifo_available_ack(w_fifo_available_ack), .o_vsync(o_vint_x), .o_vsync_edge(o_vint_edge), // dram if .o_req(o_req), .o_adrs(o_adrs), .o_len(o_len), .i_ack(i_ack) ); fm_hvc_data fm_hvc_data ( .clk_core(clk_core), .clk_vi(clk_vi), .rst_x(rst_x), // sdram interface .i_rstr(i_rstr), .i_rd(i_rd), // timing control .i_h_active(w_active), .i_first_line(w_first_line), .i_hsync(w_hsync_i), .i_vsync(w_vsync_i), .o_fifo_available(w_fifo_available), .i_fifo_available_ack(w_fifo_available_ack), // configuration .i_video_start(i_video_start), .i_color_mode(i_color_mode), // test color input .i_test_r(w_test_r), .i_test_g(w_test_g), .i_test_b(w_test_b), // color out .o_r(o_r), .o_g(o_g), .o_b(o_b), .o_a() ); endmodule
Go to most recent revision | Compare with Previous | Blame | View Log