Problem Using VHDL Package in NCLaunch

Status
Not open for further replies.

RollsRoyceMerlin

Newbie level 2
Joined
Oct 20, 2014
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
12
I'm attempting to use a VHDL package with NCLaunch. These 2 files illustrate the problem:

package.vhdl:

Code:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

package package1 is
 type state_type is (state1,state2); 
 end package1;


andgate.vhdl:

Code:
library IEEE;
use IEEE.std_logic_1164.all;
use work.package1.all;

entity ANDGATE is
port 	(in1, in2:in std_logic;
	 output:out std_logic);
end ANDGATE;

architecture BEHAVIOUR of ANDGATE is

signal state : state_type; 

begin
--output <= in1 and in2;

 state_machine : process (state,in1)
   begin  -- process state_machine

    if (in1 = '0') then
      next_state <= state1;

    else
      case state is
        when state1 =>
	next_state <= state2;
	
	when state2 =>
	next_state <= state1;
      end case;
    end if;
end process;

end behaviour;



However NCLaunch won't connect the state type definition in the package file with that in andgate.vhdl.

I get the error: Identifier 'NEXT_STATE' is not declared.


Any soloutions or thoughts greatly appreciated.
 

I don't see what a missing declaration of next_state has to do with packages. The declaration is just missing, e.g. a line like

Code:
signal next_state : state_type;
Besides the declaration, the design also misses any reasonable functionality, because state is never assigned a value.

But may be you didn't finish it?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…