Why an Independent Second Tool Matters Here
In Module 1, we stated that employing both Magic and KLayout in the physical design flow is not redundant. In Module 8, Magic verified design rules on the layout and streamed out the GDSII database. In this article, we explain the engineering principles behind executing an independent secondary DRC run with KLayout.
Diversity in Automated Verification Engines
Magic and KLayout are independent software applications. They use distinct software architectures, different computational geometry algorithms, and separately maintained rule decks written from the SkyWater 130 nm design specification. A software defect in Magic, an edge case in corner-stitching polygon operations, or a transcription error in the technology file could cause Magic DRC to miss a real physical violation. Running Magic repeatedly cannot detect systematic flaws inherent to Magic itself. An independent tool evaluating raw GDSII geometry provides genuine verification diversity. Figure 1 illustrates this multi-tool verification workflow.
OpenLane integrates this methodology into GDS streamout: Magic and KLayout both stream out the database, and an automated XOR operation confirms identical geometric output across all layers.
Executing Standalone KLayout DRC
The PDK provides KLayout DRC decks in directory libs.tech/klayout/drc. Execute batch DRC against the generated GDSII file:
klayout -b -r $PDK_ROOT/sky130A/libs.tech/klayout/drc/sky130A_mr.drc \
-rd input=runs/uart_full/results/final/gds/uart_top.gds \
-rd topcell=uart_top \
-rd report=uart_top_klayout_drc.lyrdb \
-rd feol=true -rd beol=true
Command-line options and deck filenames depend on the PDK version; inspect the comment header in the DRC deck file for supported parameters. KLayout outputs a marker database (.lyrdb). You can inspect violations visually in KLayout using the marker browser (Tools > Marker Browser), which groups errors by rule category.
For the post-repair UART design, the report shows zero violations across all rule categories. Full agreement between two independent geometric tools provides robust signoff confidence.
Reconciling Tool Discrepancies
Independent tools occasionally generate conflicting results. When KLayout flags an error that Magic approved, or vice versa, do not dismiss either finding hastily. Review the formal rule description in both rule decks and compare both implementations against official foundry PDK documentation. Open-source rule decks are developed by community contributors and can contain interpretation discrepancies or maintenance delays.
In proprietary commercial flows, the semiconductor foundry formally certifies a specific electronic design automation (EDA) signoff tool and rule deck. That certified deck serves as the legal signoff reference. In open-source flows where neither deck carries official foundry certification, cross-checking with two independent engines is essential for risk reduction.
Practice Exercise
Magic DRC reports zero violations on uart_top. KLayout DRC also reports zero design rule violations, but it flags an informational warning regarding a met4 slotting rule that Magic does not evaluate. How should the engineering team respond?
Solution
Review the met4 wide-metal slotting specification in the SkyWater 130 nm design manual. Determine whether the rule represents a mandatory manufacturing constraint that Magic omitted from its technology deck. Next, inspect the layout: determine whether any met4 polygon exceeds the maximum continuous width threshold.
If wide metal lines violate the slotting rule, modify the layout to insert slots regardless of which tool detected the omission. This scenario demonstrates the necessity of multi-tool verification. Running a single tool repeatedly cannot identify unmodeled design rules.
Having verified physical geometry with independent layout engines, the next section consolidates all timing, electrical, and geometric criteria into a comprehensive tapeout signoff checklist.