- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
`timescale 1ns / 1ps
///////////////////////////////////////////////////////////////////
///////////////
// Company:
// Engineer:
//
// Create Date: 2016/03/28 22:19:17
// Design Name:
// Module Name: vga
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
///////////////////////////////////////////////////////////////////
///////////////
(* use_dsp48 = yes *) module vga(
input clk,
input clk1,
input rst,
output reg hs,
output reg vs,
output [3:0] r,
output [3:0] g,
output [3:0] b
);
//maximum value for the horizontal pixel counter
parameter HMAX=10b1100100000; // 800
//maximum value for the vertical pixel counter
parameter VMAX=10b1000001101; // 525
//total number of visible columns
parameter HLINES=10b1010000000; // 640
// value for the horizontal counter where front porch ends
parameter HFP=10b1010010000; // 648
//value for the horizontal counter where the synch pulse ends
parameter HSP=10b1011110000; // 744
//total number of visible lines
parameter VLINES=10b0111100000; // 480
// value for the vertical counter where the front porch ends
parameter VFP=10b0111101010; // 482
//value for the vertical counter where the synch pulse ends
parameter VSP=10b0111101100; //484
//polarity of the horizontal and vertical synch pulse
// only one polarity used, because for this resolution they
coincide.
parameter SPP=1b0;
// horizontal and vertical counters
reg [9:0] hcounter=10b0000000000;
reg [9:0] vcounter=10b0000000000;
// active when inside visible screen area.
wire video_enable ;
reg vidon;
reg [11:0] color;
reg [9:0] x_zone;
reg [9:0] y_zone;
reg [9:0] x_center=10b0011001000; //200
reg [9:0] y_center=10b0011001000; //200
assign r=color[11:8];
assign g=color[7:4];
assign b=color[3:0];
// increment horizontal counter at pixel_c
原创力文档


文档评论(0)