Search code examples
verilogmodelsimieee

tf_nodeinfo has been deprecated by IEEE


I would like to use PLI routines that were developed years ago using PLI 1.0. It worked fine before. But when I tried to run using a newer version of ModelSim Verilog simulator, I got the following error message:

# ** Warning: (vsim-8668) tf_nodeinfo has been deprecated by IEEE. Although still partially supported, memoryval_p will always be set to a a null pointer.
# : PDK_top.v(102)

As the PLI routines are using tf_nodeinfo and the simulation failed. I tried to figure out how to mend this problem but I couldn't find any recommended way to replace obsoleted tf_nodeinfo.

Could anybody give me a strategy I should use to deal with this situation? All source codes of the PLI routines are available.

Also, I'm very curious why IEEE decided to drop tf_nodeinfo.


Solution

  • PLI 1.0 is old (it has been around since the mid-1980s according to the LRM), it was depreciated in IEEE Std 1364-2005 § 1.6 Deprecated clauses:

    IEEE Std 1364-2005 deprecates the Verilog PLI TF and ACC routines that were contained in previous versions of this standard. These routines were described in Clause 21 through Clause 25, Annex E, and Annex F. The text of these clauses and annexes have been removed from this version of the standard. The text of these deprecated clauses and annexes can be found in IEEE Std 1364-2001.

    I could not find any description why it was removed from the LRM. Best guesses are:

    • It could be that old tf_ and acc_ routines were not forward comparable with SystemVerilog. There is not mentioning of the tf_ and acc_ routines in IEEE Std 1800-2005, but there are vpi_ routines. IEEE was already planning on merging the two standards (and did in IEEE Std 1800-2009).
    • Or it could be because it has significant lower performance or additional overhead compared to VPI. VPI was introduced in IEEE Std 1364-2001 (§ 20, 26, & 27) and is often refereed to as PLI 2.0 (but the LRM says: "Verilog Procedural Interface routines, called VPI routines, are the third generation of the PLI"). VPI is still strong; it still has more over head then DPI but the feature capabilities do not fully overlap.

    Your choices:

    • Use an older simulator (may work for now, but at some point you will need to upgrade)
    • Find another simulator that still supports it (but it could be dropped in a future release)
    • Rewrite the functionality in:
      1. SystemVerilog IEEE Std 1800-2012
        • It is amazing what can be done with classes, multi-denominational queues & associative arrays, structs and interfaces)
      2. DPI (IEEE Std 1800-2012 § 35)
      3. VPI (IEEE Std 1800-2012 § 36)
        • The vpi_get_data/vpi_put_data might be the your tf_nodeinfo replacement, pending what the operation is doing with it.