ZFDok
驱动牛犊
驱动牛犊
  • 注册日期2005-01-05
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分110分
  • 威望20点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1674回复:0

我的输入信号怎么老是被优化了

楼主#
更多 发布于:2005-08-08 15:00
  我的输入信号怎么老是被除数ISE优化了?怎样解决这个问题?
module ConfigChip(Clk, dtrWire, rtsWire, txdWire, Sel);
    input Clk;
    input dtrWire;
    input rtsWire;
    input txdWire;
    output [1 : 0] Sel;

          reg [1 : 0] Sel;
       reg [15 : 0] BaudCnt;
       reg [15 : 0] BaudReg;
       reg DetectStart;
       reg SampleStart;
       reg ConfigStart;

       wire baudWire;
       reg baudTemp;

       initial
       begin
              Sel = 0;
              BaudReg = 128;
              BaudCnt = 0;
              baudTemp = 0;
              DetectStart = 0;
              SampleStart = 0;
              ConfigStart = 0;
       end
      
       assign baudWire = baudTemp;

       always @ (posedge Clk)
       begin
              BaudCnt = BaudCnt + 1;
              if (BaudCnt >= BaudReg)
              begin
                     baudTemp = ~baudTemp;
              end
       end

       always @ (posedge baudWire)
       begin
              Sel = Sel + 1;
       end

       always @ (posedge dtrWire)
       begin
              if (!DetectStart)
              begin
                     DetectStart = 1;
                     BaudCnt = 0;
                     baudTemp = 0;
              end
              else DetectStart = 0;
       end

       always @ (posedge rtsWire)
       begin
              if (!DetectStart)
              begin
                     DetectStart = 1;
                     BaudCnt = 0;
                     baudTemp = 0;
              end
       end



endmodule
游客

返回顶部