From b2872a21fc7d236f06e51c7d68500468c6370e44 Mon Sep 17 00:00:00 2001 From: Akibats <22522138@stu.mmu.ac.uk> Date: Thu, 8 Aug 2024 14:19:51 +0100 Subject: [PATCH] Warning For Individual Port Declaration --- FABulous/fabric_generator/file_parser.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/FABulous/fabric_generator/file_parser.py b/FABulous/fabric_generator/file_parser.py index 13daa89e..6b7f31e8 100644 --- a/FABulous/fabric_generator/file_parser.py +++ b/FABulous/fabric_generator/file_parser.py @@ -667,10 +667,10 @@ def parseFile( with open(f"{json_file}", "r") as f: data_dict = json.load(f) - # Default yosys list names added. + modules = data_dict.get("modules", {}) filtered_ports: dict[str, IO] = {} - # Gatheres port name and direction, filters out configbits as they show in ports. + # Gathers port name and direction, filters out configbits as they show in ports. for module_name, module_info in modules.items(): ports = module_info["ports"] for port_name, details in ports.items(): @@ -684,6 +684,12 @@ def parseFile( bits = details.get("bits", []) filtered_ports[port_name] = (direction, bits) + if individually_declared: + logger.warning( + f"Ports in {filename} have been individually declared rather than as a vector." + ) + logger.warning("Ports will not be concatenated during fabric generation.") + param_defaults = module_info.get("parameter_default_values") if param_defaults and "NoConfigBits" in param_defaults: noConfigBits = param_defaults["NoConfigBits"]