Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
9 years ago

How to reference a modport declared in generate block of interface?

Consider an interface defined as following code:


interface test_interface# (
    parameter MODP_CNT = 3
);
    wire portsig_array;
    genvar iport;
    generate
        for (iport = 0; iport < MODP_CNT; iport++) begin:MODPORT_GEN
            wire portsig = portsig_array;
            modport testport(output portsig);
        end
    endgenerate
endinterface

When I want to reference the modport 'testport' defined above in a module port list, how to write the port list in target module?
No RepliesBe the first to reply