Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
a_short_intro_to_modelsim_verilog_simulator [2020/09/03 22:08] – Added optimization control details shashankova_short_intro_to_modelsim_verilog_simulator [2020/09/03 22:11] – [Debugging in ModelSim] shashankov
Line 77: Line 77:
 As was hinted earlier, Modelsim performs aggressive optimizations by default. To debug you need to make sure that the optimizer is aware of the level of debug information it needs to retain. There are a couple of ways to go about this: As was hinted earlier, Modelsim performs aggressive optimizations by default. To debug you need to make sure that the optimizer is aware of the level of debug information it needs to retain. There are a couple of ways to go about this:
   * **Global Optimization**: Add the option ''-voptargs="+acc"'' to the ''vsim'' command. This enables full visibility into every aspect of the design. The command might look like: ''vsim --voptargs="+acc" <top_level>''   * **Global Optimization**: Add the option ''-voptargs="+acc"'' to the ''vsim'' command. This enables full visibility into every aspect of the design. The command might look like: ''vsim --voptargs="+acc" <top_level>''
-  * **File Level Optimization**: This is a more powerful option which lets you control optimization of specific HDL files and hence modules. Add the option ''+acc'' to the ''vlog'' command for the files you want to have view into. For example you wanted to look into a module named top in ''top.v'' you'd use the following command just for that file: ''vlog +acc top.v''. You can compile the rest of the files as usual.+  * **File Level Optimization**: This is a more powerful option which lets you control optimization of specific HDL files and hence modules. Add the option ''+acc'' to the ''vlog'' command for the files you want to have view into. For example if you wanted to look into a module named top in ''top.v'' you'd use the following command just for that file: ''vlog +acc top.v''. You can compile the rest of the files as usual.
  
 Here's a full list of possible options other than just using ''+acc'' which can also be obtained by running the command ''vlog -help Debug'' Here's a full list of possible options other than just using ''+acc'' which can also be obtained by running the command ''vlog -help Debug''