Re: [myhdl-list] attribute enum_encoding: string;
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2013-09-09 10:39:28
|
Mm, the attribute is declared in pck_myhdl but probably this is namespace issue. Iff a port uses an enum, then a top-level package is needed and the declaration is not seen, unlike when the enum type is declared in the architecture. Jan On 09/03/2013 09:48 PM, David Holl wrote: > Hello, When using ghdl for syntax checks, I get the following error > for any state machine where encoding="one_hot": pcie_drx.vhd:137:11: > no declaration for "enum_encoding" > > I can resolve ghdl's complaints by adding attribute enum_encoding: > string; to the generated .vhd file. > > Is there a way to have this line included automatically in .vhd > output? I could add it via a shell script, but I'm wondering if > there is "better way" to do it. (or is GHDL in error?) > > > For example, here is an trimmed-down excerpt from the top of the .vhd > file showing where I add the line: > > package pck_pcie_drx is attribute enum_encoding: string; <--- I need > to add this line. > > type t_enum_t_state_22 is ( > > IDLE, > > THINK, > > SEND_CMD, > > ADVANCE > > ); > > attribute enum_encoding of t_enum_t_state_22: type is "0001 0010 0100 > 1000"; > > type t_enum_t_state_23 is ( CMD, MWR_H0H1, MWR32_H2D0, MWR32_D1D2, > MWR32_D3XX, MWR64_H2H3, MWR64_D0D1, DROP ); attribute enum_encoding > of t_enum_t_state_23: type is "00000001 00000010 00000100 00001000 > 00010000 00100000 01000000 10000000"; end package pck_pcie_drx; > library IEEE; etc... > > > > > - David ps: Thank you for the fantastic MyHDL. > > > > ------------------------------------------------------------------------------ > > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! > Discover the easy way to master current and previous Microsoft > technologies and advance your career. Get an incredible 1,500+ hours > of step-by-step tutorial videos with LearnDevNow. Subscribe today and > save! > http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk > > > > > _______________________________________________ myhdl-list mailing > list myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com World-class digital design: http://www.easics.com |