- 1
- 2
- 3
- 4
- 5
梦幻呼吸灯
资料介绍
梦幻呼吸灯实验 本实验包括基本实验部分和改进实验部分(梦幻呼吸灯) 一、基本实验 1、顶层模块 top.v module top( input rst_165, input clk_165, output[7:0] led8_165 ); wire divclk_165; div_clk1 u0divclk(.rst_165(rst_165),.clk_165(clk_165),.divclk_165(divclk_165)); dream_led u0led(.rst_165(rst_165),.divclk_165(divclk_165),.led8_165(led8_165)); endmodule 图一、详细描述后的结果 顶层模块中包括 div_clk1 分频时钟模块、dream_led 梦幻 LED 灯设计部分。两 部分的连接关系如图一所示,100MHz 的时钟信号 clk_165 分频成 divclk_165 作 为 dream_led 的模块的时钟输入信号,驱动 led8_165 实现不同的输出效果。 2、分频时钟模块 div_clk.v `timescale 1ns / 1ps module div_clk1(input clk_165,input rst_165,output reg divclk_165); reg[31:0] counter_165; always @(posedge clk_165 or posedge rst_165) begin if(rst_165) begin counter_165<=32'h00000000; divclk_165<='h0; end else begin if(counter_165==32'h02faf07f) 2 begin counter_165<=32'h00000000; divclk_165<=~divclk_165; end else counter_165<=counter_165+1; end end endmodule 由于 FPGA 中提供的时钟引脚是 100MHz,要实现梦幻 LED 灯在每 1s 发生一次变 化,要对时钟进行分频。
部分文件列表
文件名 | 文件大小 | 修改时间 |
dream/dream.cache/wt/gui_handlers.wdf | 5KB | 2019-12-08 10:10:36 |
dream/dream.cache/wt/java_command_handlers.wdf | 1KB | 2019-12-08 10:10:36 |
dream/dream.cache/wt/project.wpc | 1KB | 2019-12-08 09:47:00 |
dream/dream.cache/wt/webtalk_pa.xml | 5KB | 2019-12-08 10:10:36 |
dream/dream.cache/wt/xsim.wdf | 1KB | 2019-12-06 19:36:14 |
dream/dream.hw/dream.lpr | 1KB | 2019-12-06 19:27:06 |
dream/dream.ip_user_files/README.txt | 1KB | 2019-12-06 19:36:14 |
dream/dream.sim/sim_1/behav/xsim/compile.bat | 1KB | 2019-12-06 19:36:16 |
dream/dream.sim/sim_1/behav/xsim/compile.log | 1KB | 2019-12-06 19:36:18 |
dream/dream.sim/sim_1/behav/xsim/elaborate.bat | 1KB | 2019-12-06 19:36:18 |
dream/dream.sim/sim_1/behav/xsim/elaborate.log | 1KB | 2019-12-06 19:36:22 |
... |
全部评论(1)
2020-03-29 20:39:56阿莱布里
好