当前位置:   article > 正文

Vivado时序报告之Check_timing详解_unconstrained internal endpoints

unconstrained internal endpoints

目录

一、前言

二、Check_Timing

2.1 含义解释

2.2 工程代码

2.3 时序约束

2.4 Check_timing报告

no clock

pulse_width_clock

unconstrained_internal_endpoints

no_input_delay

no_output_delay

multiple_clock

generated_clocks

loops

partial_input_delay

partial_output_delay

latch_loops

三、参考文档


一、前言

    ​Vivado使用中会涉及到各种报告,内容也较多,很多初学者可能对其中一些内容感到困惑,下面将结合实际工程示例对report_timing_summary中的Check_timing部分进行说明,帮助大家理解报告。

二、Check_Timing

    ​Check_timing报告主要显示一些时钟约束类的检查结果,以Vivado2022.1为例,检查项有以下12项

read-normal-img

 

2.1 含义解释

no_clock:检查出没有时钟信号的寄存器

constant_clock:检查出连接到常量信号(如VSS、接地、数据信号)的时钟信号

pulse_width_clock:检查出只有脉冲宽度检查的时钟引脚,该时钟引脚没有setup/hold/recovery/removal检查

unconstrained_internal_endpoints:检查出以寄存器数据引脚为时序路径终点,但引脚没有约束

no_input_delay:检查出没有设置输入延时的输入端口

no_output_delay:检查出没有设置输出延时的输出端口

multiple_clock:检查出有多个时钟的时钟引脚,在检查出存在这样的时钟引脚时,建议使用set_case_analysis约束来限制只有一个时钟在该引脚上传输

generated_clocks:检查生成时钟是否存在环路或循环定义,如果生成时钟的源时钟也是生成时钟将报错

loops:检查组合逻辑中是否存在环路

partial_input_delay:检查出输入端口中设置了输入时延input_delay,但只设置了max或min,或者延时值只有rise或fall边沿触发

partial_output_delay:检查出输出端口中设置了输出时延output_delay,但只设置了max或min,或者延时值只有rise或fall边沿触发

latch_loops:检查设计中组合逻辑是否存在latch环路

2.2 工程代码

