| Anonymous | Login | 2010-09-07 11:35 PDT |
| Main | My View | View Issues | Docs | Wiki |
| Viewing Issue Simple Details [ Jump to Notes ] [ Wiki ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||
| ID | Category | Severity | Date Submitted | Last Update | |||
| 0001666 | [SystemVerilog P1800] SV-BC | major | 2006-11-05 06:34 | 2008-05-10 19:46 | |||
| Reporter | shalom | View Status | public | ||||
| Assigned To | shalom | ||||||
| Priority | immediate | Resolution | fixed | ||||
| Status | closed | Product Version | |||||
| Summary | 0001666: 3.8: error in structural literal example | ||||||
| Description |
Krishanu Debnath asserted in http://www.eda-stds.org/sv-bc/hm/3652.html [^] that there is a problem in structure literal example at end of 3.8. I just saw, and no seems to have noticed then, that the first level of expansion is clearly wrong in that it expands the 3{a in two different ways, both of which are different from the source code. Greg Jaxon wrote in http://www.eda-stds.org/sv-bc/hm/3667.html [^] : The example on page 12 is wrong, and its expansion has been bungled. Here is a corrected version: struct {int X,Y,Z;} XYZ = '{3{1}}; typedef struct {int a,b[4];} ab_t; int a,b,c; ab_t v1[1:0] [2:0]; v1 = '{2{'{3{'{a,'{2{b,c}}}}}}}; /* expands to '{ '{3{ '{ a, '{2{ b, c }} } }}, '{3{ '{ a, '{2{ b, c }} } }} } */ /* expands to '{ '{ '{ a, '{2{ b, c }} }, '{ a, '{2{ b, c }} }, '{ a, '{2{ b, c }} } }, '{ '{ a, '{2{ b, c }} }, '{ a, '{2{ b, c }} }, '{ a, '{2{ b, c }} } } } */ /* expands to '{ '{ '{ a, '{ b, c, b, c } }, '{ a, '{ b, c, b, c } }, '{ a, '{ b, c, b, c } } }, '{ '{ a, '{ b, c, b, c } }, '{ a, '{ b, c, b, c } }, '{ a, '{ b, c, b, c } } } } */ Since there is enough room on the page, please use the vertical pattern to better illustrate the repetitive behavior. He added in http://www.eda-stds.org/sv-bc/hm/3669.html [^] : I understand that examples aren't normative, but please add: /* Implementations are not required to replicate assignment patterns before evaluating them. */ I classified this as severity major because the apostrophe rules for aggregate literals are very confusing as it is. |
||||||
| Additional Information | |||||||
| Tags | No tags attached. | ||||||
| Type | Errata | ||||||
| Attached Files |
|
||||||
|
|
|||||||
Notes |
|
|
shalom (manager) 2006-11-05 06:37 |
Dave Rich wrote in http://www.eda-stds.org/sv-bc/hm/3739.html [^] : "It has come back to me. Some functionality has been garbled when '{} was added to {}. Before we added the ', only one set of braces in a literal was represented by a replication. so {4{1}} could become the same as {1,1,1,1}, the inner set of braces is part of the replication, not part the assignment pattern. so {2{1,1}} becomes {1,1,1,1}, it Therefore I believe replication in assignment patters should only require one ' '{4{1,1}} " But I am not sure whether Dave intended to disagree with Greg. |
|
Dave Rich (manager) 2006-11-06 17:41 |
I was replying to an earlier e-mail. I do agree with Greg's re-write of the example. |
|
Brad Pierce (developer) 2006-11-16 09:38 |
See comments in http://www.eda-stds.org/sv-bc/hm/5372.html [^] |
|
shalom (manager) 2006-12-28 01:37 |
I uploaded a new proposal which just fixes the example and does not mention the number of times a replication is evaluated. That is dealt with in 0001301. |
|
mmaidment (manager) 2007-03-05 01:25 |
On January 8, 2007 the SV-BC unanimously approved the attached proposal. |
|
mmaidment (manager) 2007-05-25 16:30 |
Proposal needs to be updated for incorporation in 1800-2008 Draft 3. |
|
shalom (manager) 2007-06-01 03:24 |
Updated to Draft 3 |
|
mmaidment (manager) 2007-06-22 11:33 |
On June 11, 2007, via e-mail ballot, the SV-BC approved resolving this issue per Shalom's proposal. Stu abstained from the vote as he did not have time to review the examples. |
|
Neil Korpusik (administrator) 2007-09-13 15:34 |
Unanimously approved by the Champions in the August 15, 2007 conference call. |
|
Neil Korpusik (administrator) 2007-09-13 15:34 |
Unanimously approved by the P1800 Working Group in the August 30, 2007 conference call. |
|
Stuart Sutherland (manager) 2007-10-03 21:55 |
Corrected in P1800-2008 draft 4. |
|
shalom (manager) 2008-01-15 23:31 |
The indentation of the last comment is not right. The first line of the last comment is OK, but the remaining lines are indented too much, and not aligned with the first line. |
|
Stuart Sutherland (manager) 2008-04-17 09:59 |
Correction to indentation made in P1800-2008/D5, per bug note dated 2008-01-15. |
|
shalom (manager) 2008-05-10 19:46 |
Change verified in Drsft 5. |
| Mantis 1.1.7[^] Copyright © 2000 - 2008 Mantis Group |