controler.vdh

来自「VHDL 函数信号发生器 VHDL 函数信号发生器」· VDH 代码 · 共 37 行

VDH
37
字号

LIBRARY ieee;
USE ieee.std_logic_1164.all;

entity controler is
port(clk:in std_logic;
datain :in std_logic;
ad:out std_logic_vector(15 downto 0);
frep:out std_logic_vector(15 downto 0));
end controler;

architecture dataflow of controler is
signal out1:std_logic_vector(15 downto 0);
begin

process(clk,datain)
variable temp:std_logic_vector(15 downto 0);
begin
if clk'event and clk='1'then
temp:=temp(15 downto 0)&datain;
end if;
out<=temp;
end process;

process(out1(15))
begin
if(out1(15)='1')then
ad<=out1(15 downto 0);   
else
frep<=out1(15 downto 0);
end if;
end process;

end dataflow;


⌨️ 快捷键说明

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