diff --git a/dependency_support/com_google_skywater_pdk/cell_libraries.bzl b/dependency_support/com_google_skywater_pdk/cell_libraries.bzl index 9d0ae48a..5b25c1f6 100644 --- a/dependency_support/com_google_skywater_pdk/cell_libraries.bzl +++ b/dependency_support/com_google_skywater_pdk/cell_libraries.bzl @@ -26,11 +26,13 @@ CELL_LIBRARIES = { "commit": "7ec511f1a4689e174c63b3964d1ba8da9a3565e5", # v0.2.1, 2020-12-09 "shallow_since": "1606239275 -0800", "library_type": "ip_library", + "corners": {}, }, "sky130_fd_pr": { "commit": "f62031a1be9aefe902d6d54cddd6f59b57627436", # v0.20.1, 2020-12-09 "shallow_since": "1605038979 -0800", "library_type": "ip_library", + "corners": {}, }, "sky130_fd_sc_hd": { "commit": "ac7fb61f06e6470b94e8afdf7c25268f62fbd7b1", # v0.0.2, 2020-12-04 @@ -123,20 +125,20 @@ CELL_LIBRARIES = { "ff_n40C_5v50": ["basic", "ccsnoise"], "ff_n40C_5v50_lowhv1v65_lv1v95": ["basic"], "ff_n40C_5v50_lv1v95": ["basic", "ccsnoise"], - "hvff_lvss_100C_5v50_lowhv1v65_lv1v60": ["basic"], - "hvff_lvss_100C_5v50_lv1v40": ["basic"], - "hvff_lvss_100C_5v50_lv1v60": ["basic"], - "hvff_lvss_n40C_5v50_lowhv1v65_lv1v60": ["basic"], - "hvff_lvss_n40C_5v50_lv1v35": ["basic"], - "hvff_lvss_n40C_5v50_lv1v60": ["basic"], - "hvss_lvff_100C_1v65": ["basic"], - "hvss_lvff_100C_1v95": ["basic"], - "hvss_lvff_100C_1v95_lowhv1v65": ["basic"], - "hvss_lvff_100C_5v50_lowhv1v65_lv1v95": ["basic"], - "hvss_lvff_n40C_1v65": ["basic"], - "hvss_lvff_n40C_1v95": ["basic"], - "hvss_lvff_n40C_1v95_lowhv1v65": ["basic"], - "hvss_lvff_n40C_5v50_lowhv1v65_lv1v95": ["basic"], + #"hvff_lvss_100C_5v50_lowhv1v65_lv1v60": ["basic"], + #"hvff_lvss_100C_5v50_lv1v40": ["basic"], + #"hvff_lvss_100C_5v50_lv1v60": ["basic"], + #"hvff_lvss_n40C_5v50_lowhv1v65_lv1v60": ["basic"], + #"hvff_lvss_n40C_5v50_lv1v35": ["basic"], + #"hvff_lvss_n40C_5v50_lv1v60": ["basic"], + #"hvss_lvff_100C_1v65": ["basic"], + #"hvss_lvff_100C_1v95": ["basic"], + #"hvss_lvff_100C_1v95_lowhv1v65": ["basic"], + #"hvss_lvff_100C_5v50_lowhv1v65_lv1v95": ["basic"], + #"hvss_lvff_n40C_1v65": ["basic"], + #"hvss_lvff_n40C_1v95": ["basic"], + #"hvss_lvff_n40C_1v95_lowhv1v65": ["basic"], + #"hvss_lvff_n40C_5v50_lowhv1v65_lv1v95": ["basic"], "ss_100C_1v65": ["basic"], "ss_100C_1v65_lv1v40": ["basic"], "ss_100C_1v65_lv1v60": ["basic"], @@ -150,7 +152,7 @@ CELL_LIBRARIES = { "ss_150C_1v65_lv1v60": ["basic"], "ss_150C_3v00_lowhv1v65_lv1v60": ["basic"], "ss_n40C_1v32": ["basic"], - "ss_n40C_1v32_lv1v28": ["basic"], + #"ss_n40C_1v32_lv1v28": ["basic"], "ss_n40C_1v49": ["basic"], "ss_n40C_1v49_lv1v44": ["basic"], "ss_n40C_1v65": ["basic", "ccsnoise"], @@ -159,13 +161,13 @@ CELL_LIBRARIES = { "ss_n40C_1v65_lv1v60": ["basic", "ccsnoise"], "ss_n40C_1v95": ["basic"], "ss_n40C_5v50_lowhv1v65_lv1v60": ["basic"], - "tt_025C_2v64_lv1v80": ["basic"], - "tt_025C_2v97_lv1v80": ["basic"], + #"tt_025C_2v64_lv1v80": ["basic"], + #"tt_025C_2v97_lv1v80": ["basic"], "tt_025C_3v30": ["basic"], - "tt_025C_3v30_lv1v80": ["basic"], + #"tt_025C_3v30_lv1v80": ["basic"], "tt_100C_3v30": ["basic"], - "tt_100C_3v30_lv1v80": ["basic"], - "tt_150C_3v30_lv1v80": ["basic"], + #"tt_100C_3v30_lv1v80": ["basic"], + #"tt_150C_3v30_lv1v80": ["basic"], }, "default_corner": "ss_100C_1v95", }, @@ -195,11 +197,11 @@ CELL_LIBRARIES = { "shallow_since": "1604476021 -0800", "corners": { "ff_085C_1v95": ["basic"], - "ff_100C_1v65_dest1v76_destvpb1v76_ka1v76": ["basic"], + #"ff_100C_1v65_dest1v76_destvpb1v76_ka1v76": ["basic"], "ff_100C_1v95": ["basic"], "ff_150C_1v95": ["basic"], "ff_n40C_1v56": ["basic"], - "ff_n40C_1v65_dest1v76_destvpb1v76_ka1v76": ["basic"], + #"ff_n40C_1v65_dest1v76_destvpb1v76_ka1v76": ["basic"], "ff_n40C_1v76": ["basic"], "ff_n40C_1v95": ["basic", "ccsnoise"], "ss_100C_1v40": ["basic"], @@ -225,7 +227,7 @@ CELL_LIBRARIES = { "ff_100C_1v95": ["basic", "leakage"], "ff_150C_1v95": ["basic"], "ff_n40C_1v56": ["basic"], - "ff_n40C_1v65_ka1v76": ["basic"], + #"ff_n40C_1v65_ka1v76": ["basic"], "ff_n40C_1v76": ["basic"], "ff_n40C_1v95": ["basic", "ccsnoise", "leakage"], "ss_100C_1v60": ["basic"], diff --git a/dependency_support/com_google_skywater_pdk/cells_info.bzl b/dependency_support/com_google_skywater_pdk/cells_info.bzl new file mode 100644 index 00000000..01b0bd6a --- /dev/null +++ b/dependency_support/com_google_skywater_pdk/cells_info.bzl @@ -0,0 +1,150 @@ +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Standard cell options for SkyWater 130nm PDK.""" + +load("@rules_hdl//dependency_support/com_google_skywater_pdk:cell_libraries.bzl", "CELL_LIBRARIES") +load("@rules_hdl//pdk:build_defs.bzl", "StandardCellOptionsInfo", "check_for_each_cells_args", "temp_normalize", "voltage_normalize") + +SKY130_OPTIONS = StandardCellOptionsInfo( + libraries = [ + "sc_hd", + #"sc_hdll", + #"sc_hs", + #"sc_ms", + #"sc_ls", + #"sc_lp", + #"sc_hvl", + ], + vts = [], + corners = list(sorted({ + cname.split("_")[0]: None + for libname in CELL_LIBRARIES + for cname in CELL_LIBRARIES[libname]["corners"] + }.keys())), + volts = list(sorted({ + voltage_normalize(cname.split("_")[2]): None + for libname in CELL_LIBRARIES + for cname in CELL_LIBRARIES[libname]["corners"] + }.keys())), + temps = list(sorted({ + temp_normalize(cname.split("_")[1]): None + for libname in CELL_LIBRARIES + for cname in CELL_LIBRARIES[libname]["corners"] + }.keys())), +) + +def sky130_cell_normalize(libname, corner_def): + """Normalize a corner name. + + Args: + libname: Name of the standard cell library (like `sc_hd`). + corner_def: Skywater corner definitions (like `ff_100C_1v65`). + + Returns: + The normalize name like `sky130-sc_hd-ff-0v123_m40c` + + """ + bits = corner_def.split("_") + corner, temp, voltage = bits[:3] + v_extra = '' + if len(bits) > 3: + v_extra += '_' + if bits[3].startswith('lowhv'): + v_extra += voltage_normalize(bits.pop(3)[6:])+'t' + if len(bits) > 3 and bits[3].startswith('lv'): + v_extra += 't'+voltage_normalize(bits.pop(3)[3:]) + if len(bits) > 3: + fail("Found extra bits in corner definition {} (from '{}')".format(bits[3:], corner_def)) + + temp = temp_normalize(temp) + voltage = voltage_normalize(voltage) + + return "sky130-{n}-{c}-{v}_{t}".format( + n = libname, + c = corner, + v = voltage+v_extra, + t = temp, + ) + +def for_each_sky130_cells(libname, include_vts = None, include_corners = None, include_volts = None, include_temps = None): + """Generate a list of each standard cell library name. + + Args: + libname: Libaray name like 'sc_hd'. + include_vts: Unused for sky130. + include_corners: 'all' or list of corners ('ff', 'tt', 'ss') to include in the output. + include_volts: 'all' or list of voltages (in '0p55v' form) to include in the output. + include_temps: 'all' or list of temperatures (in 'm40c' or '125c' form) to include in the output. + + Returns: + A list of tuples containing a unique name for the cell library + (suitable for usage in rule names) and the bazel target for the cell + library. + + Example: + ``` + [ + ("sky130-sc_hd-ff-0p605_125c", "@com_google_skywater_pdk_sky130_fd_sc_hd//:sky130-sc_hd-ff-0p605_125c"), + ("sky130-sc_hd-ff-0p605_m40c", "@com_google_skywater_pdk_sky130_fd_sc_hd//:sky130-sc_hd-ff-0p605_m40c"), + .... + ] + ``` + + Use this to create bazel rules for every standard cell version like shown below; + ``` + load("@rules_hdl//dependency_support/com_google_skywater_pdk:build_info.bzl", "for_each_sky130_cells") + [ + extract_lef_and_liberty( + name = cell_name + "-data", + standard_cell = cell_target, + ) + for cell_name, cell_target in for_each_sky130_cells('sc_hd', include_corners=['25c']) + ] + ``` + """ + kwargs = { + "libname": libname, + "include_vts": include_vts, + "include_corners": include_corners, + "include_volts": include_volts, + "include_temps": include_temps, + } + check_for_each_cells_args(kwargs, SKY130_OPTIONS) + + # Iterate over all the options, skipping values not found in the include_XXX arguments. + corners = {} + for corner_def in CELL_LIBRARIES["sky130_fd_" + libname]["corners"]: + corner, temp, voltage = corner_def.split("_", 3) + + temp = temp_normalize(temp) + + if "_" in voltage: + voltage = voltage.split("_")[0] + voltage = voltage_normalize(voltage) + + if corner not in kwargs["include_corners"]: + continue + + if voltage not in kwargs["include_volts"]: + continue + + if temp not in kwargs["include_temps"]: + continue + + cell_name = sky130_cell_normalize(libname, corner_def) + cell_target = "@com_google_skywater_pdk_sky130_fd_{l}//:{c}".format(l = libname, c = cell_name) + corners[cell_name] = cell_target + + return list(sorted(corners.items())) diff --git a/dependency_support/com_google_skywater_pdk/com_google_skywater_pdk.bzl b/dependency_support/com_google_skywater_pdk/com_google_skywater_pdk.bzl index fbb7ceb7..4d8b891e 100644 --- a/dependency_support/com_google_skywater_pdk/com_google_skywater_pdk.bzl +++ b/dependency_support/com_google_skywater_pdk/com_google_skywater_pdk.bzl @@ -41,6 +41,8 @@ def com_google_skywater_pdk(): for library_name in CELL_LIBRARIES: library = CELL_LIBRARIES[library_name] + if library.get('library_type', None) == 'ip_library': + continue workspace_name = "com_google_skywater_pdk_" + library_name maybe( new_git_repository, diff --git a/dependency_support/com_google_skywater_pdk/declare_cell_library.bzl b/dependency_support/com_google_skywater_pdk/declare_cell_library.bzl index 0889d29f..0bb6f8c7 100644 --- a/dependency_support/com_google_skywater_pdk/declare_cell_library.bzl +++ b/dependency_support/com_google_skywater_pdk/declare_cell_library.bzl @@ -16,6 +16,7 @@ cell library workspace to set things up.""" load("@rules_hdl//dependency_support/com_google_skywater_pdk:build_defs.bzl", "skywater_cell_library", "skywater_corner") +load("@rules_hdl//dependency_support/com_google_skywater_pdk:cells_info.bzl", "sky130_cell_normalize") load(":cell_libraries.bzl", "CELL_LIBRARIES") def declare_cell_library(workspace_name, name): @@ -32,13 +33,21 @@ def declare_cell_library(workspace_name, name): ) library = CELL_LIBRARIES[name] corners = library.get("corners", {}) + all_corners = [] for corner in corners: + target_name = sky130_cell_normalize(name, corner).replace("sky130_fd_", "") + corner_name = "corner-" + target_name + all_corners.append(corner_name) + # boolean values indicating ccsnoise and leakage information in this # corner. ccsnoise = "ccsnoise" in corners[corner] leakage = "leakage" in corners[corner] + + # Create the corner configuration skywater_corner( - name = "{}".format(corner), + name = corner_name, + corner = corner, visibility = ["//visibility:private"], srcs = native.glob([ "cells/**/*.lib.json", @@ -49,6 +58,37 @@ def declare_cell_library(workspace_name, name): with_leakage = leakage, standard_cell_root = "external/{}".format(workspace_name), ) + + # Library with only just a single corner. + skywater_cell_library( + name = target_name, + srcs = native.glob( + include = [ + "cells/**/*.lef", + "cells/**/*.gds", + ], + # There are two types of lefs in the PDK. One for magic a layout + # tool that requires some different properties set in the LEF that + # are not always suitable for the downstream tools like OpenROAD + # and yosys. We're basically just choosing that we want the normal + # lefs instead of the magic ones. + # + # Currently this repo doesn't integrate magic into the flow. At + # some point it will, and we'll need to somehow have both lefs, or + # fix the lefs upstream. Just know that you may at some point in the + # future need to modify this. + exclude = [ + "cells/**/*.magic.lef", + ], + ), + process_corners = [":" + corner_name], + default_corner = corner, + visibility = ["//visibility:public"], + openroad_configuration = library.get("open_road_configuration", None), + tech_lef = "tech/{}.tlef".format(name) if library.get("library_type", None) != "ip_library" else None, + ) + + # Multi-corner library skywater_cell_library( name = name, srcs = native.glob( @@ -70,7 +110,7 @@ def declare_cell_library(workspace_name, name): "cells/**/*.magic.lef", ], ), - process_corners = [":{}".format(corner) for corner in corners], + process_corners = [":{}".format(corner) for corner in all_corners], default_corner = library.get("default_corner", ""), visibility = ["//visibility:public"], openroad_configuration = library.get("open_road_configuration", None), diff --git a/dependency_support/org_theopenroadproject_asap7_pdk_r1p7/cells_info.bzl b/dependency_support/org_theopenroadproject_asap7_pdk_r1p7/cells_info.bzl new file mode 100644 index 00000000..250d84fd --- /dev/null +++ b/dependency_support/org_theopenroadproject_asap7_pdk_r1p7/cells_info.bzl @@ -0,0 +1,111 @@ +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Standard cell options for the ASAP7 7nm predictive PDK.""" + +load("@rules_hdl//pdk:build_defs.bzl", "StandardCellOptionsInfo", "check_for_each_cells_args") + +ASAP7_OPTIONS = StandardCellOptionsInfo( + libraries = [ + "sc6t_rev26", + "sc7p5t_rev27", + "sc7p5t_rev28", + ], + vts = [ + "rvt", # Regular VT -- Slowest + "lvt", # Low VT + "slvt", # Super low VT -- Fastest + ], + corners = [ + "ff", + "tt", + "ss", + ], + volts = [ + # ??? + ], + temps = [ + # ??? + ], +) + +def for_each_asap7_cells(libname, include_vts = None, include_corners = None, include_volts = None, include_temps = None): + """Generate a list of each standard cell library name. + + Args: + libname: Libaray name like 'h169l3p48'. + include_vts: 'all' or list of vts ('rvt', 'lvt', 'slvt') to include in the output. + include_corners: 'all' or list of corners ('ff', 'tt', 'ss') to include in the output. + include_volts: 'all' or list of voltages (in '0p55v' form) to include in the output. + include_temps: 'all' or list of temperatures (in 'm40c' or '125c' form) to include in the output. + + Returns: + A list of tuples containing a unique name for the cell library + (suitable for usage in rule names) and the bazel target for the cell + library. + + Example: + ``` + [ + ('asap7-sc7p5t_rev27_rvt-ccs_ss', '@org_theopenroadproject_asap7sc7p5t_27//:asap7-sc7p5t_rev27_rvt-ccs_ss'), + ('asap7-sc7p5t_rev27_lvt-ccs_ss', '@org_theopenroadproject_asap7sc7p5t_27//:asap7-sc7p5t_rev27_lvt-ccs_ss'), + ... + ] + ``` + Use this to create bazel rules for every standard cell version like shown below; + ``` + load("//hardware/tools/open_road/asap7:build_info.bzl", "for_each_asap7_cells") + [ + extract_lef_and_liberty( + name = cell_name+"-data", + standard_cell = cell_target, + ) + for cell_name, cell_target in for_each_asap7_cells('sc7p5t_rev28', include_corners=['25c']) + ] + ``` + """ + kwargs = { + "libname": libname, + "include_vts": include_vts, + "include_corners": include_corners, + "include_volts": include_volts, + "include_temps": include_temps, + } + check_for_each_cells_args(kwargs, ASAP7_OPTIONS) + + # Iterate over all the options, skipping values not found in the include_XXX arguments. + output = [] + for vt in ASAP7_OPTIONS.vts: + if vt not in kwargs["include_vts"]: + continue + + for corner in ASAP7_OPTIONS.corners: + if corner not in kwargs["include_corners"]: + continue + + # No voltage or temps for ASAP7 + + # asap7-sc7p5t_rev27_rvt_4x + cell_name = "asap7-{n}_{v}-ccs_{c}".format( + n = libname, + v = vt, + c = corner, + ) + + libname_short = libname.replace("rev", "") + + # "@org_theopenroadproject_asap7sc7p5t_27//:asap7-sc7p5t_rev27_rvt-ccs_ss + cell_target = "@org_theopenroadproject_asap7{}//:{}".format(libname_short, cell_name) + output.append((cell_name, cell_target)) + return output diff --git a/pdk/build_defs.bzl b/pdk/build_defs.bzl index 75f5d46a..a5fcb388 100644 --- a/pdk/build_defs.bzl +++ b/pdk/build_defs.bzl @@ -38,3 +38,245 @@ CornerInfo = provider( "corner_name": "Name of the process corner", }, ) + +StandardCellOptionsInfo = provider( + "Provides information about what standard cell options are available", + fields = { + "libraries": "A list of available standard cell library names.", + "vts": "A list of voltage thresholds names.", + "corners": "A list of valid corners names.", + "volts": "A list of (normalize) voltage levels names used in timing characterization.", + "temps": "A list of (normalize) temperature values names used in timing characterization.", + }, +) + +def temp_format(i): + """Format an integer representing degrees celsius. + + The format is: + * Always 4 characters long. + * Always ends in lower case 'c'. + * Negative values start with lower case `m`. + * Left padded by zeros. + + The format can represent whole (integer) degrees between (inclusive) 999C to -99C. + + The format is designed to have sort in a decent way as a string. + + >>> voltage_format(30) + "030c" + + >>> voltage_format(-10) + "m10c" + + >>> voltage_format(0) + "000c" + + """ + if i < -99 or i > 999: + fail("Temperature value {} out side range for formatting (-99 -> 999).".format(i)) + + if i < -10: + s = "m" + str(i)[1:] + elif i < 0: + s = "m0" + str(i)[1:] + elif i < 10: + s = "00" + str(i) + elif i < 100: + s = "0" + str(i) + else: + s = str(i) + + return s + "c" + +def temp_parse(s): + """Parse into an int a string representing temperature in degrees celsius. + + >>> temp_parse("030c") + 30 + + >>> temp_parse("000c") + 0 + + >>> temp_parse("m35c") + -35 + + >>> temp_parse("n35c") + -35 + + >>> temp_parse("0c") + 0 + + >>> temp_parse("m02c") + -2 + + """ + os = s + s = s.lower().strip() + + # Check string ends in `c` (for degree celsius) + if s[-1] != "c": + fail("No `c` character found at end of value {}".format(s)) + s = s[:-1] + + # Convert `m` into negative sign + if s.startswith("n"): + s = "m" + s[1:] + + m = 1 + if s.startswith("m"): + m = -1 + s = s[1:] + + # Trim leading zeros + if s[:-1].startswith("0"): + s = s[:-1].lstrip("0") + s[-1] + + return int(s) * m + +def temp_normalize(s): + """Normalize an already existing temperature string into the format provided by `temp_format`. + + >>> temp_normalize("m2c") + "m02c" + + >>> temp_normalize("30c") + "030c" + + >>> voltage_format("0c") + "000c" + + >>> voltage_format("125c") + "125c" + """ + return temp_format(temp_parse(s)) + +def voltage_format(f): + """Format a decimal number representing a voltage. + + The format is: + * Always 5 characters long. + * Has one digit before the decimal point. + * Has three digital after the decimal point. + * Uses the character `p` for the decimal point. + + The format can represent voltages between (inclusive) 9.999 volts to 0.000 volts. + + The format is designed to have sort in a decent way as a string. + + >>> voltage_format(7.5) + "7v500" + + >>> voltage_format(0) + "0v000" + + >>> voltage_format(-10) + Failure... + + >>> voltage_format(2) + Failure... + + """ + if f >= 10 or f <= 0: + fail("Voltage value {} out side range for formatting (0.000 -> 9.999)".format(f)) + + # We really want `"{:1.3f}".format(f)` but starlark doesn't support it + s = str(f)[:5] + if len(s) < 5: + s = s + "0" * (5 - len(s)) + return s.replace(".", "v", 1) + +def voltage_normalize(s): + """Normalize an existing voltage string into the format provided by `voltage_format`. + + >>> voltage_normalize("7p5v") + "7v500" + + >>> voltage_normalize("7v5") + "7v500" + + >>> voltage_normalize("7.5v") + "7v500" + + """ + return voltage_format(voltage_parse(s)) + +def voltage_parse(s): + """Parse a voltage string like that produced by `voltage_format` function. + + >>> voltage_parse("7p5") + 7.5 + + >>> voltage_parse("7p500") + 7.5 + + >>> voltage_parse("0.75v") + 7.5 + + >>> voltage_parse("0v75") + 7.5 + """ + s = s.lower().strip() + + if s.endswith("v"): + s = s[:-1].replace(".", "p") + if "v" in s: + s = s.replace("v", "p") + + if "p" not in s: + fail("No decimal point found in {}".format(s)) + + s = s.replace("p", ".") + + return float(s) + +def check_for_each_cells_args(kwargs, options): + """Function for checking the arguments provided to a `for_each_XXX_cells` function are valid. + + Args: + kwargs: Dictionary of keyword arguments provided to `for_each_XXX_cells` function. + options: A `StandardCellOptionsInfo` for the PDK. + """ + #if isinstance(options, StandardCellOptionsInfo): + # fail("options should be a `StandardCellOptionsInfo` object.") + + if kwargs["libname"] not in options.libraries: + fail("Invalid library name: " + kwargs["libname"]) + + # Validate the provided voltage threadholds + if kwargs["include_vts"] in ("all", None): + kwargs["include_vts"] = options.vts + + for vt in kwargs["include_vts"]: + if vt not in options.vts: + fail("Invalid vt: {} (from {})".format(vt, kwargs["include_vts"])) + + # Valid the provided corners + if kwargs["include_corners"] in ("all", None): + kwargs["include_corners"] = options.corners + + for corner in kwargs["include_corners"]: + if corner not in options.corners: + fail("Invalid corner: {} (from {})".format(corner, kwargs["include_corners"])) + + # Validate and normalize the provided volts values + if kwargs["include_volts"] in ("all", None): + kwargs["include_volts"] = list(options.volts) + + for i, voltage in enumerate(kwargs["include_volts"]): + kwargs["include_volts"][i] = voltage_normalize(voltage) + + for voltage in kwargs["include_volts"]: + if voltage not in options.volts: + fail("Invalid volts: {} (from {})".format(voltage, kwargs["include_volts"])) + + # Validate and normalize the provided temperature values + if kwargs["include_temps"] in ("all", None): + kwargs["include_temps"] = list(options.temps) + + for i, temp in enumerate(kwargs["include_temps"]): + kwargs["include_temps"][i] = temp_normalize(temp) + + for temp in kwargs["include_temps"]: + if temp not in options.temps: + fail("Invalid temp: {} (from {})".format(temp, kwargs["include_temps"])) diff --git a/tools/test_everything.py b/tools/test_everything.py index 6126fcd9..a8c1769d 100755 --- a/tools/test_everything.py +++ b/tools/test_everything.py @@ -43,8 +43,6 @@ '@com_google_skywater_pdk_sky130_fd_sc_hs//...', '@com_google_skywater_pdk_sky130_fd_sc_hdll//...', '@com_google_skywater_pdk_sky130_fd_sc_hd//...', - '@com_google_skywater_pdk_sky130_fd_pr//...', - '@com_google_skywater_pdk_sky130_fd_io//...', '@com_icarus_iverilog//...', '@com_opencircuitdesign_magic//...', '@com_opencircuitdesign_netgen//...', @@ -64,6 +62,8 @@ '@org_sourceware_libffi//...', '@org_swig//...', '@org_theopenroadproject_asap7_pdk_r1p7//...', + '@org_theopenroadproject_asap7sc6t_26//...', + '@org_theopenroadproject_asap7sc7p5t_27//...', '@org_theopenroadproject_asap7sc7p5t_28//...', '@pybind11//...', '@rules_pkg//...',