diff --git a/openfasoc/generators/glayout/glayout/flow/blocks/composite/opamp/opamp_twostage.py b/openfasoc/generators/glayout/glayout/flow/blocks/composite/opamp/opamp_twostage.py index fe3b05c04..f612c509e 100644 --- a/openfasoc/generators/glayout/glayout/flow/blocks/composite/opamp/opamp_twostage.py +++ b/openfasoc/generators/glayout/glayout/flow/blocks/composite/opamp/opamp_twostage.py @@ -5,7 +5,7 @@ from glayout.flow.pdk.mappedpdk import MappedPDK from typing import Optional, Union from glayout.flow.primitives.fet import nmos, pmos, multiplier -from glayout.flow.blocks.elementary.diff_pair import diff_pair +from glayout.flow.blocks.diff_pair import diff_pair from glayout.flow.primitives.guardring import tapring from glayout.flow.primitives.mimcap import mimcap_array, mimcap from glayout.flow.routing.L_route import L_route @@ -19,13 +19,13 @@ from pydantic import validate_arguments from glayout.flow.placement.two_transistor_interdigitized import two_nfet_interdigitized -from glayout.flow.blocks.composite.diffpair_cmirror_bias import diff_pair_ibias -from glayout.flow.blocks.composite.stacked_current_mirror import stacked_nfet_current_mirror -from glayout.flow.blocks.composite.differential_to_single_ended_converter import differential_to_single_ended_converter -from glayout.flow.blocks.composite.opamp.row_csamplifier_diff_to_single_ended_converter import row_csamplifier_diff_to_single_ended_converter -from glayout.flow.blocks.composite.opamp.diff_pair_stackedcmirror import diff_pair_stackedcmirror +from glayout.flow.blocks.diffpair_cmirror_bias import diff_pair_ibias +from glayout.flow.blocks.stacked_current_mirror import stacked_nfet_current_mirror +from glayout.flow.blocks.differential_to_single_ended_converter import differential_to_single_ended_converter +from glayout.flow.blocks.opamp.row_csamplifier_diff_to_single_ended_converter import row_csamplifier_diff_to_single_ended_converter +from glayout.flow.blocks.opamp.diff_pair_stackedcmirror import diff_pair_stackedcmirror from glayout.flow.spice import Netlist -from glayout.flow.blocks.elementary.current_mirror import current_mirror_netlist +from glayout.flow.blocks.current_mirror import current_mirror_netlist @validate_arguments def __create_and_route_pins( @@ -110,7 +110,8 @@ def __add_mimcap_arr(pdk: MappedPDK, opamp_top: Component, mim_cap_size, mim_cap mim_cap_size = pdk.snap_to_2xgrid(mim_cap_size, return_type="float") max_metalsep = pdk.util_max_metal_seperation() mimcaps_ref = opamp_top << mimcap_array(pdk,mim_cap_rows,2,size=mim_cap_size,rmult=6) - + if int(mim_cap_rows) < 1: + raise ValueError("mim_cap_rows should be a positive integer") mimcap_netlist = mimcaps_ref.info['netlist'] displace_fact = max(max_metalsep,pdk.get_grule("capmet")["min_separation"]) @@ -247,4 +248,3 @@ def opamp_twostage( return opamp_top - diff --git a/openfasoc/generators/glayout/glayout/syntaxer/nltk_init_deps.py b/openfasoc/generators/glayout/glayout/syntaxer/nltk_init_deps.py index e4e86a294..52e69e518 100644 --- a/openfasoc/generators/glayout/glayout/syntaxer/nltk_init_deps.py +++ b/openfasoc/generators/glayout/glayout/syntaxer/nltk_init_deps.py @@ -10,11 +10,13 @@ def check_and_download_nltk_data(data_name): """ try: nltk.data.find(f"tokenizers/{data_name}") - except LookupError: + #except LookupError: + except Exception: print(f"{data_name} is not downloaded. Downloading now...") nltk.download(data_name) print(f"{data_name} has been downloaded.") check_and_download_nltk_data("punkt") -check_and_download_nltk_data("punkt_tab") \ No newline at end of file +check_and_download_nltk_data("punkt_tab") +check_and_download_nltk_data("averaged_perceptron_tagger_eng")