Verilog Basys3板4位计数器,我不&x27;我不知道为什么它不产生比特流?执行中的错误

Verilog Basys3板4位计数器,我不&x27;我不知道为什么它不产生比特流?执行中的错误,verilog,xilinx,vivado,Verilog,Xilinx,Vivado,我想用Vivado在Basys3板上制作一个4位计数器。我用verilog写了一个代码。我无法生成位流。我已经粘贴了stopwatch.v模块和约束文件。Basys3的车载时钟速度为100MHz //`timescale 1ns/1ps module stopwatch( input clk, input reset, input start, input pause, output reg [3:0] out); reg [26:0] clock; reg sta

我想用Vivado在Basys3板上制作一个4位计数器。我用verilog写了一个代码。我无法生成位流。我已经粘贴了stopwatch.v模块和约束文件。Basys3的车载时钟速度为100MHz

//`timescale 1ns/1ps

module stopwatch( input clk, input reset, input start, input pause, output reg [3:0] out);

   reg [26:0] clock;
   reg        starter;


   always @(posedge clk or posedge reset)
     begin
    if (reset)
      begin
         out <= 0;
         clock <= 0;
      end

    else if (starter)
      begin
         if (clock == 25'd10000000)
           begin
          out <= out + 1'b1;
          clock <= 0;
           end
         else
             clock <= clock + 1'b1;
      end
     end // always @ (posedge clk or posedge reset)

   always @(*)
     begin
    if (start)
      starter <= 1'b1;
    else if (pause)
      starter <= 0;

     end

endmodule // stopwatch
下面是我不断遇到的错误:

[Place 30-574] Poor placement for routing between an IO pin and BUFG. If this sub optimal condition is acceptable for this design, you may use the CLOCK_DEDICATED_ROUTE constraint in the .xdc file to demote this message to a WARNING. However, the use of this override is highly discouraged. These examples can be used directly in the .xdc file to override this clock rule.
    < set_property CLOCK_DEDICATED_ROUTE FALSE [get_nets pause_IBUF] >

    pause_IBUF_inst (IBUF.O) is locked to IOB_X0Y14
     and pause_IBUF_BUFG_inst (BUFG.I) is provisionally placed by clockplacer on BUFGCTRL_X0Y0
[Place 30-574]IO引脚和BUFG之间的布线放置不当。如果此次优化条件对此设计是可接受的,则可以使用.xdc文件中的CLOCK_Specialized_ROUTE约束将此消息降级为警告。但是,强烈不鼓励使用此覆盖。这些示例可以直接在.xdc文件中使用,以覆盖此时钟规则。

pause_IBUF_inst(IBUF.O)已锁定到IOB_X0Y14
pause_IBUF_BUFG_inst(BUFG.I)由时钟放置器临时放置在BUFGCTRL_X0Y0上

工具抱怨您选择了“暂停”I/O缓冲区。
它说你应该为那个信号使用一个全局时钟缓冲输入(BUFG)。 它通过全局时钟缓冲器“BUFGCTRL_X0Y0”发送信号

这可能是因为“启动器”是一个闩锁,Vivado认为你的暂停信号是一个时钟。这段代码是错误的:

always @(*)
begin
if (start)
  starter <= 1'b1;
else if (pause)
  starter <= 0;
end
或者,您可以将该代码移动到您的时钟部分。
在这种情况下,请确保您也重置了“启动器”

实际上,我正在映射“开始”和“暂停”按钮。如果我使用“assign starter=start&~pause”,可能无法实现预期功能。如果我暂停它,那么即使在释放“暂停-推-推”按钮后,它仍将保持暂停。然后,您首先必须发出暂停的“切换”信号。还可能必须消除传入按钮信号的反弹。
always @(*)
begin
if (start)
  starter <= 1'b1;
else if (pause)
  starter <= 0;
end
assign starter = start & ~pause;