summaryrefslogtreecommitdiff
path: root/Artix-7/run.py
diff options
context:
space:
mode:
Diffstat (limited to 'Artix-7/run.py')
-rwxr-xr-xArtix-7/run.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Artix-7/run.py b/Artix-7/run.py
index 6a42383..7b1c5a8 100755
--- a/Artix-7/run.py
+++ b/Artix-7/run.py
@@ -9,11 +9,12 @@ from pathlib import Path
from itertools import groupby
from collections import defaultdict, namedtuple
-field_skip = set(
+field_skip = set([
"18 Kb",
-)
+])
field_mapping = {
"36 Kb": ("RAM blocks", None),
+ "Max Distributed RAM (Kb)": ("Distributed RAM", None),
"Max (Kb)": ("RAM", None),
"Total I/O Banks": ("IO banks", None),
"Logic Cells": (None, "Xilix logic cells"),
@@ -56,7 +57,7 @@ def table_to_map(table, keys_in: str = None):
def read_csv(f, remove_notes = True):
table = [row for row in csv.reader(f) if not row[0].startswith("#") and len(row[0]) > 0]
if remove_notes:
- r = r"\(.*\)"
+ r = r"\([0-9]+\)"
table[0] = [re.sub(r, "", name) for name in table[0]]
table[0] = [name.strip() for name in table[0]]
return table
@@ -89,7 +90,7 @@ with open("package-devices.csv") as f:
# for r in rows:
# print(r)
- r = r"\(.*\)"
+ r = r"\([0-9]+\)"
package_idx = {int(idx): re.sub(r, "", part) for idx, part in enumerate(rows[0]) if len(part) and idx > 0}
io_by_part = {}