-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PyCDE] Change module API to extend
Module
instead of using a decor…
…ator (#4556) Refactor PyCDE module creation to a subclass based scheme. This is a breaking API change, but a largely mechanical update to users code. Reasons for the refactor: - It wasn't possible for users to extend their modules by just subclassing them. - Code completion for ports inside of generators didn't work. - We are going to introduce functional models, wherein a method of a model will be interacting with the instance. We wanted hardware generation to have a similar feeling. - Internally, supporting more module like constructs (e.g. ESI service implementations) involved specifying a bunch of callbacks. This replaces that with an OOP approach. - The old code was largely ad-hoc and evolved to meet our needs, and badly in need of some TLC. The new code is far better structured (and documented).
- Loading branch information
Showing
36 changed files
with
744 additions
and
857 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,3 +88,7 @@ class _PyProxy: | |
|
||
def __init__(self, name: str): | ||
self.name = name | ||
|
||
|
||
class PortError(Exception): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.