3

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.

toolic
  • 57,801
  • 17
  • 75
  • 117
user2756376
  • 117
  • 9

1 Answers1

6

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.
Greg
  • 18,111
  • 5
  • 46
  • 68
  • Wow, it is a perfect answer and nothing to add. Thank you for your prompt response. I'm inclined to use DPI but I need to review the DPI standard. Thank you! – user2756376 May 21 '15 at 23:31
  • @user2756376, Welcome to StackOverflow. A thank you is best give by an vote / accepting an answer. The DPI standard is described in the [IEEE Std 1800-2012](http://standards.ieee.org/getieee/1800/download/1800-2012.pdf) § 35. It is mostly a C method handle. – Greg May 22 '15 at 04:01
  • I ended up with using VPI rather than DPI. Rewriting of my PLI routine was a bit painful because no one-to-one mapping from PLI to VPI. To keep the existing PLI program, I created equivalent routines using VPI (ex. tf_getp() -> my_tf_getp()). Once you understand the concepts behind the VPI, I agree that VPI is cleaner than PLI. – user2756376 Jun 10 '15 at 05:12