RollsRoyceMerlin
Newbie level 2
- Joined
- Oct 20, 2014
- Messages
- 2
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 12
I'm attempting to use a VHDL package with NCLaunch. These 2 files illustrate the problem:
package.vhdl:
andgate.vhdl:
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.
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.