Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to pass parameters to the tcl script in yosys #1655

Open
deepali9 opened this issue Jan 24, 2020 · 2 comments
Open

Request to pass parameters to the tcl script in yosys #1655

deepali9 opened this issue Jan 24, 2020 · 2 comments

Comments

@deepali9
Copy link

deepali9 commented Jan 24, 2020

I am currently trying to do this in my Makefile :
yosys -l example.yslog -c script.tcl

I need to set certain parameters values from the makefile everytime I call the yosys-tcl script.
I would like to do something of sorts :
yosys -l example.yslog -c script.tcl -execute "set PARAMS = "01234"
Is there a way to do that?
These aren't just environment variables.

Thank you

@rodrigomelo9
Copy link
Contributor

Hi @deepali9, it was implemented in #758.

You can create a file called test.tcl with:

puts "argument count: $argc"
puts "argument 0: [lindex $argv 0]"
puts "script name: $argv0"

And after that run:

yosys -p 'tcl test.tcl hello world'

@jalcim
Copy link

jalcim commented Oct 2, 2023

its didn't work for $argv1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants