Skip to content
Snippets Groups Projects

process.py: add ABC MemoryProcess with support for spliting based on read times

Merged Mikael Henriksson requested to merge memory-process into master

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.

Screenshot_from_2023-05-12_18-39-19

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:

Screenshot_from_2023-05-12_18-23-58 Screenshot_from_2023-05-12_18-24-02

After:

Screenshot_from_2023-05-12_18-27-30 Screenshot_from_2023-05-12_18-27-35

Edited by Mikael Henriksson

Merge request reports

Pipeline #97348 failed

Pipeline failed for 6d81535e on memory-process

Test coverage 78.87% (0.07%) from 6 jobs
Approved by

Merged by Oscar GustafssonOscar Gustafsson 1 year ago (May 15, 2023 10:08am UTC)

Merge details

  • Changes merged into master with 6d81535e.
  • Deleted the source branch.

Pipeline #97351 passed

Pipeline passed for 6d81535e on master

Test coverage 78.87% (0.07%) from 6 jobs

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading