要求:输出交换输入bit顺序
hint:always块+for循环
error:在initial块中使用for循环错误,没有输出
initial改用always 后正确
module top_module(
input [99:0] in,
output [99:0] out
);
integer i,j;
always
begin
i=0;
j=99;
repeat(100)
begin
out[i]= in[j];
i=i+1;
j=j-1;
end
end
endmodule