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

Subversion Repositories wf3d

[/] [wf3d/] [trunk/] [implement/] [rtl/] [fm_hvc/] [fm_hvc.v] - Diff between revs 2 and 4

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 2 Rev 4
Line 7... Line 7...
//
//
// Abstract:
// Abstract:
//   VGA LCD Controller
//   VGA LCD Controller
//
//
// Author:
// Author:
//   Kenji Ishimaru (kenji.ishimaru@prtissimo.com)
//   Kenji Ishimaru (info.wf3d@gmail.com)
//
//
//======================================================================
//======================================================================
//
//
// Copyright (c) 2015, Kenji Ishimaru
// Copyright (c) 2015, Kenji Ishimaru
// All rights reserved.
// All rights reserved.
Line 36... Line 36...
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
// Revision History
// Revision History
 
// 2016/08/14 64-bit bus support
 
 
module fm_hvc (
module fm_hvc (
    clk_core,
    clk_core,
    clk_vi,
    clk_vi,
    rst_x,
    rst_x,
    // configuration registers
    // configuration registers
    i_video_start,
    i_video_start,
    i_fb0_offset,
    i_fb0_offset,
    i_fb0_ms_offset,
 
    i_fb1_offset,
    i_fb1_offset,
    i_fb1_ms_offset,
 
    i_color_mode,
    i_color_mode,
    i_front_buffer,
    i_front_buffer,
    i_aa_en,
 
    i_fb_blend_en,
 
    // status out
    // status out
    o_vint_x,
    o_vint_x,
    o_vint_edge,
    o_vint_edge,
    // dram if
    // dram if
    o_req,
    o_req,
Line 71... Line 68...
    o_vsync_x,
    o_vsync_x,
    o_hsync_x,
    o_hsync_x,
    o_blank_x,
    o_blank_x,
    o_de
    o_de
);
);
 
localparam P_IB_LEN_WIDTH  = 'd6;
 
`ifdef PP_BUSWIDTH_64
 
localparam P_IB_BASE_WIDTH = 'd12;
 
localparam P_IB_ADDR_WIDTH = 'd29;
 
localparam P_IB_DATA_WIDTH = 'd64;
 
`else
 
localparam P_IB_BASE_WIDTH = 'd7;
 
localparam P_IB_ADDR_WIDTH = 'd24;
 
localparam P_IB_DATA_WIDTH = 'd32;
 
`endif
//////////////////////////////////
//////////////////////////////////
// I/O port definition
// I/O port definition
//////////////////////////////////
//////////////////////////////////
    input          clk_core;
    input          clk_core;
    input          clk_vi;     // 25MHz
    input          clk_vi;     // 25MHz
    input          rst_x;
    input          rst_x;
    // configuration registers
    // configuration registers
    input          i_video_start;
    input          i_video_start;
    input  [6:0]   i_fb0_offset;
    input  [P_IB_BASE_WIDTH-1:0]   i_fb0_offset;
    input  [3:0]   i_fb0_ms_offset;
    input  [P_IB_BASE_WIDTH-1:0]   i_fb1_offset;
    input  [6:0]   i_fb1_offset;
 
    input  [3:0]   i_fb1_ms_offset;
 
    input  [1:0]   i_color_mode;
    input  [1:0]   i_color_mode;
    input          i_front_buffer;
    input          i_front_buffer;
    input  [2:0]   i_aa_en;
 
    input          i_fb_blend_en;
 
    // status out
    // status out
    output         o_vint_x;
    output         o_vint_x;
    output         o_vint_edge;
    output         o_vint_edge;
    // dram if
    // dram if
    output        o_req;
    output        o_req;
    output [23:0] o_adrs;
    output [P_IB_ADDR_WIDTH-1:0]
    output [5:0]  o_len;
                  o_adrs;
 
    output [P_IB_LEN_WIDTH-1:0]
 
                  o_len;
    input         i_ack;
    input         i_ack;
    input         i_rstr;
    input         i_rstr;
    input  [31:0] i_rd;
    input  [P_IB_DATA_WIDTH-1:0]
 
                  i_rd;
 
 
    output         clk_vo;
    output         clk_vo;
    output [7:0]   o_r;
    output [7:0]   o_r;
    output [7:0]   o_g;
    output [7:0]   o_g;
    output [7:0]   o_b;
    output [7:0]   o_b;
Line 149... Line 154...
    .o_hsync_x(o_hsync_x),
    .o_hsync_x(o_hsync_x),
    .o_blank_x(o_blank_x),
    .o_blank_x(o_blank_x),
    .o_de(o_de)
    .o_de(o_de)
);
);
 
 
fm_hvc_dma fm_hvc_dma (
`ifdef PP_USE_AXI
 
