亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 一個游戲程序.vhd

?? EDA基礎教程
?? VHD
?? 第 1 頁 / 共 2 頁
字號:
                   next_state <= PLAY ;                   active_bin <= present_active_bin ;                   load_hand_with_active_bin <= TRUE ;               end if ;           else                -- Regular state to go to next bin during play               next_state <= PLAY ;               decrement_hand <= TRUE ;               -- go to the next bin               next_active_bin := shift(present_active_bin) ;               -- We dont have to drop a marble in the opponents bin :               -- shift one bin further if this is about to happen               if ((player=LEFT and next_active_bin(OUTER_RIGHT)) OR                   (player=RIGHT and next_active_bin(OUTER_LEFT))) then                   next_active_bin := shift (next_active_bin) ;                end if ;                                 -- If the bin we go to is empty, flag that now, since               -- we need to do something different in the next cycle.               if (NOT is_empty (next_active_bin AND empty_bins)) then                   next_bin_is_empty <= TRUE ;               end if ;               active_bin <= next_active_bin ;           end if ;         when WAIT_FOR_MOVE =>           waiting_for_move <= TRUE ;           if (is_empty((NOT empty_bins) AND not_home_bins)) then                -- Here, there are no more marbles in any of the                -- play bins. This is the end of the game.                next_state <= END_OF_GAME ;               active_bin <= (others=>FALSE) ;           elsif (is_empty(buttons AND (NOT empty_bins) AND not_home_bins)) then                -- Here, No button was pushed that is valid (not                -- selecting a empty bin and not selecting a home bin.                next_state <= WAIT_FOR_MOVE ;               active_bin <= (others=>FALSE) ;           else               -- Somebody pushed a button. Load the hand with selected               -- bin and restart the play               next_state <= PLAY ;               load_hand_with_active_bin <= TRUE ;               active_bin <= buttons ; -- Should have only ONE bit set           end if ;         when END_OF_GAME =>           -- Let the datapath calculate who the winner is           end_of_the_game <= TRUE ;           active_bin <= (others=>false) ;           if (start_game) then               next_state <= WAIT_FOR_MOVE ;           else                next_state <= END_OF_GAME ;           end if ;       end case ;   end process ; --  -- Process that controls which player is on. -- The state machine defines when players have to be switched --   process (clk, reset)       procedure switch_players (signal pl : inout player_t) is       begin            if (pl=LEFT) then               pl <= RIGHT ;           elsif (pl=RIGHT) then               pl <= LEFT ;           end if ;       end ;   begin       if (reset='1') then           player <= NEITHER ;       elsif (clk'event and clk='1') then           if (start_game) then               player <= LEFT ;           else               if (switch_player) then                    switch_players (player) ;               end if ;           end if ;       end if ;   end process ;   the_player <= player ;end exemplar ;library ieee ;use ieee.std_logic_1164.all ;use work.mancala_pack.all ;entity mancala is   generic (max_marbles : natural := 32) ;   port (start_game              : boolean ;         active_bin_value        : buffer integer range 0 to max_marbles-1;         active_bin              : buffer  boolean_array(nr_of_bins-1 downto 0);         blink_right, blink_left : inout std_logic;         clk, reset              : in   std_logic;         buttons                 : in   boolean_array(nr_of_bins-1 downto 0);         button_lights           : out  boolean_array(nr_of_bins-1 downto 0);         l_player, r_player      : out  std_logic   ) ;end mancala ;  architecture exemplar of mancala is    subtype bin_integer is integer range 0 to max_marbles-1 ;    type bin_integer_array is array (nr_of_bins-1 downto 0) of bin_integer ;   -- The bins   signal bins : bin_integer_array ;    signal incremented_bin_value : bin_integer ;   signal empty_bins : boolean_array (nr_of_bins-1 downto 0) ;     -- The hand    signal hand : bin_integer ;   signal load_hand_with_active_bin : boolean ;    signal decrement_hand : boolean ;   signal hand_is_empty : boolean ;   -- Which player is playing / winning   signal player : player_t ;   signal winner : player_t ;      signal waiting_for_move : boolean ;   signal end_of_the_game : boolean ;begin   c : control generic map ( nr_of_bins=>nr_of_bins)                port map ( -- To controller :                          start_game=>start_game,                          clk=>clk,                           reset=>reset,                          buttons=>buttons,                           empty_bins=>empty_bins,                          hand_is_empty=>hand_is_empty,                          -- From controller :                          active_bin=>active_bin,                          decrement_hand=>decrement_hand,                          load_hand_with_active_bin=>load_hand_with_active_bin,                          the_player=>player,                          end_of_the_game=>end_of_the_game,                          waiting_for_move=>waiting_for_move                  ) ; -- -- Process the amount of marbles in the hand --   process (clk, reset)    begin      if (reset='1') then           hand <= 0 ;      elsif clk'event and clk='1' then          if (start_game) then              hand <= 0 ;          elsif (load_hand_with_active_bin) then              hand <= active_bin_value ;          elsif (decrement_hand and (not hand_is_empty)) then              hand <= hand - 1 ;          end if ;      end if ;   end process ;    hand_is_empty <= (hand=0) ;  -- -- Process the amount of marbles in each bin --   bin_procs : for i in bins'range generate       process (reset, clk)       begin           if (reset='1') then               bins(i) <= 0 ;           elsif clk'event and clk='1' then               if (start_game) then                   -- Initialize the home bins to zero and the                   -- work bins to a number that guarantees that there                   -- will be max_marbles in the game.                    if (i=OUTER_LEFT or i=OUTER_RIGHT) then                       bins(i) <= 0 ;                   else                        bins(i) <= max_marbles/(nr_of_bins-2) ;                   end if ;               elsif (active_bin(i)) then                   if (load_hand_with_active_bin) then                       bins(i) <= 0 ;                   elsif (decrement_hand and (not hand_is_empty)) then                       bins(i) <= incremented_bin_value ;                    end if ;               end if ;           end if ;       end process ;       empty_bins(i) <= bins(i) = 0 ;   end generate ;   --  -- Select the bin (from the bins register) that is presently active  --    process (active_bin, bins)    begin      active_bin_value <= 0 ;      for i in bins'range loop          if (active_bin(i)) then              active_bin_value <= bins(i) ;          end if ;      end loop ;   end process ; -- -- Calculate the incremented value of the presently selected bin --   incremented_bin_value <= active_bin_value + 1 ; -- Generate the light signals for the player that is active   l_player <= '1' when player=LEFT else '0' ;   r_player <= '1' when player=RIGHT else '0' ; -- -- Define the winner  --   winner <= NEITHER when NOT end_of_the_game ELSE             BOTH when bins(OUTER_LEFT)=bins(OUTER_RIGHT) ELSE             LEFT when bins(OUTER_LEFT)>bins(OUTER_RIGHT) ELSE             RIGHT ; --  -- Blink the display of the winner (on/off) --    process (clk, reset)   begin      if (reset='1') then          -- Displays ON          blink_left <= '1' ;          blink_right <= '1' ;      elsif clk'event and clk='1' then          case winner is             when LEFT =>                blink_left <= NOT blink_left ;                blink_right <= '1' ;             when RIGHT =>                blink_left <= '1' ;                blink_right <= NOT blink_right ;             when BOTH =>                 blink_left <= NOT blink_left ;                blink_right <= NOT blink_right ;             when OTHERS =>                blink_left <= '1' ;                blink_right <= '1' ;          end case ;      end if ;   end process ;    -- -- Button lights  -- Light on each button for possible move --   lights : for i in button_lights'range generate       button_lights(i) <= TRUE when (waiting_for_move AND NOT empty_bins(i))                            else FALSE ;   end generate ; end exemplar ;         

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产suv一区二区三区88区| 波波电影院一区二区三区| 日韩欧美一区中文| 666欧美在线视频| 欧美一级久久久| 精品国产一区二区亚洲人成毛片| 欧美成人a在线| 国产不卡免费视频| 成人黄页在线观看| 欧美日韩一区二区三区免费看 | 国产精品久久三| 亚洲精品在线免费观看视频| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 久久久久久电影| 亚洲精品国产一区二区三区四区在线| 丝袜国产日韩另类美女| 国产电影一区二区三区| 欧美视频完全免费看| 亚洲精品一区二区三区四区高清| 亚洲女性喷水在线观看一区| 青青青伊人色综合久久| www.99精品| 欧美xxxxx裸体时装秀| 亚洲视频在线一区| 精品一区二区综合| 欧美综合色免费| 国产欧美日韩综合精品一区二区| 日韩经典一区二区| eeuss国产一区二区三区| 日韩一区二区精品在线观看| 中文字幕在线观看一区二区| 久久精品国产一区二区| 欧美影院一区二区三区| 久久久www成人免费无遮挡大片| 亚洲成人免费在线| 一本色道久久综合亚洲精品按摩| 日韩美女天天操| 亚洲电影你懂得| 99精品视频在线观看| 精品国产一区二区三区av性色| 亚洲一区视频在线观看视频| 成人高清视频免费观看| 精品日韩成人av| 亚洲成人av电影| 色婷婷综合激情| 国产精品色婷婷久久58| 精品综合久久久久久8888| 欧美图片一区二区三区| 成人欧美一区二区三区黑人麻豆| 久久国产精品露脸对白| 欧美日韩一区二区三区四区| 国产一区二区按摩在线观看| 26uuu精品一区二区在线观看| 青青草精品视频| 亚洲综合免费观看高清在线观看| 韩国一区二区视频| 久久久影视传媒| 国产日韩精品一区二区浪潮av| 99久久伊人精品| 天堂va蜜桃一区二区三区| 精品对白一区国产伦| 日本一区二区三区四区在线视频| 天天综合色天天综合色h| 91一区二区三区在线观看| 国产精品乱人伦一区二区| 久草这里只有精品视频| 欧美艳星brazzers| 一区二区三区四区中文字幕| 91蜜桃在线免费视频| 1024成人网| 91麻豆国产在线观看| 久久精品在线免费观看| 亚洲自拍偷拍九九九| 色综合中文字幕国产 | 中文字幕一区在线观看视频| 国产成人无遮挡在线视频| 久久青草欧美一区二区三区| 久久国产精品99久久久久久老狼| 欧美无人高清视频在线观看| 中文字幕精品三区| 成人午夜激情片| ●精品国产综合乱码久久久久 | 欧美视频中文一区二区三区在线观看 | 日韩不卡手机在线v区| 337p亚洲精品色噜噜狠狠| 日韩经典中文字幕一区| 日韩欧美中文字幕制服| 狠狠色综合播放一区二区| 久久毛片高清国产| 成人小视频免费在线观看| 中文字幕亚洲视频| 在线观看欧美黄色| 欧美r级电影在线观看| 91视频91自| www.性欧美| 丁香网亚洲国际| 日本网站在线观看一区二区三区| 中文字幕色av一区二区三区| 五月综合激情日本mⅴ| 精品成人私密视频| 91精品国产一区二区| 精品视频在线看| 99re亚洲国产精品| 91黄视频在线| 成人91在线观看| 亚洲国产成人自拍| 色婷婷综合中文久久一本| 亚洲成人高清在线| 久久九九久精品国产免费直播| 成人a免费在线看| 午夜国产不卡在线观看视频| 欧美精品一区二区三| 不卡av在线网| 视频一区视频二区中文字幕| 久久久三级国产网站| 91蜜桃免费观看视频| 男人的天堂亚洲一区| 国产精品午夜在线| 欧美日韩一二三| 国产精品18久久久久久久网站| 亚洲欧美日韩久久| 日韩视频免费直播| av一区二区三区在线| 日韩专区中文字幕一区二区| 欧美韩国日本一区| 欧美精品 日韩| 成人精品一区二区三区四区| 亚洲v精品v日韩v欧美v专区| 精品国产在天天线2019| 欧美影院精品一区| 成人丝袜视频网| 美腿丝袜在线亚洲一区| 亚洲欧洲www| 日韩精品一区二区三区四区| 91美女在线观看| 国产精品影音先锋| 99免费精品在线| 亚洲欧洲精品一区二区三区| 日韩一级完整毛片| 91蝌蚪porny| 国产乱码精品1区2区3区| 亚洲在线观看免费视频| 国产日产欧产精品推荐色| 555夜色666亚洲国产免| 99精品视频在线免费观看| 国产在线精品一区二区夜色| 亚洲福利一区二区| 国产精品色一区二区三区| 精品国产欧美一区二区| 欧美日韩在线播放三区四区| jiyouzz国产精品久久| 国精产品一区一区三区mba桃花| 亚洲成a人v欧美综合天堂下载| 国产精品久久久久国产精品日日| 国产一区二区中文字幕| 在线精品视频免费播放| 一区二区三区四区蜜桃| 欧美情侣在线播放| 亚洲日穴在线视频| 岛国一区二区在线观看| 久久综合色之久久综合| 日韩电影免费一区| 97se亚洲国产综合在线| 国产情人综合久久777777| 免费观看久久久4p| 欧美猛男超大videosgay| 亚洲欧美一区二区三区极速播放| 国产精品中文字幕欧美| 国产精品美女久久久久av爽李琼| 欧美精品一区二区精品网| 91.xcao| 欧美性极品少妇| 在线影视一区二区三区| 97se亚洲国产综合自在线观| 成人丝袜高跟foot| 成人国产一区二区三区精品| 国产成人av一区二区三区在线| 国产一区二区三区精品视频| 狠狠色丁香婷综合久久| 紧缚捆绑精品一区二区| 久久99国内精品| 久久av中文字幕片| 狠狠色狠狠色综合系列| 国产毛片一区二区| 国产精品2024| 国产成人av资源| 成人午夜免费电影| av毛片久久久久**hd| 99re在线精品| 欧美午夜免费电影| 欧美精品v国产精品v日韩精品 | 国产欧美日韩在线看| 国产三级精品三级在线专区| 久久精品欧美一区二区三区麻豆 | 播五月开心婷婷综合| 成人av资源网站| 色哟哟在线观看一区二区三区| 91国内精品野花午夜精品 | 人人狠狠综合久久亚洲| 无码av免费一区二区三区试看|