Sandeep I Posted July 12, 2018 Share Posted July 12, 2018 Can we declare Generate if-for statement? module prac#(parameter m=3) (input x, input[2:0]a,b,output[2:0]c); wire [2:0]f[0:3]; genvar i; generate if(!x) begin : d2 for(i=0;i<=m;i=i+1) begin:dd assign f=(a & b); end end endgenerate endmodule It is saying that 'x' is not a constant. Thanks in advance. Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.