I see different examples online of using modports for interfaces when there are port inputs on the interface. Should modports include clk and reset on the modport even though they are interface inputs?
Here's an example with clk not included on modport : https://www.doulos.com/knowhow/sysverilog/tutorial/interfaces/ Section: Modports in Interfaces
Putting clk in the modport gives a Spyglass lint error (undriven variable), here's a general idea of the error:
interface MY_IF (input clk);
signal my_sig;
modport master (input clk, my_sig);
endinterface
MY_IF if (.clk(clk));
MY_MOD (.my_if(if.master)); // claims clk is undriven
Whereas Cadence gives issues if the clk is missing and I pass a virtual interface into a class where I use clk.
Which way is correct? Does a modport have to have ALL of the signals listed, or are port interface signals always available?
clkin the interface instance port driven by anything? your example is missing any driver. - Serge