process.py: add ABC MemoryProcess with support for spliting based on read times
This PR adds a new type of process ABC, MemoryProcess, to which the common code of MemoryVariable and PlainMemoryVariable is moved. MemoryProcess also lets the user split a process in two, based on the multiple read accesses that can exist in a MemoryProcess.
Related issues
Others
In the Comparison with folding memory assignment example, the add1.0 memory variable is now split into two memory variables, where the zero lifetime variable add1.0 is moved to direct_interconnect with split_on_length(length=0).
mem_vars = schedule.get_memory_variables()
direct, mem_vars = mem_vars.split_on_length()
for i, mem in enumerate(mem_vars_set):
memory = Memory(mem, memory_type="RAM", entity_name=f"memory{i}")
memory.assign("left_edge")
memory.show_content(title=f"Assigned {memory.entity_name}")
direct.show(title="Direct interconnects")
Before:
After:
Edited by Mikael Henriksson




