module A (
output A_OPORT_1
);
endmodule
module B (
input B_IPORT_1
);
endmodule
module TestBench;
wire A_to_B;
A A_inst (
.A_OPORT_1 (A_to_B)
);
B B_inst (
.B_IPORT_1 (A_to_B)
);
endmodule这里基本上将输出端口A:A_inst:A_OPORT_1连接到B:B_inst:B_IPORT_1
如何使用verilog PLI检索这些信息?我很欣赏你的例子。
我有一些代码,它获取一个端口并检索highconn,并且能够获取有线/网络A_to_B。
但是,我无法使用vpiPortInst找出连接到A_To_B的端口。我得到一个为空的迭代器。
vpiHandle high = vpi_handle(vpiHighConn, port);
vpi_printf(" High conndata type is %s\n",
vpi_get_str(vpiType, high));
vpi_printf(" High conndata Net type is %s\n",
vpi_get_str(vpiNetType, high));
vpi_printf(" High conndata Name is %s\n",
vpi_get_str(vpiFullName, high));
vpiHandle iter = vpi_iterate(vpiPortInst,high);
vpiHandle p2ref;
if (iter == NULL)
{
vpi_printf(" Port Iterator is null\n");
}O/P:
High conndata type is vpiNet
High conndata Net type is vpiWire
High conndata Name is $unit::A_to_B
Port Iterator is null发布于 2012-05-09 13:50:03
上面的代码可以工作。正如toolic指出的那样,这两个端口必须连接起来。
现在,这可以工作了,我可以打印出扇出。
https://stackoverflow.com/questions/10423936
复制相似问题