# How to pass arguments from cmd to tcl script of ModelSim

**URL:** <https://verificationacademy.com/forums/t/how-to-pass-arguments-from-cmd-to-tcl-script-of-modelsim/32981>\
**Category:** UVM\
**Tags:** UVM, modelsim, simulation-script, pass-argument-to-script\
**Created:** [March 21, 2017, 10:10am UTC](https://verificationacademy.com/forums/t/how-to-pass-arguments-from-cmd-to-tcl-script-of-modelsim/32981 "2017-03-21T10:10:34Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jlivermore](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jlivermore](https://verificationacademy.com/forums/u/jlivermore)\
**Post date:** [March 21, 2017, 9:30pm UTC](https://verificationacademy.com/forums/t/how-to-pass-arguments-from-cmd-to-tcl-script-of-modelsim/32981/2 "2017-03-21T21:30:09Z")

</div>

_In reply to [saritr](https://verificationacademy.com/forums/t/how-to-pass-arguments-from-cmd-to-tcl-script-of-modelsim/32981):_

I’ve had some success with something like:

vsim -c -do “do top\_script.tcl option1 option2”

You’d have to package that into your os.system() command and escape the quotes.

---

_[View the full topic](https://verificationacademy.com/forums/t/how-to-pass-arguments-from-cmd-to-tcl-script-of-modelsim/32981)._
