|
library ieee; use ieee.std_logic_1164.all; entity reg is port (reset : in std_logic; d_input : in std_logic_vector(15 downto 0); clk : in std_logic; write : in std_logic; sel : in std_logic; q_output : out std_logic_vector(15 downto 0) ); end reg; architecture a of reg is begin process(reset,clk) begin if reset = '0' then q_output <= x"0000"; elsif clk'event and clk = '0' then if sel = '1' and write ='1' then q_output <= d_input; end if; end if; end process; end a;
关于我们| 小黑屋| 手机版| Archiver| 在线咨询| ET创芯网(EETOP) ( 京ICP备15035084号 京公网安备:11010502037710 )
GMT+8, 2022-8-11 11:16 , Processed in 0.015256 second(s), 7 queries , Redis On.