سلام
من میخواهم برنامه counter حلقوی رو با کلاک بالارونده و پایین رونده باQuartus 2 بنویسم ،برنامم رو نوشتم ولی error میده ، نمیدونم چه جوری رفعشون کنم(چون تازه کارم)،لطفا کمکم کنید.
اینم برنامم:
library IEEE;
use IEEE.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity cnt1 is
port (
clk: in STD_LOGIC;
set,reset: in STD_LOGIC;
enable: in STD_LOGIC;
load: in STD_LOGIC;
data: in STD_LOGIC_VECTOR (7 downto 0);
data: in STD_LOGIC_VECTOR (0 to 7);
cnt: inout STD_LOGIC_VECTOR (7 downto 0);
cnt: inout STD_LOGIC_VECTOR (0 to 7);
);
end cnt1;
architecture cnt1_arch of cnt is
begin
count: process(clk,set,reset)
begin
if reset='1' then
cnt<=(others=>'0'
;
elsif set='1' then
cnt<=(others=>'1'
;
elsif (clk'event and clk='1'
then
if load='1' then
cnt<=data;
elsif enable='1' then
cnt<=cnt+1;
end if;
elsif (clk'event and clk='0'
then
if load='1' then
cnt<=data;
elsif enable='1' then
cnt<=cnt-1;
end if;
end if;
end process count ;
end cnt1_arch;
من میخواهم برنامه counter حلقوی رو با کلاک بالارونده و پایین رونده باQuartus 2 بنویسم ،برنامم رو نوشتم ولی error میده ، نمیدونم چه جوری رفعشون کنم(چون تازه کارم)،لطفا کمکم کنید.
اینم برنامم:
library IEEE;
use IEEE.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity cnt1 is
port (
clk: in STD_LOGIC;
set,reset: in STD_LOGIC;
enable: in STD_LOGIC;
load: in STD_LOGIC;
data: in STD_LOGIC_VECTOR (7 downto 0);
data: in STD_LOGIC_VECTOR (0 to 7);
cnt: inout STD_LOGIC_VECTOR (7 downto 0);
cnt: inout STD_LOGIC_VECTOR (0 to 7);
);
end cnt1;
architecture cnt1_arch of cnt is
begin
count: process(clk,set,reset)
begin
if reset='1' then
cnt<=(others=>'0'

elsif set='1' then
cnt<=(others=>'1'

elsif (clk'event and clk='1'

if load='1' then
cnt<=data;
elsif enable='1' then
cnt<=cnt+1;
end if;
elsif (clk'event and clk='0'

if load='1' then
cnt<=data;
elsif enable='1' then
cnt<=cnt-1;
end if;
end if;
end process count ;
end cnt1_arch;
دیدگاه