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

Netlist: Refactor #27

Merged
merged 3 commits into from
Feb 25, 2022
Merged

Conversation

NoR8quoh1r
Copy link
Contributor

Instead of using dicts and tuples introduce a few data classes with
equivalent fields. These fields must exists, so nothing is lost
by not using dicts/tuples.
The class definitions also serve to document the structure of the
netlist.

@NoR8quoh1r NoR8quoh1r changed the title Netlist: Lightly type connected component based netlist ("t2") Netlist: Refactor Dec 17, 2021
@NoR8quoh1r
Copy link
Contributor Author

Maybe pins should not be ints?

Instead of using dicts and tuples introduce a few data classes with
equivalent fields. These fields must exist, so nothing is lost
by not using dicts/tuples.
The class definitions also serve to document the structure of the
netlist.
Move hashable vertex helper class into _make_graph, also improve
readability a bit by renaming variables, etc.
Get rid of the vertex helper in render_graph, which is done
by connecting the pins of a component via new node, instead of
creating edges between pins.
@NoR8quoh1r NoR8quoh1r marked this pull request as ready for review February 25, 2022 09:13
Copy link
Contributor

@IoannisP-ITENG IoannisP-ITENG left a comment

Choose a reason for hiding this comment

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

Thank you for the PR!
Using data classes is generally a good idea.
I'll merge this commit now because there will be some changes on the netlist/graph code soon.

@IoannisP-ITENG IoannisP-ITENG merged commit 8cd3700 into faebryk:main Feb 25, 2022
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