新聞中心

        EEPW首頁 > 嵌入式系統 > 設計應用 > 用VHDL設計有限狀態機的方法

        用VHDL設計有限狀態機的方法

        作者: 時間:2011-06-01 來源:網絡 收藏

        architecture state_machine of controller is

        type statetype is (system_reset,load,one_dry,water_ld, water,

        two_dry_ld,two_dry,unload_reset,unload,return_trip,decision,

        wash,cycle_ld);

        signal present_state,next_state : statetype;

        begin

        state_comb:process (present_state,c0,reset,k1,k2,r1,r2,r3)

        begin

          if reset='1' then

         clr1='1';clr2='1';clr3='1';j='0';ena1='0';

        ena2='0';

          g1='0';c='0';b='0';a='0';

        fo=″0000000″;ld1='0';ld2='0';ld3='0';

        next_state = system_reset;

        else

        case present_state is

        when system_reset =>

        clr1='1';clr2='1';clr3='0';j='0';

        ena1='0';ena2='0';

        g1='1';c='1';b='0';a='1';

        fo=″0000000″;ld1='0';ld2='0';ld3='1';

        if (c0='1') then

        next_state=load;

        else

        next_state=system_reset;

        end if;

        when load =>

        clr1='0';clr2='0';clr3='0';j='0';

        ena1='1';ena2='0';

        g1='0';c='0';b='0';a='0';

        fo=″0000001″;ld1='0';ld2='0';ld3='0';

        if (k1='1') then

        next_state=one_dry;

        else

        next_state=load;

        end if;

        ……

        end case;

        end if;

        end process state_comb;

        state_clocked:process(clk1,reset)

        begin

        if reset='1' then

        present_state=system_reset;

        elsif rising_edge(clk1) then

        present_state=next_state;

        塵埃粒子計數器相關文章:塵埃粒子計數器原理


        評論


        相關推薦

        技術專區

        關閉
        主站蜘蛛池模板: 隆回县| 玉山县| 昌吉市| 苗栗县| 云梦县| 合作市| 永吉县| 彭泽县| 墨玉县| 榆中县| 黄平县| 象州县| 来宾市| 普格县| 莱芜市| 嘉荫县| 山阴县| 乌恰县| 东明县| 朝阳市| 天峻县| 凤冈县| 天门市| 连山| 栾川县| 安康市| 梧州市| 阿拉善左旗| 交口县| 崇州市| 东乡族自治县| 东丽区| 呼伦贝尔市| 年辖:市辖区| 上杭县| 绥宁县| 确山县| 通山县| 靖江市| 湟中县| 巴中市|