Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Error (10482): VHDL error : object "count" is used but not declared

Status
Not open for further replies.

wan khusairi

Newbie level 3
Joined
May 19, 2013
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Kuala Terengganu Malaysia
Activity points
1,323
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
use ieee.numeric_std.all;

entity ledwithcounter is

port( GPIO_0 : in std_logic_vector(1 downto 0);
ld_enb : in std_logic;--parallel load enable,active high
clk : in std_logic;-- system clock
cnt_enb : in std_logic;--count enable, active high
rst_n : in std_logic;-- reset,active high
cnt_out : out std_logic_vector(1 downto 0);
q : out std_logic_vector(1 downto 0));
end ledwithcounter ;

architecture bufferwithGpio_arc of ledwithcounter is
begin
process(GPIO_0)
begin
if (GPIO_0(0)='1') then q<=GPIO_0(1 downto 0);
else q<= "00";
end if;
end process;


counter:process(clk,rst_n)
begin

if ( rst_n='0' ) then
count <=(others=>'0');
elsif(clk'event and Clk ='1')then
if (ld_enb='1')then
count<=GPIO_0;
elsif(cnt_enb ='1')then
count <=count+1;
end if;
end if;
end process counter;
-- assigment ouput
cnt_out <= count;

end bufferwithGpio_arc;
 

What part of 'object "count" is used but not declared' do you fail to comprehend? You have to declare "count" somewhere before you use it in that "counter:process" process.
 

Re: Error (10482): VHDL error : object &quot;count&quot; is used but not declared

also, you cannot use std_logic_arith along with numeric_std as they have conflicts. You need to delete std_logic_arith.

- - - Updated - - -

also, you cannot use std_logic_arith along with numeric_std as they have conflicts. You need to delete std_logic_arith.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top