rar

Finite state automaton for air conditioning temperature control circuit

  • 2013-09-22
  • 8.12KB
  • Points it Requires : 2

library ieee:use ieee.std_logic_1164.all;entity air_conditioner is    port(clk:in std_ulogic;              temp_high:in std_ulogic;              temp_low:in std_ulogic;               heat:out std_ulogic;                cool:out std_ulogic);    end air_conditioner;achitecture style_b of air_conditioner istype state_type is (just_right,too_cold,too_hot);attribute sequential_encoding of state_type:type is \"00 01 10\";signal stvar:state_type;attribute state_vector:string;arrribute state_vector of style_b:architecture is \"stvar\";begincontrollerl:processbeginwait until clk=\'1\';if(temp_low=\'1\')then stvar<=too_cold;elsif(temp_high=\'1\')then stvar<=too_hot;else stvar<=just_right;end if;case stvar is when just_right=>heat<=\'0\';                 cool<=\'0\';when too_cold=>heat<=\'1\';               cool<=\'0\';when too_hot=>heat<=\'0\';              cool<=\'1\';end case;end process controllerl;end style_b;

unfold

You Might Like

Uploader
csdn_can
 

Recommended ContentMore

Popular Components

Just Take a LookMore

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
×