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

📄 time.vhd

📁 vhdl语言编写的一个秒表源码
💻 VHD
字号:
LIBRARY ieee;USE ieee.std_logic_1164.all;USE ieee.numeric_std.all;entity TIME is  port(    CLK         : in std_logic;   --4096 Hz    ENABLE_10MS : in    std_logic;    MEASURE     : in    std_logic;    SET_ZERO    : in    std_logic;    M_TIME      : out   std_logic_vector(13 downto 0)  );end entity TIME;architecture BEHAVIORAL_TIME of TIME is  signal REG_OUT : std_logic_vector(13 downto 0);  signal ADD_OUT : std_logic_vector(13 downto 0);  signal ADD     : std_logic_vector(13 downto 0);    begin  ADD <= "00000000000001";  reg : process(CLK)  begin    if CLK'event and CLK='1' then       if SET_ZERO = '1' THEN          REG_OUT <= (others => '0');       elsif ENABLE_10ms = '1' AND MEASURE = '1' THEN          REG_OUT <= ADD_OUT;       end if;     end if;   end process;      ADD_OUT <= std_logic_vector(unsigned(REG_OUT)+unsigned(ADD));      M_TIME <= REG_OUT;end architecture BEHAVIORAL_TIME;

⌨️ 快捷键说明

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