Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected variation between iteration display and analysis report #1036

Closed
litghost opened this issue Nov 5, 2019 · 4 comments
Closed

Unexpected variation between iteration display and analysis report #1036

litghost opened this issue Nov 5, 2019 · 4 comments

Comments

@litghost
Copy link
Collaborator

litghost commented Nov 5, 2019

Expected Behaviour

Critical path delay should be the same between the iteration display (within tolerance) and the analysis setup delay report.

Current Behaviour

Variations as large as 14 ns (iteration estimate ~19.5 ns, analysis reporting 33 ns) have been observed. On a more typical run, variations of of .5-3 ns are typical.

Possible Solution

Unknown at this time.

Steps to Reproduce

Working on replication now.
1.
2.

Context

When tuning the lookahead for the 7-series, I've seen multiple occasions where the CPD value from the iteration screen is different from what the final analysis shows. For example:

Confirming router algorithm: TIMING_DRIVEN.
---- ------ ------- ---- ------- ------- ------- ----------------- --------------- -------- ---------- ---------- ---------- ---------- --------
Iter   Time    pres  BBs    Heap  Re-Rtd  Re-Rtd Overused RR Nodes      Wirelength      CPD       sTNS       sWNS       hTNS       hWNS Est Succ
      (sec)     fac Updt    push    Nets   Conns                                       (ns)       (ns)       (ns)       (ns)       (ns)     Iter
---- ------ ------- ---- ------- ------- ------- ----------------- --------------- -------- ---------- ---------- ---------- ---------- --------
Warning 75: No routing path for connection to sink_rr 618992, retrying with full device bounding box
Warning 76: No routing path for connection to sink_rr 238799, retrying with full device bounding box
Warning 77: 17 timing startpoints were not constrained during timing analysis
Warning 78: 123 timing endpoints were not constrained during timing analysis
   1   11.9     0.0    0 6.7e+07    5432   16574    9735 ( 1.233%)  433351 (18.3%)   16.849     -1438.     -6.849      0.000      0.000      N/A
   2   32.3     0.5   38 1.4e+08    4242   13373   13981 ( 1.770%)  312953 (13.2%)   16.849     -1438.     -6.849      0.000      0.000      N/A
   3   46.0     0.6    8 2.0e+08    4191   13600   10343 ( 1.310%)  318239 (13.5%)   16.849     -1438.     -6.849      0.000      0.000      N/A
   4   59.2     0.8   17 2.4e+08    3899   12927    8334 ( 1.055%)  315860 (13.4%)   16.849     -1438.     -6.849      0.000      0.000      N/A
   5   56.6     1.1   16 2.3e+08    3620   12154    6384 ( 0.808%)  316282 (13.4%)   16.849     -1438.     -6.849      0.000      0.000      N/A
   6   48.7     1.4   19 2.0e+08    3204   10938    4875 ( 0.617%)  317224 (13.4%)   16.849     -1438.     -6.849      0.000      0.000      N/A
   7   40.0     1.9   13 1.7e+08    2769    9600    3664 ( 0.464%)  318322 (13.5%)   16.849     -1438.     -6.849      0.000      0.000      N/A
   8   30.8     2.4   10 1.3e+08    2329    7810    2554 ( 0.323%)  320411 (13.5%)   16.849     -1438.     -6.849      0.000      0.000      N/A
   9   24.3     3.1    9 9.9e+07    1857    6070    1837 ( 0.233%)  321482 (13.6%)   16.849     -1438.     -6.849      0.000      0.000      N/A
  10   17.0     4.1    5 7.3e+07    1389    4565    1212 ( 0.153%)  324106 (13.7%)   16.849     -1438.     -6.849      0.000      0.000       33
  11   15.0     5.3    5 5.8e+07    1038    3302     831 ( 0.105%)  325493 (13.8%)   16.849     -1438.     -6.849      0.000      0.000       31
  12   11.2     6.9    7 4.5e+07     748    2407     518 ( 0.066%)  327372 (13.8%)   16.849     -1438.     -6.849      0.000      0.000       30
  13    8.9     9.0    5 3.5e+07     513    1593     323 ( 0.041%)  328691 (13.9%)   16.849     -1438.     -6.849      0.000      0.000       28
  14    9.0    11.6    4 2.9e+07     331    1002     186 ( 0.024%)  329757 (13.9%)   16.849     -1438.     -6.849      0.000      0.000       28
  15    8.7    15.1    2 2.6e+07     214     727     101 ( 0.013%)  330701 (14.0%)   16.849     -1438.     -6.849      0.000      0.000       26
  16    7.6    19.7    3 2.1e+07     137     460      64 ( 0.008%)  331173 (14.0%)   16.849     -1438.     -6.849      0.000      0.000       25
  17    6.7    25.6    1 1.8e+07      91     277      43 ( 0.005%)  331617 (14.0%)   16.849     -1438.     -6.849      0.000      0.000       25
  18    5.1    33.3    1 1.4e+07      54     217      20 ( 0.003%)  332382 (14.0%)   16.849     -1438.     -6.849      0.000      0.000       25
  19    2.0    43.3    5 5706643      23      62       8 ( 0.001%)  332720 (14.1%)   16.849     -1438.     -6.849      0.000      0.000       24
  20    1.8    56.2    2 4775034      14      46       7 ( 0.001%)  332723 (14.1%)   16.849     -1438.     -6.849      0.000      0.000       24
  21    0.7    73.1    0 2307456      11      21       4 ( 0.001%)  332882 (14.1%)   16.849     -1438.     -6.849      0.000      0.000       23
  22    0.3    95.0    0  888015       7      16       2 ( 0.000%)  332971 (14.1%)   16.849     -1438.     -6.849      0.000      0.000       23
  23    0.2   123.5    0  538800       3      21       1 ( 0.000%)  332961 (14.1%)   16.849     -1438.     -6.849      0.000      0.000       23
  24    0.1   160.6    0  232887       1       5       1 ( 0.000%)  332958 (14.1%)   16.849     -1438.     -6.849      0.000      0.000       23
  25    0.1   208.8    0     346       1       1       0 ( 0.000%)  332957 (14.1%)   16.849     -1438.     -6.849      0.000      0.000       23
