RE: Section 5.6.5 Rules for DPI function call nesting

From: Shabtay Matalon <shabtay_at_.....>
Date: Thu Dec 21 2006 - 12:10:50 PST
Hi Per, 

As discussed in our last meeting, I have updated section 5.6.5 per your
suggestions and as agreed removed the recursion section. I have used
track changes to illustrate my modifications. 

Brian,

Please update section 5.6.5 in the main body with the enclosed revised
section.  

Regards and happy holidays,

Shabtay


>-----Original Message-----
>From: owner-itc@eda.org [mailto:owner-itc@eda.org] On Behalf Of Per
Bojsen
>Sent: Thursday, December 14, 2006 6:39 AM
>To: 'itc@eda.org'
>Subject: Section 5.6.5 Rules for DPI function call nesting
>
>Hi,
>
>the last paragraph of Section 5.6.5 states:
>
>   SCE-MI 2 does not support recursion. Recursion occurs for example
>   when exported function called from imported function calls the
>   same imported function initiating the call. This will result in
>   creating an infinite loop.
>
>I disagree with the last sentence.  Recursion does not in general
>lead to infinite loops.  It is true that an infinite loop could
>occur, but it does not always occur.
>
>Also, just above this paragraph the text states:
>
>   Supporting more that one level of nesting is allowed by
>   SystemVerilog DPI but considered undefined in SCE-MI 2 meaning
>   it can results in correct behavior, undefined behavior or an error.
>
>So here we state that more than one level of nesting is
>considered undefined by SCE-MI 2, yet the paragraph immediately
>following talks about something that is at least 2-level
>nesting, i.e., imported function calling exported function
>calling imported function.  I don't think we can have our
>cake and eat it too :-)
>
>   SCE-MI 2 compliant implementations should report an error
>   upon encountering recursion.
>
>This is the last sentence of the last paragraph.  I think this
>could be difficult to implement.  Not considering the fact
>that we defined more than 1 level of nesting to be undefined,
>recursion can happen with an arbitrary number of intermediate
>levels of nesting.  To check that some function that has just
>been entered is a descendent of another instance of itself
>in the call chain would be potentially complicated and would
>also lead to a performance hit as you can only do this check
>dynamically.  Sure, you can do some things statically, but
>that will only catch a subset of the cases.
>
>Ok, now I'm curios: Again, not considering that we've declared
>2-level nesting undefined, why do we even want to prohibit
>recursion in the first place?
>
>Per
>


Received on Thu Dec 21 12:11:01 2006

This archive was generated by hypermail 2.1.8 : Thu Dec 21 2006 - 12:11:16 PST