- Muchas notas - Fran Acién

20201015 - VHDL 3 - Operador terniario Conditional assignment

Some conditionals:

Conditional assignment

  • good match for a circuit a circuit that needs to give preferential treatment for certain conditions or to prioritize the operations
  • E.g., priority encoder
  • Can handle complicated conditions. e.g.,
signal_name <= value_expr_1 when boolean_expr_1 else
               value_expr_2 when boolean_expr_2 else 
               value_expr_3 when boolean_expr_3 else
               . . .
               value_expr_n

Selected signal assignment statement (switch case)

  • good match for a circuit described by a functional table
  • E.g., binary decoder, multiplexer
  • Less effective when an input pattern is given a preferential treatment
with select_expression select 
    signal_name <= value_expr_1 when choice_1, 
                   value_expr_2 when choice_2, 
                   value_expr_3 when choice_3, 
                   . . . value_expr_n when choice_n;