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 a mutli-dimensional array with VPI routine?

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
Verilog VPI provides a routine vpi_handle_by_multi_index() to obtain
one word of a mutli-dimensional array.
Its 2nd argument is the number of dimensions, but I don't know how to
obtain the number of dimensions of a mutli-dimensional array?
Is there any way to do this?
Can anyone show the example code?

Thanks a lot
 

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.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top