TheSystemDevelopmentKit / rtl

Package for rtl (i.e. Verilog and VHDL ) simulation control
Other
1 stars 2 forks source link

Add capability to run simulation with or without optimization in QuestaSim #94

Closed Roenski closed 2 months ago

Roenski commented 2 months ago

Currently the situation is as follows:

Some notes:

It would be nice if the following features were possible:

Some suggestions as to how to implement it:

  1. Just use vlogsimargs defined in sv class, and let the user define them manually.
  2. Add a property/function called optimize to questasim class. Here, you could, for example, provide the function with a list of modules whose signals you wish to keep.

The problem that occurs to me is how to add the default vopt behavior if the user does not want to define it manually? Here I explore the problem for the two suggestions introduced above:

  1. If vlogsimargs is empty, then use default values? The problem becomes if the user defines a non-vopt-related argument, then it could change the vopt behavior even if the user did not specifically change it.
  2. Here, we could define that if optimize function was not called, then we use the default behavior. However, problem arises if the user adds those functions manually to vlogsimargs then the behavior might be weird.
Roenski commented 2 months ago

@mkosunen any comments or suggestions?

mkosunen commented 2 months ago

Here's my two cents.

  1. In any cade, those (visibility-speed) trade-off option should be defined in redefinable option (@property)

  2. Interactive simulations are for debugging, so defaulting to slowest, max-visibility is justified. This could be messaged with an info.

  3. There could be 'preset library dictionary' per simulator for some elementary trafe-offs, like nothing visible, only top-level visible top-level+dut visible (if possible), and everything visible.

Roenski commented 2 months ago

@mkosunen can you check the pull request linked above? I tested it with A-Core.

Roenski commented 2 months ago

I believe the concept of optimizing a design does not exist in a lot of simulators, that's why I made it a questa-specific property.