简体   繁体   中英

How does SystemVerilog implement the dynamic features of the language?

I have started to learn SystemVerilog and I am reading about the new types, such as:

  • strings

  • dynamic/associative arrays

  • queues

I am wondering how these can be implemented in hardware due to their dynamic nature; is it that they are only for testing/simulation purposes so they are never actually instantiated in hardware?

If so, why would you ever use those types of arrays if you had to change to a normal array to run the design on hardware?

Verilog and now SystemVerilog contain features that fall into two categories: Synthesizable and Non-Synthesizable . There is no fixed standard that defines which features belong in each catagory. Ideally if you can simulate a feature, you can find a way to synthesize it.

Some features wind up in both categories depending on how it's used. For example, a for loop is synthesizable if you can statically determine (ie at compile time rather than run-time) how many iterations it has. The same is true for a queue or dynamic array - if you can define a maximum size, they can be implemented in hardware.

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