Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Situations in which 'else' or 'elsif' are unnecessary.

Reply
Thread Tools

Situations in which 'else' or 'elsif' are unnecessary.

 
 
apalopohapa apalopohapa is offline
Junior Member
Join Date: Oct 2009
Posts: 1
 
      10-20-2009
Hello.

Code:
signal slv : std_logic_vector(1 downto 0);
signal s1,s2 : std_logic;
process()
begin
  s1 <= '0';
  s2 <= '0';
-----------------
--
-- Version with 'elsif'
--
  if(slv = "00") then
    s1 = '1';
  elsif (slv = "10") then
    s2 = '1';
  end if;
-----------------
--
-- Version without 'elsif'
--
  if (slv = "00") then
    s1 <= '1';
  end if;
  if (slv = "10") then
    s2 <= '1';
  end if;
-----------------
end process;
Any difference?
 

Last edited by apalopohapa; 10-20-2009 at 06:19 PM..
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
which situations should we use thread. join() ? iMath Python 2 02-08-2013 08:27 AM
Validation on all PostBack situations DigHazuse ASP .Net 0 11-29-2005 07:53 PM
How to handle save situations in asp.net? =?Utf-8?B?RGFuaWVsIFdhbHplbmJhY2g=?= ASP .Net 12 07-27-2004 12:45 AM
I have two situations I cant seem to fix on my own! =?Utf-8?B?bW9tbXlraXNzZXM=?= Microsoft Certification 0 05-29-2004 06:31 PM
Canon wide-angle lenses - Real life situations please? Mike Garner Digital Photography 7 02-07-2004 02:32 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57