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
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

Cookies are required to use this site. You must accept them to continue using the site. Learn more…