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

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

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

?? EDA基礎(chǔ)教程
?? 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一区二区三区免费野_久草精品视频
麻豆精品在线观看| 国产精品国产精品国产专区不片| 国产不卡视频在线播放| 亚洲综合在线免费观看| 欧美tickling网站挠脚心| 色哟哟一区二区| 国产精品乡下勾搭老头1| 亚洲va欧美va天堂v国产综合| 中文字幕第一区综合| 在线91免费看| 在线一区二区视频| 成人精品视频.| 久久99精品网久久| 日本午夜精品视频在线观看| 亚洲色图一区二区三区| 国产欧美一区二区在线| 日韩一级完整毛片| 欧美午夜精品免费| 色中色一区二区| kk眼镜猥琐国模调教系列一区二区 | 性久久久久久久久久久久| 国产婷婷一区二区| 日韩欧美国产一区二区在线播放| 欧美自拍偷拍一区| av在线播放不卡| 成人三级在线视频| 亚洲精品高清在线| 中文字幕欧美日韩一区| 久久综合狠狠综合久久综合88| 在线不卡一区二区| 欧美日韩美女一区二区| 欧美日韩美女一区二区| 欧美系列在线观看| 欧美视频一区二区三区| 在线看一区二区| 在线精品亚洲一区二区不卡| 色美美综合视频| 色欧美乱欧美15图片| 91网页版在线| 99久久国产综合精品女不卡| caoporn国产精品| a亚洲天堂av| 99久免费精品视频在线观看 | 成人精品电影在线观看| 国产99久久久国产精品免费看| 国产成人午夜视频| 粉嫩一区二区三区性色av| jizz一区二区| 色激情天天射综合网| 欧美探花视频资源| 欧美精品欧美精品系列| 亚洲成人7777| 青青草国产成人99久久| 久久爱www久久做| 国产一区二区电影| 粉嫩av亚洲一区二区图片| jizzjizzjizz欧美| 欧美三级一区二区| 制服丝袜一区二区三区| 精品成人a区在线观看| 国产亚洲精品精华液| 一区二区中文视频| 亚洲国产日韩精品| 久久激情五月婷婷| www.66久久| 91麻豆精品国产91久久久更新时间| 日韩亚洲欧美一区二区三区| 国产亚洲婷婷免费| 亚洲日穴在线视频| 日韩电影免费在线| 高清不卡一二三区| 欧美三级韩国三级日本一级| 日韩欧美一级精品久久| 国产精品欧美久久久久一区二区| 亚洲欧美日韩国产成人精品影院| 石原莉奈在线亚洲二区| 国产麻豆91精品| 在线观看视频91| 精品日韩av一区二区| 一区二区三区四区蜜桃| 久久精品二区亚洲w码| 一本大道综合伊人精品热热 | 在线观看日韩电影| 日韩视频免费观看高清完整版| wwwwxxxxx欧美| 一级中文字幕一区二区| 韩国欧美国产一区| 91福利国产精品| 国产欧美一区二区三区在线老狼| 视频在线观看国产精品| 成人激情午夜影院| 精品久久久久久久人人人人传媒| 亚洲女人****多毛耸耸8| 韩国三级在线一区| 欧美日韩成人综合| 国产精品福利一区| 国产一区三区三区| 欧美日韩视频不卡| 国产精品久久久久久久久搜平片 | 国产不卡在线一区| 91麻豆精品国产91久久久久久| 亚洲三级在线观看| 欧美麻豆精品久久久久久| 日本高清无吗v一区| 精品国产一区a| 亚洲欧美日韩在线不卡| 亚洲精品一区二区精华| 一区二区三区四区在线播放| 成人免费不卡视频| 欧美精品一区二区在线观看| 五月激情丁香一区二区三区| 色乱码一区二区三区88| 中文成人av在线| 国产精品一区一区三区| 欧美一区二区三区免费| 亚洲一区av在线| 色综合 综合色| 亚洲丝袜自拍清纯另类| 国产成人av网站| 久久久久久9999| 加勒比av一区二区| 欧美电影免费观看高清完整版在线| 午夜精品一区在线观看| 欧美日韩国产一级片| 亚洲国产aⅴ天堂久久| 在线精品视频一区二区| 国产伦理精品不卡| 亚洲嫩草精品久久| 成人久久视频在线观看| 精品国内二区三区| 日本亚洲一区二区| 欧美一区二区三区在线电影| 日韩电影一区二区三区四区| 91精品国产综合久久久久| 欧美午夜在线观看| 午夜激情久久久| 欧美精品久久99久久在免费线 | 欧美一区三区二区| 日韩精品国产精品| 日韩一区国产二区欧美三区| 日韩高清中文字幕一区| 欧美一级片在线看| 麻豆精品久久精品色综合| 欧美v国产在线一区二区三区| 久久99精品久久久久久国产越南 | 97超碰欧美中文字幕| 综合久久一区二区三区| 色悠悠久久综合| 日韩中文字幕av电影| 日韩免费视频一区| 国产精品亚洲人在线观看| 国产精品久久久久桃色tv| 色香蕉久久蜜桃| 日韩电影免费在线| 久久九九影视网| 91丨九色丨蝌蚪富婆spa| 曰韩精品一区二区| 91麻豆精品国产自产在线| 激情亚洲综合在线| 国产精品美女一区二区在线观看| 色婷婷综合久久久中文一区二区| 亚洲1区2区3区视频| 精品嫩草影院久久| 95精品视频在线| 婷婷中文字幕一区三区| 精品国产乱码久久久久久闺蜜 | 处破女av一区二区| 亚洲日穴在线视频| 日韩欧美专区在线| 成人免费av网站| 五月婷婷激情综合| 国产视频一区不卡| 欧美怡红院视频| 国产精品99久久久久久久vr| 一区二区理论电影在线观看| 欧美成人综合网站| 色天使色偷偷av一区二区| 美女免费视频一区二区| 国产精品久久影院| 欧美美女视频在线观看| 成人午夜视频在线观看| 午夜久久久影院| 国产欧美一区二区精品性色超碰| 欧美三级日韩三级| 成人精品一区二区三区中文字幕| 亚洲成av人片在www色猫咪| 国产欧美日韩在线看| 欧美乱熟臀69xxxxxx| 成人福利电影精品一区二区在线观看 | 欧美—级在线免费片| 欧美日韩一二三区| 国产91精品精华液一区二区三区| 水野朝阳av一区二区三区| 国产精品国产三级国产aⅴ入口 | 中文字幕乱码日本亚洲一区二区| 欧美日韩国产高清一区二区三区| 成人免费看视频| 激情综合网av| 日韩精品成人一区二区三区| 综合久久久久久|