Re: [myhdl-list] attribute enum_encoding: string;
Brought to you by:
jandecaluwe
From: David H. <da...@ad...> - 2013-09-05 13:20:58
|
On Thu, Sep 05, 2013 at 06:03:33AM -0500, Christopher Felton wrote: > On 9/4/13 11:26 PM, David Holl wrote: > > But it still triggers the "no declaration" error in ghdl when I specify encoding='one_hot' for states: > > ... > I have updated the example, for me I don't get the error, here is a snip of the converted code > > type t_enum_states_1 is ( > IDLE, > THINK, > SEND_CMD, > ADVANCE > ); > attribute enum_encoding of t_enum_states_1: type is "0001 0010 0100 1000"; hrm --- Yep, that's the code that I'm also generating. > >> ghdl -a pck_myhdl_09.vhd m_think.vhd > >> ghdl -e m_think > >> ghdl -r m_think But "ghdl -a ..." still complains unless I patch m_think.vhd to add "attribute enum_encoding: string;" tensor(pts/0):~/m_think> diff -u m_think.vhd.orig m_think.vhd --- m_think.vhd.orig 2013-09-05 08:31:50.002627130 -0400 +++ m_think.vhd 2013-09-05 08:37:51.481874280 -0400 @@ -6,6 +6,7 @@ package pck_m_think is +attribute enum_encoding: string; type t_enum_states_1 is ( IDLE, THINK, > The version of GHDL I am using: > ghdl -v > GHDL 0.29 (20100109) [Sokcho edition] > Compiled with GNAT Version: 4.4.0 20080314 (experimental) > mcode code generator > Written by Tristan Gingold I'm using ghdl from Debian's package repository ("jessie" aka "testing"). It looks like a similar version to yours with differences in the GNAT version and code generator. tensor(pts/0):~/m_think> ghdl -v GHDL 0.29 (20100109) [Sokcho edition] Compiled with GNAT Version: 4.4.4 GCC back-end code generator Written by Tristan Gingold. |