Skip to content

Commit

Permalink
feat(precheck): make top module name optional
Browse files Browse the repository at this point in the history
if not given, just assume the top module name is the same at the base name of the given GDS file
  • Loading branch information
urish committed Nov 20, 2023
1 parent 192baef commit a97371e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions precheck/precheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,17 @@ def klayout_checks(gds: str):
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--gds", required=True)
parser.add_argument("--toplevel", required=True)
parser.add_argument("--top-module", required=False)
args = parser.parse_args()
logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
logging.info(f"PDK_ROOT: {PDK_ROOT}")

assert magic_drc(args.gds, args.toplevel)
if args.top_module:
top_module = args.top_module
else:
top_module = os.path.splitext(os.path.basename(args.gds))[0]

assert magic_drc(args.gds, top_module)

assert klayout_drc(args.gds, "feol")
assert klayout_drc(args.gds, "beol")
Expand Down

0 comments on commit a97371e

Please sign in to comment.