Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to access the vpiPort of the DUT #34

Open
r2com opened this issue Apr 14, 2023 · 0 comments
Open

Trying to access the vpiPort of the DUT #34

r2com opened this issue Apr 14, 2023 · 0 comments

Comments

@r2com
Copy link

r2com commented Apr 14, 2023

So let's say I have simple DUT in VHDL which has top ports a,b,c,d and inside entity there are signals e,f,g,h.

consider the below routine I have:

static PLI_INT32 get_handles2(p_cb_data data)
{
  vpiHandle iter, net;
      const char *net_name;
    int         net_width;
    int         net_dir;

    h_module_iter = vpi_iterate(vpiModule, NULL);
    h_top = vpi_scan(h_module_iter);
    vpi_free_object(h_module_iter);
    printf("Top-level module: %s\n", vpi_get_str(vpiFullName, h_top));

    iter = vpi_iterate(vpiPort, h_top);
    if (iter) {
        while ((net = vpi_scan(iter)) != NULL) {
            printf(" port/net found!\n");
            net_name = vpi_get_str(vpiName, net);
            net_width = vpi_get(vpiSize, net);
            net_dir = vpi_get(vpiDirection, net);
          }
        }
return 0;
}

When I have vpiPort in the "iter = vpi_iterate(vpiPort, h_top);" then I do not get print statement that port/net is found.

However, when I change vpiPort to vpiNet, it will give me that print statement 8 times, basically, it found 4 ports (top entity ports) and another 4 signals inside entity.

So, my question is, does it mean that there is no support for explicitly identifying the PORTS of the VHDL DUT? for example, what if I don't care about any signals in my VHDL entity but just want to read all ports of the entity and drive/read them during verification?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant