FPGA Center



 * Constant

 * Signal

 * Operators

 * Component

 * Concurrent Assignments

 * Process

 * Sequential Statements

 * Variable

  * User Defined Types

 

Concurrent Signal Assignments

There are three forms of conditional signam assignments :

1. Basic Signal Assignment

Syntax:

signal_name= expression

Example:

A<= B and C

2. Conditional Signal Assignment

Syntax:

Signal_name<= expression when condition else
                         expression when condition else
                        expression;

Example:

1

Output<= in1 when sel=00 else
                 襤n2 when sel=01 else
                 襤n3 when sel=10 else
                 襤n4 when sel=11 else
              
  '0';

3. Selected Signal Assignment

Syntax:

with choice_expression select
         value <= expression when choice ,
                         expression whenchoice,
                         expression when others;

Example:

Output<= in1 when 00 ,
                  襤n2 when 01 ,
                  襤n3 when 10 ,
                  襤n4 when 11 ;

 

 

 

 

 

 project                                                                                                                                    Vhdl_Code                                                                                                                                    

 

Home | Fpga | VHDL | VHDL Dictionary | Digital Design | Simulation | PCB | Examples | Contact Us
Copyright © 2010 - 2013 FPGAcenter. All Rights Reserved.