需求问题:需要使用3个GPIO实现相同的脉冲信号,三个信号之间的上升沿时延不能超过200ps。
测试环境:ZYNQ7020的黑金开发板
测试过程:
代码:
module gpio_jitter_test (
input clk_osc , //50M
output ld_0 ,
output ld_1 ,
output ld_2
);
wire clk;
reg [9:0] counter = 4'h0;
(* dont_touch="true" *) reg ld;
assign ld_0 = ld;
assign ld_1 = ld;
assign ld_2 = ld;
BUFG BUFG_inst (
.O(clk ), // 1-bit output: Clock output
.I(clk_osc ) // 1-bit input: Clock input
);
always @(posedge clk) begin
counter <= counter + 1'b1;
end
always @(posedge clk) begin
if (counter<10'h2) begin
ld <= 1'b1;
end
else begin
ld <= 1'b0;
end
end
endmodule
开始选择了三个GPIO管脚约束,其他未加任何约束。时序很不好。
开启约束之路:
方法一:
(1) 将管脚配置为fast模式
set_property SLEW FAST [get_ports ld_0]
set_property SLEW FAST [get_ports ld_1]
set_property SLEW FAST [get_ports ld_2]
改观不大,更多是影响管脚上的上升沿和下降沿敏感性,对相互之间的延时没有太大影响。
(2) 布局中发现,寄存器进行了备份