graphene
Full Member level 2
- Joined
- Mar 22, 2012
- Messages
- 129
- Helped
- 4
- Reputation
- 8
- Reaction score
- 3
- Trophy points
- 1,298
- Location
- Germany
- Activity points
- 2,181
Hallo,
I am trying to implement a 32-bit up/down counter in VHDL.I am using Xilinx ISE and I get errors which I am not understanding despite searching the internet.
I am also unable to find a pro-code in the internet.
Help and suggestions needed. Thank you in advance.
The errors are
ERROR:HDLCompiler:1731 - "\\file\home$\narayanan\ISE work directory\JGD_counter.vhd" Line 28: found '0' definitions of operator "+", cannot determine exact overloaded matching definition for "+"
ERROR:HDLCompiler:1731 - "\\file\home$\narayanan\ISE work directory\J_counter.vhd" Line 30: found '0' definitions of operator "-", cannot determine exact overloaded matching definition for "-"
ERROR:HDLCompiler:1728 - "\\file\home$\narayanan\ISE work directory\J_counter.vhd" Line 29: Type error near in_down ; current type std_logic; expected type boolean
ERROR:HDLCompiler:1728 - "\\file\home$\narayanan\ISE work directory\J_counter.vhd" Line 27: Type error near in_up ; current type std_logic; expected type boolean
ERROR:HDLCompiler:854 - "\\file\home$\narayanan\ISE work directory\J_counter.vhd" Line 16: Unit <arc_counter_32> ignored due to previous errors.
I am trying to implement a 32-bit up/down counter in VHDL.I am using Xilinx ISE and I get errors which I am not understanding despite searching the internet.
I am also unable to find a pro-code in the internet.
Help and suggestions needed. Thank you in advance.
The errors are
ERROR:HDLCompiler:1731 - "\\file\home$\narayanan\ISE work directory\JGD_counter.vhd" Line 28: found '0' definitions of operator "+", cannot determine exact overloaded matching definition for "+"
ERROR:HDLCompiler:1731 - "\\file\home$\narayanan\ISE work directory\J_counter.vhd" Line 30: found '0' definitions of operator "-", cannot determine exact overloaded matching definition for "-"
ERROR:HDLCompiler:1728 - "\\file\home$\narayanan\ISE work directory\J_counter.vhd" Line 29: Type error near in_down ; current type std_logic; expected type boolean
ERROR:HDLCompiler:1728 - "\\file\home$\narayanan\ISE work directory\J_counter.vhd" Line 27: Type error near in_up ; current type std_logic; expected type boolean
ERROR:HDLCompiler:854 - "\\file\home$\narayanan\ISE work directory\J_counter.vhd" Line 16: Unit <arc_counter_32> ignored due to previous errors.
Code:
library IEEE;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use IEEE.STD_LOGIC_ARITH.all;
entity counter_32 is
port(
CLK, IN_SET : in std_logic;
IN_RESET : in std_logic;
IN_UP : in std_logic;
IN_DOWN : in std_logic;
OUT_COUNT: out std_ulogic_vector (31 downto 0)
);
end counter_32;
architecture arc_counter_32 of counter_32 is
signal temp_count: std_ulogic_vector (31 downto 0):= (others=>'0');
begin
sync_process: process (CLK, IN_RESET)
variable counter : std_ulogic_vector (31 downto 0);
begin
if (IN_RESET='1') then
counter := (others=>'0');
elsif (rising_edge(CLK)) then
--counter := counter+1;
if (IN_UP) then
temp_count <= temp_count +1;
elsif (IN_DOWN) then
temp_count <= temp_count - 1;
end if;
end if;
OUT_COUNT <= counter;
end process;
end arc_counter_32;