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

📄 reg.vhd

📁 The objective of this projectis to design, model and simulate an autocorrelation generator circuit
💻 VHD
字号:
-- DFF modelLIBRARY IEEE;USE IEEE.STD_LOGIC_1164.ALL;entity DFF is   generic(constant TPHLRE:TIME:=10 ns;           constant TPLH:TIME:=12 ns;	   constant TPHL:TIME:=14 ns);   port (D, clk ,reset : in std_logic;  	 Q : out std_logic);end DFF;architecture BEH of DFF is beginP1: process(clk)variable Q_TEM:STD_LOGIC:='0';	begin	if (clk'event and clk='1') then	  if (Q_TEM='0' and D='1') then 	    Q <=D after TPLH;	     elsif (Q_TEM='1' and D='0') then	      Q <= D after TPHL;	       else 	        Q <=D;           end if;           Q_TEM := D;	end if;    end process P1;end BEH; ---REGLIBRARY IEEE;USE IEEE.STD_LOGIC_1164.ALL;entity REG isport (X: in std_logic_VECTOR(3 DOWNTO 0);      clk: in std_logic;      reset: in std_logic;       Z: out STD_LOGIC_VECTOR);end REG;architecture BEH of REG is   component dffc   port (D, clk ,reset : in std_logic;  	 Q : out std_logic);   end component;   for all : dffc use entity work.DFF(BEH);   signal REG_OUT: STD_LOGIC_VECTOR(3 DOWNTO 0);   beginREG_DFF0: DFFC        port map (X(0), CLK, reset, REG_OUT(0));REG_DFF1: DFFC        port map (X(1), CLK, reset,REG_OUT(1));REG_DFF2: DFFC        port map (X(2), CLK, reset,REG_OUT(2));REG_DFF3: DFFC        port map (X(3), CLK, reset,REG_OUT(3));Z <= REG_OUT;END BEH;

⌨️ 快捷键说明

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