Category TCL

Practical Exposure to writing TCL with examples

Before explaining with the examples, let me clear few things. ⦁ Before going to write the script, first read all the blogs that I have mentioned in the TCL Scripting section. Once you have the problem statement, then understand what…

Regular Expressions in TCL

Regular expressions in TCL are a way to search text. These help us to find a particular character and then we can use our ways to deal with it. “regexp” represents the regular expression. This helps to match a character…

File IO in TCL

There are basically three modes of handling files. Read, Write and Append. Below are the ways: #1. r -> Read a file, file must exist. #2. w -> Write a file, If file exists, then file will get truncated. #3.…

Procedure in TCL

There are number of scripts which can be executed more than once, to utilize the reusability we use procedure in TCL. Syntax: Proc proc_name {argument} { Body } Eg. #1. proc add {a b} { return [expr $a + $b]…

List in TCL

There are following ways to set a list of variables in a variable. ##Normally we define a list of variables in this format. set variable {value1 value2 ….. valuen} set variable “value1 value2 ….. valuen” ##If you have variables in…

String in TCL

We know that variable value can be in the form of a number or string. Working with string in tcl, we can have many ways to take care of things. set a 10; set a apple; With the above example…

ARRAY in TCL

What is Array? During execution, we can have a few variables which we need. So we can take these variables in the form of array in tcl. set array(index) value ; The way we set variables, in the same way…

LOOPS in TCL

There are many statements where we need to execute commands till the condition is met, these are called Loops in TCL. Mainly we use FOR, FOREACH and WHILE Loops in VLSI. Types of Loops FOR Loop Format: for {initialization} {condition}…

Decision in TCL

Decision There will be many points where we need a decision in tcl in between choices while writing a script, there IF statement will help us. IF comes with ELSE also if there are more than one statement. Below diagram…

Basics of TCL

Being a VLSI engineer we work on many industry tools and these tools need an automation rather than manual work as we need to handle many issues at the same time. We can’t go and fix all this manually as…