`ifdef PP_BUSWIDTH_64
 
`else
 
   wire w_req;
 
   wire [P_IB_ADDR_WIDTH-1:0]
 
       w_adrs;
 
   wire [P_IB_LEN_WIDTH-1:0]
 
       w_len;
 
   wire w_ack;
 
fm_rd_split fm_rd_split (
 
    .clk_core(clk_core),
 
    .rst_x(rst_x),
 
    .i_req(w_req),
 
    .i_adrs(w_adrs),
 
    .i_len(w_len),
 
    .o_ack(w_ack),
 
    // dram if
 
    .o_req(o_req),
 
    .o_adrs(o_adrs),
 
    .o_len(o_len),
 
    .i_ack(i_ack)
 
);
 
`endif
 
`endif
 
 
 
fm_hvc_dma #(.P_IB_ADDR_WIDTH(P_IB_ADDR_WIDTH),
 
             .P_IB_LEN_WIDTH(P_IB_LEN_WIDTH))
 
  fm_hvc_dma (
    .clk_core(clk_core),
    .clk_core(clk_core),
    .rst_x(rst_x),
    .rst_x(rst_x),
    .i_color_mode(i_color_mode),
    .i_color_mode(i_color_mode),
    .i_video_start(i_video_start),
    .i_video_start(i_video_start),
    .i_vsync(w_vsync_i),
    .i_vsync(w_vsync_i),
    .i_hsync(w_hsync_i),
    .i_hsync(w_hsync_i),
    .i_fb0_offset(i_fb0_offset),
    .i_fb0_offset(i_fb0_offset),
    .i_fb0_ms_offset(i_fb0_ms_offset),
 
    .i_fb1_offset(i_fb1_offset),
    .i_fb1_offset(i_fb1_offset),
    .i_fb1_ms_offset(i_fb1_ms_offset),
 
    .i_front_buffer(i_front_buffer),
    .i_front_buffer(i_front_buffer),
    .i_aa_en(i_aa_en[0]),
 
    .i_fifo_available(w_fifo_available),
    .i_fifo_available(w_fifo_available),
    .o_fifo_available_ack(w_fifo_available_ack),
    .o_fifo_available_ack(w_fifo_available_ack),
    .o_vsync(o_vint_x),
    .o_vsync(o_vint_x),
    .o_vsync_edge(o_vint_edge),
    .o_vsync_edge(o_vint_edge),
    // dram if
    // dram if
 
`ifdef PP_USE_AXI
 
`ifdef PP_BUSWIDTH_64
 
    .o_req(o_req),
 
    .o_adrs(o_adrs),
 
    .o_len(o_len),
 
    .i_ack(i_ack)
 
`else
 
    .o_req(w_req),
 
    .o_adrs(w_adrs),
 
    .o_len(w_len),
 
    .i_ack(w_ack)
 
`endif
 
`else
    .o_req(o_req),
    .o_req(o_req),
    .o_adrs(o_adrs),
    .o_adrs(o_adrs),
    .o_len(o_len),
    .o_len(o_len),
    .i_ack(i_ack)
    .i_ack(i_ack)
 
`endif
);
);
 
 
fm_hvc_data fm_hvc_data (
fm_hvc_data fm_hvc_data (
    .clk_core(clk_core),
    .clk_core(clk_core),
    .clk_vi(clk_vi),
    .clk_vi(clk_vi),

powered by: WebSVN 2.1.0

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