Tuesday, 2 December 2014

Scripting in VLSI industry/a VLSI engineer’s life

Need of scripting in a VLSI engineer’s life

Programming in general, and scripting in particular, is deeply associated with a VLSI engineer’s life. Right from automating repetitive tasks to interfacing with design tools, a VLSI engineer needs scripting and programming to perform his job efficiently and effectively. Scripting forms a very important part of a VLSI engineer’s life.

As everybody knows, VLSI stands for Very Large Scale Integrated Circuits. VLSI involves integrated circuits involving millions of transistors. Handling such large numbers of transistors is beyond human intervention. Specialized EDA (Electronic Design Automation) tools exist for every stage of design right from concept to fabrication. These tools are equipped with special algorithms to deliver optimized results. Thus, programming lies in the heart of EDA (Electronic Design Automation) tools. However, the core of EDA tools is built on assembly and/or high level languages such as system C. Moreover, graphical user interface (GUI) of design tools is generally very memory intensive and demands user attention. However, these tasks are often pre-defined. As an example, for the physical design flow of chip design cycle, the steps involved are generally placement, clock-tree-synthesis, routing etc. Also, all these steps are categorized into a number of smaller sub-steps, often pre-defined. All these tasks, if performed through GUI, require a lot of user intervention and time. Also, the engineer has to perform repetitive actions. EDA tools also offer text based interface in addition to GUI interface, and each step/sub-step can also be performed by some commands and switches. The sequences of commands to be run can be scripted and run so as to save time and effort.

Also, the job of a VLSI engineer is not to carry out the design flow alone. Each new design is equipped with new set of challenges never encountered before. The debug requires a great deal of analysis skills and time. In addition, different settings for a command yield different results. So, there are a number of experiments to be performed with different settings as the same settings may yield better results for one design, but not for another. Surely, these different experiments cannot be performed manually by a single user. On the contrary, commands can be written in the form of a script and can be run on the same initial database yielding different final databases. The user can, then, devote his attention to the more important task of analyzing the results. Another advantage of scripting the tasks is that the tool does not have to get struck waiting for user input after it has completed its task. Rather, it can get the next command to be executed from the script itself resulting in faster execution.

Another reason why scripting is preferred is because human work is error prone.  A single error can destroy the whole effort. Scripting the task reduces the probability of error by a huge amount.

Other than interfacing with tool also, there are a lot of non-technical repetitive tasks that the user has to perform. These include day-to-day disk cleanup, monitoring the jobs, preparing summaries of results etc. As these tasks are of repetitive nature, these can also be automated and can save a lot of manual effort.
                                       
Difference between scripting and HDL

A very common confusion that many of us have is over the differentiation between various programming languages being used by electronic designers. On one side we have C, C++, PERL, Python and on the other we have VHDL, VERILOG and SPICE. In order to understand the use case and relevance of these languages, we must first understand why these are there in the first place.
  • Programming Languages: Let us first consider basic coding languages like C and C++. These languages are the most basic means through which all general purpose computers and systems interact, mostly because of dependencies on the operating system. These languages basically provide us with data structures processing which compatible with the OS.  For VLSI designers, these  are useful mostly in developing software applications, or even design tool software itself. These languages are, thus, more like tools made for software designers instead and often have a very complex but powerful code for even simple applications. The limitations of these languages are only dependent on the type of hardware that is supported. All the other languages are in fact an abstraction of these languages themselves.
  • Tool Languages: TCL, PERL and shell based various languages come under the banner of tool languages. These languages are generally termed as interpreters (translators). They work the code line by line making it easier to write and debug at the same time. These languages simply provide us with a common set of data processing codes in the form of one-liners or functions. The main reason why these languages became popular is that since all industrial EDA tools run on the open source linux/unix environment (much cheaper and less resource intensive than windows), the user found having tools and  utilities with similar command line interface as OS makes it much easier to handle. These languages were thus used primarily to process the command line user interface data as well provide user to process the text based tool results.
  •  HDL Languages: HDL or hardware description language as the name suggests is a way of describing our design tools and the designers about the physical nature of our hardware. These languages provide a common platform for representing physical or logical blocks in a design. While SPICE level languages go down to the basics of textual representation of circuit schematics, higher abstract languages like Verilog describe the register and logical type hardware structures like the behavior and signal relation structure of a counter or memory.

In short, if we compare the making and designing of an industrial chip as making a Pizza, then:
  • HDL is the recipe describing the physical and logical process of making,
  • Tool language is the manual and user controls on the Oven, and
  • The cook is the programming language synchronizing both the recipe and the tools

How  Can I design my chip like  a PIZZA ?
Figure 1 : Baking a chip!

Different scripting languages used

As is the case with programming languages, the scripting languages are also of two types; i.e., interpreted and compiled. The commonly used scripting languages used are TCSH, TCL and PERL.

  • TCSH: TCSH is a language particularly compatible with unix operating systems. The unix based jobs can be automated with the help of TCSH interpreter
  • TCL: TCL stands for Tool Command Language. Most of the EDA tools are TCL based. So, the tool related scripts can be written in TCL.
  • PERL: PERL is a very powerful language and provides a lot of pre-built libraries for a range of tasks. Even XLS data parsing can be done using PERL. From simple useful scripts to powerful utilities can be created using PERL with not much of effort.

Thus, we have discussed how scripting languages have penetrated a VLSI engineer’s life. Without these, there will be chaos all around. It is due to scripting and scripting languages only that VLSI industry survives today. We cannot even imagine VLSI industry without scripting.

No comments:

Post a Comment