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

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

?? left_right_leds.vhd

?? 利用Spartan-3 Starter Board實驗板上的旋轉開關
?? VHD
字號:
--
-- Reference design - Rotary encoder and simple LEDs on Spartan-3E Starter Kit (Revision C)
--
-- Ken Chapman - Xilinx Ltd - November 2005
-- Revised 20th February 2006
--
-- This design demonstrates how to interface to the rotary encoder and simple LEDs.
--    At the start, only one LED is on. 
--    Turning the rotary encoder to the left or right will cause
--    the LED which is on to appear to also move in the corresponding direction.
--    Pressing the rotary encoder will invert all LEDs so that only one is off.
--
-- The design also uses the 50MHz oscillator provided on the board.
--
-- Instructional value
--   Basic VHDL including definition of inputs and outputs.
--   UCF (User Constraints File) constraints to define pin assignments to match board.
--   UCF constraints to apply pull-up and pull-down resistors to input pins.
--   Detecting rotary movement.
--   Synchronous design.
--
------------------------------------------------------------------------------------
--
-- NOTICE:
--
-- Copyright Xilinx, Inc. 2006.   This code may be contain portions patented by other 
-- third parties.  By providing this core as one possible implementation of a standard,
-- Xilinx is making no representation that the provided implementation of this standard 
-- is free from any claims of infringement by any third party.  Xilinx expressly 
-- disclaims any warranty with respect to the adequacy of the implementation, including 
-- but not limited to any warranty or representation that the implementation is free 
-- from claims of any third party.  Furthermore, Xilinx is providing this core as a 
-- courtesy to you and suggests that you contact all third parties to obtain the 
-- necessary rights to use this implementation.
--
------------------------------------------------------------------------------------
--
-- Library declarations
--
-- Standard IEEE libraries
--
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
--
------------------------------------------------------------------------------------
--
--
entity left_right_leds is
    Port (             led : out std_logic_vector(7 downto 0);
                  rotary_a : in std_logic;
                  rotary_b : in std_logic;
              rotary_press : in std_logic;
                       clk : in std_logic);
    end left_right_leds;
--
------------------------------------------------------------------------------------
--
-- Start of test architecture
--
architecture Behavioral of left_right_leds is
--
------------------------------------------------------------------------------------
--
-- Signals used to interface to rotary encoder
--
signal      rotary_a_in : std_logic;
signal      rotary_b_in : std_logic;
signal  rotary_press_in : std_logic;
signal        rotary_in : std_logic_vector(1 downto 0);
signal        rotary_q1 : std_logic;
signal        rotary_q2 : std_logic;
signal  delay_rotary_q1 : std_logic;
signal     rotary_event : std_logic;
signal      rotary_left : std_logic;
--
-- Signals used to drive LEDs
--
signal      led_pattern : std_logic_vector(7 downto 0):= "00010000"; --initial value puts one LED on near the middle.
signal        led_drive : std_logic_vector(7 downto 0);
--
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--
-- Start of circuit description
--
begin
  --
  ----------------------------------------------------------------------------------------------------------------------------------
  -- Interface to rotary encoder.
  -- Detection of movement and direction.
  ----------------------------------------------------------------------------------------------------------------------------------
  --
  -- The rotary switch contacts are filtered using their offset (one-hot) style to  
  -- clean them. Circuit concept by Peter Alfke.
  -- Note that the clock rate is fast compared with the switch rate.

  rotary_filter: process(clk)
  begin
    if clk'event and clk='1' then

      --Synchronise inputs to clock domain using flip-flops in input/output blocks.
      rotary_a_in <= rotary_a;
      rotary_b_in <= rotary_b;
      rotary_press_in <= rotary_press;

      --concatinate rotary input signals to form vector for case construct.
      rotary_in <= rotary_b_in & rotary_a_in;

      case rotary_in is

        when "00" => rotary_q1 <= '0';         
                     rotary_q2 <= rotary_q2;
 
        when "01" => rotary_q1 <= rotary_q1;
                     rotary_q2 <= '0';

        when "10" => rotary_q1 <= rotary_q1;
                     rotary_q2 <= '1';

        when "11" => rotary_q1 <= '1';
                     rotary_q2 <= rotary_q2; 

        when others => rotary_q1 <= rotary_q1; 
                       rotary_q2 <= rotary_q2; 
      end case;

    end if;
  end process rotary_filter;
  --
  -- The rising edges of 'rotary_q1' indicate that a rotation has occurred and the 
  -- state of 'rotary_q2' at that time will indicate the direction. 
  --
  direction: process(clk)
  begin
    if clk'event and clk='1' then

      delay_rotary_q1 <= rotary_q1;
      if rotary_q1='1' and delay_rotary_q1='0' then
        rotary_event <= '1';
        rotary_left <= rotary_q2;
       else
        rotary_event <= '0';
        rotary_left <= rotary_left;
      end if;

    end if;
  end process direction;
  --
  --
  ----------------------------------------------------------------------------------------------------------------------------------
  -- LED control.
  ----------------------------------------------------------------------------------------------------------------------------------
  --
  -- The LED pattern is provided by a shift register which has been initialised in the signal 
  -- definition to have only one bit active (High). 
  --
  led_display: process(clk)
  begin
    if clk'event and clk='1' then

      if rotary_event='1' then
        if rotary_left='1' then 
          led_pattern <= led_pattern(6 downto 0) & led_pattern(7); --rotate LEDs to left
         else
          led_pattern <= led_pattern(0) & led_pattern(7 downto 1); --rotate LEDs to right
        end if;
      end if;

     --
     -- Pressing the rotary encoder will cause all LED drive bits to be inverted.
     --

      if rotary_press_in='0' then
        led_drive <= led_pattern; 
       else
        led_drive <= led_pattern xor "11111111";  
      end if;

      --Ouput LED drive to the pins making use of the output flip-flops in input/output blocks.
      led <= led_drive; 

    end if;
  end process led_display;
  --
  --
end Behavioral;

------------------------------------------------------------------------------------------------------------------------------------
--
-- END OF FILE left_right_leds.vhd
--
------------------------------------------------------------------------------------------------------------------------------------

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
337p日本欧洲亚洲大胆色噜噜| 亚洲一区二区美女| 亚洲欧美一区二区三区久本道91 | 欧美日韩精品专区| 久久婷婷色综合| 一区二区三区欧美激情| 成人精品gif动图一区| 日韩欧美在线一区二区三区| 一区二区三区国产豹纹内裤在线| 国产精品一区二区免费不卡| 欧美日韩一区精品| 亚洲裸体xxx| 9i在线看片成人免费| 久久久高清一区二区三区| 日韩一区精品视频| 欧美日韩午夜在线视频| 亚洲精品视频免费看| 国产aⅴ综合色| 国产蜜臀av在线一区二区三区| 蜜臀av性久久久久av蜜臀妖精 | 亚洲成年人网站在线观看| www.99精品| 国产精品久久久久久户外露出| 精品制服美女久久| 日韩欧美一级特黄在线播放| 婷婷综合另类小说色区| 欧美男男青年gay1069videost| 综合色中文字幕| 色综合色狠狠综合色| 综合久久久久久| 99国产欧美久久久精品| 中文字幕亚洲视频| 色综合夜色一区| 亚洲黄色av一区| 欧美日韩中文字幕精品| 亚洲成人免费视| 538在线一区二区精品国产| 成人毛片视频在线观看| 国产欧美精品区一区二区三区| 国产成人在线视频网站| 国产精品久久久久久久久免费丝袜| 国产黑丝在线一区二区三区| 中文字幕免费观看一区| 色香色香欲天天天影视综合网| 亚洲人被黑人高潮完整版| 欧美亚洲综合另类| 欧美aaaaaa午夜精品| 精品国产91乱码一区二区三区| 久久国产精品无码网站| 亚洲国产精品av| 日本福利一区二区| 日本大胆欧美人术艺术动态| 日韩你懂的在线播放| 国产精品亚洲综合一区在线观看| 国产欧美日韩精品在线| 在线日韩一区二区| 麻豆91在线观看| 久久久不卡网国产精品二区 | 欧美一区二区三区四区在线观看| 视频一区二区不卡| 国产午夜精品一区二区三区四区| 91视视频在线观看入口直接观看www| 综合网在线视频| 欧美一区二区三区小说| 国产成人欧美日韩在线电影| 亚洲一区成人在线| 久久这里只有精品6| av在线不卡观看免费观看| 爽好多水快深点欧美视频| 欧美激情一区二区| 在线成人av网站| 国产一区二区三区高清播放| 亚洲男人的天堂在线观看| 日韩精品一区二区三区中文不卡| 成+人+亚洲+综合天堂| 亚洲一区二区欧美| 国产精品乱人伦中文| 欧美二区乱c少妇| 99视频精品免费视频| 老司机午夜精品99久久| 亚洲免费在线电影| 久久蜜桃av一区二区天堂| 欧美视频第二页| 成人午夜视频网站| 紧缚奴在线一区二区三区| 亚洲h在线观看| 综合色天天鬼久久鬼色| 久久精品免视看| 一区二区在线免费| 中文字幕第一区二区| 欧美一区二区福利在线| 欧美三级在线看| 色综合夜色一区| 成a人片亚洲日本久久| 国产精品中文字幕日韩精品| 捆绑紧缚一区二区三区视频| 亚洲不卡av一区二区三区| 最好看的中文字幕久久| 亚洲国产精品99久久久久久久久| www亚洲一区| 精品国产一区二区三区忘忧草 | 在线观看亚洲a| 91丨porny丨户外露出| 粉嫩一区二区三区在线看| 精品一区二区日韩| 精油按摩中文字幕久久| 久久精品国产精品青草| 欧美bbbbb| 麻豆91在线看| 国产一区二区精品在线观看| 麻豆成人在线观看| 久久精品国产精品青草| 精品一二三四区| 国产美女娇喘av呻吟久久| 国产伦精品一区二区三区视频青涩| 欧美日韩成人综合| 欧美久久久久久久久中文字幕| 欧洲亚洲国产日韩| 欧美日韩精品欧美日韩精品一| 欧美午夜片在线观看| 欧美亚洲国产bt| 欧美日韩一区二区欧美激情| 欧洲中文字幕精品| 欧美电影在哪看比较好| 日韩欧美久久一区| 久久午夜电影网| 中文字幕精品综合| 亚洲免费成人av| 午夜伊人狠狠久久| 麻豆精品视频在线观看视频| 国产在线精品一区在线观看麻豆| 国产成人精品亚洲午夜麻豆| 波多野结衣在线一区| 色琪琪一区二区三区亚洲区| 538在线一区二区精品国产| 久久久亚洲精品石原莉奈| 日本一区二区免费在线观看视频| 亚洲天堂av老司机| 午夜久久福利影院| 激情小说亚洲一区| 91网站黄www| 91精品啪在线观看国产60岁| 欧美成人性福生活免费看| 国产欧美日韩三区| 香蕉av福利精品导航| 国产伦精品一区二区三区免费迷 | 日韩一区二区三区免费看| 久久久久久黄色| 亚洲一区二区三区自拍| 免费观看在线综合色| 99国产精品久久| 欧美成人一区二区三区片免费| 国产精品久久99| 蜜桃av一区二区| 91美女福利视频| 国产日韩欧美精品在线| 亚洲超碰97人人做人人爱| 丁香天五香天堂综合| 欧美日韩精品高清| 成人免费在线视频观看| 蜜臀av一区二区在线免费观看| 99久久精品国产一区| 精品久久久久久久久久久久包黑料| 中文字幕av免费专区久久| 轻轻草成人在线| 欧美影院一区二区三区| 国产欧美日韩卡一| 毛片av一区二区三区| 欧美亚洲动漫精品| 国产精品萝li| 国产成a人亚洲精| 日韩精品最新网址| 日韩电影一区二区三区四区| 色综合久久中文字幕| 欧美激情一区二区三区在线| 久久er精品视频| 欧美日韩国产bt| 亚洲精品国产精华液| 99久久久久久99| 国产精品国产三级国产三级人妇 | 91麻豆免费在线观看| 久久久电影一区二区三区| 久久精品国产第一区二区三区| 欧美日韩精品免费| 亚洲一区二区三区国产| 91久久线看在观草草青青| 亚洲欧美视频在线观看| 成人一区二区视频| 久久久欧美精品sm网站| 精品中文av资源站在线观看| 欧美zozo另类异族| 伦理电影国产精品| 精品国产乱码久久久久久夜甘婷婷| 亚洲国产裸拍裸体视频在线观看乱了| 成人一区二区视频| 中文字幕亚洲视频| 91在线无精精品入口| 亚洲色图制服丝袜| 日本韩国欧美三级| 午夜精品成人在线|