RE: [sv-bc] Re: [sv-ac] Is concurrent assertion not allowed inside task/function?

From: Seligman, Erik <erik.seligman_at_.....>
Date: Tue Dec 15 2009 - 07:52:41 PST
We actually had explicit discussion in SV-SC of whether to allow concurrent asserts inside functions, since the new semantics for procedural concurrent assertions would seem to make this viable.

But the general feeling was that if we allowed these assertions inside functions, there was too much danger of unanticipated consequences, so that feature was dropped for the current PAR.

________________________________
From: owner-sv-ac@server.eda.org [mailto:owner-sv-ac@server.eda.org] On Behalf Of Srinivasan Venkataramanan
Sent: Tuesday, December 15, 2009 7:43 AM
To: Korchemny, Dmitry
Cc: Surya Pratik Saha; Abhishek Muchandikar; sv-bc@eda.org; sv-ac@server.eda.org; Adhip Das
Subject: Re: [sv-bc] Re: [sv-ac] Is concurrent assertion not allowed inside task/function?

But I believe allowing it inside "always" is in some cases is equivalent to allowing it inside "task" - potentially two different modeling styles, are there semantic concerns (a task maybe called by several always blocks etc.?).

Functions - maybe (though join_none is allowed, so if we were to think of "spawning threads" it is similar).

Thanks
Srini
www.cvcblr.com<http://www.cvcblr.com>
On Tue, Dec 15, 2009 at 8:16 PM, Korchemny, Dmitry <dmitry.korchemny@intel.com<mailto:dmitry.korchemny@intel.com>> wrote:
Hi Surya,

I was wrong about the BNF, but note the following:


The LRM states explicitly in 16.15 Concurrent assertions:

A concurrent assertion statement may be specified in any of the following:
- An always procedure or initial procedure as a statement, wherever these procedures may appear (see
9.2)
- A module
- An interface
- A program
- A generate block
- A checker

Thanks,
Dmitry


-----Original Message-----
From: owner-sv-bc@server.eda.org<mailto:owner-sv-bc@server.eda.org> [mailto:owner-sv-bc@server.eda.org<mailto:owner-sv-bc@server.eda.org>] On Behalf Of Surya Pratik Saha
Sent: Tuesday, December 15, 2009 12:02 PM
To: Abhishek Muchandikar
Cc: sv-bc@eda.org<mailto:sv-bc@eda.org>; sv-ac@server.eda.org<mailto:sv-ac@server.eda.org>; Adhip Das
Subject: [sv-bc] Re: [sv-ac] Is concurrent assertion not allowed inside task/function?

Hi Abhishek,
Then LRM should have some text restricting that, but there is nothing
like that. Is there any Mantis?

Hi Shalom,
BNF of both SV 2005 and SV 2009 draft 7a LRM allows it. Here is the snippet:

task_declaration ::= task [ lifetime ] task_body_declaration
task_body_declaration ::=
[ interface_identifier . | class_scope ] task_identifier ;
{ tf_item_declaration }
{ statement_or_null }
endtask [ : task_identifier ]

statement_or_null ::=
statement
| { attribute_instance } ;
statement ::= [ block_identifier : ] { attribute_instance } statement_item
statement_item ::=
[...]
| procedural_assertion_statement
[...]

procedural_assertion_statement ::=
concurrent_assertion_statement
| immediate_assertion_statement
| checker_instantiation

So BNF does not restrict it.

Regards
Surya



-------- Original Message  --------
Subject: Re:[sv-ac] Is concurrent assertion not allowed inside
task/function?
From: Abhishek Muchandikar <Abhishek.Muchandikar@synopsys.com<mailto:Abhishek.Muchandikar@synopsys.com>>
To: Surya Pratik Saha <spsaha@cal.interrasystems.com<mailto:spsaha@cal.interrasystems.com>>, sv-bc@eda.org<mailto:sv-bc@eda.org>
<sv-bc@eda.org<mailto:sv-bc@eda.org>>, sv-ac@server.eda.org<mailto:sv-ac@server.eda.org> <sv-ac@eda.org<mailto:sv-ac@eda.org>>
Cc: Adhip Das <adhip@cal.interrasystems.com<mailto:adhip@cal.interrasystems.com>>
Date: Tuesday, December 15, 2009 3:20:36 PM
> Hi,
>
> In my views, the core functionality of tasks and functions restricts such a kind of use model and is correct.
> The intended use model for tasks and functions is ability to execute common procedures.
> The result of these execution is either passed as a single value thru function or thru output/inout args from a task.
>
> How do you plan to see the assertion results thru them for a whole bunch of assertions encapsulate in them,
> By nature assertion are declarative in form , spanning over the temporal domain.
>
> Also since functions are supposed to  execute in one time unit, it really is not feasible to have assertions in them spanning over a period of time.
>
> Thanks
> Abhishek
>
> -----Original Message-----
> From: owner-sv-ac@eda.org<mailto:owner-sv-ac@eda.org> [mailto:owner-sv-ac@eda.org<mailto:owner-sv-ac@eda.org>] On Behalf Of Surya Pratik Saha
> Sent: Tuesday, December 15, 2009 2:40 PM
> To: sv-bc@eda.org<mailto:sv-bc@eda.org>; sv-ac@server.eda.org<mailto:sv-ac@server.eda.org>
> Cc: Adhip Das
> Subject: [sv-ac] Is concurrent assertion not allowed inside task/function?
>
> Hi,
> I did not see any restriction in the LRM that prevents concurrent
> assertion statement inside task/function. Though all the standard
> simulators fail for the following case for same reason:
>
> module top(input clk,a,b,c);
>
>         property prop;
>                 @(posedge clk)  a ##1 b ##1 c;
>         endproperty
>         task tsk;
>                 assert property(prop)
>                             $display("\n time = %g , testname = %s Passed",$time,"test1_16_7");
>                         else
>                             $display("\n time = %g , testname = %s
> Failed",$time,"test1_16_7");
>
>         endtask
>
>         function func();
>                 assert property(prop)
>                             $display("\n time = %g , testname = %s
> Passed",$time,"test1_16_7");
>                         else
>                             $display("\n time = %g , testname = %s
> Failed",$time,"test1_16_7");
>
>         endfunction
>
> endmodule
>
> Please comment on it.
>
>



--
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 Tue Dec 15 08:05:27 2009

This archive was generated by hypermail 2.1.8 : Tue Dec 15 2009 - 08:06:20 PST