Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Visitor
student87
Posts: 9
Registered: ‎06-18-2009
0

type

Hey guys,

 

even though my question is more basically on VHDL then on pico blaze it would be very nice if you could help me.

 

Here is my code:



architecture Sequenz of Rundenzaehler is
begin
type States is (Sleep, Setup, Calc);
Signal State, Fs : States := Sleep;

 

the bold line creates this error:

 

parse error, unexpected TYPE

 

Whats wrong about this? Do I have to define States in another file or add a package?

 

Thank you very much for your kind help

 

Daniel

Expert Contributor
eilert
Posts: 2,057
Registered: ‎08-14-2007
0

Re: type

Hi Daniel,

Simple.

Declarations have to be done before the begin:

 

architecture Sequenz of Rundenzaehler is
-- begin  -- wrong here
type States is (Sleep, Setup, Calc);
Signal State, Fs : States := Sleep;

begin

 

Have a nice synthesis

  Eilert