Altera DE2-70学习笔记2-十进制计数器

本文详细介绍了如何在Quartus II 9.1环境下,从创建工程到设计Verilog代码实现十进制计数器,再到功能和时序仿真的步骤。内容包括Verilog代码编写、分析综合、仿真文件设计、引脚分配、下载及逻辑分析仪SignalTabII的使用。
摘要由CSDN通过智能技术生成

开发环境:Quartus II 9.1

1. 创建Quartus工程

    File->New Project Wizard,选择DE2-70的芯片,设置工程名为Counter10,顶层实体名也为Counter10

 

 

 

2. Verilog设计

    输入以下代码,并保存为Counter10.v(如果顶层模块的名字和工程设定的顶层实体的名称不一致,那么需要在工程导航Project Navigator中设置该模块为成顶层实体的入口)

 

module Counter10(
                                  iclk,
                                  rst_n,
                                  q,
                                  overflow
                             );
    input             iclk;
    input              rst_n;
    output [3:0]   q;
    reg [3:0]        q;
    output            overflow;
   
    always @(posedge iclk or negedge rst_n)
    begin
           if (~rst_n) q <= 4'h0;        // Counter reset
           else
           begin

                  if (q == 4'h9) q <= 4'h0;
                  else q <= q + 4'h1;
            end
     end

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这是从外网好不容易找到的,上传与大家共享,不要积分随便下!我也是下载的,不是自己发明的,如果再去要下载积分,人品还不至于这么差! 里面有加密的,官方说明是这样的:There are two encrypted verilog files in the "DE2_70_TV_PIP" demonstraction. If users want to modify this demonstration and re-compile the project, please perform the following steps: 1.Use Notepad or other text edit software to open the file "Teraisc_license.dat", which is located in the "DE2_70_demonstrations/License for encrypted IP" folder of the DE2-70 System CD-ROM. 2. The license contains the FEATURE lines required to license the IP Cores as shown below FEATURE 535C_0009 alterad 9999.12 permanent uncounted D702CF471AC0 \ VENDOR_STRING="ddddddddhbilhyyyyyyyyUCIwiFFFFFFFF170M8XXXXXXXXpLsGcTTTTTTTTt7X8GAAAAAAAAbEQP0hhhhhhhhgrtJieeeeeeeebTNOVJJJJJJJJBLNGkuuuuuuuuDLxzRPPPPPPPPW01t4" \ HOSTID=ANY SIGN="0F45 927A 00F9 DBF3 3AAB D703 4F3D 2406 B374 \ 0E5C 87A1 34BA 10C6 0C08 E554 183B BD2D B79D D64E 3F98 393E \ 94FB F798 07B8 C334 C8B6 D1E4 36F5 67D5 1690" FEATURE 535C_000A alterad 9999.12 permanent uncounted F7FD875F1A28 \ VENDOR_STRING="ddddddddhbilhyyyyyyyyUCIwiFFFFFFFF170M8XXXXXXXXpLsGcTTTTTTTTt7X8GAAAAAAAAbEQP0hhhhhhhhgrtJieeeeeeeebTNOVJJJJJJJJBLNGkuuuuuuuuDLxzRPPPPPPPPW01t4" \ HOSTID=ANY SIGN="1834 5F1A 9CE6 15FD 9246 A640 66FE 918D 1091 \ A2D0 7DF8 7584 0E78 3732 1F48 0B24 3A92 870A EDAA F6F0 2145 \ 3098 5631 C5E1 4DC2 B14D C81A D30D 5518 63D0" 3.Open your Quartus II license.dat file in a text editor. 4.Copy the all the contents of the Terasic_license.dat and paste it at the end of your Quartus II license file. (Note: Do not delete any FEATURE lines from the Quartus II license file. Doing so will result in a non-usable license file.) 5.Open the "DE2_70_TV_PIP" project from Quartus II and compile this project. 6.After compilation is completed, it will generate a sof file named "DE2_70_TV_PIP_time_limited.sof" 7.Load this sof file into the FPGA and the demonstration will have at most one hour to be modified. In another words, the VGA output will be turned off after one hour. If users want to know more information about this demonstration, please contact us at support@terasic.com.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值