Programming and GUI Fundamentals (eBook)

TCL-TK for Electronic Design Automation (EDA)
eBook Download: EPUB
2022 | 1. Auflage
224 Seiten
Wiley (Verlag)
978-1-119-83743-5 (ISBN)

Lese- und Medienproben

Programming and GUI Fundamentals -  Abhishek Kumar,  Jyotirmoy Pathak,  Suman Lata Tripathi
Systemvoraussetzungen
92,99 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen
PROGRAMMING AND GUI FUNDAMENTALS

Discover the foundations of TCL programming and GUI development

Programming and GUI Fundamentals: Tcl-Tk for Electronic Design Automation (EDA), delivers a comprehensive exploration of the major design challenges and potential present in application and tool development with Tcl-Tk. Accessibly written and easy-to-understand, the book can be used by students at a variety of levels, as well as researchers and working professionals.

The authors present the fundamental concepts of Tcl programming and graphic user interface (GUI) development using images, and photographs, assisting with concept understanding and retention. They describe real-time system designs and offer students and designers the opportunity to learn about critical concepts in scripting and GUI development.

Readers will learn to design their own GUI, place and package widgets on the GUI, and allow EDA professionals, chip designers and students to code and design in TCL-TK. They will also benefit from:

  • A thorough introduction to scripting languages and wish interpreters, including their fundamental concepts, TCL tips and tricks, and command, variable, and procedure examples
  • Comprehensive explorations of the TCL data structure, including datatypes, strings and commands, lists and commands, and arrays and commands
  • Practical discussions of TCL control flow, including conditional commands, multi-condition commands, and loop commands
  • In-depth examinations of file input/output processing, including TCL file read-write, open and close commands, gets, and puts.

Perfect for undergraduate and graduate students studying programming or computer science, as well as professionals working on electronic design automation and chip design, Programming and GUI Fundamentals: Tcl-Tk for Electronic Design Automation (EDA) is also an indispensable resource for programming professionals seeking to upskill.

Suman Lata Tripathi, PhD, is Professor of VLSI Design at Lovely Professional University. She is a Senior Member of the IEEE and obtained her doctorate in Microelectronics and VLSI Design from Motilal Nehru National Institute of Technology, Allahabad, India.

Abhishek Kumar, PhD, is Associate Professor at Lovely Professional University. He received his doctorate in VLSI Design for Low Power and Secured Architecture from Lovely Professional University, Punjab, India.

Jyotirmoy Pathak is Assistant Professor at Lovely Professional University, Punjab India. He has published over 10 research papers, holds 9 patents, and 1 copyright.


PROGRAMMING AND GUI FUNDAMENTALS Discover the foundations of TCL programming and GUI development Programming and GUI Fundamentals: Tcl-Tk for Electronic Design Automation (EDA), delivers a comprehensive exploration of the major design challenges and potential present in application and tool development with Tcl-Tk. Accessibly written and easy-to-understand, the book can be used by students at a variety of levels, as well as researchers and working professionals. The authors present the fundamental concepts of Tcl programming and graphic user interface (GUI) development using images, and photographs, assisting with concept understanding and retention. They describe real-time system designs and offer students and designers the opportunity to learn about critical concepts in scripting and GUI development. Readers will learn to design their own GUI, place and package widgets on the GUI, and allow EDA professionals, chip designers and students to code and design in TCL-TK. They will also benefit from: A thorough introduction to scripting languages and wish interpreters, including their fundamental concepts, TCL tips and tricks, and command, variable, and procedure examples Comprehensive explorations of the TCL data structure, including datatypes, strings and commands, lists and commands, and arrays and commands Practical discussions of TCL control flow, including conditional commands, multi-condition commands, and loop commands In-depth examinations of file input/output processing, including TCL file read-write, open and close commands, gets, and puts. Perfect for undergraduate and graduate students studying programming or computer science, as well as professionals working on electronic design automation and chip design, Programming and GUI Fundamentals: Tcl-Tk for Electronic Design Automation (EDA) is also an indispensable resource for programming professionals seeking to upskill.

Suman Lata Tripathi, PhD, is Professor of VLSI Design at Lovely Professional University. She is a Senior Member of the IEEE and obtained her doctorate in Microelectronics and VLSI Design from Motilal Nehru National Institute of Technology, Allahabad, India. Abhishek Kumar, PhD, is Associate Professor at Lovely Professional University. He received his doctorate in VLSI Design for Low Power and Secured Architecture from Lovely Professional University, Punjab, India. Jyotirmoy Pathak is Assistant Professor at Lovely Professional University, Punjab India. He has published over 10 research papers, holds 9 patents, and 1 copyright.

