LDMCC(1ICD)

NAME
ldmcc - the LDMC compiler

SYNOPSIS
ldmcc [options] file ...

file
    Name of input file.

OPTIONS
Options can be all cc(1) and ld(1) options. These options are passed on to the C compiler, see cc(1). Options for the LDMC compiler all begin with -L:

-Ld Do not search default library.

-Llxxx
    This option is an abbreviation for the library name "ICDPATH/lib/libxxx.a".

-Lp Run only the LDMC preprocessor on the named ".ldmc" files, and leave the result on ".c" files.

-Lr Do not remove the ".c" files that are created from the ".ldmc" files.

-Lv Verbose mode.

DESCRIPTION
Ldmc is the IC layout language LDM embedded in the C programming language. A preprocessor scans the input files whose names end in ".ldmc" and replaces all LDM statements it encounters with C function calls. The name of the archive containing the object code for these functions, the resulting ".c" files and all other input files are passed on to the ordinary Unix C compiler. Moreover, the object code of some functions making available a so called Silicon Assembler are also loaded automatically from the previously mentioned archive. The operators of the Silicon Assembler are implemented as C routines and are described in section 5 of the ICD manual. An introduction to these functions can be found in ldmcintro(5ICD). When the compiled program is run, it produces an ordinary LDM file. An LDM statement can begin anywhere in the C text of the ".ldmc" files where a C statement could have been begun, and ends in a semicolon or a newline. An LDM statement can be continued on the next line by escaping the newline character with a backslash character. The mechanism of the preprocessor that substitutes every LDM statement by a call for the corresponding C routine is triggered with each occurrence of one of the LDM keywords 'ms', 'mc', 'me', 'box', or 'term' in the input, or with a colon (:) as a first non-blank on the line (strings and C comments are passed unchanged). Therefore, and also because these keywords are the names of the corresponding C functions, the user (LDMC programmer) must not use them as an identifier. He must also avoid names beginning in 'll', since the external names of the LDMC functions do so. An LDM statement in an LDMC program can contain variables, function calls or expressions at all places where normally a layer code, a number or a name is expected. Fields in an embedded LDM statement are separated by one or more blanks (spaces or tabs) as in standard LDM, or are bracketed. Strings in the embedded LDM statements, i.e. model-names, are unquoted, this is done to make converting an LDM description to an LDMC description easier.

AUTHOR
N. van der Meijs

FILES
file.ldmc	Input file.
file.c	Input file, preprocessor
	output file.
/bin/cc	Unix C compiler.
ICDPATH/lib/ldmcpp	Ldmcc preprocessor.
ICDPATH/lib/include/stdldmc.h	Declarations for the LDMC
	functions.
ICDPATH/lib/libldmc.a	Archive of the object files
	of the LDMC functions.

SEE ALSO
N. van der Meijs, "LDMC User's Manual", Delft University of Technology, Dep. of Electrical Engineering, Network Theory Section.
cc(1), ld(1), ldmcpp(1ICD), ldmcintro(5ICD).

DIAGNOSTICS
The preprocessor checks for syntax errors in the LDMC statements and reports them. Semantic errors, for example negative repeat parameters or references to undefined models, are extensively checked and reported at runtime. In fact, the user can be sure that the LDM output is syntactically and semantically correct when no errors are reported while running the program. All messages are intended to be self-explanatory.