Welcome to My Website

About Me

My photo
I am doing my final year EEE in Dr.SACOE. If someone feels that they have never made a mistake in their life, then it means that they had never tried a new thing in their life.............. i make lot of mistakes, hope am trying something new or ?

Followers

Sequential statements

Posted by PRABHAKARAN Saturday, March 6, 2010

IF-THEN:

The format of the IF-THEN construct is as follows:

IF (condition) THEN
{sequence of statements}
ELSIF (condition) THEN
{sequence of statements}
ELSE
{sequence of statements}
END IF;

There may be 0 or more ELSIF clauses and 0 or 1 ELSE clause. The following is an example of an IF-ELSE statement.

PROCESS (sela, selb, a, b, c) -- process executes if any of these signals change
BEGIN
IF sela = ‘1’ THEN
q <= a;
ELSIF selb = ‘1’ THEN
q <= b;
ELSE
q <= c;
END IF;
END PROCESS;

0 comments

Post a Comment