注意:此设计中在综合后会报错,因为PLL的参数COMPENSATION("ZHOLD")为ZHOLD,如果需要跑通,需设置为EXTERNAL或INTERNAL,之所以这样设置是为了看到pulse_width_clock检查

  1. `timescale 1ns / 1ps
  2. //
  3. // Company:
  4. // Engineer:
  5. //
  6. // Create Date: 2024/02/24 14:18:11
  7. // Design Name:
  8. // Module Name: Check_timing
  9. // Project Name:
  10. // Target Devices:
  11. // Tool Versions:
  12. // Description:
  13. //
  14. // Dependencies:
  15. //
  16. // Revision:
  17. // Revision 0.01 - File Created
  18. // Additional Comments:
  19. //
  20. //
  21. module Check_timing(clk1,clk2,clk3,rst,d1,d2,S,CLKIN1,CLKIN2,CLKINSEL,CLKFBIN,CLKFBOUT,o_clk,o_lut,O,Q1,Q2,Q3,out_syn,pll_out,ff2);
  22. input clk1,clk2,clk3,rst,d1,S;
  23. input [4:0] d2;
  24. input CLKIN1,CLKIN2,CLKINSEL,CLKFBIN;
  25. output O,Q1,Q2,Q3,out_syn,pll_out,CLKFBOUT,o_clk,o_lut;
  26. reg ff1,pll_ff1,pll_ff2,ff_syn;
  27. output reg [4:0] ff2;
  28. wire o_fdce;
  29. always@(posedge clk1,negedge rst)
  30. if(!rst)
  31. begin
  32. ff1<=1'b0;
  33. ff2<=1'b0;
  34. end
  35. else begin
  36. ff1<=d1;
  37. ff2<=d2;
  38. end
  39. //constant_clock
  40. (*DONT_TOUCH="YES"*)LUT2 #(
  41. .INIT(4'b0101) // Specify LUT Contents
  42. ) LUT2_inst4 (
  43. .O(o_lut), // LUT general output
  44. .I0(clk3),// LUT input
  45. .I1(d1) // LUT input
  46. );
  47. (*DONT_TOUCH="YES"*) FDCE #(
  48. .INIT(1'b0) // Initial value of register (1'b0 or 1'b1)
  49. ) FDCE_inst (
  50. .Q(o_clk), // 1-bit Data output
  51. .C(clk3), // 1-bit Clock input
  52. .CE(S), // 1-bit Clock enable input
  53. .CLR(rst), // 1-bit Asynchronous clear input
  54. .D(d1) // 1-bit Data input
  55. );
  56. assign sum12=ff1+o_fdce;
  57. always@(posedge clk2,negedge rst)
  58. if(!rst)
  59. ff_syn<=1'b0;
  60. else begin
  61. ff_syn<=sum12;
  62. end
  63. assign out_syn=ff_syn;
  64. //latch_loop
  65. LDCE #(
  66. .INIT(1'b1)
  67. )
  68. LDCE_inst2 (
  69. .Q(Q2), // 1-bit output: Data
  70. .CLR(rst), // 1-bit input: Asynchronous clear
  71. .D(Q3), // 1-bit input: Data
  72. .G(1'b1), // 1-bit input: Gate
  73. .GE(S) // 1-bit input: Gate enable
  74. );
  75. LUT1 #(
  76. .INIT(2'b01) // Specify LUT Contents
  77. ) LUT1_inst3 (
  78. .O(Q3), // LUT general output
  79. .I0(Q2) // LUT input
  80. );
  81. //loop
  82. LUT1 #(
  83. .INIT(2'b01) // Specify LUT Contents
  84. ) LUT1_inst1 (
  85. .O(O), // LUT general output
  86. .I0(Q0) // LUT input
  87. );
  88. LUT1 #(
  89. .INIT(2'b01) // Specify LUT Contents
  90. ) LUT1_inst2 (
  91. .O(Q0), // LUT general output
  92. .I0(O) // LUT input
  93. );
  94. PLLE2_ADV #(
  95. .BANDWIDTH("OPTIMIZED"), // OPTIMIZED, HIGH, LOW
  96. .CLKFBOUT_MULT(8), // Multiply value for all CLKOUT, (2-64)
  97. .CLKFBOUT_PHASE(0.0), // Phase offset in degrees of CLKFB, (-360.000-360.000).
  98. // CLKIN_PERIOD: Input clock period in nS to ps resolution (i.e. 33.333 is 30 MHz).
  99. .CLKIN1_PERIOD(0.0),
  100. .CLKIN2_PERIOD(0.0),
  101. // CLKOUT0_DIVIDE - CLKOUT5_DIVIDE: Divide amount for CLKOUT (1-128)
  102. .CLKOUT0_DIVIDE(1),
  103. .CLKOUT1_DIVIDE(2),
  104. .CLKOUT2_DIVIDE(4),
  105. .CLKOUT3_DIVIDE(5),
  106. .CLKOUT4_DIVIDE(1),
  107. .CLKOUT5_DIVIDE(1),
  108. // CLKOUT0_DUTY_CYCLE - CLKOUT5_DUTY_CYCLE: Duty cycle for CLKOUT outputs (0.001-0.999).
  109. .CLKOUT0_DUTY_CYCLE(0.4),
  110. .CLKOUT1_DUTY_CYCLE(0.5),
  111. .CLKOUT2_DUTY_CYCLE(0.5),
  112. .CLKOUT3_DUTY_CYCLE(0.5),
  113. .CLKOUT4_DUTY_CYCLE(0.5),
  114. .CLKOUT5_DUTY_CYCLE(0.5),
  115. // CLKOUT0_PHASE - CLKOUT5_PHASE: Phase offset for CLKOUT outputs (-360.000-360.000).
  116. .CLKOUT0_PHASE(0.0),
  117. .CLKOUT1_PHASE(0.0),
  118. .CLKOUT2_PHASE(0.0),
  119. .CLKOUT3_PHASE(0.0),
  120. .CLKOUT4_PHASE(0.0),
  121. .CLKOUT5_PHASE(0.0),
  122. .COMPENSATION("ZHOLD"), // ZHOLD, BUF_IN, EXTERNAL, INTERNAL
  123. .DIVCLK_DIVIDE(1), // Master division value (1-56)
  124. // REF_JITTER: Reference input jitter in UI (0.000-0.999).
  125. .REF_JITTER1(0.0),
  126. .REF_JITTER2(0.0),
  127. .STARTUP_WAIT("FALSE") // Delay DONE until PLL Locks, ("TRUE"/"FALSE")
  128. )
  129. PLLE2_ADV_inst (
  130. // Clock Outputs: 1-bit (each) output: User configurable clock outputs
  131. .CLKOUT0(CLKOUT0), // 1-bit output: CLKOUT0
  132. .CLKOUT1(CLKOUT1), // 1-bit output: CLKOUT1
  133. .CLKOUT2(CLKOUT2), // 1-bit output: CLKOUT2
  134. // Feedback Clocks: 1-bit (each) output: Clock feedback ports
  135. .CLKFBOUT(), // 1-bit output: Feedback clock
  136. // Clock Inputs: 1-bit (each) input: Clock inputs
  137. .CLKIN1(CLKIN1), // 1-bit input: Primary clock
  138. .CLKIN2(CLKIN2), // 1-bit input: Secondary clock
  139. // Control Ports: 1-bit (each) input: PLL control ports
  140. .CLKINSEL(CLKINSEL), // 1-bit input: Clock select, High=CLKIN1 Low=CLKIN2
  141. .RST(rst), // 1-bit input: Reset
  142. // Feedback Clocks: 1-bit (each) input: Clock feedback ports
  143. .CLKFBIN(CLKFBIN) // 1-bit input: Feedback clock
  144. );
  145. // End of PLLE2_ADV_inst instantiation
  146. always@(posedge CLKOUT0,negedge rst)
  147. if(!rst)
  148. begin
  149. pll_ff1<=1'b0;
  150. pll_ff2<=1'b0;
  151. end
  152. else begin
  153. pll_ff1<=d1;
  154. pll_ff2<=S;
  155. end
  156. assign pll_out=pll_ff1*pll_ff2;
  157. wire sum12;
  158. assign sum12=pll_ff1+pll_ff2;
  159. always@(posedge CLKOUT1,negedge rst)
  160. if(!rst)
  161. ff_syn<=1'b0;
  162. else begin
  163. ff_syn<=sum12;
  164. end
  165. assign out_syn=ff_syn;
  166. endmodule

2.3 时序约束

  1. create_clock -period 4.000 -name clk1 -waveform {0.000 2.000} -add [get_ports clk1]
  2. create_clock -period 6.000 -name clk1_a -waveform {0.000 3.000} -add [get_ports clk1]
  3. create_clock -period 6.000 -name clkin1 -waveform {0.000 3.000} -add [get_ports CLKIN1]
  4. create_generated_clock -name gen_clk -source [get_pins PLLE2_ADV_inst/CLKOUT1] -multiply_by 2 -add -master_clock clkin2 [get_pins PLLE2_ADV_inst/CLKOUT0]
  5. set_input_delay -clock [get_clocks clk1] -rise 0.111 [get_ports {{d2[0]} {d2[1]}}]
  6. set_output_delay -clock [get_clocks clk1] -min 0.222 [get_ports {ff2[0]}]
  7. create_clock -period 9.000 -name clkin2 -waveform {0.000 4.500} -add [get_ports CLKIN2]
  8. create_generated_clock -name gen_clk -source [get_ports CLKIN1] -multiply_by 2 -add -master_clock clkin2 [get_pins PLLE2_ADV_inst/CLKOUT1]
  9. create_clock -period 10.000 -name clk3 -waveform {0.000 5.000} -add [get_ports clk3]
  10. set_case_analysis 1 [get_ports clk3]

2.4 Check_timing报告

no clock

no_clock中触发器ff_syn无时钟信号,因为ff_syn的时钟clk2无create_clock约束,后面的serverity表示影响大小,High表示影响大

 

pulse_width_clock

对PLL的反馈输入端口进行脉冲宽度检查

 

unconstrained_internal_endpoints

unconstrained_internal_endpoints中high级别的端口未设置最大时延,级别为medium表示由于连接常量时钟而无最大延时

 

no_input_delay

未设置input_delay约束的端口

no_output_delay

未设置output_delay约束的端口,设置了约束的端口不会出现

 

multiple_clock

时钟引脚存在多个时钟的触发器,之所以存在多个时钟是因为这些触发器由时钟clk1驱动,而clk1端口上定义了2各时钟信号clk1和clk1_a

 

generated_clocks

生成时钟约束问题,因为generate_clock约束中master pin和master clock是无关联的。

 

loops

设计中组合路径存在环路LUT1_inst1和LUT1_inst2的输入输出首尾相连了

 

partial_input_delay

设计中d2[0],d2[1]中的set_input_delay约束中使用了-rise,注意,如果再添加一条set_input_delay,使用-fall,则端口不会出现在partial_input_delay中,此时延时约束完整

 

partial_output_delay

设计中ff2[0]中的set_output_delay约束中使用了-min,注意:如果再添加一条约束使用-max,则不会partial_output_delay中

 

latch_loops

设计中LDCE_inst2的输入和输出首尾相连,因此出现latch的环路

 

三、参考文档

用户手册《ug835-vivado-tcl-commands-en-us-2023.1.pdf》

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/正经夜光杯/article/detail/787310
推荐阅读
相关标签
  

闽ICP备14008679号