📄 shiftreg7495.vhd.bak
字号:
library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;entity shift7495 is port(clk, cr, rin,lin: in std_logic; s: in std_logic_vector(1 downto 0); d: in std_logic_vector(3 downto 0); q: out std_logic_vector(3 downto 0) );end shift7495;architecture reg of shift7495 issignal sq: std_logic_vector(3 downto 0);begin process(clk,cr,d) begin if(cr='1') then sq<= "0000"; elsif(clk'event and clk='1') then case s is when "00" => sq<=d; when "01" => sq<= rin& d(3 downto 1); when "10" => sq<= d(2 downto 0)&lin; when "11" => sq<= d(0)& d( 3 downto 1); when others => sq<= "UUUU"; end case ; end if; end process; end reg;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -