Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to obtain the number of dimensions of array with VPI routines?

Status
Not open for further replies.

hfly47

Junior Member level 2
Junior Member level 2
Joined
Nov 27, 2009
Messages
22
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,415
How to obtain the number of dimensions of Verilog array with VPI routines?

Anyone can show the example code?
Thanks a lot
 

Do you have PLI handbook by Stuart Sutherland. I think i saw some multidimensional arrays in one of its chapters on VPI
 

Do you have PLI handbook by Stuart Sutherland. I think i saw some multidimensional arrays in one of its chapters on VPI

tariq786, thanks for your reply :)
I have the PDF file of this book, but it doesn't contain the appendix parts which list the diagram of Verilog objects.
And this book just simply introduces some routines about multi-dimension arrays such as vpi_handle_by_multi_index(), but hasn't told how to obtain the number of dimensions.
 

Thanks for your attentions.
A kind person has told me the method, shown as below:

unsigned dims = 0;
vpiHandle range = vpi_iterate(vpiRange, array_handle);
while (vpi_scan(range)) dims += 1;
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top