Net definition
DEFIN(' sig_list ');
Object type Pascal procedure
Status Base code
User level 0
Description
DEFIN is used for defining input signals to both the top level of the
design and inputs to User defined macros. If all the inputs to be defined
cannot be placed in one DEFIN statement then more than one may be used.
The order of signals is significant, and is used by the M (Macro)
statement or the $IOS keyword in the TABLE statement. DEFIN and DEFOUT
statements may be mixed in any order.
Constraints
Top level signals must be declared before the first instance is placed in
the main network. In macro input definitions DEFIN's must appear before
the first instance is placed in the macro. Hierarchical signal names are
not allowed.
Examples
1) DEFIN('xl, x2, x37');
2) defin('one_single_signal_name');
Typical errors
1) defin(xl,x2,x3); {missing quotes}
2) defin(' a b c a'); { 'a' is declared twice }
3) defin('x'); { some Pascal’s need two chars in a string }
See also
DEFOUT, sig_list, DEFIO, MACRO, TABLE.
L2I v0r1 Draft copy Page 1.1
Net definition
DEFOUT(' sig_list'); DEFIO(' sig_list ');
Object type Pascal procedure
Status Base code. (DEFIO from vlrl)
User level 0
Description
DEFOUT is used for defining output signals to both the top level of the
design and inputs to user defined macros. If all the OUTPUTS to be defined
cannot be placed in one DEFOUT statement then more than one may be used.
The order of signals is significant, and is used by the M (Macro)
statement or the $IOS keyword in the TABLE statement. DEFIN and DEFOUT
statements may be mixed in any order.
DEFIO has the same function as DEFOUT except that signals can change IO
direction during the simulation.
Constraints
Top level signals must be declared before the first instance is placed
in the main network. In macro input definitions DEFOUT's must appear
before the first instance is placed in the macro. Hierarchical signal
names are not allowed.
Examples
1) DEFOUT('xl, x2, x37');
2) defout('one_single_signal_name');
Typical errors
1) defout(xl,x2,x3); { missing quotes }
2) defout(' a b c a'); { 'a' is declared twice }
3) defout('x'); { some Pascal’s need two chars in a string I
See also
DEFIN, sig_list, DEFIO, MACRO, TABLE
L2I v0r1 Draft copy Page 1.2
Net definition
DEFINBUS ('bus_name', upper_bound, lower_bound);
DEFOUTBUS('bus_name', upper_bound, lower_bound);
DEFIOBUS ('bus_name', upper_bound, lower_bound);
Object type Pascal procedure
Status from vl
User level 2
Description
Used to define input, output and IO busses in the same way as DEFIN's
are used to define single signals. These procedures define signals in the
form : (index) where the bus_name is defined by the user and the
index is a number between upper-bound and lower-bound. Since all the
signals in the bus are defined in one statement the DEFBUS statement are
an easy way to declare bus related signals. Signals declared in this way
are grouped in the simulator output.
Constants
Lower-bound must be a lower number then upper_bound. bus_name must not
exist as a signal name.
Examples
1) DEFINBUS('a',31,0); {define signals a(31) ... a(0) }
Typical Errors
1) DEFINBUS('busa',0,7); {upper bound lower than lower bound}
2) DEFIOBUS(busa,0,7); {only the name should be in quotes}
See also
DEFIN/OUT/IO
L2I v0r1 Draft copy Page 1.3
Net definition
NETSTART;
Object type : Pascal procedure
Status : Base code
User level : 0
Description
Defines the start of the top level netlist.
Constraints
May not be placed inside a macro definition. No macros may be used after
NETSTART. Only one NETSTART is permitted.
Examples
1) NETSTART;
2) netstart;
Typical errors
1) netstart { missing ; }
2) Error: NETSTART found in macro.
See also
NETEND.
Net definition
NETEND;
Object type : Pascal procedure
Status : Base code
User level : 0
Description
Defines the end of the top level netlist, Only one NETEND is permitted.
Net connectivity checks are instituted by NETEND. Warnings and fatal error
messages concerning illegal net connections are given at this point in the
program.
Constraints
May not be placed inside a macro definition and cannot be used before
NETSTART.
Examples
1) NETEND;
2) netend;
Typical errors
1) netend { missing ; }
2) Error: NETEND found outside netlist.
See also
NETSTART.
L2I v0rl Draft copy Page 1.5
Net definition
INST(' inst_name, model_name, sig_list');
Object type Pascal procedure
Status Base code
User level 0
Description
Makes an instance of a library model in the users netlist. The inst_name
must be unique within the current macro or netlist definition. The model
name must exist within the current or base library. The order of the
sig_list is significant and is specified with the library model
documentation. The procedure name can be shortened to 'I'. Understand the
difference between INST and MACRO. INST can only be used to instantiate
library models.
Constraints
Cannot be used outside macro or netlist definitions.
Examples
1) INST('il, nand3, xl,x3,x2, out');
2) I('inst23, dff, dl, clk, ql, dl');
Typical errors
1) I('ml, nand2, xl,x3 '); {wrong number of arguments}
2) inst('m23, inverter, xl,x5 '); {inverter not in library}
3) i('m23, nand2, xl,x3,x2'); {m23 not unique}
See also
MACRO, model_name, inst_name
L2I v0rl Draft copy Page 1.6
Net definition
DEFMACRO(' macro_name ');
Object type : Pascal procedure
Status : Base code
User level :
Description
Starts the definition of a user defined macro cell.
Constraints
Must not be contained in another macro definition or after NETSTART. The
user defined name " macro_name " must be unique.
Examples
1) DEFMACRO('counter');
Typical errors
See Constrains.
See also
ENDMACRO, macro_name
L2I v0r1 Draft copy
Net definition
ENDMACRO;
Object type : Pascal procedure
Status : Base code
User level :
Description
Used to end the definition of a user macro.
Constraints
May not be used after NETSTART. May not be used without corresponding
DEFMACRO.
Examples
1) ENDMACRO;
2) endmacro;
Typical errors
See Constraints.
See also
DEFMACRO, MACRO
L2I v0rl Draft copy Page 1.8
Net definition
MACRO(' inst_name, macro_name, sig_list ');
Object type Pascal procedure
Status Base code
User level
Description
Used to instantiate user defined macros in the main netlist or in other
user defined macros. Macros must be declared before being used, The order
of the sig_list is significant. These formal parameters are matched in
order with the signals declared in the DEFIN, DEFOUT, and DEFIO
statements included in the macro definition. Note that in a hierarchical
netlist signal and instance name prescripts are added in order to make
signal and instance names unique. For example the signal name "a" inside a
macro instantiation name "ml" would be called "ml.a" by the database.
Generally the user is unaware of this process. Hierarchical names are
output by the XREF statement and can be included in the TABLE statement.
"MACRO" may be shortened to "M" in the netlist.
Constraints
The inst_name must be unique within this macro or top level netlist
definition. The macro-name must have been defined with DEFMACRO. A MACRO
statement may not appear after NETEND.
Examples
1) MACRO('ml, dffx, d, clear, q, d');
2) M('m2, count4, clock, clearl, a, b, c, d');
Typical errors
1) Wrong number of parameters.
2) Macro name not found.
3) Instance name not unique.
4) Used to make an instance of a library model instead of INST.
See also
DEFMACRO, XREF, macro-name, ENDMACRO
L2I v0r1 Draft copy Page 1. 9
Net definition
XREF;
Object type Pascal procedure
Status Base code
User level 2
Description
This optional command is used to print a cross reference listing of the
top level netlist. All signals connected to each instance and all
instances connected to each signal are listed. IO type of signals is also
listed. Names are listed in their fully qualified form and this may help
locate signals nested in the hierarchy for tracing using the TABLE
statement.
Constraints
Normally used after NETEND.
Examples
1) XREF;
Typical errors
A warning or error MSG is written if used before NETEND;
See also
L2I v0rl Draft copy Page 1.10
Net definition
MODEL_OUT;
Object type Pascal procedure
Status Sun v0 only (Unsupported)
User level 7
Description
Used to generate a flattened netlist in Lattice model format. This
statement only generates the body of a signal part definition for v0
however IO's and top level instantiation are not difficult to edit in by
hand. vl will have a separate program to generate a proper hierarchical
model output. A file called L2I.mod is generated by this procedure. An
interface include file and SED script is needed to make the output compile
with model. MODEL_OUT is an example of the type of extension that the User
can implement and in the sun release this is included in the userprocs
file.
Constraints
May only be used after NETEND.
Example
MODEL_OUT;
L2I v0rl Draft copy Page 1.11
Page created by: rh@rh1.org
Changes last made on: 02/08/06