3
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的模塊使用VPI PLI連接 - Verilog的VCS
我如何可以檢索使用該信息verilog PLI?例如讚賞。
我有一些代碼獲取一個端口並檢索highconn並能夠獲取wire/net 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
在你的代碼中,這2個端口沒有連接在一起,因爲'A_inst'和'B_Inst'在單獨的Tb模塊中。 – toolic
謝謝我會解決它。 –