论文首页哲学论文经济论文法学论文教育论文文学论文历史论文理学论文工学论文医学论文管理论文艺术论文 |
该计数器可产生一个分频系数为3的分频器,并产生一个默认的逻辑符号COUNTER3。其输入端口为RESET、EN和CLK;输出端口为QA和QB。下面给出模3计数器VHDL描述代码:
library ieee;
use ieee.std-logic-1164.all;
use ieee.std-logic-unsigned.all;
entity counter3 is
port(clk,reset,en:in std-logic;
qa,qb:out std-logic);
end counter3;
architecture behavior of counter3 is
signal count:std-logic-vector(1 downto 0);
begin
process(reset,clk)
begin
if reset='1'then
count(1 downto 0)