What should be the specified port directions of signals in an interface, how do you specify it with what reason? This is not about port directions of the modports, but about signals inside the interface which could then be a part of the modports.
In reply to acpatel5:
From the LRM:
The keyword modport indicates that the directions are declared as if inside the module.
Signals inside an interface don’t have any direction as they are just signals. The use of a modport allows you to specify a port direction in specific use cases.
Note that modports are considered a design construct and shouldn’t be used in a verification environment.
In reply to cgales:
I wanted to make it clearer now that I did not mean signals inside an interface but that are part of the interface itself, they should have port directions, is that correct?
If so, in that case how would we specify them?
In reply to acpatel5:
I’m not sure what you mean by “part of the interface itself”. All signals inside an interface are part of the interface.
Do you mean signals specified as inputs/outputs as part of a port list, similar to modules? In this case, you would specify the direction just like you would a module.
In order to use a modport, you need to create an instance of the interface, and you would connect the ports as required.
In reply to cgales:
Yes, how do we define the directions input/output or possibly inout, of the signals in the portlist?
Are those port directions related to the directions of those signals in multiple modports in the interface?
In reply to acpatel5:
Usually interface ports are inputs. See Difference between input and wire clock to an interface | Verification Academy
But same as with module ports, you have to analyze the flow of data to determine port directions.