Author Biographies

Chapter 1 - Introduction

Chapter 2 - Basic Command

Chapter 3 - Program Flow Control

Chapter 4 - Tcl Data Structure

Chapter 5 - Tcl Object-Oriented Programming

Chapter 6: File Processing

Chapter 7: Toolkit Widget

Chapter 8 - Binding Command and Other Widget

Chapter 9 - Canvas Widget and Tk Commands

Chapter 10 - Tcl-Tk for EDA Tool

Index

1
Introduction


Language is a structured system of communication used by humans. When a human wishes to communicate with a computer system, a programming language is required. A programming language is able to convert a set of instructions, known as the source code, to perform a specific task. There are a number of common programming languages, such as C, C++, and JAVA. Each programming language requires a specific compiler, which is able to translate the source code into machine code. There are also other mechanisms to produce machine code that are interpreter‐based, and these use step‐by‐step executors of the source code. A language can be implemented with either a compiler or interpreter. A combination of both platforms is possible too where the compiler generates the machine code and then passes it to the interpreter for execution [1].

Tcl stands for Tool Command Language. It is an interpreter‐based scripting language, designed to be easy to embed into the application. A scripting language is a programming language that automates the execution of tasks. Scripts are written for the run time execution and are interpreted rather than compiled. Some popular scripting languages are Python, Ruby, Bash, Node Js, and Perl. Scripting languages are required in web applications, system administration, gaming, and plugin development for an existing system. Scripting languages are preferred owing to the (i) ease of learning, (ii) fast editing, (iii) interactivity, and (iv) functionality.

The shell script is a set of instructions in the specific programming language to be run by the UNIX shell, a command‐line interpreter. Tcl (pronounced as tickle) is high‐level, interpreted, dynamic programming. Tcl is very similar to the UNIX shell languages, namely Bounce, C, Korn, and Perl, and therefore offers a wide range of programmability [2]. Tcl supports a wide range of programming paradigms, like object‐oriented programming, and the imperative and functional procedural styles offer the ability for applications to communicate with each other. It is possible to associate Tcl with the toolkit (Tk) used for building a graphical user interface (GUI). Tk is a cross‐platform, which offers a wide range of widget libraries that can also be associated with other programming languages.

Tcl and the X‐window toolkit were developed by Prof. John Ousterhout of U.C. Berkeley to solve the difficulty associated with a programming language. It was initially developed for UNIX, then ported to Windows, MAC, DOS, and QS/2. Its ability to integrate a Tcl interpreter with existing applications and to interact with the program set is what differentiates it from other programs. Table 1.1 presents a comparison between programming and scripting languages.

Table 1.1 Programming and scripting language comparison.

Programming language Scripting language
Set of instructions executes a task Based on script written for run time environment
Compiler based Interpreter based
Develop from scratch Can integrate with existing
Run independent of parent program Run inside another program
Compiled into a more compact form, does not need to be interpreted Can be interpreted within another program
Offer full usage of language Faster execution
One‐shot conversion Line‐by‐line conversion
Long development time Shorter development time since less coding
C, C++, C#, Java, VB, COBOL, PASCAL JavaScript, Tcl, Perl, PHP, Ruby, Lua, Shell

1.1 Features of Tcl


  • Low development time
  • Easy integration with Tk
  • Cross‐platform independence can access with Windows, Mac, Unix
  • Inclusion into another programming languages
  • Open‐source
  • Command‐based operation
  • Dynamically redefined and overridden
  • Data types are based on strings
  • Event‐driven interface

A Tcl application requires a Tcl interpreter and a text editor. Nomenclature and version of the editor would be different depending on the operating system. Vi is preferred for UNIX or LINUX systems and notepad for Windows as a .tcl file. A Tcl script development with a text editor must be saved with the extension .tcl, which is known as the source file. The interpreter enables us to execute the Tcl command line by line. The latest version of the Tcl installer for the Windows operating system can be downloaded from http://activestate.com. The latest stable version is tcl8.6.

There is a different mechanism to access the Tcl interpreter

Search ➔ tclsh

Figure 1.1 shows a command‐line interpreter based on the Windows environment.

Figure 1.1 Command‐line interpreter.

Search ➔ wish

Figure 1.2 Wish interpreter.

Wish, i.e., Windowing Shell, is a Tcl interpreter, as presented in Figure 1.2, embedded with Tk; the Tcl command is read from a standard text editor or notepad. The Tcl command can be edited in the console window and wish in a smaller window to display the Tk widget. Alternatively, users can interact via importing the source file into the interpreter. A set of Tcl commands edited with notepad saved with the .tcl extension can be imported into the console.

