?? cslt_cntr.vhd
字號(hào):
library IEEE;use IEEE.std_logic_1164.all;use IEEE.numeric_STD.all;use IEEE.std_logic_unsigned.all;entity rcd_cntr is port (rcd_end : out std_logic; Reset : in std_logic; Clk : in std_logic; ld_rcd : in std_logic; rcd_max : in unsigned(1 downto 0));end entity rcd_cntr;architecture rcd_cntr_arch of rcd_cntr issignal count_N_sig : unsigned(1 downto 0);signal count_sig : unsigned(1 downto 0);beginprocess (Clk, Reset)variable count : unsigned(1 downto 0);begin if (Reset = '0') then count := (others => '0'); elsif rising_edge(Clk) then if (ld_rcd = '1') then count := rcd_max; else count := count_N_sig; end if; count_sig <= count; end if;end process;process (count_sig)variable rcd_end_int : std_logic;variable count_N : unsigned(1 downto 0);begin if (count_sig = "00") then count_N := "00"; rcd_end_int := '1'; else count_N := count_sig - 1 ; rcd_end_int := '0'; end if;count_N_sig <= count_N;rcd_end <= rcd_end_int;end process;end architecture rcd_cntr_arch;
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -