VHDL源代码数器.docVIP

  • 5
  • 0
  • 约2.05万字
  • 约 19页
  • 2016-10-12 发布于贵州
  • 举报
VHDL源代码数器

十五计数器 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; ENTITY fiveteencout IS PORT(clk,reset,enable : IN std_logic; count : OUT std_logic_vector(3 downto 0)); END fiveteencout; ARCHITECTURE counter OF fiveteencout IS SIGNAL count_int:std_logic_vector(0 to 3); BEGIN PROCESS(clk,reset) BEGIN WAIT UNTIL rising_edge(clk); IF reset = 1 THEN count_int = (OTHERS = 0); ELSIF enable = 1 THEN IF(count_int=1110) THEN count_int=0000; ELSE count_int = count_int 1; --ELSE -- NULL ; --IF (count_int=1001) THEN --count_int=0000; END IF; END IF; END PROCESS; count = count_int; -- IF

文档评论(0)

1亿VIP精品文档

相关文档