学习的过程也是一个遗忘的过程,为了留下学习轨迹或者是为了以后能够回忆下学习的过程,我会时不时的来更新自己正在学习的内容。

How Verilog PLI works

上一篇 / 下一篇  2008-08-23 14:20:48 / 个人分类:HDL & VERIFICATION

  • Write the functions in C/C++ code.
  • Compile them to generate shared libs (*.DLL in Windows and *.so in UNIX). Simulator like VCS allows static linking.
  • Use these Functions in Verilog code (Mostly Verilog Testbench).
  • Based on simulator, pass the C/C++ function details to simulator during compile process of Verilog Code (This is called linking, and you need to refer to the simulator user guide to understand how this is done).
  • Once linked just run the simulator like any other Verilog simulation.

                  

During execution of the Verilog code by the simulator, whenever the simulator encounters user defined system tasks (the ones which start with $), the execution control is passed to the PLI routine (C/C++ function).

注:Once linking is done, simulation is run as a normal simulation as we saw earlier, with slight modification to the command line options: we need to tell the simulator that we are using PLI (Modelsim needs to know which shared objects to load in the command line).

具体的可以参见以下网址:

verilog PLI介绍


FPGA/CPLD器件价格查询

TAG:

windtail的研二生涯 引用 删除 windtail   /   2008-08-27 22:39:06
有关这个,个人感觉看看ModelSim里面的example会有比较大的帮助,尤其是文件中的说明。我只是试了试VPI,成功传递了下参数,感觉还挺好,呵呵。
 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-11-22  
      1
2345678
9101112131415
16171819202122
23242526272829
30      

数据统计

  • 访问量: 1272
  • 日志数: 16
  • 建立时间: 2008-01-03
  • 更新时间: 2008-10-13

RSS订阅

Open Toolbar