3b100:out<={4b0,in[7:4]};
3b101:out<={5b0,in[7:5]};
3b110:out<={6b0,in[7:6]};
3b111:out<={7b0,in[7]};

endcase
end
2:begin
if(in[7]==0)
begin
case(amount)
3b000:out<=in;
3b001:out<={1b0,in[7:1]};
3b010:out<={2b0,in[7:2]};
桶形移位寄存器 ARM桶形移位器
3b011:out<={3b0,in[7:3]};3b100:out<={4b0,in[7:4]};3b101:out<={5b0,in[7:5]};3b110:out<={6b0,in[7:6]};3b111:out<={7b0,in[7]}; endcase
end
else
begin
case(amount)
3b000:out<=in;
3b001:out<={1b1,in[7:1]};3b010:out<={2b10,in[7:2]};3b011:out<={3b100,in[7:3]};3b100:out<={4b1000,in[7:4]};3b101:out<={5b10000,in[7:5]};3b110:out<={6b100000,in[7:6]};3b111:out<={7b1000000,in[7]};endcase
end
end
3:begin
case(amount)
3b000:out<=in;
3b001:out<={in[0],in[7:1]}; 3b010:out<={in[1:0],in[7:2]}; 3b011:out<={in[2:0],in[7:3]}; 3b100:out<={in[3:0],in[7:4]}; 3b101:out<={in[4:0],in[7:5]}; 3b110:out<={in[5:0],in[7:6]}; 3b111:out<={in[6:0],in[7]}; endcase
end
default:;
endcase
endmodule
建立代码文件:
桶形移位寄存器 ARM桶形移位器
分析综合成功:
建立仿真:


桶形移位寄存器 ARM桶形移位器


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-22711-2.html
许多男人一生娶过多个女人
这明显是自亚投行以来中国在国际上混的风生水起
居然在非正规渠道买产品