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);
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库刘增辉-vhdl实验报告-实验6 双向移位寄存器(5)在线全文阅读。
相关推荐: