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

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

?? 一個游戲程序.vhd

?? 這些是FPGA的一寫資源
?? 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一区二区三区免费野_久草精品视频
av午夜精品一区二区三区| 午夜精品免费在线| 欧美一级二级在线观看| 欧美日韩一级黄| 欧美视频一区二区三区四区| 丁香啪啪综合成人亚洲小说| 成人综合婷婷国产精品久久| 成人av资源在线观看| 色综合中文字幕国产 | 国产一区美女在线| 久草在线在线精品观看| 老司机免费视频一区二区| 蜜臀av性久久久久蜜臀aⅴ四虎| 人妖欧美一区二区| 精品一区二区久久| 风间由美一区二区av101 | 欧美日韩精品免费| 欧美一级理论片| 久久九九99视频| 最近中文字幕一区二区三区| 夜夜嗨av一区二区三区网页| 五月婷婷激情综合| 韩国av一区二区三区在线观看| 国产精品一二三区在线| 97se亚洲国产综合在线| 欧美精品在线观看播放| 久久午夜国产精品| 一级中文字幕一区二区| 乱中年女人伦av一区二区| 国产成人免费高清| 欧美色网站导航| 久久久综合精品| 一区二区免费在线| 久久精品国产久精国产| www.亚洲激情.com| 欧美日韩1234| 欧美国产综合一区二区| 亚洲一区在线免费观看| 国产成人精品一区二| 欧美三级资源在线| 国产拍欧美日韩视频二区| 一二三区精品福利视频| 国产成人自拍网| 欧美一区二区三区色| ...中文天堂在线一区| 美女久久久精品| 欧美日韩一区不卡| 中文字幕日韩一区二区| 激情综合色综合久久| 欧美日韩日日夜夜| 中文字幕一区日韩精品欧美| 另类中文字幕网| 欧美精品1区2区3区| 18成人在线观看| 韩国欧美一区二区| 日韩午夜在线观看视频| 亚洲午夜羞羞片| 91麻豆国产福利精品| 国产视频一区二区三区在线观看| 日本中文字幕一区二区视频| 在线观看成人小视频| 18成人在线视频| 成人动漫视频在线| 欧美韩国日本综合| 国产成a人无v码亚洲福利| 日韩欧美在线一区二区三区| 午夜精品免费在线观看| 欧美日韩色一区| 亚洲国产视频网站| 欧美三级乱人伦电影| 一区av在线播放| 欧美性淫爽ww久久久久无| 一区二区三区电影在线播| 色哟哟日韩精品| 亚洲黄一区二区三区| 一本久久a久久免费精品不卡| 国产精品美女久久福利网站| 成人美女在线视频| 国产精品国产自产拍高清av王其| 国产成a人亚洲| 1区2区3区国产精品| 一本大道av一区二区在线播放| 亚洲天堂成人网| 在线精品视频一区二区三四| 亚洲精品午夜久久久| 精品视频一区 二区 三区| 日韩高清不卡一区二区三区| 日韩欧美国产1| 国产九色sp调教91| 亚洲欧洲国产专区| 成人午夜精品在线| 亚洲激情图片qvod| 欧美精品xxxxbbbb| 久久精品国产99国产| 久久久久国产成人精品亚洲午夜| 亚洲美女电影在线| 精品在线免费视频| 成人av片在线观看| 亚洲精品一区二区三区影院 | 亚洲国产日产av| 日韩精品久久理论片| 精品在线一区二区三区| 精品人在线二区三区| 久久国产夜色精品鲁鲁99| 日韩一区二区三区视频在线观看| 有码一区二区三区| 成人免费av网站| 欧美性视频一区二区三区| 成人av在线播放网址| 91美女片黄在线观看| 欧美日韩在线播放三区| 国产视频亚洲色图| 亚洲成a人片在线观看中文| 91网上在线视频| 精品日韩成人av| 老司机午夜精品99久久| 久久免费的精品国产v∧| 亚洲蜜臀av乱码久久精品| 国产中文一区二区三区| 日韩午夜电影在线观看| 日韩精品一区二区三区视频在线观看| 日韩一区二区三区三四区视频在线观看 | 亚洲国产精品一区二区久久| 日本不卡的三区四区五区| 欧美日韩精品福利| 成人永久aaa| 亚洲人成网站精品片在线观看| 老司机精品视频线观看86| 欧美精品一区二区高清在线观看| 成人性生交大片免费看视频在线 | 亚洲第一av色| 精品三级在线看| 欧美三级日韩三级| 色综合久久久久综合体| 一区二区不卡在线播放 | 国产不卡视频一区二区三区| 视频一区视频二区中文字幕| 亚洲欧洲精品一区二区三区| 2021久久国产精品不只是精品| 欧美精品xxxxbbbb| 91国产精品成人| 99re成人在线| 99久久精品99国产精品| 成人污视频在线观看| 国产成人在线视频网站| 国产精品资源在线| 国产呦萝稀缺另类资源| 国产专区综合网| 精品一区二区精品| 精品亚洲国内自在自线福利| 美女视频黄久久| 国产在线播放一区| 老汉av免费一区二区三区| 青娱乐精品在线视频| 日韩vs国产vs欧美| 免费久久99精品国产| 日本午夜精品一区二区三区电影| 日韩黄色在线观看| 久久99精品国产麻豆婷婷洗澡| 美女在线观看视频一区二区| 美日韩一区二区三区| 国产精品自在欧美一区| 久久国产夜色精品鲁鲁99| 九色|91porny| 福利一区二区在线| 成人性生交大片免费| 色噜噜狠狠色综合欧洲selulu| 欧美丝袜丝交足nylons图片| 777午夜精品免费视频| 日韩精品中文字幕一区二区三区| 精品久久久久久久久久久久久久久| 国产日韩欧美电影| 亚洲宅男天堂在线观看无病毒| 午夜精品在线看| 国产精品一品二品| 91热门视频在线观看| 宅男噜噜噜66一区二区66| 26uuu色噜噜精品一区二区| 亚洲国产精品99久久久久久久久| 亚洲免费视频中文字幕| 丝袜诱惑制服诱惑色一区在线观看| 精品一区二区三区免费毛片爱| 丰满亚洲少妇av| 欧美精品在线观看播放| 欧美精品一区二区久久久| 亚洲手机成人高清视频| 天天射综合影视| 成人一道本在线| 日韩一区二区在线观看视频 | 欧美一区二区视频在线观看2020 | 国产专区综合网| 欧美在线免费视屏| 欧美精品一区二区三区高清aⅴ| 中文字幕一区二区在线播放| 蜜臀a∨国产成人精品| av成人免费在线| 久久久久久久久久久99999| 天涯成人国产亚洲精品一区av| 成人激情黄色小说| 日韩免费视频一区二区|