Entity Layout STATES
Synopsis
This declaration provides a mechanism for associating a gif image to a particular state of an entity.
- object_id str - The name of the entity that is associated with the parameter.
This can be the type name of an entity defined in the entity library,
in which case the parameter will be positioned on all the entities of that type. It can also
be the the instance name of the required entity. The instance name should be the complete hierarchical name.
When specifying a level name from the hierarchy, the instance name, not the type name,
should be used. Each level in the hierarchy should be seperated by a
'.'. Therefore the syntax for a complete hierarchical name is :
top_level_instance_name.next_level_name. ... .last_level_name.
The param information given to an instance overrides the param information of the library component.
- state_namei str - One of the states defined the ENTITY declaration.
- gif_imagei str - The gif image to be associated with this state. This image will first
be searched in the project/bitmaps directory, then in the HASE_directory/bitmaps. If not
found, the HASE_directory/bitmaps/default_ent.gif image will be used. If no state is defined
or no image is associated with a state, the name of the entity (not of the instance) is used to find
the gif image.
Example
If the entity sdb_reg is defined with the statement:
STATES (SDB_REG, SDB_REG_BUSY)
Then the elf file may contain the declaration:
sdb_reg : STATES SDB_REG:operand SDB_REG_BUSY:operand_busy
Doing so, each instance of the sdb_reg entity will use images operand.gif
and operand_busy.gif depending on their states.
See /home/hase/Development/tomasulo/tmp for a complete example.
Note: This statement has to be put in place of the previous statement:
sdb_reg : PARAM cur_state MODE ENT_ICON POSITION (0,0)
The name of the state parameters is now my_state, in case of a
tranformation from an existing project, you have to get rid of all cur_state
references both in .edl file and in .hase files.
Frederic Mallet
Last modified: Mon Jul 29 15:50:38 BST 2002