基于FPGA设计的vga显示测试实验Verilog逻辑源码Quartus工程文件+文档说明,FPGA型号Cyclone4E系列中的EP4CE6F17C8,Quartus版本17.1。module top( input clk, input rst_n, //vga output output vga_out_hs, //vga horizontal synchronization output vga_out_vs, //vga vertical synchronization output[4:0] vga_out_r, //vga red output[5:0] vga_out_g, //vga green output[4:0] vga_out_b //vga blue );wire video_clk;wire video_hs;wire video_vs;wire video_de;wire[7:0] video_r;wire[7:0] video_g;wire[7:0] video_b;assign vga_out_hs = video_hs;assign vga_out_vs = video_vs;assign vga_out_r = video_r[7:3]; //discard low bit dataassign vga_out_g = video_g[7:2]; //discard low bit dataassign vga_out_b = video_b[7:3]; //discard low bit data//generate video pixel clockvideo_pll video_pll_m0( .inclk0(clk), .c0(video_clk));color_bar color_bar_m0( .clk(video_clk), .rst(~rst_n), .hs(video_hs), .vs(video_vs), .de(video_de), .rgb_r(video_r), .rgb_g(video_g), .rgb_b(video_b));endmodule
标签: fpga vga显示 verilog quartus
上传时间: 2021-12-19
上传用户:kingwide
FPGA片内FIFO读写测试Verilog逻辑源码Quartus工程文件+文档说明,使用 FPGA 内部的 FIFO 以及程序对该 FIFO 的数据读写操作。FPGA型号Cyclone4E系列中的EP4CE6F17C8,Quartus版本17.1。timescale 1ns / 1ps//////////////////////////////////////////////////////////////////////////////////module fifo_test( input clk, //50MHz时钟 input rst_n //复位信号,低电平有效 );//-----------------------------------------------------------localparam W_IDLE = 1;localparam W_FIFO = 2; localparam R_IDLE = 1;localparam R_FIFO = 2; reg[2:0] write_state;reg[2:0] next_write_state;reg[2:0] read_state;reg[2:0] next_read_state;reg[15:0] w_data; //FIFO写数据wire wr_en; //FIFO写使能wire rd_en; //FIFO读使能wire[15:0] r_data; //FIFO读数据wire full; //FIFO满信号 wire empty; //FIFO空信号 wire[8:0] rd_data_count; wire[8:0] wr_data_count; ///产生FIFO写入的数据always@(posedge clk or negedge rst_n)begin if(rst_n == 1'b0) write_state <= W_IDLE; else write_state <= next_write_state;endalways@(*)begin case(write_state) W_IDLE: if(empty == 1'b1) //FIFO空, 开始写FIFO next_write_state <= W_FIFO; else next_write_state <= W_IDLE; W_FIFO: if(full == 1'b1) //FIFO满 next_write_state <= W_IDLE; else next_write_state <= W_FIFO; default: next_write_state <= W_IDLE; endcaseendassign wr_en = (next_write_state == W_FIFO) ? 1'b1 : 1'b0; always@(posedge clk or negedge rst_n)begin if(rst_n == 1'b0) w_data <= 16'd0; else if (wr_en == 1'b1) w_data <= w_data + 1'b1; else w_data <= 16'd0; end///产生FIFO读的数据always@(posedge clk or negedge rst_n)begin if(rst_n == 1'b0) read_state <= R_IDLE; else read_state <= next_read_state;endalways@(*)begin case(read_state) R_IDLE: if(full == 1'b1) //FIFO满, 开始读FIFO next_read_state <= R_FIFO; else next_read_state <= R_IDLE; R_FIFO: if(empty == 1'b1)
上传时间: 2021-12-19
上传用户:20125101110
This Getting Started Guide is written for Maxwell beginners and experienced users who would like to quickly re familiarize themselves with the capabilities of MaxwelL.This guide leads you step-by-step through solving and analyzing the results of a rotational actuator magnetostatic problem with motion By following the steps in this guide, you will learn how to perform the following tasks Modify a models design parameters y assign variables to a model's design parameters.Specify solution settings for a design Validate a designs setupRun a maxwell simulation v Plot the magnetic flux density vecto v Include motion in the simulation本《入门指南》是为希望快速重新熟悉MaxwelL功能的Maxwell初学者和有经验的用户编写的。本指南将引导您逐步解决和分析旋转致动器静运动问题的结果。按照本指南中的步骤,您将学习如何执行以下任务。修改模型设计参数y将变量分配给模型的设计参数。指定设计的解决方案设置验证设计设置运行maxwell模拟v绘制磁通密度vecto v在模拟中包含运动
上传时间: 2022-03-10
上传用户:
【例3.1]4位全加器module adder 4(cout,sum i na,i nb,cin);output[3:0]sum output cout;input[3:0]i na,i nb;input cin;assign(cout,suml=i na +i nb+ci n;endmodule【例3.2]4位计数器module count 4(out,reset,clk);output[3:0]out;input reset,cl k;regl 3:01 out;always@posedge clk)
标签: verilog
上传时间: 2022-06-16
上传用户:canderile