|Baumeister Mediasoft Engineering|
The Bartels User Language Interpreter is integrated to the Schematic Editor, the Layout Editor, the Autorouter, the CAM Processor, the CAM View module and the Chip Editor of the Bartels AutoEngineer. I.e., the Bartels User Language Interpreter can be used for calling Bartels User Language programs from each of these BAE modules.
3.3.1 Mode of Operation
The User Language Interpreter is activated by calling a User Language program from one of the valid interpreter environments. Any User Language program call is processed by applying the subsequently described sequence of operations.
Program Load, Dynamic Link
When calling a
User Language program, the
User Language Interpreter first of all must load the required
User Language machine program with the specified program name from the
Each User Language program can contain dynamic link requests, i.e. requests on binding User Language library machine code to program machine code at runtime. Dynamic linking is automatically applied during program load. Each dynamic link library (DLL) must be available, and the definitions (variables, functions, function parameters) provided with each DLL machine code must match its definitions at compile time (otherwise the Interpreter might try to access non-existent or wrong library objects, which would result in undefined behavior or even system crash with design data loss). The built-in linker of the User Language Interpreter checks on dynamic link library compatibility and refuses to run the program when encountering any inconveniences (error message ). In case of incompatible DLLs, the User Language program must be recompiled.
After loading (and dynamically linking) the User Language machine program, the User Language Interpreter starts executing the program. Program execution can be understood to be the simulation of the User Language machine architecture by processing the instructions of the machine program. Program execution starts with the first machine program instruction and is completed when the program counter refers to a non-existent machine program instruction.
After executing the machine program a program termination must be applied to release the main memory allocated during program execution (Program Cleanup), and to remove the machine program from main memory (Program Unload).
3.3.2 Program Call
When calling a User Language program, the name of the program to be executed must be specified. This program name specification can be accomplished either explicitly or implicitly according to one of the subsequently described methods.
The User Language program calls. The function activates a dialog with a program name prompt and a button for interactive User Language program selection:function from the menu is used for explicit
One method of implicit User Language program call is provided by pressing special keys of the keyboard whilst working in the BAE function menu, i.e., this type of implicit User Language program call is possible at any time unless another interactive keyboard input currently is awaited by the system. The specification of the program name is accomplished implicitly by pressing a special key. Table 3-2 contains the list of key bindings provided with the User Language interpreter environments. Programs named bae_* have higher priority than those with module-specific names. When pressing one of the keys listed in table 3-2, the User Language program with the corresponding name is automatically started (if it is available).
Event-driven Program Call
The User Language Interpreter environments are featuring event-driven User Language program calls, where User Language programs with predefined names are automatically started at certain events and/or operations such as after BAE module start, after loading and/or before saving a design element, when changing the zoom factor or when selecting a toolbar item. Table 3-3 lists the assignment of predefined User Language program names to corresponding interpreter environment events and/or operations. Programs named bae_* have higher priority than those with module-specific names. The BAE module start User Language program call method is most useful for automatic system parameter setup as well as for key programming and menu assignments (see also below). The element save and load program call methods can be used to save and restore element-specific parameters such as the zoom area, color setup, etc.
Key Programming and Menu Assignments
Bartels User Language provides system functions for performing key programming and defining menu assignments. It is possible to define key bindings such as key m for activating the mirron User Language program or key U for activating the BAE menu function. New or existing menus and/or menu entries can be (re-)configured to support special User Language program and/or BAE menu function calls. These features provide a powerful tool for configuring the menus of the AutoEngineer modules with integrated User Language Interpreter. It is a good idea to utilize the User Language startup programs for performing automatic key binding and menu setup. For an example on how to provide key bindings and menu assignments see the uifsetup User Language program distributed with the BAE software; this program is indirectly called from the startup programs listed in table 3-3. Even dynamic changes to the AutoEngineer user interface can be supported with special User Language programs for performing online key and menu programming. See the keyprog User Language program for implementations of online key programming facilities.
Menu Function Key Bindings
The keyprog key programming utility available through key 5 can be used in BAE pulldown menu interfaces for assigning BAE menu functions to keys by chosing and , double-clicking a key, clicking the button in the program menu and selecting the desired BAE menu function.
Macro Command Interpreter
A macro command interpreter is built into the
ulsystem User Language system function, the
With macro specifications, it is possible to assign submenu functions such as
Customized Parameter Settings and Menu Configurations
Customized parameter settings, key definitions and menu assignments can be stored to the
BAE User Language programs are designed to evaluate relevant definitions from
3.3.3 Error Handling
User Language Interpreter errors might occur whilst executing a User Language program call. These errors are reported to the interpreter environment, and a corresponding error message is displayed in the status line of the interpreter environment. The following listings contain all error message definitions of the User Language Interpreter.
Fatal Internal Errors
The following internal User Language Interpreter errors either refer to memory management problems or indicate User Language Interpreter implementation gaps; these errors are fatal, i.e., they force an abortion of the current interpreter environment:
ERROR : Out of memory! ERROR : Unspecified User Language interpreter error! ERROR : INTERNAL ERROR -- PLEASE REPORT!
Program Loader Errors
The following User Language Interpreter errors refer to program load failures or compatibility problems:
ERROR : Program 'n' already loaded (recursive call)! ERROR : Program 'n' not found! ERROR : Incompatible User Language program version! ERROR : Incompatible index/function reference(s)!
Program Runtime Errors
User Language Interpreter errors refer to problems whilst executing a
User Language program, i.e., they might occur at program runtime; these error messages include a program counter
(PCl) ERROR : Stack underflow (program structure damaged)! (PCl) ERROR : Stack overflow! (PCl) ERROR : Division by zero is attempted! (PCl) ERROR : Function call error! (PCl) ERROR : System function not available here! (PCl) ERROR : System function not implemented! (PCl) ERROR : User function not found! (PCl) ERROR : Referenced function is of wrong type! (PCl) ERROR : Invalid parameter for referenced function! (PCl) ERROR : Memory protection fault on array access! (PCl) ERROR : Array index out of range! (PCl) ERROR : File access error! (PCl) ERROR : File read error! (PCl) ERROR : File write error!
Database Access Errors
The following User Language Interpreter errors refer to problems accessing the Bartels AutoEngineer design database (DDB); such errors might indicate an erroneous Bartels AutoEngineer software installation, if they occur whilst loading a User Language program; a database access error occurring whilst program runtime usually is caused by an implementation error in the executed User Language program:
ERROR : Cannot create database file 'n'! ERROR : Read/write error whilst accessing file 'n'! ERROR : Too many open files! ERROR : File 'n' is not a database/DDB file! ERROR : File structure is damaged in file 'n'! ERROR : File structure is erroneous in file 'n'! ERROR : Function not available for old format! ERROR : Database limit exceeded! ERROR : File 'n' is not compatible with program version! ERROR : Element 'n' not found! ERROR : Element 'n' exists already! ERROR : File 'n' not found! ERROR : Record end reached! ERROR : Unspecified database error!
Interpreter • © 1985-2023 Oliver Bartels F+E • Updated: 04 April 2011, 11:03 [UTC]
|Baumeister Mediasoft Engineering, Clontarf, Dublin 3, D03 HA22, Ireland
© 2023 Manfred Baumeister