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] On Behalf Of Surya Pratik Saha Sent: Tuesday, December 15, 2009 12:02 PM To: Abhishek Muchandikar Cc: sv-bc@eda.org; 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> To: Surya Pratik Saha <spsaha@cal.interrasystems.com>, sv-bc@eda.org <sv-bc@eda.org>, sv-ac@server.eda.org <sv-ac@eda.org> Cc: Adhip Das <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] On Behalf Of Surya Pratik Saha > Sent: Tuesday, December 15, 2009 2:40 PM > To: sv-bc@eda.org; 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, and is believed to be clean. --------------------------------------------------------------------- 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 06:52:36 2009
This archive was generated by hypermail 2.1.8 : Tue Dec 15 2009 - 06:53:49 PST