Can Verilog/Systemverilog/VHDL be considered actor oriented programming languages?

二次信任 提交于 2019-12-09 04:22:28

While these HDL's are not inherently designed as actor oriented languages, there has been multiple efforts to model abstract asynchronous message-passing using them. There are various examples of modeling Communicating Sequential Processes (CSP) in Verilog/SystemVerilog/VHDL/SystemC. Although they are meant to be used to design hardware and test environments, with a little bit of effort they can be used to "mimic" such higher level modeling language. The obvious reason for doing this is to take advantage of the existing powerful compilers and simulation tools for these language and not creating yet another new language.

For example, "SystemVerilogCSP" models CSP-like communication channels and abstract message passing using SystemVerilog's interfaces. While the communication channels are implemented using handshake protocols, from the user's perspective of this package, they are just atomic and blocking actions. See Figure 2 in this paper, in which two concurrent modules communicate through blocking CSP-like communication actions.

Moreover, Verilog and SystemVerilog can spawn parallel threads using fork-join constructs.

I remember when I was first starting out I did some basic design work. I was always trying to fix problems in my design by fixing the code and then my mentor told me "you're not supposed to program here, you're supposed to describe what hardware is going to get synthesized from this code".

Verilog and VHDL are hardware description languages (HDLs) and when using them you think differently than you would when you program in some other language. I would avoid calling them programming languages (though they do also have constructs than aren't meant to be synthesized, but that's for the purpose of creating testbenches).

No. The execution semantics of these languages are event driven. They use a stratified even queue which makes execution on multi-core or other parallel architectures extremely difficult. An event is a change on a signal or some abstract message, and all event go on to a queue to be distributed (or fanned out) to all processes waiting on the event. Only one process is executed at a time.

Although you can synthesize these HDL descriptions into another form that might be actor oriented, the actual source cannot is not.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!