yimaqi.vhd

来自「用VHDL语言实现TDMA编码,简单」· VHDL 代码 · 共 29 行

VHD
29
字号
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
----------------------------------------
entity yimaqi is
port(F2,F1:in std_logic;
     Y3,Y2,Y1,Y0:out std_logic);
end entity yimaqi;
-----------------------------------------
architecture rt1 of yimaqi  is
signal indata:std_logic_vector(1 downto 0);
signal Y:std_logic_vector(3 downto 0);
begin
indata<=F2&F1;
process(indata)
begin 
case indata is 
when"00"=>Y<="1110";
when"01"=>Y<="1101";
when"10"=>Y<="1011";
when"11"=>Y<="0111";
when others=>Y<="XXXX";
end case;
end process;
Y3<=Y(3);
Y2<=Y(2);
Y1<=Y(1);
Y0<=Y(0);
end rt1;

⌨️ 快捷键说明

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