[an error occurred while processing this directive]
|
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.STD_LOGIC_arith.all;
use IEEE.STD_LOGIC_unsigned.all;
entity COUN is
port(
RST : in STD_LOGIC;
CLK : in STD_LOGIC;
CLK_8 : in STD_LOGIC;
FSR : out STD_LOGIC
);
end COUN;
architecture COUN of COUN is
signal cnt : std_logic_vector (3 downto 0);
begin
process(clk,rst)
begin
if rst = '1' then
cnt <= (others => '0');
FSR <= '0';
elsif rising_edge(CLK) then
FSR <= CLK_8 and not(cnt(3));
if CLK_8 = '0' then
cnt(3) <= (others => '0');
elsif cnt(3) = '0' then
cnt <= cnt + 1;
end if;
end if;
end process;
end COUN;
cnt описан как signal только исходя из правил "хорошего тона".
unsigned - определяет, что числа без знака.
signed - числа в ДК.
Но в том же Active HDL есть много примеров (в смысле что и как писать).
У Xilinx, Altera - сколько оборудования занимают конкретные схемы.
E-mail: info@telesys.ru