original_docstring: 
          This function is specialized to add FASM features for the IO buffers
          in the 7-Series database format.
          
docstring: This function is specialized to add FASM features for the IO buffers
  in the 7-Series database format.
docstring_tokens: This function is specialized to add FASM features for the IO buffers in the 7 - Series database format .
code: def handle_ios(self):
          """
          This function is specialized to add FASM features for the IO buffers
          in the 7-Series database format.
          """
  
          # FIXME: Need to make this dynamic, and find a suitable way to add FASM annotations to the device resources.
          #        In addition, a reformat of the database might be required to have an easier handling of these
          #        features.
          allowed_io_types = {
              "OBUF": [
                  "LVCMOS12_LVCMOS15_LVCMOS18_LVCMOS25_LVCMOS33_LVTTL_SSTL135_SSTL15.SLEW.SLOW",
                  "LVCMOS33_LVTTL.DRIVE.I12_I16", "PULLTYPE.NONE"
              ],
              "IBUF": [
                  "LVCMOS12_LVCMOS15_LVCMOS18_LVCMOS25_LVCMOS33_LVTTL.SLEW.FAST",
                  "LVCMOS12_LVCMOS15_LVCMOS18_LVCMOS25_LVCMOS33_LVDS_25_LVTTL_SSTL135_SSTL15_TMDS_33.IN_ONLY",
                  "LVCMOS25_LVCMOS33_LVTTL.IN", "PULLTYPE.NONE"
              ]
          }
  
          iob_sites = ["IOB_Y0", "IOB_Y1"]
          iob_re = re.compile("IOB_X[0-9]+Y([0-9]+)")
  
          for cell_instance, cell_data in self.physical_cells_instances.items():
              if cell_data.cell_type not in allowed_io_types:
                  continue
  
              tile_name = cell_data.tile_name
  
              m = iob_re.match(cell_data.site_name)
              assert m, site_name
  
              y_coord = int(m.group(1))
              if "SING" in tile_name and y_coord % 50 == 0:
                  iob_sites_idx = 0
              elif "SING" in tile_name and y_coord % 50 == 49:
                  iob_sites_idx = 1
              else:
                  iob_sites_idx = y_coord % 2
  
              iob_site = iob_sites[iob_sites_idx]
  
              for feature in allowed_io_types[cell_data.cell_type]:
                  self.add_cell_feature((tile_name, iob_site, feature))
code_tokens: def handle_ios ( self ) : allowed_io_types = { "OBUF" : [ "LVCMOS12_LVCMOS15_LVCMOS18_LVCMOS25_LVCMOS33_LVTTL_SSTL135_SSTL15.SLEW.SLOW" , "LVCMOS33_LVTTL.DRIVE.I12_I16" , "PULLTYPE.NONE" ] , "IBUF" : [ "LVCMOS12_LVCMOS15_LVCMOS18_LVCMOS25_LVCMOS33_LVTTL.SLEW.FAST" , "LVCMOS12_LVCMOS15_LVCMOS18_LVCMOS25_LVCMOS33_LVDS_25_LVTTL_SSTL135_SSTL15_TMDS_33.IN_ONLY" , "LVCMOS25_LVCMOS33_LVTTL.IN" , "PULLTYPE.NONE" ] } iob_sites = [ "IOB_Y0" , "IOB_Y1" ] iob_re = re . compile ( "IOB_X[0-9]+Y([0-9]+)" ) for cell_instance , cell_data in self . physical_cells_instances . items ( ) : if cell_data . cell_type not in allowed_io_types : continue tile_name = cell_data . tile_name m = iob_re . match ( cell_data . site_name ) assert m , site_name y_coord = int ( m . group ( 1 ) ) if "SING" in tile_name and y_coord % 50 == 0 : iob_sites_idx = 0 elif "SING" in tile_name and y_coord % 50 == 49 : iob_sites_idx = 1 else : iob_sites_idx = y_coord % 2 iob_site = iob_sites [ iob_sites_idx ] for feature in allowed_io_types [ cell_data . cell_type ] : self . add_cell_feature ( ( tile_name , iob_site , feature ) )
short_docstring: This function is specialized to add FASM features for the IO buffers
  in the 7-Series database format.
short_docstring_tokens: This function is specialized to add FASM features for the IO buffers in the 7 - Series database format .
comment: """
          This function is specialized to add FASM features for the IO buffers
          in the 7-Series database format.
          """$SEP$# FIXME: Need to make this dynamic, and find a suitable way to add FASM annotations to the device resources.$SEP$#        In addition, a reformat of the database might be required to have an easier handling of these$SEP$#        features.