module FLIP #( parameter WIDTH = 1 ) ( input [WIDTH-1:0] in, output [WIDTH-1:0] out ); genvar flip_idx; for (flip_idx = 0, flip_idx < WIDTH; flip_idx++) begin assign out[flip_idx] = in[WIDTH-flip_idx-1]; end endmodule