-
Notifications
You must be signed in to change notification settings - Fork 298
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
Abstract out PortList from HWModuleLike #5749
Conversation
This implements a parser for a new module style. This module style uses ModuleType to store it's ports. This allows maininging port order. The added HWTestModuleOp is temporary to allow development until moving all the modules over.
//===------------------------------------------------------------------===// | ||
// PortList Methods | ||
//===------------------------------------------------------------------===// | ||
::circt::hw::ModulePortInfo getPortList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this redundant? I would imagine this method is already declared via DeclareOpInterfaceMethods<HWModuleLike>
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not. And if it were, it would be a compile error (duplicate definition).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -29,6 +29,7 @@ include "mlir/Interfaces/SideEffectInterfaces.td" | |||
/// the module-like operations. | |||
class HWModuleOpBase<string mnemonic, list<Trait> traits = []> : | |||
HWOp<mnemonic, traits # [ | |||
DeclareOpInterfaceMethods<PortList>, | |||
DeclareOpInterfaceMethods<HWModuleLike>, | |||
DeclareOpInterfaceMethods<HWMutableModuleLike>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok... Having all three of these is redundant, right? HWMutableModuleLike should be enough, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure, but it seemed in some tests that interface inheritance didn't obviously connect to the declaring methods. I was also able to get weird (invalid) stuff out of tblgen, so I'm not sure this feature is heavily tested yet.
Breaking up #5738