简体   繁体   中英

Make HTTP Request from Verilog

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

Yes, do some searching for 'DPI' or 'PLI'. If you have a SystemVerilog capable simulator the DPI solution is a lot less overhead. Basically the Verilog end of it will be:

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. This of course is assuming that you're using a commercial Verilog simulator. I don't think Icarus supports DPI yet (could be wrong).

Using VPI is a more portable but takes significantly more coding to put together. I encourage you to research that one on your own if that's what you need.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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