微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 嵌入式设计讨论 > FPGA,CPLD和ASIC > 两个按钮来加减同个变量的问题!到底错在哪?

两个按钮来加减同个变量的问题!到底错在哪?

时间:10-02 整理:3721RD 点击:

无知新人求问题出在那?

  1. module x1121_chip( U,  d ,Code_A,RESET);

  2. input  U,  d;
  3. input RESET;      
  4. output  [1:4]Code_A;
  5. reg [1:4]A;

  6.    always@(posedge  U,posedge  d, posedge RESET ) // the block of A
  7.         begin //the number will be up_overflow and auto become 0;
  8.           if(RESET)
  9.              A=8;                                    
  10.          else  if(U)  
  11.              A=A+1;  
  12.          else  
  13.              A=A-1;           
  14.          end

  15. assign Code_A=A;
  16. endmodule

复制代码

这玩意综合后的图形太坑了...当U变成高电平时候,..Code_A居然变成了条麻花藤
受不鸟了..求大神指点..(单击图片可放大)


  
有哪位可以解救下的嘛

posedge  U,posedge  d, posedge RESET

我的天啊!还是回去看看verilog书吧,版上大牛是不屑于给你指出问题的~

你这个逻辑写得太不规范了

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top