steveicarus / iverilog

Icarus Verilog
https://steveicarus.github.io/iverilog/
GNU General Public License v2.0
2.81k stars 522 forks source link

vpiHigConn not supported in vpi_handle? #752

Open svenka3 opened 2 years ago

svenka3 commented 2 years ago

I am trying to get HighConn of a port via:

vpiHandle high = vpi_handle(vpiHighConn, sig_h); 

I get error on vpiHighConn as undeclared. I looked inside vpi_user.h and it is missing the define for the same. Is this unsupported? Is it easy to add by any chance?

From standard vpi_user.h I see:

/*********************************** METHODS **********************************/
/**************** methods used to traverse 1 to 1 relationships ***************/

#define vpiCondition          71   /* condition expression */
#define vpiDelay              72   /* net or gate delay */
#define vpiElseStmt           73   /* else statement */
#define vpiForIncStmt         74   /* increment statement in for loop */
#define vpiForInitStmt        75   /* initialization statement in for loop */
#define vpiHighConn         76   /* higher connection to port */

In Icarus's version this is missing.

Background - we are trying to enhance debug of OVL in Icarus as part of ABV support in IVL_UVM. So it will help to print the HighConn of a test_expr that fails in an assertion (OVL).

Thanks

martinwhitaker commented 2 years ago

vvp only implements a subset of the VPI data model. It's enough to implement the standard system tasks and functions and the waveform dumpers, but is nowhere near complete. The design gets transformed into a simpler form before being passed to vvp, so in many cases it's not possible to implement the correct behaviour.

svenka3 commented 2 years ago

Thanks, I understand it is not supported as of now. If this is implemented we can do some amount of "connectivity verification " using Icarus - a problem that's becoming prominent these days.

I am curious as a user - as the net value propagation, force etc are working such connectivity information is present inside the database - perhaps it is transformed and hence can't retrieve source code level connectivity ? Is my understanding right?

Cheers Srini

caryr commented 2 years ago

Correct, the net is optimized for connectivity and does not currently have access to the source level net information you are looking for.