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

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

?? left_right_leds.vhd

?? xilinx的SPARTAN-3E入門開發板實例 根據官方公布的led移動范例改寫。 原范例僅提供了源代碼、燒寫文件以及dos窗口下使用的燒寫bat文件。 本實例采用了ise7.1i創建
?? 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一区二区三区免费野_久草精品视频
久久精品一区二区三区不卡牛牛| 欧美精品粉嫩高潮一区二区| 精品国产精品网麻豆系列| 日本最新不卡在线| 亚洲精品一区二区在线观看| 制服丝袜成人动漫| 成人av电影在线观看| 视频一区免费在线观看| 欧美极品美女视频| 欧美日韩国产经典色站一区二区三区| 国产一区福利在线| 亚洲一区中文日韩| 中文一区在线播放| 国产精品乱人伦中文| 日韩一区二区在线播放| 色综合天天综合狠狠| 久久精品国产久精国产| 亚洲高清在线精品| 亚洲人午夜精品天堂一二香蕉| 欧美大度的电影原声| 欧美日韩一区二区三区视频| 成人av免费网站| 在线观看区一区二| 一道本成人在线| 不卡的av中国片| 在线视频亚洲一区| 欧美一级欧美三级在线观看| 欧美三区免费完整视频在线观看| 欧美精品123区| 亚洲精品一线二线三线| 亚洲天堂福利av| 国产欧美日本一区二区三区| 精品少妇一区二区三区日产乱码 | 欧洲视频一区二区| 884aa四虎影成人精品一区| 精品久久人人做人人爱| 国产精品理伦片| 国产精品拍天天在线| 亚洲午夜影视影院在线观看| 精品亚洲国产成人av制服丝袜| 美女视频黄a大片欧美| 亚洲va中文字幕| 亚洲福利国产精品| 国产呦精品一区二区三区网站| 99久久精品免费看国产| 色综合中文字幕| 久久久美女艺术照精彩视频福利播放| 精品裸体舞一区二区三区| 亚洲欧美日韩在线| 国产一区福利在线| 91精品国模一区二区三区| 亚洲欧美偷拍卡通变态| 国产一区二区看久久| 911精品国产一区二区在线| 日本一区二区成人| 激情欧美一区二区| 成人免费观看视频| 日本韩国一区二区| 3atv一区二区三区| 亚洲黄色av一区| 美女免费视频一区| 欧美巨大另类极品videosbest | 色网站国产精品| 久久久国产精华| 久久电影国产免费久久电影| 欧美日韩mp4| 亚洲综合男人的天堂| 成人午夜伦理影院| 久久久三级国产网站| 激情综合色综合久久| 日韩欧美一级二级三级久久久| 亚洲福利一二三区| 欧美日韩免费视频| 一级日本不卡的影视| 五月天一区二区三区| 国产一区二区三区四区在线观看| 制服丝袜中文字幕一区| 亚洲成va人在线观看| 欧美视频中文一区二区三区在线观看| 91麻豆精品国产91久久久久| 亚洲成人自拍偷拍| 欧美三级日韩在线| 日韩精品91亚洲二区在线观看| 欧美日韩一级二级三级| 五月婷婷另类国产| 欧美一区二区久久| 国内精品自线一区二区三区视频| 日韩你懂的在线观看| 国产真实乱子伦精品视频| 26uuu欧美| 爽好多水快深点欧美视频| 欧美日本韩国一区二区三区视频| 亚洲成人资源网| 26uuu亚洲综合色| 国产99久久精品| 久久亚洲二区三区| 成人免费高清视频在线观看| 中文字幕一区二区三区在线播放 | 麻豆视频观看网址久久| 日韩欧美一卡二卡| 国产91在线看| 一区二区不卡在线播放| 日韩欧美中文一区二区| 国产精品一区二区久激情瑜伽| 91精品蜜臀在线一区尤物| 精品影视av免费| 亚洲欧洲日产国码二区| 欧美放荡的少妇| 成人夜色视频网站在线观看| 亚洲一区电影777| 久久网这里都是精品| 色播五月激情综合网| 久久激情五月激情| 亚洲激情自拍偷拍| 精品国产乱码久久| 欧美三级电影网站| 国产成人av一区二区三区在线观看| 日韩欧美二区三区| 99久久久无码国产精品| 免费在线看一区| 日韩一级在线观看| 91美女片黄在线观看91美女| 国产精品日韩精品欧美在线| 精品污污网站免费看| 国产精品亚洲а∨天堂免在线| 亚洲一区二区三区四区五区黄| 日韩欧美综合一区| 91美女在线看| 成人av免费网站| 国内精品伊人久久久久av一坑| 亚洲一区二区综合| 国产精品二三区| 精品日韩成人av| 717成人午夜免费福利电影| 波多野结衣在线aⅴ中文字幕不卡| 中文字幕一区不卡| 精品女同一区二区| 在线91免费看| 欧美伊人久久久久久久久影院| 国产成人午夜99999| 麻豆91免费观看| 石原莉奈在线亚洲二区| 亚洲一区二区精品视频| 亚洲乱码中文字幕| 国产精品国产三级国产有无不卡| 久久色在线视频| 2021国产精品久久精品| 精品久久久久一区二区国产| 欧美肥胖老妇做爰| 日韩一区二区视频| 欧美日韩国产片| 欧美精品日韩精品| 91精品国产色综合久久ai换脸 | 欧美一级生活片| 欧美一级片在线| 日韩三级.com| 精品国产乱码久久久久久浪潮 | 欧美精品一区二区三区蜜臀| 5月丁香婷婷综合| 欧美丰满一区二区免费视频| 欧美日韩国产片| 欧美一级xxx| 日韩美女视频在线| 久久久久国产精品麻豆| 国产人妖乱国产精品人妖| 欧美国产日韩在线观看| 亚洲欧美日韩电影| 亚洲综合成人在线视频| 日本欧美一区二区在线观看| 男人的j进女人的j一区| 国产传媒一区在线| 国产不卡视频一区| 欧美亚洲图片小说| 制服丝袜国产精品| 国产欧美日韩中文久久| 成人欧美一区二区三区1314| 亚洲一级二级在线| 日本va欧美va精品发布| 国产高清精品久久久久| jlzzjlzz亚洲女人18| 欧美视频一区二区三区四区| 日韩一区二区麻豆国产| 中文字幕av在线一区二区三区| 亚洲免费av观看| 麻豆精品国产传媒mv男同| 国产精品白丝jk黑袜喷水| 色婷婷一区二区三区四区| 3d动漫精品啪啪| 国产精品激情偷乱一区二区∴| 亚洲一区二区免费视频| 国产精品一二二区| 欧美午夜电影网| 国产亚洲精品bt天堂精选| 亚洲精品国产精品乱码不99| 麻豆精品国产传媒mv男同 | 亚洲主播在线观看| 韩国欧美国产一区| 欧美图区在线视频| 国产精品久久久久久久久动漫 | 国产一区二区福利|