DRC Explanation Script - 2024.1 English

Vivado Design Suite User Guide: Using Tcl Scripting (UG894)

Document ID
UG894
Release Date
2024-05-30
Version
2024.1 English

There are times when the designer has a DRC rule name or a pattern of DRC rules and wants to get an explanation about what these rules are doing. This can be done by reporting properties on the DRC objects.

The example script below takes as input a pattern matching a set of DRC rule(s) and prints some explanation (severity and description) for each rule. If the pattern does not match any rule then an error message is issued.

proc explain_drc { drcs } {
  package require struct::matrix
  set loop_drcs [get_drc_checks $drcs -quiet]
  if {$loop_drcs == {}} { 
    puts " Error: $drcs does not match any existing DRC rule"
    return 
  }
  struct::matrix drcsm
  drcsm add columns 3
  drcsm add row {DRC_ID SEVERITY DESCRIPTION}
  foreach drc $loop_drcs {
    set description "\{[get_property DESCRIPTION [get_drc_checks $drc]]\}"
    set severity "\{[get_property SEVERITY [get_drc_checks $drc]]\}"
    set key "\{[get_property NAME [get_drc_checks $drc]]\}"
    drcsm add row "$key $severity $description"
  }
  puts "[drcsm format 2chan]";
  drcsm destroy
}

There are a number of Tcl packages embedded inside Vivado and this example script uses the struct::matrix package to format the summary table.

The following are some sample outputs from the explain_drc proc:

Vivado% explain_drc CFGBVS-1
DRC_ID  SEVERITY DESCRIPTION                    
CFGBVS-1 Warning Missing CFGBVS and CONFIG_VOLTAGE Design Properties
Vivado% explain_drc CFGBVS-*
DRC_ID  SEVERITY     DESCRIPTION                    
CFGBVS-1 Warning     Missing CFGBVS and CONFIG_VOLTAGE Design Properties
CFGBVS-2 Critical Warning CFGBVS Design Property               
CFGBVS-3 Warning     CONFIG_VOLTAGE Design Property           
CFGBVS-4 Critical Warning CFGBVS and CONFIG_VOLTAGE Design Properties    
CFGBVS-5 Critical Warning CONFIG_VOLTAGE Design Property           
CFGBVS-6 Critical Warning CONFIG_VOLTAGE with HP Config Banks        
CFGBVS-7 Warning     CONFIG_VOLTAGE with Config Bank VCCO 
Vivado% explain_drc foo
Error: foo does not match any existing DRC rule