Professional Documents
Culture Documents
OOVHDL: Object Oriented VHDL
OOVHDL: Object Oriented VHDL
54
0-8186-8180-2/97 $10.00 0 1997 IEEE
Authorized licensed use limited to: Consortium - Algeria (CERIST). Downloaded on April 21,2021 at 21:05:03 UTC from IEEE Xplore. Restrictions apply.
en tity-declaration ::= Examples
entity identifier is [ new entityname ] - - An entity declaration with operation declarations only:
en tityheader
oRerafon_declaration_list use Work.Reg-Types.all ;
en tity-declarative-part entity Register is
[begin operation Clear ;
en titystatement-part ] operation Read(Va1: out RegAlem) ;
end [ entity] [ entitysimplemame] ; operation Write(Va1: in RegIlem) ;
end entity Register ;
The optional new clause specifies inheritance from another
entity. The entity using the new clause is called base entity - - An entity declaration using the new clause:
and the entity specified in the new clause is called derived
entity. An entity can only have another entity as its base use Work.Reg-Types.all ;
entity. Only single inheritance is supported. entity Program-Counter is new Register
Inheritance applies to the entity header, the entity declara- operation Increment ;
tive part, the entity statement part, and the operation decla- end entity Program-Counter ;
ration list.
Entity Declarative Part
Entity Header The entity declarative part declares items that are common
The entity header defines the ports and generics of the en- to all the design entities whose interfaces are defined by the
tity. The syntax is unchanged but the following inheritance given entity declaration.
rules apply : entity-declarative-part ::=
{ en tity-declarativeitem }
All ports and generics of an entity are inheritable.
New port and generic definitions can be added by the en tity-declarativeitem ::=
derived entity. su bprogramdeclaration
su bprogram-body
o Port and generic definitions cannot be redefined type-declara tion
through inheritance and should be unique. subtype-declara tion
constan t-declaration
Operation Declarations signal-declaration
shared-variable-declaration
Operations are used to specify a public message interface instance-variable-declaration
to an entity. Their formal parameters are signals, similar to file-declaration
ports. alias-declaration
attribute-declaration
operationdeclaration-list ::= attribu tespecifica tion
{ operation-declaration } disconnectionspeci fication
use-clause
operation-declaration ::= group-template-declaration
operationspecification ; group-declaration
operationspecification ::=
operation identifier [ (portlist ) ] The entity declarative part has been extended to allow
for the declaration of instance variables and the following
The following inheritance rules apply to operations: inheritance rules apply:
All entity declarative items are inheritable.
0 All operations of an entity are inheritable.
o New entity declarative items can be defined by the
o New operations can be defined by the derived entity. derived entity.
0 Operations may be redefined by declaring an opera- Subprograms can be redefined by the derived entity
tion having exactly the same name in the derived en- by declaring a subprogram having exactly the same
tity. name.
55
Authorized licensed use limited to: Consortium - Algeria (CERIST). Downloaded on April 21,2021 at 21:05:03 UTC from IEEE Xplore. Restrictions apply.
0 Declarations cannot be overridden by the derived en- Architecture Declarative Part
tity since they are required for the defined operations.
The architecture declarative part declares items that are
available for use within the block defined by the design en-
Example tity.
- - An entity declaration with instance variable architecture-declarative-part ::=
- - declarations also: { block-declarativeitem }
56
Authorized licensed use limited to: Consortium - Algeria (CERIST). Downloaded on April 21,2021 at 21:05:03 UTC from IEEE Xplore. Restrictions apply.
Examples Instance variables may be accessed by more than one oper-
ation or process at a time, and the conflict of this multiple
- - An architecture declaration with instance van'able access is resolved by means of shared variables with a pro-
- - declarations and operation bodies: tect mechanism [31.
57
Authorized licensed use limited to: Consortium - Algeria (CERIST). Downloaded on April 21,2021 at 21:05:03 UTC from IEEE Xplore. Restrictions apply.
The message send statement has been added to the set of begin
sequential statements to specify a message sent to an object. operationstatemen t-part
end operation [ identifier] ;
4.1. Message Send Statements
operation-declarative-part ::=
A message invokes the execution of an operation body in { process-declarativejtem }
the architecture of a specified Entity.
operationstatement-part ::=
messagesend-statemen t ::= { sequentialstatement }
object_name.operationaame
[ ( actual-parameter-list ] ; The execution of an operation body statement consists in
the repetitive execution of its sequence of statements.
Since operation bodies are similar to processes (i.e., con-
The object name specifies the entity instance (i.e., object) current), an entity can execute more than one operation at a
and the operation name specifies the operation body to be time.
invoked. Operations are requested when a message is sent. Messages
When an entity E invokes one of its own operations, i.e. sent to the same entity at the same time are queued in the
sends a message to itself, the keyword self is used in place entity in case they invoke the same operation. When the
of the object name. operation is performed, the next message in the queue is
removed and executed. If there is no message in the queue,
the entity waits for a new message.
Examples
Messages have the same priority level and are queued in a
R 1.Read( Data ) ; first-in-first-out (FIFO) order.
C.1ncrement ;
6. Lexical Elements
5. Concurrent Statements The new keywords that have been added to the lexical ele-
ments of VHDL are the following:
Concurrent statements describe the overall behavior or do, instance, operation, and self.
structure of a design. They execute asynchronously with
respect to each other.
7. Predefined Language Environment
concurren tstatement ::=
blockstatemen t Only one predefined attribute has been added to the prede-
I processstatement fined attributes of VHDL.
I operation-bodysta temen t
I concurrentmessagesendstatement 7.1. Predefined Attributes
I concurren tprocedure-call-statement The ’component attribute has been added to express a
1 concurrentassertionstatemen t broadcasting mechanism. It allows the same message to be
1 concurrentsignal-assignmentstatement broadcast to objects of the same base class. The description
I componentinstantiationstatemen t of this attribute is given bellow:
I generatestatement
entityname’component
Two new concurrent statements have been added to VHDL. Kind: List of entity names
Prefix: An entity name
5.1. Operation Body Statements Result: A list of messages
58
Authorized licensed use limited to: Consortium - Algeria (CERIST). Downloaded on April 21,2021 at 21:05:03 UTC from IEEE Xplore. Restrictions apply.
8. Conclusion
References
59
Authorized licensed use limited to: Consortium - Algeria (CERIST). Downloaded on April 21,2021 at 21:05:03 UTC from IEEE Xplore. Restrictions apply.