9.5 Concurrent signal assignment

...
ENTITY e IS
    ...
BEGIN
    ...
END e ;

...
ARCHITECTURE a OF e IS
    ...
BEGIN
    ...
END a ;

...
CONFIGURATION c
        OF e IS
    ...
    ...
    ...
END

...
PACKAGE pkg IS
    ...
    ...
    ...
END pkg ;

concurrent_signal_assignment_statement::=

[ label : ] [ postponed ]
        conditional_signal_assignment
| [ label : ] [ postponed ]

        selected_signal_assignment

..
PACKAGE BODY pck
        IS
    ...
    ...
    ...
END pck ;

...
b: BLOCK IS
    ...
BEGIN
    ...
END BLOCK b ;

FUNCTION f (...)
    RETURN r IS
    ...
BEGIN
    ...
END f ;

PROCEDURE p (...) IS
    ...
BEGIN
    ...
END p ;

p : PROCESS
    ...
BEGIN
    ...
END PROCESS p ;

9.5.1 Further definitions

conditional_signal_assignment ::=
    target <= options conditional_waveforms ;

selected_signal_assignment ::=
    with expression select
    
target <= options selected_waveforms ;

9.5.2 Additional information

With a conditional signal assignment there is always an equivalent process statement; in general, this is valid for all concurrent assignments.

The equivalent process statement of a concurrent signal assignment statement including the keyword POSTPONED is a postponed process.

If the conditional signal assignment has the form

        target <= options waveform_1 WHEN condition_1 ELSE
                        waveform_2 WHEN condition_2 ELSE
                                       .
                                       .
                                       .
                          waveform_n-1 WHEN condition_n-1 ELSE
                          waveform_n ;

the signal assignment in the corresponding process statement has the form

        IF condition_1 THEN
          target <= wave_transform_1 ;
        ELSIF condition_2 THEN
          target <= wave_transform_2 ;
                           .
                           .
                           .
        ELSIF condition_n-1 THEN
          target <= wave_transform_n-1 ;
        ELSE
          target <= wave_transform_n ;
        END IF ;

If the (conditional) waveform is a simple waveform the signal assignment in the corresponding process

statement has the form

        target <= wave_transform ;

 

The process statement of the wave_transform of a waveform of the form
waveform_element1, waveform_element1, ..., waveform_elementN
has the form
target <= [delay_mechanism] waveform_element1, waveform_element1, ..., waveform_elementN ;

The process statement of the wave_transform of a waveform of the form
unaffected
has the form
null ;

null is here a null statement, not a null transaction!

The waveforms` characteristics and the conditions contained in the signal assignment have to be formulated appropriately so that the IF-statement in the corresponding process statement is a permitted statement.

With a selecting signal assignment there is always an equivalent process statement. If the selecting signal assignment has the form

        WITH expression SELECT
          target <= options waveform_1 WHEN choice_list_1 ,
                            waveform_2 WHEN choice_list_2 ,
                                          .
                                          .
                                          .
                            waveform_n-1 WHEN choice_list_n-1 ,
                            waveform_n WHEN choice_list_n ;

the signal assignment in the corresponding process statement has the form

        CASE expression IS
          WHEN choice_list_1 => target <= wave_transform_1 ;
          WHEN choice_list_2 => target <= wave_transform_2 ;
                                          .
                                          .
                                          .
          WHEN choice_list_n-1 => target <= wave_transform_n-1 ;
          WHEN choice_list_n => target <= wave_transform_n ;
        END CASE ;

For wave_transform look at the previous topic on conditional signal assignment.

The characteristics of the selected expression, of the waveforms and the criteria of selection contained in the signal assignment have to be formulated appropriately so that the CASE statement in the corresponding

process statement is a permitted statement.

If the option GUARDED is contained in the signal assignment it is a so-called controlled assignment. If the target is also controlled the statement part of the corresponding process statement looks as follows:

        IF guard THEN
          signal_transform
        ELSE
          disconnection_statements
        END IF ;

If the target is not controlled the statement part of the corresponding process statement looks as follows:

        IF guard THEN
          signal_transform
        END IF ;

It is also possible that neither signal assignment nor target is controlled. If this is the case the statement part of the corresponding process statement looks as follows:

         signal_transform

It is not permitted to handle a signal assignment as being not controlled while handling the corresponding

target as being controlled!

9.5.3 Examples

a <= b AFTER 5 ns ;

The value of b is assigned to the signal a after 5ns.
In the first case the inertial delay model and in the
second case the transport delay model is used.

lbl : a <= TRANSPORT b AFTER 5 ns ;
c : data_bus <= GUARDED
      reg_output AFTER 3 ns ;

The controlled signal assignment is only carried out
if the corresponding condition in the block declaration
is fulfilled.

a <= '1' AFTER 5 ns WHEN sel = 0
   ELSE
      '0' AFTER 3 ns,
      '1' AFTER 5 ns WHEN sel = 1
      ELSE
      'X' AFTER 2 ns ;

If sel=0 then a is assigned the value 1 after 5ns;
if sel=1 then a is assigned the value 0 after 3ns and
the value 1 after 5ns;
otherwise a is given the value X after 2 ns.

lmux : WITH muxval SELECT
      sig <= TRANSPORT
            "001" AFTER 2 ns WHEN 0 ,
            "110" AFTER 5 ns WHEN 1 ,
            "000" AFTER 5 ns WHEN 2 ,
            "111" AFTER 5 ns WHEN 3 ,
            "XXX" WHEN OTHERS ;

In this value assignment to the signal sig the value of
of muxval is taken into consideration.
If muxval=0 then sig is assigned the value 001 etc.
For this assignment the delay model TRANSPORT
is used irrespective of the value of muxval.

S <= UNAFFECTED
      WHEN input = S' DRIVING_VALUE
      ELSE input AFTER delay ;

S is only driven if the driver value is different the
current value of S ; otherwise nothing happens.