阅读:1759回复:0
我的输入信号怎么老是被优化了
我的输入信号怎么老是被除数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 |
|