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

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

?? ?

?? 44個vhdl實例 注1: 含有不可綜合語句
??
?? 第 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.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲激情在线播放| 国产精品系列在线播放| 成人激情免费视频| 国产拍欧美日韩视频二区| 国产精品99久久久久久宅男| 国产拍欧美日韩视频二区| 成人丝袜高跟foot| 日韩一区欧美小说| 精品视频1区2区| 成人av电影在线观看| 日韩午夜电影在线观看| 亚洲午夜视频在线| 欧美色男人天堂| 免费久久精品视频| 国产亚洲精品久| 色综合欧美在线视频区| 一区二区欧美精品| 日韩欧美一二三四区| 国产91在线|亚洲| 亚洲精品免费在线观看| 91精品国模一区二区三区| 国产在线播放一区| 伊人婷婷欧美激情| 日韩午夜av一区| 91亚洲永久精品| 蜜臀久久99精品久久久久宅男| 91精品国产综合久久蜜臀| 国产精品99久久久久久久女警| 中文字幕在线观看不卡视频| 欧美三级电影在线看| 国产美女精品人人做人人爽| 亚洲久草在线视频| 欧美精品一区二区久久久| 色婷婷综合久久久中文字幕| 另类小说综合欧美亚洲| 亚洲欧洲日韩在线| 日韩欧美一级特黄在线播放| 97精品国产露脸对白| 麻豆高清免费国产一区| 国产精品萝li| 欧美成人激情免费网| 91免费看视频| 国产精品综合av一区二区国产馆| 亚洲一级二级在线| 国产精品无人区| 日韩视频国产视频| 色欧美片视频在线观看| 久久国产福利国产秒拍| 亚洲福利一区二区三区| 日本一区二区三区视频视频| 欧美一区二区三区免费在线看| av不卡一区二区三区| 韩国视频一区二区| 午夜日韩在线观看| 一区二区三区电影在线播| 久久综合久久综合久久综合| 91.xcao| 色综合久久久久网| 国产 日韩 欧美大片| 韩国精品在线观看| 理论片日本一区| 亚欧色一区w666天堂| 亚洲精品视频自拍| 国产精品乱人伦中文| 久久久国产一区二区三区四区小说| 欧美一级夜夜爽| 欧美日本在线观看| 欧美午夜理伦三级在线观看| 99久久婷婷国产综合精品| 成人性生交大片免费看中文| 精品亚洲aⅴ乱码一区二区三区| 日韩电影在线观看网站| 日韩精品国产精品| 五月天网站亚洲| 亚洲mv在线观看| 天天色 色综合| 亚洲成av人片| 日韩电影一二三区| 天堂一区二区在线| 秋霞成人午夜伦在线观看| 三级一区在线视频先锋 | 亚洲一二三区在线观看| 亚洲卡通动漫在线| 亚洲自拍与偷拍| 一区二区三区在线免费观看| 一区二区三区色| 亚洲成人精品影院| 日韩不卡手机在线v区| 另类小说色综合网站| 国产一区二区三区高清播放| 国产不卡一区视频| 成人黄色av电影| 色94色欧美sute亚洲线路二| 欧美日韩一区二区三区四区五区| 欧美午夜影院一区| 日韩免费观看高清完整版| 26uuu色噜噜精品一区| 中文字幕+乱码+中文字幕一区| 国产精品久久久久久久久免费丝袜| 国产精品成人免费在线| 亚洲免费大片在线观看| 亚洲第一激情av| 狠狠网亚洲精品| 成人av在线影院| 欧美日韩国产首页| 久久综合久久鬼色| 亚洲精品美腿丝袜| 美国十次综合导航| a级高清视频欧美日韩| 欧美网站一区二区| 欧美精品一区二区三区视频| 1024成人网| 日本中文字幕一区二区有限公司| 国产麻豆成人传媒免费观看| 91免费视频观看| 国产一区 二区 三区一级| 国产高清亚洲一区| 一本大道久久a久久精品综合| 欧美老年两性高潮| 国产女主播一区| 亚洲高清在线视频| 国产乱码字幕精品高清av | 久久久精品国产免费观看同学| 中文字幕不卡的av| 日日摸夜夜添夜夜添亚洲女人| 国产综合成人久久大片91| 91官网在线观看| 亚洲精品一区二区三区香蕉| 一区二区三区鲁丝不卡| 韩国毛片一区二区三区| 欧美在线免费播放| 国产亚洲1区2区3区| 日本亚洲欧美天堂免费| 91丨porny丨户外露出| 日韩欧美综合在线| 亚洲综合在线观看视频| 国产大陆亚洲精品国产| 91精品国产乱| 一区二区视频免费在线观看| 成人午夜激情视频| 精品久久一区二区三区| 亚洲电影一区二区| jizz一区二区| 26uuuu精品一区二区| 日韩国产在线一| 在线观看视频一区| 国产精品久久久爽爽爽麻豆色哟哟| 老汉av免费一区二区三区| 欧美亚洲国产一区在线观看网站| 国产精品你懂的| 国产精品小仙女| 欧美不卡一区二区| 日韩avvvv在线播放| 欧美三级乱人伦电影| 夜夜精品视频一区二区| www.欧美精品一二区| 国产精品萝li| 强制捆绑调教一区二区| 欧美性做爰猛烈叫床潮| 亚洲视频一区二区在线观看| 国产99久久久精品| 国产偷国产偷精品高清尤物| 欧美性受极品xxxx喷水| 成人欧美一区二区三区视频网页| 大胆亚洲人体视频| 国产清纯美女被跳蛋高潮一区二区久久w| 免费人成在线不卡| 欧美电影在线免费观看| 午夜欧美视频在线观看| 欧美日韩情趣电影| 亚洲成av人片观看| 91精品国产免费| 青草av.久久免费一区| 欧美不卡一区二区| 国产一区视频在线看| 久久先锋资源网| 成人手机电影网| 综合精品久久久| 欧美视频精品在线观看| 午夜婷婷国产麻豆精品| 欧美一级精品在线| 青娱乐精品在线视频| 久久这里只有精品首页| 国产成人精品免费网站| 国产精品你懂的| 欧美在线一二三四区| 日韩成人一级片| 久久五月婷婷丁香社区| 成人免费视频一区| 一级日本不卡的影视| 日韩一区二区精品葵司在线| 激情图区综合网| **性色生活片久久毛片| 欧美午夜免费电影| 精品一区二区三区久久久| 欧美激情艳妇裸体舞| 在线视频中文字幕一区二区| 日韩va亚洲va欧美va久久| 久久精品无码一区二区三区| 91免费看片在线观看|