[sv-bc] p1800/d6p1 comments, mostly editorial

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Wed Oct 26 2005 - 07:45:14 PDT
  

Hi,

I started reading the last P1800 draft in an orderly manner, and have a
few minor comments on what I have studied so far.

*       General: In Syntax Boxes, not all footnotes are hypertext links.

*       Syntax 3-1 should contain primary_literal and
unbased_unsized_literal.

*       4.1, 1st para., last sentence: "so that it is not be" should be
"so that it not be".

*        In 4.9, "User-defined types", I found the following paragraph
and its example unclear:

""User-defined type identifiers have the same scoping rules as data
identifiers, except that hierarchical reference to type identifiers
shall not be allowed. References to type identifiers defined within an
interface through ports are allowed provided they are locally re-defined
before being used."

interface intf_i;

typedef int data_t;
endinterface


module sub(intf_i p)

typedef p.data_t my_data_t;

my_data_t data;

// type of 'data' will be int when connected to interface above

endmodule

*         p.data_t certainly looks like a hierarchical reference. Is the
2nd sentence in the paragraph intended to state an exception to the rule
in the 1st sentence? If so, it should say so explicitly.

*       Also, the 2nd sentence mentions local redefinition of the type
identifier. Is the line "typedef p.data_t my_data_t;" intended to
express this? If so, the sentence is unclearly worded. I would say that
the line defines my_data_t, not re-defines p.data_t.

*       BTW, should not there be a ";" at the end of the "module
sub(intf_i p)" line?

 

*       4.9, 3rd to last paragraph: This paragraph mentions "coupled
definitions". Is this term defined?

*       4.10, "Enumerations": The last example on p. 23 is as follows:

// Syntax error: IDLE=2'b00, XX=2'bx, S1=??, S2=??
enum integer {IDLE, XX='x, S1, S2} state, next;

Since the enum is of integer type, then the preceding comment, which
shows the enum names to be 2-bit vectors, looks wrong, copied from the
2nd previous example.

*       4.10, top of p.24: It states, "It shall be an error if
incrementing the previous value causes an overflow within the
significant digits of the enumerated type." What are "significant
digits" in this context? Is it defined? Is there a difference between
this sentence and the one a few lines down, "Any enumeration encoding
value that is outside the representable range of the enum shall be an
error."? The latter is much clearer.

*       4.10, p.24: "If an automatically incremented value is assigned
elsewhere in the same enumeration, this shall be a syntax error." (It
may be an error, but I don't think it is an error of SYNTAX.) Is it an
error to explicitly assign the same value to two enum names? It does not
seem to say. Either way, it should be explicit.

*       4.10, last sentence: "Like C, there is no overloading of
literals, so medal and medal4 cannot be defined in the same scope." I
looked a long time for 'medal' and did not find it. Finally, this
morning, I by chance noticed that 'medal' appears at the top of the
page, far before this sentence, so when the reader gets to this
sentence, he does not see 'medal' at all.

Thanks,

Shalom




image001.gif
Received on Wed Oct 26 07:45:37 2005

This archive was generated by hypermail 2.1.8 : Wed Oct 26 2005 - 07:46:21 PDT