RE: [sv-bc] 10.8 Named blocks and statement labels - question

From: Rich, Dave <Dave_Rich_at_.....>
Date: Thu Feb 09 2006 - 11:24:07 PST
initial #10 outer_label.inner_label.V = 5;


The 'while loop' is a single statement that has as part of it an inner
block statement within it. That outer statement label is attached to the
entire while_statement.

I agree that the LRM could be improved on this matter and wish I had the
time to improve it. So someone, please come up with a proposal.

Dave


I

> -----Original Message-----
> From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
> Jonathan Bromley
> Sent: Thursday, February 09, 2006 10:18 AM
> To: sv-bc@eda.org
> Subject: RE: [sv-bc] 10.8 Named blocks and statement labels - question
> 
> > I interpret
> >
> > label: statement
> >
> > to be
> >
> > begin : label
> > 	statement
> > end : label
> 
> Does the label on a simple procedural statement really put that
> statement in a new named scope?  I can't find a decision in
> the LRM, although that doesn't mean I haven't missed it.
> 
> For example, I think users might find this surprising,
> whichever way the decision goes...
> 
>   always @(e)
>     outer_label: while (test)
>       begin : inner_label
>         int V;
>         ...
>       end : inner_label
>   // which of the following is right?
>   initial #10 inner_label.V = 5;
>   initial #10 outer_label.inner_label.V = 5;
> 
> --
> Jonathan Bromley, Consultant
> 
> DOULOS - Developing Design Know-how
> VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services
> 
> Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24
1AW,
> UK
> Tel: +44 (0)1425 471223                   Email:
> jonathan.bromley@doulos.com
> Fax: +44 (0)1425 471573                           Web:
> http://www.doulos.com
> 
> This e-mail and any  attachments are  confidential and Doulos Ltd.
> reserves
> all rights of privilege in  respect thereof. It is intended for the
use of
> the addressee only. If you are not the intended recipient please
delete it
> from  your  system, any  use, disclosure, or copying  of this
document is
> unauthorised. The contents of this message may contain personal views
> which
> are not the views of Doulos Ltd., unless specifically stated.
Received on Thu Feb 9 11:24:20 2006

This archive was generated by hypermail 2.1.8 : Thu Feb 09 2006 - 11:25:23 PST