From fc3279a64d0bf80281c69c26e21e3ae7314196e0 Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Thu, 25 May 2023 20:59:12 +0300 Subject: [PATCH] tiles support in --create-user-config --- project.py | 11 ++++++++++- tile_sizes.yaml | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tile_sizes.yaml diff --git a/project.py b/project.py index a122775..3a0b4e8 100644 --- a/project.py +++ b/project.py @@ -16,6 +16,10 @@ import shutil CELL_URL = 'https://antmicro-skywater-pdk-docs.readthedocs.io/en/test-submodules-in-rtd/contents/libraries/sky130_fd_sc_ls/cells/' +with open(os.path.join(os.path.dirname(__file__), 'tile_sizes.yaml'), 'r') as stream: + tile_sizes = (yaml.safe_load(stream)) + + class Project(): def __init__(self, index, git_url, local_dir, args, fill=False): @@ -350,7 +354,12 @@ class Project(): fh.write(" $::env(DESIGN_DIR)/" + source) if line != len(self.src_files) - 1: fh.write(' \\\n') - fh.write('"\n') + fh.write('"\n\n') + tiles = self.yaml['project']['tiles'] + die_area = tile_sizes[tiles] + fh.write(f'# Project area: {tiles} tiles\n') + fh.write(f'set ::env(DIE_AREA) "{die_area}"\n') + fh.write(f'set ::env(FP_DEF_TEMPLATE) "$::env(DESIGN_DIR)/../tt/def/tt_block_{tiles}.def"\n') def golden_harden(self): logging.info(f"hardening {self}") diff --git a/tile_sizes.yaml b/tile_sizes.yaml new file mode 100644 index 0000000..9465b7d --- /dev/null +++ b/tile_sizes.yaml @@ -0,0 +1,5 @@ +1x1: "0 0 167.9 108.8" +1x2: "0 0 167.9 220.32" +2x2: "0 0 338.56 220.32" +4x2: "0 0 679.88 220.32" +8x2: "0 0 1362.52 220.32"