Number | 288
|
Category | errata
|
Synopsis | 4.1.14: replication operator and function calls
|
State | lrmdraft
|
Class | errata-discuss
|
Arrival-Date | Feb 23 2003
|
Originator | "Brad Pierce" <Brad.Pierce@synopsys.com>
|
Release | 2001b: 4.1.14
|
Environment |
|
Description |
According to 4.1.14, "If the replication operator is used on a function call operand, the function need not be evaluated multiple times. ... This is another form of expression evaluation short-circuiting." Section 4.1.4 describes short-circuiting as "if the final result of an expression can be determined early, the entire expression need not be evaluated". If the return value of the function can depend on side-effects such as some local state information, then it may not be true that the final result of { f(x) , f(x) , f(x) , f(x) } can be determined early. Why not require that a function call in a multiple concatenation be evaluated exactly once? The situation is analagous to the C-language "A[f(i)] += 5", which is not just syntactic sugar for "A[f(i)] = A[f(i)] + 5". -- Brad |
Fix |
REPLACE If the replication operator is used on a function call operand, the function need not be evaluated multiple times. For example: result = {4{func(w)} may be computed as result = { func(w), func(w), func(w), func(w)} or y = func(w) ; result = { y, y, y, y} This is another form of expression evaluation short-circuiting. WITH When a replication expression is evaluated, the operand shall be evaluated exactly once, even if the replication constant is zero. |
Audit-Trail |
Fix replaced by brad.pierce@synopsys.com on Tue Nov 2 15:19:54 2004 REPLACE If the replication operator is used on a function call operand, the function need not be evaluated multiple times. For example: result = {4{func(w)} may be computed as result = { func(w), func(w), func(w), func(w)} or y = func(w) ; result = { y, y, y, y} This is another form of expression evaluation short-circuiting. WITH When a replication expression is evaluated, the operand shall be evaluated exactly once, even if the replication constant is zero. From: Shalom.Bresticker@freescale.com To: brad.pierce@synopsys.com Cc: etf-bugs@boyd.com Subject: Re: errata/288: PROPOSAL - 4.1.14: replication operator and function calls Date: Mon, 8 Nov 2004 10:26:48 +0200 (IST) Brad, Without taking a position on your proposal, it should include closing 527 as well. Shalom -- Shalom Bresticker Shalom.Bresticker @freescale.com Design & Verification Methodology Tel: +972 9 9522268 Freescale Semiconductor Israel, Ltd. Fax: +972 9 9522890 POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 5441478 From: Shalom.Bresticker@freescale.com To: sv-champions@eda.org Cc: etf-bugs@boyd.com Subject: Re: errata/288: PROPOSAL - 4.1.14: replication operator and function calls Date: Sun, 5 Dec 2004 12:15:44 +0200 (IST) This is the proposal approved by the ETF: On Tue, 2 Nov 2004 brad.pierce@synopsys.com wrote: > REPLACE > > If the replication operator is used on a function > call operand, the function need not be evaluated > multiple times. For example: > > result = {4{func(w)} > > may be computed as > > result = { func(w), func(w), func(w), func(w)} > > or > > y = func(w) ; > result = { y, y, y, y} > > This is another form of expression evaluation > short-circuiting. > > WITH > > When a replication expression is evaluated, the > operand shall be evaluated exactly once, even if > the replication constant is zero. > > > http://boydtechinc.com/cgi-bin/issueproposal.pl?cmd=view&database=default&pr=288 I would leave the example, as follows: "For example: result = {4{func(w)} ; would be computed as y = func(w) ; result = { y, y, y, y } ;" -- Shalom Bresticker Shalom.Bresticker @freescale.com Design & Verification Methodology Tel: +972 9 9522268 Freescale Semiconductor Israel, Ltd. Fax: +972 9 9522890 POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 5441478 [ ]Freescale Internal Use Only [ ]Freescale Confidential Proprietary From: "Brad Pierce" <Brad.Pierce@synopsys.com> To: <Shalom.Bresticker@freescale.com>, <sv-champions@eda.org> Cc: <etf-bugs@boyd.com> Subject: Re: [sv-champions] Re: errata/288: PROPOSAL - 4.1.14: replication operator and function calls Date: Mon, 6 Dec 2004 09:32:26 -0800 >Category: errata >Confidential: no >Originator: "Brad Pierce" <Brad.Pierce@synopsys.com> >Release: 2001b >Submitter-Id: etf >Class: TBD >Description: Shalom, That's a good editorial suggestion, and I would not be opposed to your revising my proposal in the way you suggest. -- Brad -----Original Message----- From: owner-sv-champions@eda.org [mailto:owner-sv-champions@eda.org]On Behalf Of Shalom.Bresticker@freescale.com Sent: Sunday, December 05, 2004 2:16 AM To: sv-champions@eda.org Cc: etf-bugs@boyd.com Subject: [sv-champions] Re: errata/288: PROPOSAL - 4.1.14: replication operator and function calls This is the proposal approved by the ETF: On Tue, 2 Nov 2004 brad.pierce@synopsys.com wrote: > REPLACE > > If the replication operator is used on a function > call operand, the function need not be evaluated > multiple times. For example: > > result = {4{func(w)} > > may be computed as > > result = { func(w), func(w), func(w), func(w)} > > or > > y = func(w) ; > result = { y, y, y, y} > > This is another form of expression evaluation > short-circuiting. > > WITH > > When a replication expression is evaluated, the > operand shall be evaluated exactly once, even if > the replication constant is zero. > > > http://boydtechinc.com/cgi-bin/issueproposal.pl?cmd=view&database=default&pr =288 I would leave the example, as follows: "For example: result = {4{func(w)} ; would be computed as y = func(w) ; result = { y, y, y, y } ;" -- Shalom Bresticker Shalom.Bresticker @freescale.com Design & Verification Methodology Tel: +972 9 9522268 Freescale Semiconductor Israel, Ltd. Fax: +972 9 9522890 POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 5441478 [ ]Freescale Internal Use Only [ ]Freescale Confidential Proprietary |
Unformatted |
|
Hosted by Boyd Technology