module shifter(din,clk,clr,dout);
input din,clk,clr;
output[7:0] dout;
reg[7:0] dout;
always @(posedge clk)
begin
if (clr) dout<= 8'b0; //同步清0,高电平有效
else
begin
dout <= dout << 1; //输出信号左移一位
dout[0] <= din; //输入信号补充到输出信号的最低位
end
end
endmodule
最后
以上就是悦耳棉花糖最近收集整理的关于30--移位寄存器的全部内容,更多相关30--移位寄存器内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复