File ➔ Source ➔ locate the file ➔ open search ➔ tkcon

Figure 1.3 Tkcon interpreter.

The tkcon interface shown in Figure 1.3 is a replacement of the standard console with Tk. It provides a GUI while the Tk commands are used in the program. Users can enter the program using a standard text editor or can import a source file.

File ➔ Load file ➔ Locate the file ➔ Open

1.2 Special Variable


Tcl includes some special variables that present their usage (see Figure 1.4). The following is a list of the special variables [3].

  • tcl_library Sets the location of Tcl library.
  • tcl_version Displays the current version of the interpreter.
  • tcl_patchLevel Displays the current patch level.
  • tcl_interactive Switches between interactive (1) and non‐interactive (0) mode.
  • tcl_precision Displays the number of digits to generate when converting floating‐point values to strings.
  • tcl_rcFileName Provides the user‐specific startup file.
  • tcl_pkgPath Provides a list of directories where packages are installed.
  • Argc Refers to several command‐line arguments.
  • Argv Refers to the list containing the command‐line arguments.
  • argv0 Refers to the filename being interpreted.
  • env (PATH) When Tcl starts, it creates the env array and reads the environment. It displays the array of elements for the environment variable.

Figure 1.4 Tcl special variable.

Tk is the most common extension of Tcl, and enables the creation and manipulation of the interface widgets. Advantages of the GUI design with command‐line arguments are (i) faster development, (ii) a higher level of interface than other standard library toolkits, (iii) interface can be factorized with user application.

The following online platforms prove that an online interpreter does not need to be installed:

1.3 Tcl First Program


The following Tcl script displays a statement at the std. output [4]:

puts “Hello Tcl World”

Each line of the script can be terminated by a newline or semicolon (;). A script can be stopped from execution via commenting by adding a hash (#) at the beginning. Figure 1.5 displays a simple program to display.

Figure 1.5 Tcl simple program.

1.4 Tcl Identifiers


Tcl is a case‐sensitive language. Identifiers are the names used to identify the variable (defined by the user). An identifier can start with an alphabetical letter (A–Z/a–z), underscore (_), or numeric digit (0–9). It avoids characters such as @ and %.

Examples: var., Var, St1, s_1, prog50.

Whitespace in Tcl is known as a blank statement and the interpreter ignores it. Whitespace describes the blank, newline, tab character, or comment. It separates one part of the statement from another.

1.5 Applications of Tcl


There are several reasons a developer may prefer a Tcl scripting language. The following are the most favorable applications for the Tcl...

Erscheint lt. Verlag 29.9.2022
Sprache englisch
Themenwelt Mathematik / Informatik Informatik Programmiersprachen / -werkzeuge
Mathematik / Informatik Informatik Theorie / Studium
Schlagworte Benutzeroberfläche • Computer-Ratgeber • Computer Science • Computing Special Topics • End-User Computing • GUI • Informatik • Programmierung • Programmierung / Benutzeroberflächen • Programmierung / C u. C++ • Programming / C & C++ • Programming / User Interface Design • Spezialthemen Computerratgeber
ISBN-10 1-119-83743-X / 111983743X
ISBN-13 978-1-119-83743-5 / 9781119837435
Haben Sie eine Frage zum Produkt?
EPUBEPUB (Adobe DRM)
Größe: 27,1 MB

Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM

Dateiformat: EPUB (Electronic Publication)
EPUB ist ein offener Standard für eBooks und eignet sich besonders zur Darstellung von Belle­tristik und Sach­büchern. Der Fließ­text wird dynamisch an die Display- und Schrift­größe ange­passt. Auch für mobile Lese­geräte ist EPUB daher gut geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine Adobe-ID und die Software Adobe Digital Editions (kostenlos). Von der Benutzung der OverDrive Media Console raten wir Ihnen ab. Erfahrungsgemäß treten hier gehäuft Probleme mit dem Adobe DRM auf.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine Adobe-ID sowie eine kostenlose App.
Geräteliste und zusätzliche Hinweise

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
Entwicklung von GUIs für verschiedene Betriebssysteme

von Achim Lingott

eBook Download (2023)
Carl Hanser Verlag GmbH & Co. KG
39,99
Das umfassende Handbuch

von Johannes Ernesti; Peter Kaiser

eBook Download (2023)
Rheinwerk Computing (Verlag)
44,90
Mit über 150 Workouts in Java und Python

von Luigi Lo Iacono; Stephan Wiefling; Michael Schneider

eBook Download (2023)
Carl Hanser Verlag GmbH & Co. KG
29,99