Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > VHDL Synthesis Error for Synopsys but not for Synplicity!

Reply
Thread Tools

VHDL Synthesis Error for Synopsys but not for Synplicity!

 
 
SuSenSa08
Guest
Posts: n/a
 
      01-18-2008
Hi all,

I have the following VHDL codes:

-- FSM definition
type pre_statetype is (wait_high, wait_hold);

signal pre_state : pre_statetype;

-- one-hot FSM encoding
attribute enum_encoding : string;
attribute enum_encoding of pre_statetype : type is "000001 000010
000100 001000 010000 100000";

Synplify Pro 8.8 does not complain about it but Synopsys
design_compiler -xg mode 2007.03 does as shown below:

Information: Building the design 'prelaunch'. (HDL-193)
Error: prelaunch.vhd:37: The number of enum encodings given does not
match the number of literals. (ELAB-341)
*** Presto compilation terminated with 1 errors. ***
Warning: Unable to resolve reference 'prelaunch_pulse_gen' in
'decoder_asic'. (LINK-5)
1


Why are the tools different ? Is the error fatal, i.e. need a fix ?

Thanks,

Calvin
 
Reply With Quote
 
 
 
 
Mike Treseler
Guest
Posts: n/a
 
      01-18-2008
SuSenSa08 wrote:

> Why are the tools different ?


Because you are using vendor-specific attributes.

Is the error fatal, i.e. need a fix ?

Leave out the attributes and
declare a type enumeration for the
the state variable (or signal) updates.
Let synthesis handle the encoding and decoding details.

-- Mike Treseler
 
Reply With Quote
 
 
 
 
SuSenSa08
Guest
Posts: n/a
 
      01-18-2008
On Jan 18, 11:02*am, Mike Treseler <(E-Mail Removed)> wrote:
> SuSenSa08 wrote:
> > Why are the tools different ?

>
> Because you are using vendor-specific attributes.
>
> *Is the error fatal, i.e. need a fix ?
>
> Leave out the attributes and
> declare a type enumeration for the
> the state variable (or signal) updates.
> Let synthesis handle the encoding and decoding details.
>
> * * * * *-- Mike Treseler


I thought the error was due to a mismatch between 2 lists.

The Synopsys error went away when I changed the line to:

attribute enum_encoding of pre_statetype : type is "10 01";

Is that possible ?

Calvin
 
Reply With Quote
 
SuSenSa08
Guest
Posts: n/a
 
      01-18-2008
On Jan 18, 11:02*am, Mike Treseler <(E-Mail Removed)> wrote:
> SuSenSa08 wrote:
> > Why are the tools different ?

>
> Because you are using vendor-specific attributes.
>
> *Is the error fatal, i.e. need a fix ?
>
> Leave out the attributes and
> declare a type enumeration for the
> the state variable (or signal) updates.
> Let synthesis handle the encoding and decoding details.
>
> * * * * *-- Mike Treseler


I thought the error was about a mismatch between 2 lists.

The synopsys error went away when I changed the line to:

attribute enum_encoding of pre_statetype : type is "10 01";

Is that possible ?

Calvin
 
Reply With Quote
 
Mike Treseler
Guest
Posts: n/a
 
      01-18-2008
SuSenSa08 wrote:

> The synopsys error went away when I changed the line to:
> attribute enum_encoding of pre_statetype : type is "10 01";
> Is that possible ?


Yes but it's a vendor attribute, not part of the language.
If you want to do it that way, check with vendor docs.


-- Mike Treseler
 
Reply With Quote
 
Jim Lewis
Guest
Posts: n/a
 
      01-18-2008
>> The synopsys error went away when I changed the line to:
>> attribute enum_encoding of pre_statetype : type is "10 01";
>> Is that possible ?

Yes. Formally there are only 2 states in your state type, so
having more than 2 values specified (as in your previous example)
is wierd and the Synopsys' error is consistent with basic VHDL
philosophy - if a literal has too many values to be associated
with a target, it is a serious error and warrants immediate designer
attention.

> Yes but it's a vendor attribute, not part of the language.
> If you want to do it that way, check with vendor docs.


enum_encoding is a vendor created attribute that was
standardized in 1076.6-1999. So while it is not part of
the base standard (1076), it is part of the 1076.6 standard.

Even so, as Mike suggested, you still want to check your vendor
docs as may take enum_encoding as THE encoding to use and while
some may take it only as a request or suggestion.

Cheers,
Jim
SynthWorks
 
