MESH2D, MESH3D, MESH4D, ... - Automatic generation of arrays of entities.
Syntax
MESHdimD name (
ENTITY_TYPE ( entity_type )
SIZE1( size1 ) SIZE2 ( size2 ) ...
NO_LINKS( 1 | 2 )
WRAP( 0 | 1 )
DESCRIPTION( "description" )
PARAMS( ref_parameters, ... )
)
Synopsis
This is the same kind of constructs than Mesh1D but with more than one dimension.
- dim int - The dimension of the mesh.
- name str - The name of the array to be created.
- entity_type str - The type name of the entity to be used to create the array.
The entity must have previously been defined in the entity library.
- sizeX int - The number of entities in the Xth dimension.
- no_links 1 or 2 - This is indicates whether two links or
one should be used to connect together the entities. If one link is required,
the entity must have at least dim SOURCE ports and dim DESTINATION ports. If two links
are required then the entity to be used should have at least dim*2 SOURCE ports and
dim*2 DESTINATION ports.
- wrap 0 or 1 - This is used to indicate whether the two end
entities of each dimension should be joined together. A 1 indicates that they should,
and a 0 that they shouldn't. If this component is omitted then it is assumed to be 0.
- description str - A description of an aspect of the array entity created.
- ref_parameters - This section of the dim-dimensional array entity
definition describes the parameters that are associated with it.
See reference parameters section.
Port names and links:
In order to select which port of an entity will be connected to which port of which neighbour entity, the following
policy is applied:
The ith SOURCE port of an entity will be connected to the ith DESTINATION port of the closest following entity through
the ith dimension.
When no_links=2, the (dim+i)th SOURCE port of an entity will be connected to the (dim+i)th DESTINATION port of the
closest preceding entity through the ith dimension.
Example about links:
In the Mesh2D example below.
The 1st SOURCE port (to_right) is connected to the 1st DESTINATION port (from_left)
of the closest following entity through the 1st dimension (x). As no_links = 2, the (dim+1 = 3)rd SOURCE port
(to_left) is connected to the 3rd DESTINATION port (from_right) of the closest preceding entity through
the 1st dimension.
The 2nd SOURCE port (to_bottom) is connected to the 2nd DESTINATION port (from_top)
of the closest following entity through the 2nd dimension (y). As no_links = 2, the (dim+2 = 4)th SOURCE port
(to_top) is connected to the 4th DESTINATION port (from_bottom) of the closest preceding entity through
the 2nd dimension.
ELF Description
The XSPACING, YSPACING, ZSPACING information used to be defined in the edl description. This is no longer
supported. This optional information may be provided with the position of the entity in the
EL description.
Example with Mesh2D
Naming entities
All generated entities in this example are named :
_0_0_ _1_0_ _2_0_
_0_1_ _1_1_ _2_1_
_0_2_ _1_2_ _2_2_
_0_3_ _1_3_ _2_3_
The first number is the coordinate in the first dimension, the second is the
the coordinate is the second dimension, ...
With this EDL description :
ENTITYLIB (
ENTITY sender (
DESCRIPTION ("sender")
PARAMS ( )
PORTS (
PORT ( to_right, t_readLink, SOURCE)
PORT ( to_bottom, t_readLink, SOURCE)
PORT ( to_left, t_readLink, SOURCE)
PORT ( to_top, t_readLink, SOURCE)
PORT ( from_left, t_readLink, DESTINATION)
PORT ( from_top, t_readLink, DESTINATION)
PORT ( from_right, t_readLink, DESTINATION)
PORT ( from_bottom, t_readLink, DESTINATION)
)
)
MESH2D six (
ENTITY_TYPE (sender)
SIZE1 (3)
SIZE2 (4)
NO_LINKS(2)
WRAP(0)
DESCRIPTION("2-dimensional array of sender entities")
PARAMS()
)
)
STRUCTURE(
-- List of entity instances in top-level model
AENTITY sender SEND ( DESCRIPTION("single entity") )
AENTITY six SIX ( DESCRIPTION("first mesh2d entity") )
AENTITY six SIX2 ( DESCRIPTION("second mesh2d entity"))
)
and this ELF code:
SIX : position (10,10) 80 80
SIX2 : position (300,10) 100 60
SEND : position (500,300)
one will obtain the following result:
Example with Mesh4D
With this EDL description :
ENTITYLIB (
ENTITY sender4 (
DESCRIPTION ("sender through 4 dimensions")
PARAMS ( )
PORTS (
PORT ( to_first, t_readLink, SOURCE)
PORT ( to_second, t_readLink, SOURCE)
PORT ( to_third, t_readLink, SOURCE)
PORT ( to_fourth, t_readLink, SOURCE)
PORT ( back_to_first, t_readLink, SOURCE)
PORT ( back_to_second, t_readLink, SOURCE)
PORT ( back_to_third, t_readLink, SOURCE)
PORT ( back_to_fourth, t_readLink, SOURCE)
PORT ( from_first, t_readLink, DESTINATION)
PORT ( from_second, t_readLink, DESTINATION)
PORT ( from_third, t_readLink, DESTINATION)
PORT ( from_fourth, t_readLink, DESTINATION)
PORT ( back_from_first, t_readLink, DESTINATION)
PORT ( back_from_second, t_readLink, DESTINATION)
PORT ( back_from_third, t_readLink, DESTINATION)
PORT ( back_from_fourth, t_readLink, DESTINATION)
)
)
MESH2D four (
ENTITY_TYPE (sender4)
SIZE1 (4)
SIZE2 (3)
SIZE3 (2)
SIZE4 (2)
NO_LINKS(2)
WRAP(0)
DESCRIPTION("see what happens with Mesh4D")
PARAMS()
)
)
STRUCTURE(
-- List of entity instances in top-level model
AENTITY sender4 SEND ( DESCRIPTION("single entity") )
AENTITY four FOUR ( DESCRIPTION("first mesh4d entity") )
)
and this ELF code:
FOUR : position (10,10) 140 140 70
SEND : position (650,400)
one will obtain the following result:
Frederic Mallet
Last modified: Tue Nov 20 15:32:52 GMT 2001