Subject: RE: [sv-cc] assertion erratas: 2 minor issues
From: Francoise Martinolle (fm@cadence.com)
Date: Wed Jan 21 2004 - 20:00:25 PST
Bassam,
I agree with these changes. I accept the resolution of this errata as you sent.
One other small clarification which should be done is who owns the 
allocation of the memory for the sub-structures fields s_vpi_attempt_info. 
detail and .attemptStartTime.
This is not specified. May be we need to open another errata to specify who 
allocates, who owns the memory.
I would think that the user application would allocate the overall struct 
vpi_attempt_info but its fields would be populated by the VPI interface and 
would be read only for the user application.
Francoise
        '
At 11:24 AM 1/21/2004 -0800, Bassam Tabbara wrote:
>Francoise, thx a lot for the careful reading, you have found 2 errata: 
>[Swapnajit please take care of sending to David (and be careful to keep 
>all the courier fonts), I think this passed already, if anyone objects to 
>the fixes/changes please voice your concern we can close on this by Friday]
>
>- "info" field is correct, this is talking about the returned info 
>*pointer*, so "info" is correct, just change the word from field to 
>pointer, and explain that no attempt structure info is available.
>
>- yes, apparently that is bug: we can say cb_time is NULL, but now that I 
>think about it I'd rather we return the time of the disable/..... (makes 
>sense to mark some sort of "endpoint" to the assertion).
>
>- I also added another bug that bugged me :-)! See the first bullet below 
>(line before the "info" bug)
>
>Thanks, ok with you Francoise ? Please give ths a once over ...
>-Bassam.
>
>%%%%%%%%%%%% Corrected LRM submission as of 1/21/04, this is an LRM errata 
>going into draft 4%%%%%%%%%%%%%
>
>
>Section 28.4.2, "Placing assertion callbacks"
>
>
>
>
>
>update this part of LRM
>
>
>
>[prototype for vpi_register_assertion_cb()]
>
>Change (changes in red and blue):
>
>
>
>       /* typedef for vpi_register_assertion_cb callback function */
>       typedef  PLI_INT32 (vpi_assertion_callback_func)(
>          PLI_INT32 reason,         /* callback reason */
>          p_vpi_time cb_time,       /* callback time */
>          vpiHandle assertion,      /* handle to assertion */
>          p_vpi_attempt_info info,  /* attempt related information */
>          PLI_BYTE8 *user_data      /* user data entered upon registration */
>       );
>
>       vpiHandle vpi_register_assertion_cb(
>             vpiHandle assertion,       /* handle to assertion */
>             PLI_INT32 reason,          /* reason for which callbacks 
> needed */
>             PLI_INT32 (*cb_rtn)(       /* callback function */
>                   PLI_INT32 reason,    /* callback reason */
>                   p_vpi_time cb_time,  /* callback time */
>                   vpiHandle assertion,
>                   p_vpi_attempt_info info,
>                   PLI_BYTE8 *userData ),
>             vpi_assertion_callback_func *cb_rtn,
>             PLI_BYTE8 *user_data       /* user data to be supplied to cb */
>       );
>
>       typedef struct t_vpi_assertion_step_info {
>             PLI_INT32 matched_expression_count;
>             vpiHandle *matched_exprs;                /* array of 
> expressions */
>             p_vpi_source_info *exprs_source_info;    /* array of source 
> info */
>             PLI_INT32 stateFrom, stateTo;            /* identify 
> transition */
>       } s_vpi_assertion_step_info, *p_vpi_assertion_step_info;
>
>       typedef struct t_vpi_attempt_info {
>             union {
>                   vpiHandle failExpr;
>                   p_vpi_assertion_step_info step;
>             } detail;
>             s_vpi_time attemptStartTime; /* Time attempt triggered */
>       } s_vpi_attempt_info, *p_vpi_attempt_info;
>
>
>[towards the end of the section, make the following change (in Blue), also 
>add the  3rd and 4th NOTES at the end of this section]
>
>The attempt information structure t_vpi_attempt_info attempt information 
>structure contains details relevant to the specific event that 
>occurred.<?xml:namespace prefix = o ns = 
>"urn:schemas-microsoft-com:office:office" />
>
>       On disable, enable, reset and kill callbacks, the info field is 
> NULL returned  p_vpi_attempt_info info pointer is NULL and no attempt 
> information is available.
>
>       On start and success callbacks, only the attemptStartTime field is 
> valid.
>
>       On a cbAssertionFailure callback, the attemptStartTime and 
> detail.failExpr fields are valid.
>
>       On a step callback, the attemptStartTime and detail.step elements 
> fields are valid.
>
>NOTES
>
>3 -- The content of the cb_time field depends on the reason identified by 
>the reason field, as follows:
>         cbAssertionStart - cb_time is the time when the assertion attempt 
> has been started.
>        cbAssertionSuccess, cbAssertionFailure - cb_time is the time when 
> the assertion succeeded/failed.
>         cbAssertionStepSuccess, cbAssertionStepFailure - cb_time is the 
> time when the assertion attempt step succeeded/failed.
>         cbAssertionDisable, cbAssertionEnable, cbAssertionReset, 
> cbAssertionKill -  cb_time is the time when the assertion
>             attempt was disabled/enabled/reset/killed.
>4 -- In contrast to cb_time, the content of attemptStartTime is always the 
>start time of the actual attempt of an assertion. It can be used as an 
>unique ID that distinguishes the attempts of any given assertion.
>-----Original Message-----
>From: owner-sv-cc@server.eda.org [mailto:owner-sv-cc@server.eda.org] On 
>Behalf Of Francoise Martinolle
>Sent: Wednesday, January 21, 2004 7:53 AM
>To: sv-cc@server.eda.org
>Subject: [sv-cc] assertion erratas: 2 minor issues
>
>I noted a problem in the assertion errata which we are supposed to vote on 
>today.
>
>The description is incorrect, there is no "info" field in the attempt info 
>structure. It should say that the "step" field is NULL.
>Additionally we should replace the sentence: "not possible, data supplied 
>is NULL." with "the cb_time field shall be NULL"
>
>
>
>Text is the following.
>The attempt information structure contains details relevant to the 
>specific event that occurred.
>On disable, enable, reset and kill callbacks, the info field is NULL.
>
>On start and success callbacks, only the attemptStartTime field is valid.
>On a cbAssertionFailure callback, the attemptStartTime and detail.failExpr 
>fields are
>valid.
>On a step callback, the attemptStartTime and detail.step elements 
>elementsfields are valid.
>NOTES
>1) ...
>2) ...
>3) The content of the cb_time field depends on the reason identified by 
>the reason field, as follows:
>cbAssertionStart - cb_time is the time when the assertion attempt has been 
>started.
>cbAssertionSuccess, cbAssertionFailure - cb_time is the time when the 
>assertion
>succeeded/failed.
>cbAssertionStepSuccess, cbAssertionStepFailure - cb_time is the time when the
>assertion attempt step succeeded/failed.
>cbAssertionDisable, cbAssertionEnable, cbAssertionReset, cbAssertionKill -
>not possible, data supplied is NULL.
>4) In contrast to cb_time, the content of attemptStartTime is always the 
>start time of the actual attempt of
>an assertion. It can be used as an unique ID that distinguishes the 
>attempts of any given assertion.
This archive was generated by hypermail 2b28 : Wed Jan 21 2004 - 20:04:39 PST