A
asic1234@gmail.com
Guest
I am trying to print out the complete design hierarchy for a given
design using PLI.
I have used "acc_next_child" to get the next LOWER module in the
design. However, I am not able to get to the NEXT **ADJACENT**
module. How can I do this?
For example when I use the following hierarchy as
$print_hierarchy(top_level0.ModA_level1), the function can only get to
ModA, B, C and subsequently stops, whereas the desired result is to
print out the ENTIRE hierarchy. In other words, anything listed after
ModD_level1 and below never gets printed. How can I do this? Is there
an acc_ function to get the module hierarchy handle for the next
ADJACENT (instead of LOWER) module? (See my entire PLI code below).
top_level0
top_level0.ModA_level1
top_level0.ModA_level1.ModB_level2
top_level0.ModA_level1.ModB_level2.ModC_level3
top_level0.ModD_level1
top_level0.ModE_level1
top_level0.ModF_level1
top_level0.ModF_level1.ModG_level2
top_level0.ModF_level1.ModG_level2.ModH_level3
#include <stdio.h>
#include "acc_user.h"
#include "veriuser.h"
void printNextModule(handle);
void print_hierarchy()
{
handle top_handle;
acc_initialize();
top_handle = acc_handle_tfarg(1);
printNextModule(top_handle);
acc_close();
}
void printNextModule(handle module_handle)
{
handle child_handle = NULL;
child_handle = acc_next_child(module_handle,child_handle);
if(NULL==child_handle)
{
//Placeholder for future code
return;
}
else
{
io_printf("%s\n", acc_fetch_fullname(child_handle));
printNextModule(child_handle);
}
}
Thanks
design using PLI.
I have used "acc_next_child" to get the next LOWER module in the
design. However, I am not able to get to the NEXT **ADJACENT**
module. How can I do this?
For example when I use the following hierarchy as
$print_hierarchy(top_level0.ModA_level1), the function can only get to
ModA, B, C and subsequently stops, whereas the desired result is to
print out the ENTIRE hierarchy. In other words, anything listed after
ModD_level1 and below never gets printed. How can I do this? Is there
an acc_ function to get the module hierarchy handle for the next
ADJACENT (instead of LOWER) module? (See my entire PLI code below).
top_level0
top_level0.ModA_level1
top_level0.ModA_level1.ModB_level2
top_level0.ModA_level1.ModB_level2.ModC_level3
top_level0.ModD_level1
top_level0.ModE_level1
top_level0.ModF_level1
top_level0.ModF_level1.ModG_level2
top_level0.ModF_level1.ModG_level2.ModH_level3
#include <stdio.h>
#include "acc_user.h"
#include "veriuser.h"
void printNextModule(handle);
void print_hierarchy()
{
handle top_handle;
acc_initialize();
top_handle = acc_handle_tfarg(1);
printNextModule(top_handle);
acc_close();
}
void printNextModule(handle module_handle)
{
handle child_handle = NULL;
child_handle = acc_next_child(module_handle,child_handle);
if(NULL==child_handle)
{
//Placeholder for future code
return;
}
else
{
io_printf("%s\n", acc_fetch_fullname(child_handle));
printNextModule(child_handle);
}
}
Thanks