Reply With Quote
 
sly
Guest
Posts: n/a
 
      01-19-2008
Jim Lewis a écrit :
>>> The synopsys error went away when I changed the line to:
>>> attribute enum_encoding of pre_statetype : type is "10 01";
>>> Is that possible ?

> Yes. Formally there are only 2 states in your state type, so
> having more than 2 values specified (as in your previous example)
> is wierd and the Synopsys' error is consistent with basic VHDL
> philosophy - if a literal has too many values to be associated
> with a target, it is a serious error and warrants immediate designer
> attention.
>
>> Yes but it's a vendor attribute, not part of the language. If you want
>> to do it that way, check with vendor docs.

>
> enum_encoding is a vendor created attribute that was
> standardized in 1076.6-1999. So while it is not part of
> the base standard (1076), it is part of the 1076.6 standard.
>
> Even so, as Mike suggested, you still want to check your vendor
> docs as may take enum_encoding as THE encoding to use and while
> some may take it only as a request or suggestion.
>
> Cheers,
> Jim
> SynthWorks


From IEEE 1076.6-1999 Standart:
"The value of this attribute shall specify the encoding of the
enumeration type literals. The attribute value
shall be made up of tokens separated by one or more spaces.
There shall be as many tokens as there are literals
in the enumeration type, with the first token corresponding to the first
enumeration literal, the second
token corresponding to the second enumeration literal, and so on."
 
Reply With Quote
 
SuSenSa08
Guest
Posts: n/a
 
      01-19-2008
On Jan 19, 5:36*am, sly <sly@none> wrote:
> Jim Lewis a écrit :
>
>
>
>
>
> >>> The synopsys error went away when I changed the line to:
> >>> *attribute enum_encoding of pre_statetype : type is "10 01";
> >>> Is that possible ?

> > Yes. *Formally there are only 2 states in your state type, so
> > having more than 2 values specified (as in your previous example)
> > is wierd and the Synopsys' error is consistent with basic VHDL
> > philosophy - if a literal has too many values to be associated
> > with a target, it is a serious error and warrants immediate designer
> > attention.

>
> >> Yes but it's a vendor attribute, not part of the language. If you want
> >> to do it that way, check with vendor docs.

>
> > enum_encoding is a vendor created attribute that was
> > standardized in 1076.6-1999. *So while it is not part of
> > the base standard (1076), it is part of the 1076.6 standard.

>
> > Even so, as Mike suggested, you still want to check your vendor
> > docs as may take enum_encoding as THE encoding to use and while
> > some may take it only as a request or suggestion.

>
> > Cheers,
> > Jim
> > SynthWorks

>
> *From IEEE 1076.6-1999 Standart:
> "The value of this attribute shall specify the encoding of the
> enumeration type literals. The attribute value
> shall be made up of tokens separated by one or more spaces.
> There shall be as many tokens as there are literals
> in the enumeration type, with the first token corresponding to the first
> enumeration literal, the second
> token corresponding to the second enumeration literal, and so on."- Hide quoted text -
>
> - Show quoted text -


It makes sense to have a one-to-one mapping between 2 lists.

However, I am still not sure why Synplicity synthesis does not
complain when there is a mismatch!
 
Reply With Quote
 
Alan Fitch
Guest
Posts: n/a
 
      01-21-2008
SuSenSa08 wrote:
<snip>
>
> However, I am still not sure why Synplicity synthesis does not
> complain when there is a mismatch!


Synplify doesn't (as far as I know) support enum_encoding.

It uses two attributes,

syn_encoding

and

syn_enum_encoding


syn_enum_encoding is closest to your original example, i.e. it takes
a comma separated list of string literals.

However note that syn_enum_encoding is ignored if the FSM Compiler is
enabled.


regards
Alan
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
synopsys DC synthesis errors chinski VHDL 0 09-22-2008 01:23 AM
synthesis using the synopsys-Design Vision Kakkar Vipan \(AI AP D PD VI 4\) VHDL 0 04-21-2005 02:40 PM
WENG FOOK LEE- VHDL Coding and Logic Synthesis with Synopsys mt VHDL 0 02-06-2004 05:57 PM
Am I right in my VHDL code? Synopsys DC runs for ever... walala VHDL 8 09-24-2003 02:04 PM
SOS! newbie question about synthesizable VHDL : synthesis run successfully but post-synthesis failed... walala VHDL 4 09-09-2003 08:41 AM



Advertisments