Skip to content
Snippets Groups Projects

Add minimize memory to PE connection resource algorithm

Merged Simon Bjurek requested to merge add-min-mem-to-pe-con-res-alg into master
Files
5
+ 17
1
@@ -615,13 +615,29 @@ of :class:`~b_asic.architecture.ProcessingElement`
direct_interconnects: ProcessCollection | None = None,
):
super().__init__(entity_name)
pe_names = [pe._entity_name for pe in processing_elements]
if None in pe_names:
raise ValueError(
"Entity names must be defined for all processing elements."
)
if len(pe_names) != len(set(pe_names)):
raise ValueError("Entity names of processing elements needs to be unique.")
self._processing_elements = (
[processing_elements]
if isinstance(processing_elements, ProcessingElement)
else list(processing_elements)
)
mem_names = [mem._entity_name for mem in memories]
if None in mem_names:
raise ValueError("Entity names must be defined for all memories.")
if len(mem_names) != len(set(mem_names)):
raise ValueError("Entity names of memories needs to be unique.")
self._memories = [memories] if isinstance(memories, Memory) else list(memories)
self._direct_interconnects = direct_interconnects
self._variable_input_port_to_resource: defaultdict[
InputPort, set[tuple[Resource, int]]
] = defaultdict(set)
@@ -929,7 +945,7 @@ of :class:`~b_asic.architecture.ProcessingElement`
fmt: str | None = None,
branch_node: bool = True,
cluster: bool = True,
splines: str = "spline",
splines: Literal["spline", "line", "ortho", "polyline", "curved"] = "spline",
io_cluster: bool = True,
multiplexers: bool = True,
colored: bool = True,
Loading