0

I am a super newbie in this area so I apologize in advance for any dumb thing I might say! :D

I work with Cadence's RTL Compiler and I am trying to automate the process of synthesizing so many designs with different sizes located in different directories, and producing the reports and save them in each folder. I am using tcl scripts to run the commands of the RTL program inside Linux terminal.

First, I have to do some initializations outside the RTL environment. So I have created a script file called setup.tcl that I call from the Linux terminal and then call the RTL program itself (rc):

source setup.tcl
rc

This will run the RTL compiler program inside the same terminal so now the compiler commands can be entered.

rc:/>

Now, I need a script for the RTL commands named rtl_script.tcl to run all the commands inside RTL environment and it will work just fine doing:

rc:/>source rtl_script.tcl

I need to run the whole routine with just one command so that I can loop it and everything.

More precisely, a master script called master.tcl is needed that first runs the setup.tcl, opens RTL Compiler, and then runs rtl_script.tcl inside the rc environment. All done in the same terminal. Something like:

source setup.tcl
rc
source rtl_script.tcl

The problem is that when I enter the command source master.tcl the shell stops after entering the RTL environment and it does not run the rtl_script.tcl. Any help would be appreciated. Thanks.

  • Can you give `rc` a script to run on the command line? Like `rc rtl_script.tcl` perhaps? – Etan Reisner Jul 31 '15 at 20:44
  • Further explanation on the title: I suppose running *rc* command will start a new shell inside the same terminal. So by *new shell* I mean after opening RTL Compiler and by the **script** I mean **master.tcl**. – Arash Ashrafi Jul 31 '15 at 20:46
  • Yes, I understood. The problem here is the same as people asking about how to run commands *inside* the remote shell they get from running `ssh` and the answer is use `ssh ... ` so I was asking if `rc` can do the same thing. – Etan Reisner Jul 31 '15 at 20:50
  • Sorry for the over explanation, @Ethan. I have tried that and unfortunately it doesn't work. – Arash Ashrafi Jul 31 '15 at 20:54
  • If you can't get it to do it automatically in any way then you are probably going to need to look at using something like `expect` to automate it. – Etan Reisner Jul 31 '15 at 20:58
  • @EtanReisner I found the solution and your first comment gave me a great direction to do so. Thank you so much! Sorry for misspelling your name earlier. – Arash Ashrafi Aug 07 '15 at 17:39

1 Answers1

0

I posted this question and I thought the answer should have something to do with different shells. But all I had to do, as @EtanReisner told me, was to give rc command a script to run from but the correct syntax is like this:

rc -file rtl_script.tcl

If you want your master script to continue after running after rc finishes, you have to have an exit command at the end of rtl_script.tcl script. I had to take a closer look at the Cadence documentation.