带load_clr等功能的寄存器.vhd
来自「含有各类寄存器」· VHDL 代码 · 共 21 行
VHD
21 行
--8-bit Register with Synchronous Load and ClearThe design entity shows the standard way of describing a register using a synchronous process, ie. a process containing a single wait statement which is triggered by a rising edge on the clock input.library ieee;use ieee.std_logic_1164.all;entity reg8 isport(clock, clear, load : in std_logic;d : in std_logic_vector(7 downto 0);q : out std_logic_vector(7 downto 0));end entity reg8;architecture v1 of reg8 isbeginreg_proc : processbeginwait until rising_edge(clock);if clear = '1' thenq <= (others => '0');elsif load = '1' thenq <= d;end if;end process;end architecture v1;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?