Basic Blocks

Syntax for operator body definition in diagram notation.

Conventions

The diagram parts are presented by their notation in Swan.

When an element is expected in its textual syntax in a diagram, it is noted with conventions described in Conventions.

Blocks

A block consumes flows (inputs) and/or produces flows (outputs). These flows are carried by wires connected to other blocks through ports. The ports are pins or buses.

A block is either:

  • an expression block
    produces a flow

    expr is in textual syntax (see Expression)

    includes the case of a single identifier: input, local variable, constant
  • a definition block:
    consumes a flow and defines a local variable or an output
  • an operator instance block
    • predefined from the catalog
    • user defined
  • a group block : to group, ungroup, reorder wires

Wires

A wire in a block diagram has a source and one or several targets. Thus, a wire is composed of a source port reference and several target port references.

  • a source port reference is either
    a source pin
    or a source bus with possibly a group_adaptation
  • a target port reference is either
    a target pin
    or a target bus with possibly a group_adaptation