»»»Home «««
»»»TELL «««
»»»Toped «««
»»»Ifaces «««
|
Table of Contents TopEd Layout Language - a C-like code for layout scripting. The initial idea behind TELL was to serve as a macro language to improve the interface and to facilitate the work with Toped. During the design of the layout editor the initial intentions evolved into the idea to create a script able to code the layout. Indeed a good amount of manual layout work can be relatively easily generalized and automated if the user possesses a convenient tool. Besides such a script would produce a layout according to a set of predefined design rules (DRC), thus minimizing human errors and reducing the design checks and the time for back end design operations in general. Having a similar tool the designer can parametrise the layout generation and to make it virtually (or at least partially) independent of the design rules. The idea of course is not new - silicon compilers, parametrised cells etc. - all this sounds quite the same. TELL does not have the ambition to be a silicon compiler. It is rather trying to be the tool, that will bring some benefits in the manual layout process right now. In the same time the language seems to be able to evolve in order to serve as a bridge between the front end and back end design process. Routing algorithms, netlist parsers, logic synthesis, standard cell layout libraries - all of them can benefit from using a similar language.
See the example in including files The TELL preprocessor implements some basic macro functionality. Most of
it corresponds directly to the C preprocessor. All preprocessor commands
are prefixed with Probably the most commonly used command of the preprocessor
File paths are in UNIX format, environment variables are recognized and properly expanded. If a path is not provided, the preprocessor searches the following paths in this order
If the included file is not found the parsing stops. /* The following lines demonstrate the use of preprocessor include command which recognizes environmental variables */ #include "topedmain.tll" #include "$TPD_LOCAL/tll/seed.tll" #include "$COMMON_POOL/opamp.tll" // end of demo code Tell preprocessor implements only object-like macroses - i.e. those that do not take parameters.
Every time the macro identifier appears in the parsed Tell code - it will be substituted with the corresponding list of replacement tokens. If the list of replacement tokens is empty, it will be replaced with empty string. A macro can be defined also on the command line using -D parameters. A macro definition can be removed using Parts of the Tell code can be excluded or alternated from the parsing using the commands below - all of them implementing expected behavior.
Each #define display echo #define single #define singleNspace #ifdef single #define message1 "Single is defined" #else // unknown variable shall not be reported. Parser doesn't see it! syntax = 0; #define message1 "Single is not defined" #endif #ifndef singleNspace // unknown variable shall not be reported. Parser doesn't see it! syntax = 0; #define message2 "singleNspace is not defined" #else #define message2 "singleNspace is defined" #endif display(message1); display(message2); #undef display #undef message1 #undef message2 Pragmas instruct the parser to use or execute implementation dependent features. Here is a list of Tell pragmas
All the keywords that are not describing a data type are listed below. The description is quite brief, because the behavior of the statements is supposed to be familiar. The conditional statement working in the expected manner. Second part - else - is optional. The expression in brackets after if must be of type bool. if (a == 1) {echo("test OK")} // else {echo("test FAIL")}; Forces a return from a function and might be used to transfer a value back to the calling routine. Return outside the function boundaries is illegal. return ((0,0)); // return statement of a function of a type point return; // used in functions of type void only
Traditional pre-conditional loop. The conditional expression must evaluate to true in order to execute the operators block real a = 10; while (a > 0) { echo(a); a = a - 1; }; Traditional post-conditional loop. This is an exception of the C syntax. Cycle loops until the conditional expression is true. real a = 10; repeat { echo(a); a = a - 1; } until (a > 0); |