Krzysztof Herman
06/05/2024, 6:59 AMklayout -zz -rd in_gds="results/ihp-sg13g2/gcd/base/6_final.gds" \
-rd report_file=/home/herman/github/KrzysztofHerman/OpenROAD-flow-scripts/flow/reports/ihp-sg13g2/gcd/base/6_drc.lyrdb \
-r /home/herman/github/KrzysztofHerman/OpenROAD-flow-scripts/flow/platforms/ihp-sg13g2/drc/sg13g2_maximal.lydrc) 2>&1 | tee ./logs/ihp-sg13g2/gcd/base/6_drc.log
DRC: batch mode
ERROR: In /home/herman/github/KrzysztofHerman/OpenROAD-flow-scripts/flow/platforms/ihp-sg13g2/drc/sg13g2_maximal.lydrc: 'cell' script variable must be defined on command line
ERROR: RuntimeError: 'cell' script variable must be defined on command line in Executable::execute
Andreas Krinke
06/05/2024, 9:06 AMKrzysztof Herman
06/05/2024, 9:09 AMmake drc
Krzysztof Herman
06/05/2024, 9:11 AMKrzysztof Herman
06/05/2024, 9:11 AMAndreas Krinke
06/05/2024, 10:16 AMraise("'cell' script variable must be defined on command line")
by
active_cellname = RBA::CellView::active.cell_name
Krzysztof Herman
06/05/2024, 11:02 AMKrzysztof Herman
06/05/2024, 11:02 AMERROR: In /home/herman/github/KrzysztofHerman/OpenROAD-flow-scripts/flow/platforms/ihp-sg13g2/drc/sg13g2_maximal.lydrc: layout file must be defined on command line or via 'gdsfile' script variable
ERROR: RuntimeError: layout file must be defined on command line or via 'gdsfile' script variable in Executable::execute
/home/herman/github/KrzysztofHerman/OpenROAD-flow-scripts/flow/platforms/ihp-sg13g2/drc/sg13g2_maximal.lydrc:37:in `execute'
Andreas Krinke
06/05/2024, 11:16 AMKrzysztof Herman
06/05/2024, 11:25 AMKrzysztof Herman
06/05/2024, 11:28 AMERROR: In /home/herman/github/KrzysztofHerman/OpenROAD-flow-scripts/flow/platforms/ihp-sg13g2/drc/sg13g2_maximal.lydrc: 'source': Cell name not found in input layout
ERROR: RuntimeError: 'source': Cell name not found in input layout in Executable::execute
Andreas Krinke
06/05/2024, 2:31 PM# Supported variables that can be set using "-rd <name>=<value>" on the command line:
# logfile - path to the log file [default: no log file]
# in_gds - path to the GDS layout to check (required in batch mode)
# cell - name of the cell to check
# outfile - path to the report database [default: sg13g2_maximal.lyrdb in the script directory]
# to set logfile: -rd logfile="sg13g2_maximal.log"
if $logfile
log_file($logfile)
end
application = RBA::Application.instance
main_window = application.main_window
# to set input layout: -rd in_gds="path to GDS file"
if main_window
curr_layout_view = main_window.current_view()
unless curr_layout_view
layout_path = RBA::FileDialog::ask_open_file_name("Chose your layout file.", ".", "GDSII files (*.GDS *.gds *.GDS.gz *.gds.gz *.GDS2 *.gds2 *.GDS2.gz *.gds2.gz);; All files (*)")
main_window.load_layout(layout_path, 1)
curr_layout_view = main_window.current_view()
end
active_layout = RBA::CellView::active.layout
active_cellname = RBA::CellView::active.cell_name
source(active_layout, active_cellname)
else
log("DRC: batch mode")
# to set cell: -rd cell="topcell"
if $cell
active_cellname = $cell
log("Active cell: " + active_cellname)
source($in_gds, active_cellname)
active_layout = source.layout
else
source($in_gds)
active_layout = source.layout
active_cellname = source.cell_name
end
end
unless active_layout or $in_gds
raise("layout file must be defined on command line or via 'in_gds' script variable")
end
Krzysztof Herman
06/05/2024, 2:38 PMDRC: batch mode
Elapsed time: 0:10.51[h:]min:sec. CPU time: user 10.34 sys 0.18 (100%). Peak memory: 462132KB.
# Hacky way of getting DRV count (don't error on no matches)
grep -c "<value>" reports/ihp-sg13g2/gcd/base/6_drc.lyrdb > ./reports/ihp-sg13g2/gcd/base/6_drc_count.rpt || [[ $? == 1 ]]
grep: reports/ihp-sg13g2/gcd/base/6_drc.lyrdb: No such file or directory
make: *** [Makefile:934: reports/ihp-sg13g2/gcd/base/6_drc.lyrdb] Error 1
Andreas Krinke
06/05/2024, 4:36 PM# Supported variables that can be set using "-rd <name>=<value>" on the command line:
# logfile - path to the log file [default: no log file]
# in_gds - path to the GDS layout to check (required in batch mode)
# cell - name of the cell to check
# outfile - path to the report database [default: sg13g2_maximal.lyrdb in the script directory]
# to set logfile: -rd logfile="sg13g2_maximal.log"
if $logfile
log_file($logfile)
end
application = RBA::Application.instance
main_window = application.main_window
# to set input layout: -rd in_gds="path to GDS file"
if main_window
curr_layout_view = main_window.current_view()
unless curr_layout_view
layout_path = RBA::FileDialog::ask_open_file_name("Chose your layout file.", ".", "GDSII files (*.GDS *.gds *.GDS.gz *.gds.gz *.GDS2 *.gds2 *.GDS2.gz *.gds2.gz);; All files (*)")
main_window.load_layout(layout_path, 1)
curr_layout_view = main_window.current_view()
end
active_layout = RBA::CellView::active.layout
active_cellname = RBA::CellView::active.cell_name
source(active_layout, active_cellname)
else
log("DRC: batch mode")
# to set cell: -rd cell="topcell"
if $cell
active_cellname = $cell
log("Active cell: " + active_cellname)
source($in_gds, active_cellname)
active_layout = source.layout
else
source($in_gds)
active_layout = source.layout
active_cellname = source.cell_name
end
end
unless active_layout or $in_gds
raise("layout file must be defined on command line or via 'in_gds' script variable")
end
if active_layout.dbu != 0.001
puts "WARNING: Layout dbu value (" + active_layout.dbu.to_s + " ) deviates from rule file dbu value (0.001). This will scale the layout and may not be intended."
end
report_file = __dir__ + "/sg13g2_maximal.lyrdb"
# to set report file: -rd report_file="sg13g2_maximal.lyrdb"
if $report_file
report_file = File.expand_path($report_file)
end
report("design rules: sg13g2_maximal | layout cell: " + active_cellname, report_file)
Krzysztof Herman
06/05/2024, 5:43 PMAndreas Krinke
06/05/2024, 5:44 PMKrzysztof Herman
06/05/2024, 7:04 PMAndreas Krinke
06/06/2024, 12:10 PMKrzysztof Herman
06/06/2024, 12:55 PMAndreas Krinke
06/06/2024, 2:49 PM