ENTITY - Architecture Entity Description
Syntax
ENTITY entity_type_name library_name (
EXTENDS ( abstract_type )
DESCRIPTION ("description")
STATES (state1, ...)
PARAMS
( modifier reference_parameter, ... )
PORTS
( port, ... )
)
Synopsis
The ENTITY construct enables the creation of a basic type of the architecture.
- entity_type_name str - The name of the type of entity to be created.
This is used to create instances of the component in the architecture, and to identify
the correct simulation code and icon.
- library_name str (optional) - The name of library from which the
behaviour is coming from. If the library_name is not specified, then the user must
provide a .hase description of the behaviour.
See library components for a description of components
which are currently in the HASE library.
- abstract_type str (optional) - The name of the
abstract entity this entity is intended to inherit from.
The abstract entity must have previously been defined in the
entity library.
- description str - A description of an aspect of the entity.
- statei str (optional) - This is an explicit declaration of the entity's states.
It provides the entity with a variable called my_state which can take values
declared in the STATES statement. This declaration was previously performed by defining an
external enumerate parameter. Consequently, the entity was dependent on the existence of the external ENUM
type, the reusability was reduced. In addition, doing so, gif images can be associated to
each state in the ELF declaration making the ENT_ICON
mode useless and making redundant the gif information in edl file.
- modifier read_only or static (optional) -
There are two possible optional modifiers. The static modifier must be
used when you want the parameter to be shared by every instances of this
entity. The read_only modifier is used when you declare a parameter
which must not be modified by the user via the gui, the value can be updated
only by the instance of the entity. In the example below, the hit
parameter is declared read_only. The user cannot decide what the number
of hits is.
- reference_parameter - This section of the entity definition describes the
parameters that are associated with the entity. For example, a memory entity may have
an array associated with it to hold the contents, and integer to hold the access time of
the component. Careful selection of the parameters could result in reusable components.
For example a cache entity might have parameters for its size, associativity and
access time. See the reference section.
- port - This section of the entity definition describes the ports
of the entity.
The ports are the entities means of communicating with the other entities. Ports of different
entities are connected together to form a communication channel.
Example
ENTITY Cache ( DESCRIPTION ( "A generic parameterized cache" )
PARAMS ( RARRAY ( Memory, cache_contents )
RINT ( access_time, 2 )
RENUM ( Associativity, cache_assoc, 0 )
read_only RINT ( hit, 0 )
)
PORTS ( PORT ( to_cpu, LinkData, SOURCE )
PORT ( from_cpu, LinkData, DESTINATION )
PORT ( to_main_mem, LinkData, SOURCE )
PORT ( from_main_mem, LinkData, DESTINATION )
)
)
Frederic Mallet
Last modified: Thu Sep 5 11:41:44 BST 2002