How do I fix this foreach loop variable syntax error?
I am trying to use foreach in SystemVerilog. What I am doing wrong here? `define size 3:0 //variable module tb; reg [7:0] temp; initial begin temp = 8'd25; $display("%d", temp[`size]); foreach ((temp[`size])[i]) $display("%d", temp[i]); (temp[`size])[i] = 1'b0; end endmodule
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.