SYNC library This library contains some entities to deal with synchronisation issues.
See also ENTITY and ABSTRACT declarations.
Clock Pll Clocked Biclocked
More detailed explanation:
To debug: When using these entities, HASE will automatically link the project against the libsync.a library file. To get the same behaviour with additional debug information, the Makefile can manually be modified to link against the libsyncd.a library file.
Clock - 11/01/2002
EDL declaration of the Clock Entity
ENTITY Clock sync ()
The Clock entity accepts registration from any entity during the startup phase. Then it sends events to each registered entity at regular simulation_time intervals.
Parameters:
float period - period of the clock, expressed in the simulation time unit.
read_only int cycle - number of ticks which have actually been sent to the registered entities. It is just for information, there is no point modifying this parameter (read_only).
Behaviour:
The Clock entity operates in two phases:
  1. Send a tick signal to any registered entity. The tick signal contains an integer value which represents the tick number.
  2. Wait for completion signals from any of the registered entities. If the period time is reached and some entities have not sent the completion signal, then an error message is printed to inform the user that the Clock is to slow (Clock.period is too small).
    An integer value should be attached to the completion signal. If this value is negative, then the clock stops its behaviour assuming an error has occurred. Otherwise, the cycle starts again to phase1.

Pll - 11/01/2002
EDL declaration of the Pll Entity
ENTITY Pll sync ()
The Pll has the same behaviour as the Clock entity but in addition it can also registered to a Clock (or to another Pll).
Parameters:
int ratio - ratio by which the period of the incoming clock must be divided.
String clockName - As a Clocked entity, a Pll can select the Clock (or any other entity inheriting from the Clock class : e.g. Pll) with which it wants to register.
read_only int mainCycle - number of ticks which have actually been sent by the Clock entity with which the Pll has registered.
read_only int pllCycle - number of ticks which have actually been sent to the registered entities.
Behaviour:
That is the same behaviour as for the Clock entity. But this behaviour is only played when a tick signal is received from the entity with which the Pll has registered.

Clocked - 27/06/2002
EDL declaration of the Clocked Entity
ABSTRACT Clocked sync ()
Defines the basic behaviour of a 1-phase synchronous entity.
Parameters:
String clockName - name of entity of type Clock to register with. It can be the name of any instance of the Clock entity or any subclass of the Clock entity (e.g. Pll).
Behaviour:
execute the pre service (defined in the section $pre of the .hase file
for any signal coming from the clockName:Clock do
execute the tick service.
send a completion signal to the clockName:Clock.

The value sent with the completion signal is 1 as a default.
If the stopSimulation() method has been called, then the value is 0.
If the stopSimulation(int i) method has been called then the value is i. When i is negative this means that an error has occurred and the entity want the simulation to be stopped.
DebugMode:
The Clocked entity has a debug mode in which a statement is printed at the begin and the end of the tick service. Use the bool debug; attribute to set and reset the debug mode.

Biclocked - 27/06/2002
EDL declaration of the Biclocked Entity
ABSTRACT Biclocked sync ( )
Defines the basic behaviour of a 2-phase synchronous entity.
Parameters:
String clockName - name of entity of type Clock to register with. It can be the name of any instance of the Clock entity or any subclass of the Clock entity (e.g. Pll).
Behaviour:
The actual implementation of Biclocked inherits from Clocked and redefines the tick(int no) service.
When no is even, the service phase0(int no) is called with the value no/2.
When no is off, the service phase1(int no) is called with the value no/2.
Debug mode:
The Biclocked entity has also a debug mode in which a statement is printed at the begin and the end of each phase0/phase1 service. Use the bool debug; attribute to set and reset the debug mode.
Warning: Only one service (either phase0 or phase1) is executed for each signal coming from the Clock entity. That means that the overall period of a Biclocked entity is twice the period of the related Clock.
PROJECT(
PREAMBLE(
NAME "project_name"
DIRECTORY "working_directory"
AUTHOR "project_author"
VERSION ver
DESCRIPTION "project_description"
COMPILER "compiler_name"
LINK "linker_name"
LIBRARY "library_options"
EXTERN lib1, ...
)
PARAMLIB(parameter, ...)
GLOBALS(reference_parameter, ...)
ENTITYLIB( entity_definition | higher_entity_definition | mesh_entity | abstract_entity, ...)
STRUCTURE(architecture_entity | communication_channel , ... )
)


Home : Research : Groups : Hase : Manuals : Edl 

Please contact our webadmin with any comments or changes.
Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh.