Re: [sv-bc] RE: [sv-ec] svlog enum function usage & maven query

From: Greg Jaxon <Greg.Jaxon_at_.....>
Date: Thu Apr 24 2008 - 11:01:43 PDT
My copy of P1800-2008 shows Mantis 1480 making the correction that
a method_call_root cannot be an expression but only a primary.
Primarys* can be function_calls, but I don't see method_calls in the list.
Primary_literal is also a possible method_call_root, so I think the
enum labels can be used here, but not the method results.

I don't understand why this restriction exists, if it really does.

Greg

Brad Pierce wrote:
> I think an enum method can only be used with a variable, not with an
> anonymous value returned by some expression.
> 
>  
> 
> n  Brad
> 
>  
> 
> *From:* owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] *On Behalf Of
> *Kapil Kaushik
> *Sent:* Thursday, April 24, 2008 9:57 AM
> *To:* sv-ec@eda.org; sv-bc@eda.org; sv-ac@eda-stds.org
> *Subject:* [sv-ec] svlog enum function usage
> 
>  
> 
> Hi,
> 
>  
> 
> System Verilog provides some enum functions(section 4.10) like: next,
> prev, last, first etc. for use. I have a doubt whether the following
> statement (highlighted) is valid:
> 
>  
> 
> module test(input clk, input in, output out);
> 
>  
> 
> typedef enum {red, yellow, blue, green} color;
> 
> color my_color
> 
>  
> 
> always @(clk)
> 
> begin
> 
>  
> 
> my_color = blue;
> 
> *my_color = my_color.prev.next.next*
> 
>  
> 
> end
> 
> endmodule
> 
>  
> 
> i.e. are stacked up function calls valid? SVlog LRM does not mention
> anything about this, so it would be great to have some feedback on this.
> 
>  
> 
> Thanks,
> 
> Kapil
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Apr 24 11:03:35 2008

This archive was generated by hypermail 2.1.8 : Thu Apr 24 2008 - 11:06:38 PDT