Subject: [sv-ec] EXT11 - Dynamic Queues (Bounced email from Neil Korpusik)
From: David W. Smith (david.smith@synopsys.com)
Date: Mon Oct 20 2003 - 11:49:22 PDT
Hi Arturo,
I have the following comments on EXT-11
1. 4.14.1 Queue Operators
There are several examples but not much text in this section. This
leaves several unanswered questions.
a. Are expressions allowed as indices for reads and writes?
b. The examples for reads and writes are accessing the first and last
entries. I assume that any item can be read and written. e = q[9];
c. Can a slice of one queue be assigned to another queue? p = q[0:5];
d. Can a slice of a queue be deleted? q = q[0:2];, where q.size > 4
e. Can an entry be deleted from the middle of the queue?
q = {q[0:a], q[a+2:$]};
2. 4.14.1 Rules for Queue Operators, bottom of page 1
a. Rules 2 and 4 are saying the same thing. The fourth one could probably
be deleted.
b. Rule 6, says
"If either a or b are 4-state expressions containing X or Z values, it
yields the empty queue {}."
The word 'it' should be replaced with Q[a:b]
c. Next to last rule, page 2, says
"... shall cause a read operation (e=Q[n]) to return then default ..."
should be
"... shall cause a read operation (e=Q[n]) to return the default ..."
d. The last two rules, page 2
Both of these rules discuss invalid index values, X is mentioned but
Z isn't. Wouldn't a Z value also cause the index to be invalid?
3. 4.14.7 push_front()
The function prototype doesn't show any arguments. Shouldn't there be
one argument: 'queue_type item', just like push_back?
4. 4.15 Array Manipulation Methods
The BNF shows 'list_of_arguments'. All of the examples that use
arguments only show one. Is it possible to have more than one argument?
5. 4.15.1 Array Locator Methods
a. Last sentence, page 3, discusses the "iterator argument" which is a
variable name.
This appears to be a label that is optionally provided by the user.
O Does iterator argument represent a variable that the user has
declared somewhere?
If not, then what happens if the user has declared a variable named
'item' and they use this as the iterator argument?
O I would rather see the application figure out the variables on its
own. Is it really necessary for the user to specify a variable
name here?
b. first() and last() are already defined for associative arrays.
function int first(ref index); // SV 4.10.4
function int last(ref index);
c. max()
"returns the element with the maximum value a or whose expression
evaluates to a minimum"
Should be (note 2 changes below)
"returns the element with the maximum value or whose expression
evaluates to a maximum"
d. unique_inex() should be unique_index()
e. Syntax for 'with'
The syntax used in constraints, uses {}, arrays use ().
success = p.randomize() with {x<y}; // SV 12.6
qi = IA.find(x) with (x>5); // EXT-11
f. What if the expression makes no sense for the type of array?
x>5 // for a string
6. Array ordering methods
a. shuffle(), reverse() "The with clause is ignored"
Why is it allowed?
b. Last example
c.sort(x) with(x.blue <<4 + x.green); // EXT-11
c.sort(x) with(x.blue <<8 + x.green); // change 4 to 8?
Neil
This archive was generated by hypermail 2b28 : Mon Oct 20 2003 - 11:50:04 PDT