1.实验目的:下载Quartus软件与Modlsim并进行Verilog Modelsim仿真
2.实验内容:参考老师发的视频的代码,然后用Quartus ii 和Modlsim进行仿真
3.实验原理:按照视频上的内容,书写和运行代码,完成仿真操作。
4.实验工具:Quartus软件、Modlsim软件、pc机。
5.实验截图:
6.实验代码:
module Latched_Seven_Seg_Display(
output reg [6: 0] Display_L, Display_R,
input Blanking, Enable, clock, reset
);
reg [3: 0]count;
// abc_defg
parameter BLANK= 7'b111_1111;
parameter ZERO= 7'b000_0001; //h01
parameter ONE = 7'b100_1111; //h4f
parameter TWO = 7'b001_0010; //h12
parameter THREE = 7'b000_0110; //h06
parameter FOUR= 7'b100_1100; //h4c
parameter FIVE= 7'b010_0100; //h24
parameter SIX= 7'b010_0000; //h20
parameter SEVEN= 7'b000_1111; //h0f
parameter EIGHT = 7'b000_0000; //h00
parameter NINE= 7'b000_0100; //h04
always @ (posedge clock)
if(reset)count <= 0;
else if (Enable) count <= count+1;
always @ (count, Blanking)
if (Blanking) begin Display_L = BLANK; Display_R = BLANK; end else
case (count)
0: begin Display_L = ZERO; Display_R = ZERO; end
2: begin Display_L = ZERO; Display_R = TWO; end
4: begin Display_L = ZERO; Display_R = FOUR; end
6: begin Display_L= ZERO; Display_R= SIX; end
10: begin Display_L = ONE; Display_R = ZERO; end
12: begin Display_L = ONE; Display_R = TWO; end
14: begin Display_L = ONE; Display_R= FOUR; end
//default: begin Display_L = BLANK; Display_R= BLANK; end
endcase
endmodule
7.实验视频:
期末2
8.软件下载网站:
1、Quartus软件下载链接:
https://pan.baidu.com/s/1k_pr6xnKMZyzAh_nyej7yQ 提取码:7330
2、Modelsim 10.x软件下载链接:
https://pan.baidu.com/s/1PoKk4W_SG7Zqp9KNuwLdTQ
提取码:m7ja