[sv-bc] funny example of cast operator


Subject: [sv-bc] funny example of cast operator
From: Paul Graham (pgraham@cadence.com)
Date: Mon Jan 12 2004 - 18:18:28 PST


Section 3.14 has this example of the cast operator:

    shortint'{8'hFA, 8'hCE}

It looks like the intent is to cast each element of the concat to shortint.
If so, that feature should be documented.

This feature brings up a possible ambiguity. Suppose I have:

    typedef struct packed {
        shortint a, b;
    } mytype;

    ... mytype'{8'hFA, 8'hCE} ...

Is the intent here to cast the entire concat to type mytype, or to cast
each element of the concat to type mytype?

Paul



This archive was generated by hypermail 2b28 : Mon Jan 12 2004 - 18:19:18 PST