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.

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
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;

3527729800_1413835625_thumb.jpg


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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top