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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? 一個游戲程序.vhd

?? VHDL的49個例子
?? VHD
?? 第 1 頁 / 共 2 頁
字號:
-- --   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.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国内精品在线播放| 秋霞午夜av一区二区三区| 成人自拍视频在线| 中文天堂在线一区| 91麻豆精品视频| 亚洲成人7777| 日韩久久免费av| 国产精品一区二区在线播放| 国产欧美精品一区二区三区四区| 成人91在线观看| 亚洲国产日韩综合久久精品| 欧美一区二区网站| 国产精品一区二区免费不卡| 日韩一区欧美小说| 6080亚洲精品一区二区| 国产精品18久久久久| 亚洲欧美一区二区三区极速播放| 欧美三级在线视频| 国内成人免费视频| 亚洲免费在线看| 欧美一区二视频| 99久久精品免费| 日韩精彩视频在线观看| 国产丝袜欧美中文另类| 欧美在线免费播放| 国产精品中文字幕日韩精品| 一卡二卡三卡日韩欧美| 欧美va亚洲va| 久久网站热最新地址| 91免费在线看| 韩国一区二区在线观看| 亚洲日本电影在线| 精品国产免费一区二区三区香蕉| 91免费看`日韩一区二区| 男女男精品网站| 亚洲欧美aⅴ...| 精品免费视频一区二区| 欧美在线观看一区| 国产99久久精品| 日本女优在线视频一区二区| 亚洲天天做日日做天天谢日日欢| 日韩欧美三级在线| 欧美视频一区在线观看| 国产91精品一区二区| 喷水一区二区三区| 一区二区三区不卡视频在线观看| 久久久99久久| 欧美一二三区在线观看| 欧美性猛交xxxx乱大交退制版| 成人爽a毛片一区二区免费| 日本不卡不码高清免费观看| 亚洲午夜日本在线观看| 国产精品对白交换视频| 国产亚洲va综合人人澡精品 | 亚洲一区二区三区爽爽爽爽爽 | 国产欧美一区二区精品久导航| 69堂亚洲精品首页| 日韩欧美三级在线| 91国产丝袜在线播放| av亚洲精华国产精华精华| 久久66热re国产| 日韩精品成人一区二区三区| 亚洲在线成人精品| 亚洲桃色在线一区| 国产精品久久久久桃色tv| 国产午夜精品在线观看| 久久尤物电影视频在线观看| 精品国产一区二区精华| 日韩免费观看2025年上映的电影 | 日韩一级黄色大片| 欧美精品18+| 欧美色欧美亚洲另类二区| 色成年激情久久综合| 色综合视频一区二区三区高清| 不卡的av电影| 99久久综合狠狠综合久久| 成人精品免费视频| 成人av网站大全| 91麻豆精品秘密| 欧美日韩亚洲综合一区| 欧美日韩精品欧美日韩精品一| 欧美日韩日本视频| 欧美精品一二三四| 日韩欧美国产一区在线观看| 欧美电影免费观看高清完整版| 亚洲超丰满肉感bbw| 亚洲一区二区三区视频在线 | 日韩精品一区二区三区四区视频| 欧美精品粉嫩高潮一区二区| 日韩午夜精品视频| 精品对白一区国产伦| 国产亚洲成aⅴ人片在线观看| 中文字幕一区二区三| 一区二区三区免费观看| 偷窥少妇高潮呻吟av久久免费| 美女国产一区二区三区| 国产激情91久久精品导航 | 中文一区二区在线观看| 综合激情成人伊人| 亚洲成人精品影院| 韩国欧美国产1区| 成人免费视频app| 91成人网在线| 欧美不卡激情三级在线观看| 国产片一区二区| 亚洲午夜久久久久久久久电影院 | 国产成人精品三级| 91丨porny丨蝌蚪视频| 欧美精品777| 国产日韩欧美精品在线| 亚洲免费成人av| 麻豆91免费观看| 成人av网站在线观看| 欧美日韩在线播| 国产午夜精品久久| 亚洲成人免费av| 国产精品亚洲一区二区三区在线 | 欧美国产一区在线| 亚洲最大色网站| 国产一区二区三区最好精华液| 色网站国产精品| 久久影院视频免费| 亚洲成人精品影院| 成人高清视频免费观看| 日韩亚洲欧美高清| 有坂深雪av一区二区精品| 国产综合色在线| 欧美电影一区二区三区| 国产精品灌醉下药二区| 捆绑调教一区二区三区| 一本大道久久a久久综合| 亚洲精品在线观| 日韩精品国产欧美| 欧美午夜精品电影| 国产精品青草久久| 美国十次了思思久久精品导航| 色哦色哦哦色天天综合| 久久久蜜桃精品| 人人狠狠综合久久亚洲| 欧美日韩综合不卡| 国产精品电影一区二区| 国产精品资源在线| 日韩一级免费一区| 日韩av在线发布| 欧美性大战xxxxx久久久| 中文字幕一区二区在线观看 | 麻豆中文一区二区| 欧美日韩午夜影院| 亚洲夂夂婷婷色拍ww47| av成人免费在线| 欧美激情综合五月色丁香| 国产一区二区中文字幕| 日韩女优毛片在线| 蜜臀久久99精品久久久久宅男| 欧美日韩黄色影视| 亚洲无线码一区二区三区| 在线日韩av片| 一区二区三区四区国产精品| 91女厕偷拍女厕偷拍高清| 国产精品美女久久福利网站| 国产成人在线色| 国产偷v国产偷v亚洲高清| 国产一区 二区| 精品国产成人系列| 紧缚奴在线一区二区三区| 日韩美女一区二区三区四区| 美女国产一区二区三区| 精品久久久久久综合日本欧美| 蜜桃视频在线一区| 精品久久国产字幕高潮| 黄色小说综合网站| 26uuu久久综合| 国产成人亚洲综合a∨婷婷图片| 久久久久久久精| 成人免费毛片高清视频| 亚洲欧洲三级电影| 91国偷自产一区二区开放时间| 亚洲国产精品精华液网站| 欧美日韩亚洲综合在线| 裸体健美xxxx欧美裸体表演| 精品国免费一区二区三区| 国产成人h网站| 亚洲精品欧美激情| 欧美日韩国产片| 久久精品国内一区二区三区| 2023国产精品视频| 91亚洲精华国产精华精华液| 亚洲福利视频一区二区| 欧美一级搡bbbb搡bbbb| 国产精品一区二区久久精品爱涩| 国产欧美日本一区视频| 91福利在线看| 麻豆精品在线观看| 国产精品色眯眯| 中文字幕在线观看不卡视频| 欧美在线视频日韩| 国产一区欧美二区| 亚洲欧美另类久久久精品| 欧美一级免费大片| 国产999精品久久|