Skip to content

Commit

Permalink
Merge pull request #336 from chetanya-goyal/main
Browse files Browse the repository at this point in the history
Quick fixes for PR 333
  • Loading branch information
msaligane authored Sep 18, 2024
2 parents a93aa63 + 15de247 commit f010202
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down Expand Up @@ -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"])
Expand Down Expand Up @@ -247,4 +248,3 @@ def opamp_twostage(

return opamp_top


Original file line number Diff line number Diff line change
Expand Up @@ -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")
check_and_download_nltk_data("punkt_tab")
check_and_download_nltk_data("averaged_perceptron_tagger_eng")

0 comments on commit f010202

Please sign in to comment.