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

rpc: add public Records as module ports. #241

Merged
merged 1 commit into from Sep 30, 2019
Merged

rpc: add public Records as module ports. #241

merged 1 commit into from Sep 30, 2019

Conversation

jfng
Copy link
Contributor

@jfng jfng commented Sep 29, 2019

Use case: modules exposing streams or bus interfaces as ports.

nmigen/rpc.py Outdated
# considered a port.
for port_name, port in vars(elaboratable).items():
if not port_name.startswith("_") and isinstance(port, (Signal, Record)):
def flatten(port):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can use port._lhs_signals() here. (It's internal, but nmigen.rpc is a part of nMigen, so it's fine.)

We should maybe expose something like this as a public API for Record, but that would be a separate discussion.

@codecov
Copy link

codecov bot commented Sep 30, 2019

Codecov Report

Merging #241 into rpc will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              rpc     #241   +/-   ##
=======================================
  Coverage   82.23%   82.23%           
=======================================
  Files          33       33           
  Lines        5495     5495           
  Branches     1174     1174           
=======================================
  Hits         4519     4519           
  Misses        842      842           
  Partials      134      134

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update acbd09c...890ad0a. Read the comment docs.

@whitequark whitequark merged commit 7b0f107 into m-labs:rpc Sep 30, 2019
@whitequark
Copy link
Contributor

Thank you!

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

2 participants