📄 reg.vhd.txt
字号:
----------------------------------------------------------------------------------- Universitaet Heidelberg-- Kirchhoff-Institut fuer Physik-- Lehrstuhl fuer Technische Informatik---- Filename: reg.vhd-- Author: Jan de Cuveland-- Description: FF-based Register of variable width-- Comment: ---- Version history:--------------------------------------------------------------------------------- Version | Author | Date | Modification---------------------------------------------------------------------------------------------------------------------------------------------------------------- 1.0 | de Cuveland | 28.09.00 | created-------------------------------------------------------------------------------LIBRARY IEEE;USE IEEE.std_logic_1164.ALL; USE IEEE.std_logic_signed.ALL;--------------------------------------------------------------------------------- ENTITY-------------------------------------------------------------------------------entity reg is generic ( WIDTH : integer := 1 ); port ( D : in std_logic_vector(WIDTH-1 downto 0); Q : out std_logic_vector(WIDTH-1 downto 0); clk : in std_logic; reset_n : in std_logic );end reg;--------------------------------------------------------------------------------- ARCHITECTURE-------------------------------------------------------------------------------architecture behavioral of reg isbeginBitFlop: process (reset_n, clk)begin if (reset_n = '0') then Q <= (q'range => '0'); elsif (clk'event and clk = '1') then Q <= D; end if;end process;end behavioral;--------------------------------------------------------------------------------- CONFIGURATION--------------------------------------------------------------------------------- synopsys translate_offconfiguration reg_CFG of reg is for behavioral end for;end reg_CFG;-- synopsys translate_on
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -