RE: [sv-cc] 1456 (context behavior): modified proposal

From: Francoise Martinolle <fm_at_.....>
Date: Tue May 23 2006 - 04:30:19 PDT
 
Ralph,
 
I read the proposal on 1456 and I have a couple of comments.
 
The definition of a DPI-C call chain seems to imply that it has to do
only with a DPI-C import context function.
You do not mention DPI import context functions, is this because they
are not standard? (This is DPI-C versus DPI strings)
 
We need to cover all variations. What about if you have the following
call chain:
DPI-C context import function_1 calls DPI-C context function_2 which
calls a C function
Does the later C function inherits the context of DPI-C context
function_2?
 
DPI-C context import function_1calls DPI SV export function_1 which
calls DPI SV export function_2 which calls DPI-Cimport function_2 which
call C function
What is the context of DPI SV export function_2?
What is the context of the last C fcuntion call (not it is not called by
a context import function)?
 
 
Instead of defining the term of DPI-C call chain, I would have define
this in terms of setting and inheriting the
context:
The context of a call to a DPI import context function is set with the
DPI import declaration instantiated scope 
unless set explicitly otherwise by a svSetScope call inside the DPI
import function body.
A systemVerilog export function or C function always inherits the
context of the calling DPI or C function.
It is erroneous if the context of a systemVerilog export function is
unknown.
 
Francoise
       '
 

________________________________

	From: owner-sv-cc@eda.org [mailto:owner-sv-cc@eda.org] On Behalf
Of Duncan, Ralph
	Sent: Monday, May 22, 2006 1:50 PM
	To: sv-cc@eda.org
	Subject: [sv-cc] 1456 (context behavior): modified proposal
	
	

	Mantis item 1456 has a new proposal; the changes are

	 

	. Affirm that calling exported tasks and functions from
non-context call 

	  chains results in undefined behavior (just as calling the DPI
context 

	  manipulation utilities does).

	 

	. Distinguish "DPI context call chains," which exhibit general
rules from 

	  "DPI-C" context call chains, which describe the behavior of C
call chains.

	            .. The general DPI discussion (in 26.4.3) should be
in terms of 

	               "DPI call chains."

	            .. Descriptions of C call chains in Annex F now uses
"DPI context call chain"

	           for the general case but "DPI-C call chain" when
describing call sequences 

	           in C vs. those in SystemVerilog.  (After all, Annex F
is devoted to C).

	 

	 

	We also talked about how context and call-chains worked in a
general way.

	A reasonable action would be to take 5/11's email about
call-chains and add relevant

	material to 26.4.3 to address the general, not-C-specific case.

	 

	Please share any comments you have on the 5/11 email.

	 

	Ralph

	 

	Ralph Duncan

	Mentor Graphics 

	San Jose, CA

	 
Received on Tue May 23 04:30:14 2006

This archive was generated by hypermail 2.1.8 : Tue May 23 2006 - 04:30:30 PDT