Skip to content

Commit

Permalink
added function to return part family name based on part name
Browse files Browse the repository at this point in the history
  • Loading branch information
yonnorc42 committed Jan 8, 2025
1 parent fa11f53 commit 7bd920e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bfasst/utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,12 @@ def json_write_if_changed(path, json_str):
if not json_equivalent:
with open(path, "w") as f:
f.write(json_str)


def get_family_from_part(part):
"""
part (string): e.g., "xc7a200tsbg484-1"
Returns the part family name based on the part name,
will have to be changed if we start supporting more part families
"""
return "kintex7" if part[3] == "k" else "artix7"

0 comments on commit 7bd920e

Please sign in to comment.