예제 #1
0
 def get_nets_at(loc):
     if loc in net_tile_cache:
         return net_tile_cache[loc]
     row, col = loc
     nets = set()
     for tile in c.get_tiles_by_position(row, col):
         tinf = tile.info
         tdb = pytrellis.get_tile_bitdata(
             pytrellis.TileLocator(c.info.family, c.info.name, tinf.type))
         for sink in tdb.get_sinks():
             if not non_tile_re.match(sink):
                 nets.add(sink)
             mux = tdb.get_mux_data_for_sink(sink)
             for src in mux.get_sources():
                 if not non_tile_re.match(src):
                     nets.add(src)
         for fc in tdb.get_fixed_conns():
             if not non_tile_re.match(fc.sink):
                 nets.add(fc.sink)
             if not non_tile_re.match(fc.source):
                 nets.add(fc.source)
     nets = list(sorted((["R{}C{}_{}".format(row, col, _) for _ in nets])))
     net_tile_cache[loc] = nets
     return nets
예제 #2
0
파일: tensor.py 프로젝트: arthurdjn/nets
 def __radd__(self, other):
     return nets.add(other, self)
예제 #3
0
파일: tensor.py 프로젝트: arthurdjn/nets
 def __add__(self, other):
     return nets.add(self, other)