Entity Declaration
|
An entity declaration defines input to a model, outputs supported by the model, and generic parameters used by the different implementations of the model. |
||
|
ENTITY entity_name IS GENERIC (generic_list); -- optional generic list PORT (port_list); -- input/output signal ports END [ENTITY] name; |
||
|
generic_list |
Specifies static information to be communicated to a model from its environment for all architectures. These include timing information (setup, hold, delay times), ambient information (temperature), and other parameters. |
|
|
port_list |
Specifies dynamic information to be communicated between a model and its environment for all architectures. A port can be represented by a quantity, terminal, or signal. The mode of a port defines the directions of the signals on that port, and is one of IN, OUT, INOUT, BUFFER, or LINKAGE. |
|
|
Port Modes |
An IN port can be read but not updated within the module. An IN port cannot appear on the left side of a signal assignment. An OUT port can be updated but not read within the module. An OUT port cannot appear on the right side of a signal assignment. An INOUT port is bidirectional and can be both read and updated, with multiple update sources possible. Signal objects can use the mode IN, OUT, and INOUT; quantity objects can use IN and OUT whereas terminals have no direction mode. Ports of type BUFFER and LINKAGE are transformed to INOUT types in Twin Builder. |
|
|
ENTITY spring_tr IS GENERIC(s0: DISPLACEMENT:= 0.0); -- list of generic parameters PORT(QUANTITY c: IN STIFFNESS:= 100.0; -- list of quantity ports TERMINAL tr1, tr2 : TRANSLATIONAL_V; -- list of terminal ports SIGNAL ctrl: IN BIT); -- list of signal ports END ENTITY spring_tr; |
||