找回密码
 注册
搜索
查看: 844|回复: 0

[讨论] modelsim可以compile而Quarturs II 不能compile的程序

[复制链接]
发表于 2008-7-1 13:41:28 | 显示全部楼层 |阅读模式
各位大虾 ,以下程序为什么在modelsim compile成功而在Quartus II却报错,  另外modelsim编写的TB,在波形仿真时为什么找不到该引脚?


module sell_1(clk,rst,half,one,retur,led,sum);
    input clk,rst,half,one;
    output[3:0] sum;
    output retur,led;
    reg[3:0] sum;
    reg retur,led;
    reg[1:0] half_cnt,one_cnt;
    wire[3:0] totall;

    always @(posedge clk)
        begin
            if(rst)
            begin
                retur<=0;led<=0;
                half_cnt=0;one_cnt=0; end
        else if(half)
        begin half_cnt<=half_cnt+1;end  
             if(one)
        begin one_cnt<=one_cnt+1; end   
    end
        assign totall=half_cnt+one_cnt;

    always @(totall)
       begin
           if(totall==4'b1101)
         begin
            led=1; sum<=sum+1;
              half_cnt<=0;one_cnt<=0;
            end

          if(totall>4'b1101)
         begin
            led=1;retur=1;sum<=sum+1;
             half_cnt<=0;one_cnt<=0;  end
         else
            begin
              retur<=0;led<=0; end
        end
        
endmodule
高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-9-30 10:29 , Processed in 0.044324 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表