Altera_Forum
Honored Contributor
16 years agoGeneric interfaces in Quartus II
I use interfaces a lot in my designs. They are indispensable.
I noted that Quartus II 9.0 supposedly supports generic interfaces. I have tried a number of ways to do this, but have not been successful. I assume that since QII supports both parameterized and generic interfaces, there is a way to implement them. I have a parameterized interface, so I cannot fully specify the interface in the module definitions. Things work fine to specify the module at the top level and provide the paramter, but how to pass to a lower level module the parameterized interface? I tried a generic, but Quartus complains that you cannot use a generic interface without module binding.. perhaps the module order is wrong? Here is a scaled down example of what I am trying to do: interface IF_IOChannel # (parameter size=5); logic OE; logic Out; logic In; modport master ( output OE, Out, input In ); modport drv( input OE,Out ); modport rd( output In ); endinterface module Ch1Mod ( .. interface _if ); .. endmodule /// similar for Ch2Mod module top(...) IF_IOChannel # (.size(3)) if_ch1; IF_IOChannel# (.size(8)) if_ch2; Ch1Mod mc1inst(._if(if_ch1)); Ch2Mod mc2inst(._if(if_ch2)); endmodule