ChanServ changed the topic of #yosys to: Yosys Open SYnthesis Suite: https://github.com/YosysHQ/yosys/ | Channel logs: https://libera.catirclogs.org/yosys/ | Bridged to #yosys:matrix.org
tpb has quit [Remote host closed the connection]
tpb has joined #yosys
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #yosys
cr1901 has quit [Ping timeout: 276 seconds]
cr1901 has joined #yosys
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #yosys
_whitelogger has joined #yosys
FabM has joined #yosys
FabM has joined #yosys
srk has quit [Ping timeout: 268 seconds]
srk has joined #yosys
Guest29 has joined #yosys
<Guest29> Hi
<Guest29> I am running Yosys for Synthesis
<Guest29> I am using *.ys files
<Guest29> So in *.ys file, how can we define variable ?
<Guest29> Like read_verilog $XYZ/rtl_path/abc.v
<jix> you can't, you need to use TCL if you need that
<jix> (or alternatively generate .ys files from some other form of script)
<Guest29> Can you help me how by TCL ? I have tried with yosys -c <*.tcl> and I have declared read_verilog $XYZ/rtl_path/abc.v in TCL but not working
<jix> in TCL you need to either prefix commands with the yosys command so it would be `yosys read_verilog $XYZ/rtl_path/abc.v` in the TCL script (not including the `)
<jix> alternatively you can run the TCL command `yosys -import` at the start to make all non-conflicting yosys commands available as TCL commands directly
<Guest29> Ok. Thanks.  At the start  mean ? > I use this command - yosys -l yosys_run.log -s yosys_script.ys
<jix> no you use `yosys -l yosys_run.log -c yosys_script.tcl` but then at the top of `yosys_script.tcl` you run `yosys -import` as the first TCL command
<jix> (or alternatively in `yosys_script.tcl` you prefix every yosys command with `yosys` e.g. `yosys read_verilog ....`)
<Guest29> Ok
<jix> and if you want to access environment variables, not TCL variables, you need to use $::env(VAR_NAME)
<jix> but that's just standard TCL
<Guest29> Suppose I have multiple commands like read_libert, read_verilog , synth, difflibmap etc ....
<Guest29> abc -liberty,  opt_clean, write_verilog ....
<jix> what's your question in that case?
<Guest29> Suppose above commands are in *.ys, Now I have converted to TCL so for each command I have to write yosys ?
<jix> You have two choices, 1) you run `yosys -import` once at the top of the .tcl file or 2) you write `yosys` before every command
<jix> but some yosys commands have names that are already existing commands in TCL, so if you use `yosys -import` you have to watch out for those since they will have a different name
<jix> those are the yosys commands `proc` and `rename` according to the documentation https://yosyshq.readthedocs.io/projects/yosys/en/latest/cmd/tcl.html
<tpb> Title: tcl - execute a TCL script file - YosysHQ Yosys 0.55-dev documentationMenuExpandLight mode (at yosyshq.readthedocs.io)
kristianpaul has joined #yosys
Guest29 has quit [Quit: Client closed]
tux3 has quit [Server closed connection]
tux3 has joined #yosys
FabM has quit [Ping timeout: 276 seconds]
tlwoerner has quit [Ping timeout: 245 seconds]
Peetz0r has quit [Server closed connection]
Peetz0r has joined #yosys
adamgreig_ has quit [Server closed connection]
adamgreig_ has joined #yosys
Guest26 has joined #yosys
kristianpaul has quit [Ping timeout: 276 seconds]
Guest26 has quit [Quit: Client closed]
krispaul has joined #yosys
krispaul has quit [Ping timeout: 248 seconds]
krispaul has joined #yosys
nonchip has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
nonchip has joined #yosys
vancz has quit []