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

From: Korchemny, Dmitry <dmitry.korchemny_at_.....>
Date: Tue Dec 15 2009 - 08:18:12 PST
But these are syntactical limitations. I am not talking that this cannot be allowed, and I even think it would be useful to allow concurrent assertions in functions and tasks, but it requires some additional definition work that has not been completed yet.

Thanks,
Dmitry

From: Srinivasan Venkataramanan [mailto:svenka3@gmail.com]
Sent: Tuesday, December 15, 2009 5:43 PM
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.
>
>


---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Dec 15 08:40:59 2009

This archive was generated by hypermail 2.1.8 : Tue Dec 15 2009 - 08:42:58 PST