Restoring best routing
Critical path: 16.8492 ns
Successfully routed after 25 routing iterations.
Router Stats: total_nets_routed: 36118 total_connections_routed: 117768 total_heap_pushes: 1808927915 total_heap_pops: 650875703
# Routing took 444.49 seconds (max_rss 2555.2 MiB, delta_rss +0.0 MiB)

and

Final critical path: 17.651 ns, Fmax: 56.654 MHz
Setup Worst Negative Slack (sWNS): -7.65102 ns
Setup Total Negative Slack (sTNS): -1653.2 ns

I've traced how the analysis output is generated, and I believe the router is using the same pathway, so I haven't been able to explain the discrepancy yet.

I'm currently working on replication issues and adding debug outputs to see if I can isolate where the error is arising.

Your Environment

  • VTR revision used:
  • Operating System and version:
  • Compiler version:
@litghost
Copy link
Collaborator Author

litghost commented Nov 5, 2019

I added a simple debugging step to print the full report_timing.setup.rpt at each iteration, and the critical path delay in the timing report is correct. So the question is why is the critical path different in the router iteration display from the value in the timing report?

@litghost
Copy link
Collaborator Author

litghost commented Nov 5, 2019

Looks like the routing iteration display uses tatum::find_critical_paths and the reporter uses tatum::TimingPathCollector::collect_worst_setup_timing_paths. So the question is why do they return a different CPD?

@litghost
Copy link
Collaborator Author

litghost commented Nov 5, 2019

Bug was introduced in 485697e , the cache was not invalided when update_setup() is called, only when update() was called.

@litghost
Copy link
Collaborator Author

litghost commented Nov 6, 2019

Fixed by #1037

@litghost litghost closed this as completed Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant