刘增辉-vhdl实验报告-实验6 双向移位寄存器(5)

2020-12-16 14:05

VHDL实验 报告(完整、高质量)

长安大学电子科学与技术系刘增辉

开始

Clr='1'? N N

Y

clk'event and clk='1'? Y Y dir='0'? N

for i in 7 downto 0 loop a(i):='0';

a(i):=a(i+1)

a(i+1):=a(i)

for i in 7 downto 0 loop dout(i)<=a(i);

结束

六、源代码:library ieee; use ieee.std_logic_1164.all; entity d_reg is port(clk,clr,dir,din:in std_logic; dout:out std_logic_vector(7 downto 0)); end d_reg; architecture behave of d_reg is begin process(clr,clk) variable a:std_logic_vector(7 downto 0); begin if(clr='1') then for i in 7 downto 0 loop a(i):='0'; end loop; elsif(clk'event and clk='1') then if(dir='0') then a(0):=a(1); a(1):=a(2); a(2):=a(3); a(3):=a(4); a(4):=a(5); a(5):=a(6); a(6):=a(7);


刘增辉-vhdl实验报告-实验6 双向移位寄存器(5).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:乌克兰著名模特-艾米丽 布露蒙(Emily Bloom)

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: