⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unishift74194.vhd

📁 vhdl programs to use as a lab experiment all advance programs
💻 VHD
字号:
library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;entity shift74194 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 shift74194;architecture reg of shift74194 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;     q<= sq;end reg;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -