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

Subversion Repositories vga_lcd

[/] [vga_lcd/] [trunk/] [rtl/] [verilog/] [vga_wb_master.v] - Diff between revs 30 and 31

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

Rev 30 Rev 31
Line 35... Line 35...
////                                                             ////
////                                                             ////
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
 
 
//  CVS Log
//  CVS Log
//
//
//  $Id: vga_wb_master.v,v 1.6 2002-02-07 05:42:10 rherveille Exp $
//  $Id: vga_wb_master.v,v 1.7 2002-02-16 10:40:00 rherveille Exp $
//
//
//  $Date: 2002-02-07 05:42:10 $
//  $Date: 2002-02-16 10:40:00 $
//  $Revision: 1.6 $
//  $Revision: 1.7 $
//  $Author: rherveille $
//  $Author: rherveille $
//  $Locker:  $
//  $Locker:  $
//  $State: Exp $
//  $State: Exp $
//
//
// Change History:
// Change History:
//               $Log: not supported by cvs2svn $
//               $Log: not supported by cvs2svn $
 
//               Revision 1.6  2002/02/07 05:42:10  rherveille
 
//               Fixed some bugs discovered by modified testbench
 
//               Removed / Changed some strange logic constructions
 
//               Started work on hardware cursor support (not finished yet)
 
//               Changed top-level name to vga_enh_top.v
 
//
 
 
`include "timescale.v"
`include "timescale.v"
`include "vga_defines.v"
`include "vga_defines.v"
 
 
module vga_wb_master (clk_i, rst_i, nrst_i, cyc_o, stb_o, cab_o, we_o, adr_o, sel_o, ack_i, err_i, dat_i, sint,
module vga_wb_master (clk_i, rst_i, nrst_i, cyc_o, stb_o, cab_o, we_o, adr_o, sel_o, ack_i, err_i, dat_i, sint,
Line 139... Line 145...
        wire [23:0] color_proc_q, ssel1_q, rgb_fifo_d;
        wire [23:0] color_proc_q, ssel1_q, rgb_fifo_d;
        wire        color_proc_wreq, ssel1_wreq, rgb_fifo_wreq;
        wire        color_proc_wreq, ssel1_wreq, rgb_fifo_wreq;
        wire rgb_fifo_empty, rgb_fifo_full, rgb_fifo_rreq;
        wire rgb_fifo_empty, rgb_fifo_full, rgb_fifo_rreq;
        wire ImDoneFifoQ;
        wire ImDoneFifoQ;
        reg  dImDoneFifoQ, ddImDoneFifoQ;
        reg  dImDoneFifoQ, ddImDoneFifoQ;
        reg  [2:0] ImDoneCursorQ;
 
 
 
        reg sclr; // synchronous clear
        reg sclr; // synchronous clear
 
 
        wire [7:0] clut_offs; // color lookup table offset
        wire [7:0] clut_offs; // color lookup table offset
 
 
Line 411... Line 416...
                .clut_offs(clut_offs),
                .clut_offs(clut_offs),
                .clut_q(clut_q)
                .clut_q(clut_q)
        );
        );
 
 
        // hookup data-source-selector && hardware cursor module
        // hookup data-source-selector && hardware cursor module
`ifdef VGA_HWC1
`ifdef VGA_HWC1 // generate Hardware Cursor1 (if enabled)
        reg scursor1_ld;
        reg scursor1_ld;
        reg scursor1_en;
        reg scursor1_en;
        reg [31:0] scursor1_xy;
        reg [31:0] scursor1_xy;
        reg sddImDoneFifoQ, sdImDoneFifoQ;
 
 
 
        always@(posedge clk_i)
 
                if (ssel1_wreq)
 
                        begin
 
                                sdImDoneFifoQ  <= #1 dImDoneFifoQ;
 
                                sddImDoneFifoQ <= #1 sdImDoneFifoQ;
 
                        end
 
 
 
        always@(posedge clk_i)
        always@(posedge clk_i)
                if (sclr)
                if (sclr)
                        scursor1_ld <= #1 1'b0;
                        scursor1_ld <= #1 1'b0;
                else
                else
Line 440... Line 437...
 
 
        always@(posedge clk_i)
        always@(posedge clk_i)
                if (scursor1_ld)
                if (scursor1_ld)
                        scursor1_xy <= #1 cursor1_xy;
                        scursor1_xy <= #1 cursor1_xy;
 
 
        vga_ssel ssel_and_hw_cursor1 (
        vga_curproc hw_cursor1 (
                .clk(clk_i),
                .clk(clk_i),
                .rst_i(sclr),
                .rst_i(sclr),
                .Thgate(Thgate),
                .Thgate(Thgate),
                .Tvgate(Tvgate),
                .Tvgate(Tvgate),
                .idat(color_proc_q),
                .idat(color_proc_q),
Line 455... Line 452...
                .cursor_we(cursor1_we),
                .cursor_we(cursor1_we),
                .cursor_dat(dat_i),
                .cursor_dat(dat_i),
                .rgb_fifo_wreq(ssel1_wreq),
                .rgb_fifo_wreq(ssel1_wreq),
                .rgb(ssel1_q)
                .rgb(ssel1_q)
        );
        );
`else
 
        wire sddImDoneFifoQ, sdImDoneFifoQ;
`ifdef VGA_HWC0 // generate additional signals for Hardware Cursor0 (if enabled)
 
        reg sddImDoneFifoQ, sdImDoneFifoQ;
 
 
 
        always@(posedge clk_i)
 
                if (ssel1_wreq)
 
                        begin
 
                                sdImDoneFifoQ  <= #1 dImDoneFifoQ;
 
                                sddImDoneFifoQ <= #1 sdImDoneFifoQ;
 
                        end
 
`endif
 
 
 
`else                   // Hardware Cursor1 disabled, generate pass-through signals
 
 
        assign ssel1_wreq = color_proc_wreq;
        assign ssel1_wreq = color_proc_wreq;
        assign ssel1_q    = color_proc_q;
        assign ssel1_q    = color_proc_q;
 
 
 
`ifdef VGA_HWC0 // generate additional signals for Hardware Cursor0 (if enabled)
 
        wire sddImDoneFifoQ, sdImDoneFifoQ;
 
 
        assign sdImDoneFifoQ  = dImDoneFifoQ;
        assign sdImDoneFifoQ  = dImDoneFifoQ;
        assign sddImDoneFifoQ = ddImDoneFifoQ;
        assign sddImDoneFifoQ = ddImDoneFifoQ;
`endif
`endif
 
 
`ifdef VGA_HWC0
`endif
 
 
 
 
 
`ifdef VGA_HWC0 // generate Hardware Cursor0 (if enabled)
        reg scursor0_ld;
        reg scursor0_ld;
        reg scursor0_en;
        reg scursor0_en;
        reg [31:0] scursor0_xy;
        reg [31:0] scursor0_xy;
 
 
        always@(posedge clk_i)
        always@(posedge clk_i)
Line 486... Line 500...
 
 
        always@(posedge clk_i)
        always@(posedge clk_i)
                if (scursor0_ld)
                if (scursor0_ld)
                        scursor0_xy <= #1 cursor0_xy;
                        scursor0_xy <= #1 cursor0_xy;
 
 
        vga_ssel ssel_and_hw_cursor0 (
        vga_curproc hw_cursor0 (
                .clk(clk_i),
                .clk(clk_i),
                .rst_i(sclr),
                .rst_i(sclr),
                .Thgate(Thgate),
                .Thgate(Thgate),
                .Tvgate(Tvgate),
                .Tvgate(Tvgate),
                .idat(ssel1_q),
                .idat(ssel1_q),
Line 501... Line 515...
                .cursor_we(cursor0_we),
                .cursor_we(cursor0_we),
                .cursor_dat(dat_i),
                .cursor_dat(dat_i),
                .rgb_fifo_wreq(rgb_fifo_wreq),
                .rgb_fifo_wreq(rgb_fifo_wreq),
                .rgb(rgb_fifo_d)
                .rgb(rgb_fifo_d)
        );
        );
`else
`else   // Hardware Cursor0 disabled, generate pass-through signals
        assign rgb_fifo_wreq = ssel1_wreq;
        assign rgb_fifo_wreq = ssel1_wreq;
        assign rgb_fifo_d = ssel1_q;
        assign rgb_fifo_d = ssel1_q;
`endif
`endif
 
 
        // hookup RGB buffer (temporary station between WISHBONE-clock-domain and pixel-clock-domain)
        // hookup RGB buffer (temporary station between WISHBONE-clock-domain and pixel-clock-domain)

powered by: WebSVN 2.1.0

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