RE: [sv-cc] Multidimensional dynamic array in DPI-C

From: Jim Vellenga <vellenga@cadence.com>
Date: Thu Apr 05 2012 - 13:58:20 PDT

Yes, my mistake. Evidently the system decided it had remembered my login long enough. I didn't notice that I had to log in again.

Thanks,
Jim Vellenga

From: Rich, Dave [mailto:Dave_Rich@mentor.com]
Sent: Thursday, 5 Apr 2012 1:09 PM
To: Jim Vellenga; sv-cc@eda.org
Subject: RE: [sv-cc] Multidimensional dynamic array in DPI-C

I use a developer account for P1800.

When you are logged in, does it say (Jim Vellenga - Developer) If not, make sure your project is set to P1800

Dave
Mentor Graphics

From: Jim Vellenga [mailto:vellenga@cadence.com]
Sent: Thursday, April 05, 2012 9:37 AM
To: Rich, Dave; Radoslaw Nawrot; sv-cc@eda.org
Cc: 'Oleg Demchenko'; 'Daniel Mlynek'
Subject: RE: [sv-cc] Multidimensional dynamic array in DPI-C

I logged into Mantis this morning and couldn't find a button for Report Issue. Do you have one? If so, I wonder what the difference in our statuses is.

From: Rich, Dave [mailto:Dave_Rich@mentor.com]<mailto:[mailto:Dave_Rich@mentor.com]>
Sent: Thursday, 5 Apr 2012 11:44 AM
To: Jim Vellenga; Radoslaw Nawrot; sv-cc@eda.org<mailto:sv-cc@eda.org>
Cc: 'Oleg Demchenko'; 'Daniel Mlynek'
Subject: RE: [sv-cc] Multidimensional dynamic array in DPI-C

Jim,

I do not believe that is completely true. IEEE does not publish a corrigendum anymore. You can certainly continue to enter Mantis issues and provide proposed solutions. The committees are free to discuss erratum and clarification issues and provide interpretations; it's just that nothing is binding because they cannot vote on anything yet.

Dave
Mentor Graphics

From: owner-sv-cc@eda.org<mailto:owner-sv-cc@eda.org> [mailto:owner-sv-cc@eda.org]<mailto:[mailto:owner-sv-cc@eda.org]> On Behalf Of Jim Vellenga
Sent: Thursday, April 05, 2012 8:13 AM
To: Radoslaw Nawrot; sv-cc@eda.org<mailto:sv-cc@eda.org>
Cc: 'Oleg Demchenko'; 'Daniel Mlynek'
Subject: RE: [sv-cc] Multidimensional dynamic array in DPI-C

Unfortunately, at the moment two things are true, as far as I know:

1) The IEEE no longer allows working groups to provide "interpretations".

2) The SV-CC committee is not continuing to meet, and will probably not resume until the next round of updates.

3) I can't even file this as a question for the future, because the working group data base appears to be closed to new issues.

I agree with you that these are reasonable questions, but I suspect that the answer is up to you and your VPI provider or providers - unless someone else sees a specific answer in the standard.

From: owner-sv-cc@eda.org<mailto:owner-sv-cc@eda.org> [mailto:owner-sv-cc@eda.org]<mailto:[mailto:owner-sv-cc@eda.org]> On Behalf Of Radoslaw Nawrot
Sent: Thursday, 5 Apr 2012 2:31 AM
To: sv-cc@eda.org<mailto:sv-cc@eda.org>
Cc: 'Oleg Demchenko'; 'Daniel Mlynek'
Subject: [sv-cc] Multidimensional dynamic array in DPI-C

Hello,

I have two interpretation problems:

1.) array querying functions for multidimensional dynamic array

Example code:
module top;
import "DPI-C" function a(int i [][]);
int y [][];
 initial
 begin
 y=new[4];
 y[0] = new[1];
 y[1] = new[2];
 y[2] = new[3];
 y[3] = new[4];
 a(y);
 end
 initial #1000 $finish;
endmodule

What should be returned on c side by svSize:

extern "C" int a(svOpenArrayHandle hnd) {

file<<"Size d2: "<<svSize(hnd,2)<<std::endl;

return 0;

}

?

Should be 0 ($high - $low + 1)? Or maybe simulation error would be better in that case?

LRM says:

$left shall return the left bound of the dimension. For a packed dimension, this is the index of the

most significant element. For a queue or dynamic array dimension, $left shall return 0.

- $right shall return the right bound of the dimension. For a packed dimension, this is the index of

the least significant element. For a queue or dynamic array dimension whose current size is zero,

$right shall return -1.

- For a fixed-size dimension, $increment shall return 1 if $left is greater than or equal to $right

and -1 if $left is less than $right. For a queue or dynamic array dimension, $increment shall

return -1.

- $low shall return the same value as $left if $increment returns -1, and the same value as

$right if $increment returns 1.

- $high shall return the same value as $right if $increment returns -1, and the same value as

$left if $increment returns 1.

So all dynamic arrays should have size =0 ??

 If yes than how user can get information to hull data by index if he(she) doesn't know how many index;es array have?

2.) If I use svGetArrElemPtr1(hnd, 0) should it return another svOpenArrayHandle ?

    If not then how user can get number of second dimension elements to use svGetArrElemPtr2 ??

    The same question about svGetArrayPtr

Thanks in advance ,

Radek

--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.
--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Apr 5 13:59:12 2012

This archive was generated by hypermail 2.1.8 : Thu Apr 05 2012 - 13:59:19 PDT