File size: 2,852 Bytes
34292e0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
utl::set_metrics_stage "detailedroute__{}"
source $::env(SCRIPTS_DIR)/load.tcl
load_stage_input 5_1_grt.odb
source_step_tcl PRE DETAIL_ROUTE

if { !$::env(SKIP_DETAILED_ROUTE) } {
  erase_non_stage_variables route
  set_propagated_clock [all_clocks]

  set additional_args ""
  append_env_var additional_args dbProcessNode -db_process_node 1
  append_env_var additional_args OR_SEED -or_seed 1
  append_env_var additional_args OR_K -or_k 1
  append_env_var additional_args VIA_IN_PIN_MIN_LAYER -via_in_pin_bottom_layer 1
  append_env_var additional_args VIA_IN_PIN_MAX_LAYER -via_in_pin_top_layer 1
  append_env_var additional_args DISABLE_VIA_GEN -disable_via_gen 0
  append_env_var additional_args REPAIR_PDN_VIA_LAYER -repair_pdn_vias 1
  append_env_var additional_args DETAILED_ROUTE_END_ITERATION -droute_end_iter 1

  append additional_args " -verbose 1"

  # DETAILED_ROUTE_ARGS is used when debugging detailed, route, e.g. append
  # "-droute_end_iter 5" to look at routing violations after only 5 iterations,
  # speeding up iterations on a problem where detailed routing doesn't converge
  # or converges slower than expected.
  #
  # If DETAILED_ROUTE_ARGS is not specified, save out progress report a
  # few iterations after the first two iterations. The first couple of
  # iterations would produce very large .drc reports without interesting
  # information for the user.
  #
  # The idea is to have a policy that gives progress information soon without
  # having to go spelunking in Tcl or modify configuration scripts, while
  # not having to wait too long or generating large useless reports.

  set arguments [expr {
    [env_var_exists_and_non_empty DETAILED_ROUTE_ARGS] ? $::env(DETAILED_ROUTE_ARGS) :
    [concat $additional_args {-drc_report_iter_step 5}]
  }]

  set all_args [concat [list \
    -output_drc $::env(REPORTS_DIR)/5_route_drc.rpt \
    -output_maze $::env(RESULTS_DIR)/maze.log] \
    $arguments]

  log_cmd detailed_route {*}$all_args

  if {
    !$::env(SKIP_ANTENNA_REPAIR_POST_DRT) &&
    [env_var_exists_and_non_empty MAX_REPAIR_ANTENNAS_ITER_DRT]
  } {
    set repair_antennas_iters 1
    if { [repair_antennas] } {
      detailed_route {*}$all_args
    }
    while {
      [check_antennas] && $repair_antennas_iters < $::env(MAX_REPAIR_ANTENNAS_ITER_DRT)
    } {
      repair_antennas
      detailed_route {*}$all_args
      incr repair_antennas_iters
    }
  } else {
    utl::metric_integer "antenna_diodes_count" -1
  }

  source_step_tcl POST DETAIL_ROUTE

  check_antennas -report_file $env(REPORTS_DIR)/drt_antennas.log

  if { ![design_is_routed] } {
    error "Design has unrouted nets."
  }

  report_design_area

  # Don't report metrics as we have not extracted parasitics, which will
  # happen in final so there is no need to repeat it here.
}

orfs_write_db $::env(RESULTS_DIR)/5_2_route.odb