1 module forloops01 (input clk, a, b, output reg [3:0] p, q, x, y);
3 always @(posedge clk) begin
5 p[2*k +: 2] = {a, b} ^ {2{k}};
10 q[k] = {~a, ~b, a, b} >> k[1:0];
15 module forloops02 (input clk, a, b, output reg [3:0] q, x, output [3:0] y);
19 q[k] = {~a, ~b, a, b} >> k[1:0];
24 assign y = k - {a, b};