Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual ports on multiple incoming connections #224

Merged
merged 2 commits into from Mar 11, 2022

Conversation

mathisrichter
Copy link
Contributor

@mathisrichter mathisrichter commented Mar 9, 2022

Draft implementation to support virtual ports on multiple incoming connections of a port (wip).
This currently only supports this use case between PyOutPorts and PyInPorts (with virtual ports). RefPorts/VarPorts would have to be handled similarly.

I am looking for feedback on the way I am associating the CSP ports in the PyInPort with the transformation functions that must be applied. In the Compiler, I am associating the transformation functions with a string-based ID of the source port. In the Runtime, I am associating the CSP port with the same ID. The Builder is the only place where these two pieces of information coexist. There, I am then creating an association between the CSP port and the transformation function (through the common ID).

Signed-off-by: Mathis Richter mathis.richter@intel.com

Issue Number: #223

Objective of pull request: Support for virtual ports on multiple incoming connections to a Port.

Pull request checklist

Your PR fulfills the following requirements:

  • Issue created that explains the change and why it's needed
  • Tests are part of the PR (for bug fixes / features)
  • Docs reviewed and added / updated if needed (for bug fixes / features)
  • PR conforms to Coding Conventions
  • PR applys BSD 3-clause or LGPL2.1+ Licenses to all code files
  • Lint (flakeheaven lint src/lava tests/) and (bandit -r src/lava/.) pass locally
  • Build tests (pytest) passes locally

Pull request type

Please check your PR type:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation changes
  • Other (please describe):

What is the current behavior?

  • Virtual ports on multiple incoming connections to a Port are not supported.

What is the new behavior?

  • Virtual ports on multiple incoming connections to a Port are now supported.

Does this introduce a breaking change?

  • Yes
  • No

Supplemental information

…nnections of a port (wip).

Signed-off-by: Mathis Richter <mathis.richter@intel.com>
Copy link
Contributor

@PhilippPlank PhilippPlank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for me, I would just recommend to change the identifier of the csp_port dictionary.

src/lava/magma/compiler/builders/builder.py Outdated Show resolved Hide resolved
src/lava/magma/core/process/ports/ports.py Outdated Show resolved Hide resolved
Copy link
Contributor

@joyeshmishra joyeshmishra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes recommended.

Signed-off-by: Mathis Richter <mathis.richter@intel.com>
@mathisrichter mathisrichter marked this pull request as ready for review March 11, 2022 21:43
@mathisrichter mathisrichter merged commit bbe6e82 into lava-nc:main Mar 11, 2022
@mathisrichter mathisrichter deleted the vp_multi_223 branch March 11, 2022 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants