VGA显示彩色条纹Basys3开发板verilog代码
名称:VGA显示彩色条纹Basys3开发板verilog代码(代码在文末下载)
软件:VIVADO
语言:Verilog
代码功能:
FPGA代码Verilog/VHDL代码资源下载:www.hdlcode.com
本代码已在Basys3开发板验证,开发板如下,其他开发板可以修改管脚适配:

工程文件

程序文件

RTL图

程序编译

管脚分配

部分代码展示:
//彩色条纹控制模块 module imageGenerator ( inputi_clk, input[10:0]i_x, input[9:0]i_y, output[3:0]o_blue, output[3:0]o_green, output[3:0]o_red ); localparam display_x = 640; localparam display_y = 480; reg [3:0] blue= 4'h0; reg [3:0] red= 4'h0; reg [3:0] green= 4'h0; //将3种颜色进行排列组合 always @(posedge i_clk ) begin if (i_x < display_x/8) begin//白色--1/8 blue <= 4'h0;//蓝色 green <= 4'h0;//绿色 red <= 4'h0;//红色 end else if ( display_x/8 <= i_x && i_x <= display_x/4 )begin// 1/8~2/8 blue <= 4'h0; green <= 4'h0; red <= 4'hf; end else if ( display_x/4 <= i_x && i_x <= 3*display_x/8 )begin// 2/8~3/8 blue <= 4'h0; green <= 4'hf; red <= 4'h0; end else if ( 3*display_x/8 <= i_x && i_x <= display_x/2 )begin// 3/8~4/8 blue <= 4'h0; green <= 4'hf; red <= 4'hf; end else if ( display_x/2 <= i_x && i_x <= 5*display_x/8 )begin// 4/8~5/8 blue <= 4'hf; green <= 4'h0; red <= 4'h0; end else if ( 5*display_x/8 <= i_x && i_x <= 6*display_x/8 )begin// 5/8~6/8 blue <= 4'hf; green <= 4'h0; red <= 4'hf; end else if ( 6*display_x/8 <= i_x && i_x <= 7*display_x/8)begin// 6/8~7/8 blue <= 4'hf; green <= 4'hf; red <= 4'h0; end else begin// 7/8~8/8 blue <= 4'hf; green <= 4'hf; red <= 4'hf; end end assign o_blue= blue; assign o_red= red; assign o_green= green; endmodule
代码文件(付费下载):
![]()
1、代码文件需要付费后才可见。
2、支付问题请联系微信公众号客服。
3、优质Verilog/VHDL代码资源,所见即所得。
Verilog/VHDL资源下载 » VGA显示彩色条纹Basys3开发板verilog代码
2、支付问题请联系微信公众号客服。
3、优质Verilog/VHDL代码资源,所见即所得。
Verilog/VHDL资源下载 » VGA显示彩色条纹Basys3开发板verilog代码

发表评论
模板文件不存在: ./template/plugins/comment/pc/index.htm