From adb3b197715ffdf05842c060e9c2c61100be4c0d Mon Sep 17 00:00:00 2001 From: Olof Kindgren Date: Fri, 6 Dec 2024 10:54:25 +0100 Subject: [PATCH] Add splitlib filter --- fusesoc/filters/splitlib.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 fusesoc/filters/splitlib.py diff --git a/fusesoc/filters/splitlib.py b/fusesoc/filters/splitlib.py new file mode 100644 index 00000000..eca344d3 --- /dev/null +++ b/fusesoc/filters/splitlib.py @@ -0,0 +1,14 @@ +import logging +import os + +logger = logging.getLogger(__name__) + + +class Splitlib: + def run(self, edam, work_root): + for f in edam["files"]: + if not "logical_name" in f: + f["logical_name"] = ( + str(f["core"]).lstrip(":").replace(":", "_").replace(".", "_") + ) + return edam