简体   繁体   English

从Verilog发出HTTP请求

[英]Make HTTP Request from Verilog

是否可以调用在Verilog模块内部发出HTTP请求的C / C ++ / Python / Java函数?

Yes, do some searching for 'DPI' or 'PLI'. 是的,进行一些搜索“ DPI”或“ PLI”。 If you have a SystemVerilog capable simulator the DPI solution is a lot less overhead. 如果您具有支持SystemVerilog的模拟器,则DPI解决方案的开销要少得多。 Basically the Verilog end of it will be: 基本上,Verilog的结尾是:

import "DPI" function void do_http(...)

Where you can then call do_http within your Verilog like a normal task or function and you pass the .c file that implements do_http on the command line along with the rest of your sources. 然后,您可以像在常规任务或函数中一样在Verilog中调用do_http,并在命令行中传递实现do_http的.c文件以及其他源代码。 This of course is assuming that you're using a commercial Verilog simulator. 当然,这是假设您使用的是商用Verilog模拟器。 I don't think Icarus supports DPI yet (could be wrong). 我认为Icarus还不支持DPI(可能是错误的)。

Using VPI is a more portable but takes significantly more coding to put together. 使用VPI更具可移植性,但是需要花费更多的代码才能组合在一起。 I encourage you to research that one on your own if that's what you need. 如果需要,我鼓励您自己研究一个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM