Thank you for the tutorial. I'm an analog designer and quite new to PD tool knowledge. I have a couple of questions : 1. You mentioned SDC syntax is superset of TCL. I read about genus shell in references from cadence online support(COS). Is this basically a tcl shell with some kind of additional procs included to support the PD like python base + new libraries? I mean the language syntax is still TCL without any additional syntax, rather additional cdns related procs like read_hdl, create_clk etc. 2. There are some switches available for commands like create_clk -period. I believe the create_clk is a proc (correct me if I'm wrong). What syntax of proc definition allows the user to use these switches? I have seen switches in commands like puts as well. I was unsuccessful in my google search in finding this. Can you add procs in your TCL tutorial in the end?
@AdiTeman Жыл бұрын
Hi, I think the answer to both of your questions is the same. The Genus (and other tools) shell is, indeed, interpreted in TCL. This is, in general, standard TCL, though Cadence/Synopsys/Mentor/etc. may have added or modified some small things, but very minor. All the other commands, such as read_hdl are, I believe, just procs. I can't tell you that this is exactly how they implemented the interface (obviously, behind these procs, there is highly optimized compiled code, probably written in C++ or something...), but they pretty much adhere to the functionality and rules of vanilla TCL. You can, indeed, write procs to accept flags, such as the SDC or other commands do. There is a special variable called "args", which must be the last argument in a proc definition and is a list of all the remaining arguments. You can then iterate over this list and do whatever you want with it. You can find a nice explanation here: www2.lib.uchicago.edu/keith/tcl-course/topics/procedures.html I should indeed add this to the tutorial. I will try to do it sometime in the future.