Sort wire pairs using extract_numbers.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
This commit is contained in:
Keith Rothman 2020-02-19 06:25:45 -08:00
parent c2a5c7ffa1
commit 9aec0c8d9c
1 changed files with 5 additions and 1 deletions

View File

@ -12,6 +12,7 @@ import pickle
import sys
from prjxray import util, lib
from prjxray.xjson import extract_numbers
def get_tile_grid_info(fname):
@ -606,7 +607,10 @@ def main():
pool, node_tree, nodes, wire_map, grid)
for data in tileconn:
data['wire_pairs'] = tuple(sorted(data['wire_pairs']))
data['wire_pairs'] = tuple(
sorted(
data['wire_pairs'],
key=lambda x: tuple(extract_numbers(s) for s in x)))
tileconn = tuple(
sorted(