original_docstring: 
          This function is currently specialized to add very specific features
          for pseudo PIPs which need to be enabled to get the correct HW behaviour
          
docstring: This function is currently specialized to add very specific features
  for pseudo PIPs which need to be enabled to get the correct HW behaviour
docstring_tokens: This function is currently specialized to add very specific features for pseudo PIPs which need to be enabled to get the correct HW behaviour
code: def handle_site_thru(self, site_thru_pips):
          """
          This function is currently specialized to add very specific features
          for pseudo PIPs which need to be enabled to get the correct HW behaviour
          """
  
          def get_feature_prefix(site_thru_feature, wire):
              regex = re.compile(site_thru_feature.regex)
  
              m = regex.match(wire)
  
              return site_thru_feature.callback(m) if m else None
  
          # FIXME: this information needs to be added as an annotation
          #        to the device resources
          site_thru_features = list()
          site_thru_features.append(
              ExtraFeatures(
                  regex="IOI_OLOGIC([01])_D1",
                  features=["OMUX.D1", "OQUSED", "OSERDES.DATA_RATE_TQ.BUF"],
                  callback=lambda m: "OLOGIC_Y{}".format(m.group(1))))
          site_thru_features.append(
              ExtraFeatures(
                  regex="[LR]IOI_ILOGIC([01])_D",
                  features=["ZINV_D"],
                  callback=lambda m: "ILOGIC_Y{}".format(m.group(1))))
          site_thru_features.append(ExtraFeatures(
              regex="CLK_HROW_CK_MUX_OUT_([LR])([0-9]+)",
              features=["IN_USE", "ZINV_CE"],
              callback=lambda m: "BUFHCE.BUFHCE_X{}Y{}".format(0 if m.group(1) == "L" else 1, m.group(2))
              ))
          #TODO: Better handle BUFGCTRL route-through depending on the
          #      used input pin
          site_thru_features.append(
              ExtraFeatures(
                  regex="CLK_BUFG_BUFGCTRL([0-9]+)_I0",
                  features=[
                      "IN_USE", "ZINV_CE0", "ZINV_S0", "IS_IGNORE1_INVERTED"
                  ],
                  callback=
                  lambda m: "BUFGCTRL.BUFGCTRL_X0Y{}".format(m.group(1))))
          site_thru_features.append(
              ExtraFeatures(
                  regex="CLK_BUFG_BUFGCTRL([0-9]+)_I1",
                  features=[
                      "IN_USE", "ZINV_CE1", "ZINV_S1", "IS_IGNORE0_INVERTED"
                  ],
                  callback=
                  lambda m: "BUFGCTRL.BUFGCTRL_X0Y{}".format(m.group(1))))
  
          for tile, wire0, wire1 in site_thru_pips:
              for site_thru_feature in site_thru_features:
                  prefix = get_feature_prefix(site_thru_feature, wire0)
  
                  if prefix is None:
                      continue
  
                  for feature in site_thru_feature.features:
                      self.add_cell_feature((tile, prefix, feature))
  
                  break
code_tokens: def handle_site_thru ( self , site_thru_pips ) : def get_feature_prefix ( site_thru_feature , wire ) : regex = re . compile ( site_thru_feature . regex ) m = regex . match ( wire ) return site_thru_feature . callback ( m ) if m else None site_thru_features = list ( ) site_thru_features . append ( ExtraFeatures ( regex = "IOI_OLOGIC([01])_D1" , features = [ "OMUX.D1" , "OQUSED" , "OSERDES.DATA_RATE_TQ.BUF" ] , callback = lambda m : "OLOGIC_Y{}" . format ( m . group ( 1 ) ) ) ) site_thru_features . append ( ExtraFeatures ( regex = "[LR]IOI_ILOGIC([01])_D" , features = [ "ZINV_D" ] , callback = lambda m : "ILOGIC_Y{}" . format ( m . group ( 1 ) ) ) ) site_thru_features . append ( ExtraFeatures ( regex = "CLK_HROW_CK_MUX_OUT_([LR])([0-9]+)" , features = [ "IN_USE" , "ZINV_CE" ] , callback = lambda m : "BUFHCE.BUFHCE_X{}Y{}" . format ( 0 if m . group ( 1 ) == "L" else 1 , m . group ( 2 ) ) ) ) site_thru_features . append ( ExtraFeatures ( regex = "CLK_BUFG_BUFGCTRL([0-9]+)_I0" , features = [ "IN_USE" , "ZINV_CE0" , "ZINV_S0" , "IS_IGNORE1_INVERTED" ] , callback = lambda m : "BUFGCTRL.BUFGCTRL_X0Y{}" . format ( m . group ( 1 ) ) ) ) site_thru_features . append ( ExtraFeatures ( regex = "CLK_BUFG_BUFGCTRL([0-9]+)_I1" , features = [ "IN_USE" , "ZINV_CE1" , "ZINV_S1" , "IS_IGNORE0_INVERTED" ] , callback = lambda m : "BUFGCTRL.BUFGCTRL_X0Y{}" . format ( m . group ( 1 ) ) ) ) for tile , wire0 , wire1 in site_thru_pips : for site_thru_feature in site_thru_features : prefix = get_feature_prefix ( site_thru_feature , wire0 ) if prefix is None : continue for feature in site_thru_feature . features : self . add_cell_feature ( ( tile , prefix , feature ) ) break
short_docstring: This function is currently specialized to add very specific features
  for pseudo PIPs which need to be enabled to get the correct HW behaviour
short_docstring_tokens: This function is currently specialized to add very specific features for pseudo PIPs which need to be enabled to get the correct HW behaviour
comment: """
          This function is currently specialized to add very specific features
          for pseudo PIPs which need to be enabled to get the correct HW behaviour
          """$SEP$# FIXME: this information needs to be added as an annotation$SEP$#        to the device resources$SEP$#TODO: Better handle BUFGCTRL route-through depending on the$SEP$#      used input pin