When I run this in Questasim, I get error vopt-2730, Undefined variable: IS_DUT. It occurs to me that Questasim is trying to get IS_DUT from the hierarchical level in which the bound interface is instantiated, rather than the level that has the bind statement. Is there a way I can pass this parameter to the bound entity as needed?
(top is the name of my top-level testbench.) In both cases, I get the error “The expression for a parameter actual associated with the parameter name (‘SOURCE_IS_DUT/DEST_IS_DUT’) for the module instance (‘raw’) must be constant” – even though IS_DUT is declared as a localparam array in top.
The syntax for the bind statement works exactly as if a bound instance statement was written source code inside the target instance. You are not allowed to override parameters with hierarchical references to other parameters.
Thanks for pointing that out. So I take it $unit doesn’t work because it’s in reference to the bf_framer_ifc compilation unit. Before you answered, I realized that bf_framer_ifc doesn’t have my enumerated types imported, so I added the package reference to them:
Years too late, but here’s my current workaround: Create a package and refer to it. It’s already compiled as it gets compiled in the module that creates the bind. And therefore it’s findable using it’s namespace in the bind line.