Re: SDL-News: Channel substructure from [KEMoss6#aol.com]


Subject: Re: SDL-News: Channel substructure from [KEMoss6#aol.com]
From: Rick Reed TSE (rickreed#tseng.co.uk)
Date: Tue Nov 05 2002 - 13:00:05 GMT


Become an SDL Forum Society member <http://www.sdl-forum.org/Society/members.htm>
The originator of this message is responsible for its content.
-----From Rick Reed TSE <rickreed#tseng.co.uk> to sdlnews -----

> From: KEMoss6#aol.com
> Date: Sat, 2 Nov 2002 13:04:58 EST
> Subject: Channel substructure
>
> I would like to know how to send a signal to three separate blocks. I feel
> that this has something to do with channel partitioning but I'm having a
> hard
> time understanding how this is done and what the benefits are. I have one of
> the recommended text books. Please can someone advise me.

It is not clear from the question if you mean that there are three block
instances with different names, or if there is a a replicated block with
three instances.

Assume the signal to be sent is named s and the data expression conveyed by
the signal is e.

SDL does not (currently) have a mechanism where one instance of a signal can
be received by more than one block. Instead it is required to send three
signal instances, one to each receiving block. This can be done in three
separate outputs, or combined into one output mentioning the signal s three
times - once for each instance to be sent.

In the case of three block instances with different names, there would have
to be channels with different name for each named block instance and the
solution is simple: just use the channel name that communicates with the
relevant block. If we assume the channels are c1, c2 and c3 leading to
blocks b1, b2 and b2, the body of the output (symbol or statement) would be

   s(e) VIA c1, s(e) VIA c2, s(e) VIA c3

in SDL-92 this can also be expressed as

   s(e) VIA ALL c1, c2, c3

though in this case the expression e is evaluated only once. NOTE: in
SDL-2000 the VIA ALL syntax is not supported and the data expression would
have to be assigned to a temporary variable to prevent re-evaluation for
each signal instance.

As this first case is fairly obvious, it is more likely that the question
concerns sending to three instances of a replicated block.

If there is one channel that conveys the signal to a replicated block, each
output needs to be constrained to send the signal to a specific pid using
TO clauses:

  s(e) TO pex1, s(e) TO pex2, s(e) TO pex3

where pex1, pex2 and pex3 are pid expressions. It is quite likely that these
will be based on storing the pid value obtained from the block to be
addressed, either when the system is initialised or when a signal is
received from the agent to be addressed in the block.

For example, assume that each block corresponds to a circuit number in the
range 1 to 3, and an array p for storing the Pid values against circuit
numbers. In SDL-92

NEWTYPE Circuit_number
  INHERITS Integer
  OPERATORS ALL
  CONSTANTS 1:3
ENDNEWTYPE Circuit_number;

NEWTYPE Cct_pid
  Array(Circuit_number,PId)
ENDNEWTYPE;

DCL p Cct_pid;

On initialisation of the system each block could send a special signal to
the process, and on receiving the signal the p values could be set by:

DCL i Natural :=3;

  p[i]:= SENDER,
  i:= i-1;

It is suggested that this is only done in an initialisation state with all
other signals saved, and when i=0 a transition is then made to another state
(for example idle, or processing other initialisation signals).

To send to each block the body of the output would be:

    s(e) TO p(1), s(e) TO p(2), s(e) TO p(3)

--
Rick Reed - rickreed#tseng.co.uk
Tel:+44 15394 88462 Mob.:+44 7970 50 96 50

--End text from Rick Reed TSE <rickreed#tseng.co.uk> to sdlnews --- For extra SDL Forum Society benefits join at <http://www.sdl-forum.org/Society/members.htm>



This archive was generated by hypermail 2a23 : Thu May 09 2013 - 16:05:49 GMT