Slice with unpacked arrays


Subject: Slice with unpacked arrays
From: David W. Smith (david.smith@synopsys.com)
Date: Mon Jan 13 2003 - 15:39:33 PST


Greetings,
The issue came up in todays SV-EC meeting about the use of slices with
unpacked arrays. All of the examples in 3.0 were with packed data. Was it
intended that unpacked data could be used as well?
 
It is not clear in Section 4.4 which is supported. The first paragraph
refers to packed array or integer type. There are additional references to
both packed and unpacked. The example we want to verify is:
 
string d[5:1] = { "a", "b", "c", "d", "e" };
string p[*];
p = { d[1:3], "hello", d[4:5] };
 
which would result in: "a" "b" "c" "hello" "d" "e"
 
Is the use of the slice legal?
 
Regards
David
David W. Smith
Synopsys Scientist

Synopsys, Inc.
Synopsys Technology Park
2025 NW Cornelius Pass Road
Hillsboro, OR 97124

Voice: 503.547.6467
Main: 503.547.6000
FAX: 503.547.6906
Email: david.smith@synopsys.com
 <http://www.synopsys.com/> http://www.synopsys.com

 



This archive was generated by hypermail 2b28 : Mon Jan 13 2003 - 15:41:20 PST