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

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

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

?? 一些VHDL的小程序
?? 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.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品 欧美精品| 午夜精品aaa| 国产精品66部| 国产丝袜欧美中文另类| 国产成人欧美日韩在线电影| 国产农村妇女毛片精品久久麻豆| 成人性生交大片免费看视频在线 | 极品少妇xxxx偷拍精品少妇| 欧美大片在线观看一区二区| 国产精品一二三四区| 国产精品初高中害羞小美女文| 色一情一乱一乱一91av| 香蕉久久夜色精品国产使用方法| 8x福利精品第一导航| 久99久精品视频免费观看| 久久午夜免费电影| 91麻豆福利精品推荐| 亚洲sss视频在线视频| 2021中文字幕一区亚洲| 99精品在线观看视频| 亚洲丶国产丶欧美一区二区三区| 日韩精品综合一本久道在线视频| 国产成人丝袜美腿| 香蕉成人伊视频在线观看| 久久男人中文字幕资源站| 一本大道久久a久久综合婷婷| 午夜不卡av在线| 亚洲国产精品精华液ab| 欧美影视一区在线| 国产精品99久久久久| 性久久久久久久| 国产精品五月天| 欧美日韩不卡在线| 成人污污视频在线观看| 无吗不卡中文字幕| 中文字幕av资源一区| 欧美一区二区三区人| 99久久久精品| 国产在线视视频有精品| 亚洲黄色av一区| 久久亚洲欧美国产精品乐播| 欧美少妇bbb| 国产不卡一区视频| 日韩电影免费一区| 亚洲丝袜自拍清纯另类| 26uuu精品一区二区三区四区在线| 色综合久久久久久久久| 国产福利不卡视频| 久久国产欧美日韩精品| 亚洲影视在线播放| 最好看的中文字幕久久| 国产日韩欧美精品一区| 日韩一区二区三区观看| 欧美日韩一卡二卡三卡| 一本一本久久a久久精品综合麻豆| 精品一区二区三区久久久| 午夜精品爽啪视频| 亚洲一区在线视频| 1024成人网| 国产精品私人影院| 久久久久青草大香线综合精品| 91精品国产91热久久久做人人| 91久久精品一区二区三| 99免费精品在线| 国v精品久久久网| 国产精品白丝jk黑袜喷水| 激情综合网av| 精品在线视频一区| 美女被吸乳得到大胸91| 热久久国产精品| 日韩影院免费视频| 日韩精品一二三| 首页综合国产亚洲丝袜| 天天影视涩香欲综合网| 午夜精品久久久久久久99樱桃 | 99国产精品99久久久久久| 国产一区不卡在线| 国产美女av一区二区三区| 国产自产2019最新不卡| 国产二区国产一区在线观看| 国产精品一区二区在线观看不卡| 国产精品白丝av| 懂色av一区二区三区免费观看 | 日韩av一区二区三区四区| 亚洲不卡在线观看| 天堂一区二区在线免费观看| 天天做天天摸天天爽国产一区 | 亚洲欧美乱综合| 一区二区三区在线影院| 亚洲成a人片综合在线| 调教+趴+乳夹+国产+精品| 免费欧美高清视频| 国产一区二区三区在线看麻豆| 国产成人免费在线观看| 成人aaaa免费全部观看| 91国产成人在线| 欧美日本乱大交xxxxx| 日韩一区二区三区四区五区六区 | 久久久.com| 中文字幕第一区第二区| 一区二区三区四区av| 首页国产丝袜综合| 国产精品羞羞答答xxdd| 色国产综合视频| 欧美一区二区国产| 国产精品久久久久7777按摩| 亚洲一区二区视频| 蓝色福利精品导航| 不卡一二三区首页| 欧美精品日韩综合在线| 欧美激情艳妇裸体舞| 一区二区在线观看不卡| 蓝色福利精品导航| 99久久精品国产观看| 日韩一区二区在线免费观看| 国产精品丝袜久久久久久app| 亚洲.国产.中文慕字在线| 国产福利一区二区三区视频 | 天堂一区二区在线免费观看| 久久91精品久久久久久秒播| 94色蜜桃网一区二区三区| 欧美一级专区免费大片| 国产精品福利影院| 六月丁香婷婷色狠狠久久| 99久久er热在这里只有精品15| 在线播放国产精品二区一二区四区| 久久久精品日韩欧美| 午夜欧美在线一二页| 成人伦理片在线| 欧美一区二区国产| 亚洲一区二区精品视频| 成人综合婷婷国产精品久久蜜臀 | 97久久久精品综合88久久| 日韩网站在线看片你懂的| 成人免费小视频| 国产一区二区免费视频| 51久久夜色精品国产麻豆| 综合色中文字幕| 国产精品99久久久久| 日韩欧美二区三区| 亚洲成av人综合在线观看| 色综合天天在线| 国产精品麻豆久久久| 国产一区二区三区日韩| 日韩一区二区三区在线| 亚洲成人免费影院| 在线观看亚洲成人| 中文字幕欧美一区| 懂色一区二区三区免费观看| 亚洲精品一区在线观看| 美美哒免费高清在线观看视频一区二区 | 日韩免费一区二区| 午夜精品福利一区二区三区av | 韩国女主播成人在线观看| 国产精品久久久一本精品| 国产精品一级黄| 精品处破学生在线二十三| 久久精品国产久精国产| 69堂国产成人免费视频| 亚洲午夜日本在线观看| 欧美在线|欧美| 一区二区激情视频| 欧美写真视频网站| 亚洲成人在线免费| 7777精品伊人久久久大香线蕉超级流畅 | 日韩高清不卡一区| 欧美日韩国产精选| 天堂影院一区二区| 91精品国产综合久久婷婷香蕉| 亚洲国产va精品久久久不卡综合| 在线亚洲免费视频| 亚洲国产精品久久人人爱| 欧美色精品在线视频| 午夜一区二区三区在线观看| 欧美日本高清视频在线观看| 五月激情丁香一区二区三区| 日韩一级大片在线| 激情丁香综合五月| 国产精品午夜在线观看| 不卡在线视频中文字幕| 一区二区三区电影在线播| 欧美日韩高清影院| 美女国产一区二区| 国产午夜亚洲精品理论片色戒| 高清国产午夜精品久久久久久| 久久精品一二三| 99精品视频在线免费观看| 一区二区三区精品在线| 欧美肥胖老妇做爰| 国产美女精品在线| 亚洲欧美区自拍先锋| 欧美精品日韩综合在线| 国产乱人伦偷精品视频不卡 | 激情深爱一区二区| 国产午夜精品一区二区三区嫩草| 成人av午夜电影| 亚洲第一成人在线| 久久综合狠狠综合久久激情| 94-欧美-setu| 久久精品国产亚洲高清剧情介绍|