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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? 一個(gè)游戲程序.vhd

?? 這些是FPGA的一寫(xiě)資源
?? VHD
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
-- --   Copyright (c) 1993,1994 by Exemplar Logic, Inc.  All Rights Reserved.---- This source file may be used and distributed without restriction    -- provided that this copyright statement is not removed from the file  -- and that any derivative work contains this copyright notice.         -----------------  This is a synthesizable description that implements an emulator --  of the Mancala game (African beans game).----  Description of the Hardware-----------------------------------  The hardware for the game includes a number of displays, each with a button and--  a light, that each represent a 'bin' that can store marbles (beans). ----  The display indicates the number of marbles in each bin at any given time. --  The light indecates that the present bin is not empty and that pushing the --  button is a valid move in the game.----  The button for each display indicates that a player takes the marbles from --  the selected bin, and takes them in his hand. The hand is represented by a --  diplay itself (no button).----  Each player has a home bin, located on opposite sides of the game. The home --  bin is also represented by a display. There should not be a button on the --  home bins, since the game does not allow the removal of marbles from the home--  bins.----  Besides this, the game has a button to start the game, and a reset for power-up--  purposes.----  Here is a picture that represents the hardware setup of the game :------  *  == Light for valid move or to indicate the player who is active--  O  == Button to make move--  _-- | | --  -  == 7 - segment display-- |_|----                           work bins--                  *   O     *   O     *   O     *   O--                  _   _     _   _     _   _     _   _--                 | | | |   | | | |   | | | |   | | | | --                  -   -     -   -     -   -     -   ---       *         |_| |_|   |_| |_|   |_| |_|   |_| |_|         *--     _   _                                                   _   _--    | | | |                                                 | | | |--     -   -                                                   -   ---    |_| |_|                                                 |_| |_|---- home bin LEFT                                           home bin right--                  *   O     *   O     *   O     *   O            --                  _   _     _   _     _   _     _   _--                 | | | |   | | | |   | | | |   | | | | --                  -   -     -   -     -   -     -   ---                 |_| |_|   |_| |_|   |_| |_|   |_| |_|----                            work bins----     _   _--    | | | |--     -   -                                              O  Start Game--    |_| |_|----    Hand bin------ The Rules of the game ----------------------------    At the start of the game, the left player is active and can make a move.--    The left player selects a bin (by pressing the corresponding button).--    The machine will move the marbles from the bin (display) to the hand (diplay)--    and drop one marble in each successive bin (clockwise) from the hand, --    starting with the bin clock-wise adjecent to the selected bin.--    A marble is never dropped in a opponents home bin (will be skipped).----    If the last marble from the hand is dropped in an empty bin, the players--    switch turns, and it is the other players turn to make a move.----    If the last marble from the hand is dropped in the players home bin,--    the player can make another move.----    If the last marble from the hand is dropped in a non-empty work bin,--    all the marbles from that bin will be moved back to the hand and the --   game proceeds.----    The game ends if there are no more marbles in any of the work bins.----    The winner of the game is the player who has most marbles in his/her--    home bin at the end of the game.--------  About the design------------------------    The design contains a controller and a data path. The controller contains --    a state machine that defines the overall state of the game (waiting for a--    move, end of the game, playing). --    The controller also has a register that defines which bin is active at any--    point in time during active playing. ----    The controller provides signals for the data path to decrement the hand --    marble count, or load the hand with the selected work bin count, or indecate--    that the game is over and a winner should be defined etc.----    The data path contains a register for each bin in the game. --    The number of bins is easily programmable by setting a integer constant.--    The data path also contains counters to decrement the hand marble count--    or increment the bin marble counts.----    The data path provides signals for the controller to indicate that the --    hand bin is empty, or which of the work bins is empty.--   --    The work bin registers are loaded with a equal number of marbles at the start --    of the game. The total number of marbles in the game is programmable by setting--    a generic in the top entity.----    The data path also includes light drivers for the lights on each button that --    indicate a valid move, and the lights that indicate which player is active.--    Two extra signals are generated by the data path that let the home bin --    display of the winner of the game blink on and off (at the end of the game).----    The design does not include a merry-go-round display driver. This is done--    outside this design, on the Aptix board. ----    The design does also not include a 18 bit clock devider that provides a --    vary slow ticking clock to let humans follow the moves of the machine --    cycle by cycle.----    library ieee ;use ieee.std_logic_1164.all ;package mancala_pack is   type boolean_array is array (natural range <>) of boolean ;   type player_t is (LEFT, RIGHT, BOTH, NEITHER) ;   -- Define the number of bins in the game here.   -- This include the two home bins   constant nr_of_bins : natural := 10 ;    -- Define the indexes of the two home bins    constant OUTER_LEFT : natural := 0 ;   constant OUTER_RIGHT : natural := nr_of_bins/2 ;    -- Make a 'mask' constant that eliminates the home bins   constant not_home_bins : boolean_array (nr_of_bins-1 downto 0) :=        (OUTER_LEFT=>FALSE, OUTER_RIGHT=>FALSE, OTHERS=>TRUE) ;   -- Component Declaration of the controller of the game   component control        generic (nr_of_bins : natural := 32) ;       port (start_game : in boolean ;           reset, clk : in std_logic ;           buttons : in boolean_array (nr_of_bins-1 downto 0) ;           empty_bins : in boolean_array (nr_of_bins-1 downto 0) ;           hand_is_empty : in boolean ;                     active_bin : buffer boolean_array (nr_of_bins-1 downto 0) ;           decrement_hand : out boolean ;           load_hand_with_active_bin : out boolean ;                the_player : out player_t ;           end_of_the_game : out boolean ;           waiting_for_move : out boolean       ) ;   end component ;end mancala_pack ;library ieee ;use ieee.std_logic_1164.all ;use work.mancala_pack.all ;entity control is   generic (nr_of_bins : natural := 10) ;   port (start_game : in boolean ;         reset, clk : in std_logic ;         buttons : in boolean_array (nr_of_bins-1 downto 0) ;         empty_bins : in boolean_array (nr_of_bins-1 downto 0) ;         hand_is_empty : in boolean ;                   active_bin : buffer boolean_array (nr_of_bins-1 downto 0) ;         decrement_hand : out boolean ;         load_hand_with_active_bin : out boolean ;         the_player : out player_t ;         end_of_the_game : out boolean ;         waiting_for_move : out boolean    ) ;end control ;architecture exemplar of control is    type state_t is (PLAY, WAIT_FOR_MOVE, END_OF_GAME);   -- The state variables for the controller state machine   signal present_state, next_state : state_t ;   -- A separate register (one-hot) defines which bin is active   signal present_active_bin : boolean_array(nr_of_bins-1 downto 0) ;   signal player : player_t ;   signal switch_player : boolean ;   signal last_bin_was_empty, next_bin_is_empty : boolean ;   -- Shift routine to shift to the next bin.   function shift(sel : boolean_array) return boolean_array is   begin      -- shift this register to the right, roll over right bit to left      return sel(sel'right) & sel(sel'left downto sel'right+1);    end ;   -- General routine to check if a boolean array contains all 'false' elements.   function is_empty (bins : boolean_array) return boolean is      constant empty : boolean_array (bins'range) := (others=>false) ;   begin       return (bins = empty) ;   end ;begin   process (clk, reset)   begin       if (reset='1') then           present_state <= END_OF_GAME ;           last_bin_was_empty <= FALSE ;           present_active_bin <= (others=>false) ;       elsif (clk'event and clk='1') then           present_state <= next_state ;           last_bin_was_empty <= next_bin_is_empty ;           present_active_bin <= active_bin ;       end if ;   end process ;   process (start_game,present_state,hand_is_empty,empty_bins,buttons,            present_active_bin, last_bin_was_empty, player)       variable next_active_bin : boolean_array (present_active_bin'range) ;   begin       load_hand_with_active_bin <= FALSE ;       decrement_hand <= FALSE ;       switch_player <= FALSE ;       waiting_for_move <= FALSE ;       next_bin_is_empty <= FALSE ;       end_of_the_game <= FALSE ;       case present_state is         when PLAY =>           if (hand_is_empty) then               -- No more marbles in the hand.               if (is_empty (present_active_bin AND not_home_bins)) then                  -- Stop if we drop the last marble in our own bin                   next_state <= WAIT_FOR_MOVE ;                   active_bin <= (others=>false) ;               elsif (last_bin_was_empty) then                  -- Stop and switch players if we drop the last marble                  -- in an empty bin                   switch_player <= TRUE ;                   next_state <= WAIT_FOR_MOVE ;                   active_bin <= (others=>false) ;               else                   -- Continue if last marble dropped in a non-empty bin.                  -- Re-load hand with the full bin contents.

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲综合精品久久| 亚洲一区二区av在线| 欧美日韩中文字幕一区| 国产麻豆精品一区二区| 亚洲国产日韩综合久久精品| 国产精品免费免费| 欧美精品一区二区三区四区 | 欧美亚洲丝袜传媒另类| 国产在线精品一区在线观看麻豆| 又紧又大又爽精品一区二区| 久久久久久久久岛国免费| 欧美男人的天堂一二区| 日韩女优电影在线观看| 欧美日韩一二三| 99久久免费视频.com| 国产ts人妖一区二区| 免费观看成人av| 视频一区国产视频| 亚洲精品国产a久久久久久| 国产精品久久久一本精品| 久久久精品天堂| 2020国产精品久久精品美国| 日韩一级黄色大片| 91麻豆精品国产| 欧美丝袜丝交足nylons图片| 91麻豆国产福利在线观看| 不卡一区在线观看| 成人免费视频国产在线观看| 国产精品一区在线观看你懂的| 日韩av在线播放中文字幕| 午夜精品久久久久久久99樱桃| 亚洲激情图片小说视频| 一区二区三区中文在线观看| 亚洲日本免费电影| 亚洲精品一二三| 亚洲自拍偷拍网站| 亚洲午夜日本在线观看| 亚洲成人在线免费| 午夜欧美大尺度福利影院在线看| 樱桃国产成人精品视频| 亚洲老司机在线| 亚洲一级二级三级| 日韩黄色在线观看| 麻豆精品久久久| 国产乱子伦视频一区二区三区| 久久99精品久久只有精品| 国产综合久久久久影院| 国产成人免费高清| 成人av在线影院| 色综合激情五月| 在线观看欧美精品| 91精品国产综合久久久久久久 | 国产精品成人免费精品自在线观看| 久久精品一区二区三区四区| 国产日本一区二区| 亚洲三级在线播放| 午夜伦欧美伦电影理论片| 蜜臀99久久精品久久久久久软件| 国产一区中文字幕| 不卡的av在线| 日本道精品一区二区三区| 91麻豆国产福利精品| 欧美日产国产精品| 欧美大片在线观看| 国产欧美中文在线| 一区二区三区精密机械公司| 免费看日韩精品| 国产成人精品免费在线| 91传媒视频在线播放| 91精品国产91综合久久蜜臀| 精品久久久久久久久久久久久久久久久 | 91精品国产欧美一区二区| 日韩精品最新网址| |精品福利一区二区三区| 午夜不卡av免费| 激情五月婷婷综合网| 9人人澡人人爽人人精品| 精品视频免费看| 国产香蕉久久精品综合网| 一区二区三区在线免费视频| 麻豆91精品视频| av影院午夜一区| 日韩一区二区三区在线观看| 国产精品午夜久久| 日韩avvvv在线播放| 国产91精品免费| 欧美丰满少妇xxxxx高潮对白| 久久精品视频一区二区三区| 亚洲国产综合色| 成人app软件下载大全免费| 日韩午夜电影在线观看| 亚洲欧美激情小说另类| 国产麻豆精品在线| 555www色欧美视频| 亚洲同性同志一二三专区| 韩国毛片一区二区三区| 欧美日韩中字一区| 亚洲图片另类小说| 国产精品一级片在线观看| 这里是久久伊人| 一区二区三区日韩在线观看| 国产精品99久久久久久久女警| 色8久久精品久久久久久蜜| 国产亚洲精品7777| 麻豆久久久久久久| 欧美精品第1页| 亚洲乱码精品一二三四区日韩在线 | 欧美成人aa大片| 亚洲综合清纯丝袜自拍| 成人福利视频在线| 国产无一区二区| 精品一区二区三区视频| 777欧美精品| 一区二区三区.www| 99国产精品99久久久久久| 久久久一区二区三区捆绑**| 热久久免费视频| 制服丝袜日韩国产| 亚洲成人激情社区| 91国偷自产一区二区三区观看 | 欧洲亚洲国产日韩| 亚洲欧洲国产日本综合| 不卡的av在线播放| 国产精品久久久久久久久图文区| 国产精品资源在线看| 26uuu久久综合| 精品一区二区三区不卡| 欧美sm美女调教| 麻豆91在线播放免费| 精品日韩一区二区三区免费视频| 日韩精品一区第一页| 欧美美女直播网站| 日韩电影在线一区| 欧美日韩久久久| 日本亚洲欧美天堂免费| 欧美一级欧美三级在线观看| 日日夜夜精品视频天天综合网| 欧美日韩免费不卡视频一区二区三区| 亚洲国产精品一区二区www| 欧美中文字幕亚洲一区二区va在线 | 一区二区三区四区高清精品免费观看 | 精品一区二区三区在线观看国产| 88在线观看91蜜桃国自产| 天堂一区二区在线| 日韩视频在线观看一区二区| 美女www一区二区| 久久影院视频免费| 风间由美性色一区二区三区| 国产精品久久777777| 一本高清dvd不卡在线观看| 亚洲最大色网站| 7777精品伊人久久久大香线蕉最新版| 男人的天堂久久精品| 精品国产麻豆免费人成网站| 国产二区国产一区在线观看| 国产精品美女久久久久aⅴ | 在线看一区二区| 偷拍与自拍一区| 欧美大肚乱孕交hd孕妇| 国产成人免费视频| 亚洲免费观看高清完整版在线观看熊 | 一区二区三区免费在线观看| 欧美日韩一二三| 久久精品国产精品亚洲综合| 日本一区二区三区电影| 91福利在线看| 麻豆国产欧美日韩综合精品二区 | 欧美色老头old∨ideo| 免费人成在线不卡| 中文av字幕一区| 欧美视频精品在线| 精品无人码麻豆乱码1区2区| 日韩美女视频一区二区| 日韩一区二区三| 99精品久久99久久久久| 免费成人在线观看视频| 国产精品乱码一区二区三区软件| 欧美日韩一级片网站| 国产电影一区二区三区| 亚洲一区视频在线观看视频| 久久久久久久综合狠狠综合| 欧洲在线/亚洲| 国模冰冰炮一区二区| 亚洲制服丝袜av| 国产欧美日韩亚州综合| 欧美美女一区二区三区| 不卡一区中文字幕| 另类小说一区二区三区| 亚洲精品视频在线看| 欧美精品一区二区三区高清aⅴ| 色婷婷狠狠综合| 国产成人欧美日韩在线电影| 亚洲电影一区二区三区| 国产精品网友自拍| 日韩欧美一级二级三级久久久| 99精品欧美一区二区三区综合在线| 热久久免费视频| 亚洲一区二区三区在线| 国产精品色婷婷| 26uuuu精品一区二区|