Using bind in conditional generate block

Hi,
is it possible to bind different blocks according to some genvar?

parameter BIND_USING_A_PARAMS=1;
generate
if(BIND_USING_A_PARAMS==1) begin
bind dut module_a#(.a(1),.b(2)) mod_a_inst( .clk(clk), .rst(rst), .* );
end
else begin
bind dut module_a#(.a(2),.b(3)) mod_a_inst( .clk(clk), .rst(rst), .* );
end
endgenerate

I dont see any problems with the approach you are provided. It should work assuming that the generate statement is in the right scope.

However one disadvantage is that you will need to recompile the entire design everytime you want to change the parameter value as the generates are resolved during compile time.

Logie Ramachandran
Verikwest Systems Inc