# This directory contains a seal ring generator for the Googl/SkyWater
# sky130 PDK using magic.  Because the seal ring contains many layers that
# do not appear in standard layout editing, they are all specially implemented
# in the sky130seal_ring.tech file in this directory.
#
# An example seal ring was generated by SkyWater and imported using magic's
# gdsquery.sh script.  It was then hand-edited to contain only the bottom
# quarter.  Then it was saved in .mag databases.
#
# The generator script sky130_gen_sealring.py calls magic using the
# sky130seal_ring.tech file, and automatically modifies the geometry to
# stretch to the half width and height of the specified dimensions.  Then
# the lower-left cells are copied and folded over the centerline to make
# the complete seal ring.  The seal ring is then written out in GDS format.
# Then a simplified magic view is generated in the usual user-facing 
# sky130 technology file, with the GDS_FILE property pointing to the seal
# ring GDS.  This layout and GDS can then be imported into a layout.
#
# Usage:
#
#   sky130_gen_sealring.py width height target_dir [-force] [-outer]
#
# Where:
#   width = the full-chip layout width
#   height = the full-chip layout height
#   target_dir = location of the full-chip layout
#
#   -force = overwrite existing files in the target directory
#   -outer = width and height represent the seal ring outer edge, not the chip area
#
# Results:
#   Files advSeal_6u_gen.mag and advSeal_6um_gen.gds are generated and placed in
#   target_dir.  advSeal_6u_gen.mag is an "abstract" view that represents the
#   seal ring in diffusion and the nikon cross in metal1, and references
#   the advSeal_6um_gen.gds file in the same directory as a GDS_FILE property.
#

