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

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

?? rxcver.vhd

?? 利用VHDL語言開發一個UART的源代碼
?? VHD
?? 第 1 頁 / 共 2 頁
字號:
-- --------------------------------------------------------------------
-- >>>>>>>>>>>>>>>>>>>>>>>>> COPYRIGHT NOTICE <<<<<<<<<<<<<<<<<<<<<<<<<
-- --------------------------------------------------------------------
-- Copyright (c) 2001 by Lattice Semiconductor Corporation
-- --------------------------------------------------------------------
--
-- Permission:
--
--   Lattice Semiconductor grants permission to use this code for use
--   in synthesis for any Lattice programmable logic product.  Other
--   use of this code, including the selling or duplication of any
--   portion is strictly prohibited.
--
-- Disclaimer:
--
--   This VHDL or Verilog source code is intended as a design reference
--   which illustrates how these types of functions can be implemented.
--   It is the user's responsibility to verify their design for
--   consistency and functionality through the use of formal
--   verification methods.  Lattice Semiconductor provides no warranty
--   regarding the use or functionality of this code.
--
-- --------------------------------------------------------------------
--           
--                     Lattice Semiconductor Corporation
--                     5555 NE Moore Court
--                     Hillsboro, OR 97214
--                     U.S.A
--
--                     TEL: 1-800-Lattice (USA and Canada)
--                          408-826-6000 (other locations)
--
--                     web: http://www.latticesemi.com/
--                     email: techsupport@latticesemi.com
--
-- --------------------------------------------------------------------
--
--  Project:           Universal Asynchronous Receiver Transmitter
--  File:              rxcver.vhd
--  Title:             rxcver
--  Design Library:    IEEE
--  Dependencies:      IEEE.std_logic_1164.all
--                     IEEE.std_logic_unsigned.all
--  Description:       VHDL file for the UART Receiver Module
--
--    <Global reset and clock>
--      Reset       : Master reset
--      Clk16X      : UART internal clock
--
--    <Register>
--      RBR         : Receiver Buffer Register
--
--    <Rising edge of RBR, LSR read strobes>
--      RbrRDn_re   : one Clk16X width pulse indicating rising edge of RbrRDn_r
--      LsrRDn_re   : one Clk16X width pulse indicating rising edge of LsrRDn_r
--
--    <Receiver input>
--      SIN         : Receiver serial input
--
--    <Receiver control>
--      Databits    : "00"=5-bit, "01"=6-bit, "10"=7-bit, "11"=8-bit
--      ParityEnable: '0'=Parity Bit Enable, '1'=Parity Bit Disable
--      ParityEven  : '0'=Even Parity Selected, '1'=Odd Parity Selected
--      ParityStick : '0'=Stick Parity Disable, '1'=Stick Parity Enable
--
--    <Receiver/Transmitter status>
--      RxRDY       : RBR data is ready to be read
--      OverrunErr  : Overrun error
--      ParityErr   : Parity error
--      FrameErr    : Frame error
--      BreakInt    : BREAK interrupt
--
-- --------------------------------------------------------------------
--
-- Revision History :
-- --------------------------------------------------------------------
--   Ver  :| Author            :| Mod. Date :| Changes Made:
--   V1.1 :| J.H.              :| 06/19/01  :| Support ispMACH 5000VG
--   V1.0 :| D.W. & J.H.       :| 06/01/01  :| First Release
-- --------------------------------------------------------------------

library IEEE;
use IEEE.Std_Logic_1164.all;
use IEEE.Std_Logic_Unsigned.all;

entity Rxcver is
  port (
    -- Global reset and clock
    Reset       : in  std_logic; -- Master reset
    Clk16X      : in  std_logic; -- UART internal clock
    -- Register
    RBR         : out std_logic_vector(7 downto 0); -- Receiver Buffer Reg
    -- Rising edge of RBR, LSR read strobes
    RbrRDn_re   : in  std_logic; -- pulse indicating rising of RbrRDn_r
    LsrRDn_re   : in  std_logic; -- pulse indicating rising of LsrRDn_r
    -- Receiver input
    SIN         : in  std_logic;
    -- Receiver control
    Databits    : in  std_logic_vector(1 downto 0); -- Data bits length
    ParityEnable: in  std_logic; -- 0= Parity Disabled; 1= Parity Enabled
    ParityEven  : in  std_logic; -- 0= Odd Parity; 1= Even Parity
    ParityStick : in  std_logic; -- 0= Stick Disabled; 1= Stick Enabled
    -- Receiver status
    RxRDY       : out std_logic; -- Receiver data ready to read
    OverrunErr  : out std_logic; -- Receiver overrun error flag
    ParityErr   : out std_logic; -- Receiver parity error flag
    FrameErr    : out std_logic; -- Receiver framing error flag
    BreakInt    : out std_logic  -- Receiver BREAK interrupt flag
  );
end Rxcver;

architecture Rxcver_a of Rxcver is

  signal NumDataBitReceived_r : std_logic_vector(3 downto 0);

  signal RSR         : std_logic_vector(7 downto 0);
  signal RxPrtyErr   : std_logic;
  signal RxFrmErr    : std_logic;
  signal RxIdle_r    : std_logic;
  signal RbrDataRDY  : std_logic;
  signal CNT_r       : std_logic_vector(3 downto 0);

  signal Hunt_r      : boolean;
  signal HuntOne_r   : std_logic;

  signal SIN1_r      : std_logic;
  signal RxFrmErr1_r : std_logic;
  signal RxIdle1_r   : std_logic;

  signal OverrunErr_r: std_logic;
  signal ParityErr_r : std_logic;
  signal FrameErr_r  : std_logic;
  signal BreakInt_r  : std_logic;

  signal SampledOnce : std_logic;

  -- Receiver Clock Enable Signal
  signal RxClkEn     : std_logic;

  signal RBR_r       : std_logic_vector(7 downto 0);

  -- State Machine Definition
  type state_typ is (idle, shift, parity, stop);
  signal Rx_State : state_typ;

  -- Attributes for ispMACH5000VG to get higher performance
  --   These can be removed when the UART design is targeted to other devices.
  ATTRIBUTE SYN_KEEP : integer;
  ATTRIBUTE SYN_KEEP OF RxPrtyErr, NumDataBitReceived_r, RSR : SIGNAL IS 1;
  ATTRIBUTE SYN_KEEP OF Hunt_r, HuntOne_r, ParityErr_r, FrameErr_r : SIGNAL IS 1;
  ATTRIBUTE SYN_KEEP OF BreakInt_r, RBR_r, OverrunErr_r, RbrDataRDY : SIGNAL IS 1;
  ATTRIBUTE SYN_KEEP OF RxFrmErr, RxIdle_r : SIGNAL IS 1;
  ATTRIBUTE OPT : string;
  ATTRIBUTE OPT OF RxPrtyErr, NumDataBitReceived_r, RSR : SIGNAL IS "KEEP";
  ATTRIBUTE OPT OF Hunt_r, HuntOne_r, ParityErr_r, FrameErr_r : SIGNAL IS "KEEP";
  ATTRIBUTE OPT OF BreakInt_r, RBR_r, OverrunErr_r, RbrDataRDY : SIGNAL IS "KEEP";
  ATTRIBUTE OPT OF RxFrmErr, RxIdle_r : SIGNAL IS "KEEP";

begin

--------------------------------------------------------------------------------
-- Generate RxClkEn signal
--------------------------------------------------------------------------------

  -- RxClkEn : serial port data receiving clock enable
  RxCLK_Proc: process (Reset, Clk16X)
  begin
    if (Reset='1') then
      RxClkEn <= '0';
    elsif rising_edge(Clk16X) then
      if (CNT_r="0110") then
        RxClkEn <= '1';
      else
        RxClkEn <= '0';
      end if;
    end if;
  end process RxCLK_Proc;

  -- CNT_r : 4-bit counter for RxClkEn waveform generation
  CNT_Proc: process (Reset, Clk16X)
  begin
    if (Reset='1') then
      CNT_r <= (others => '0');
    elsif rising_edge(Clk16X) then
      if (Rx_State /= idle) or (Hunt_r) then
        -- Increment count when not idle or when Hunt_r is TRUE
        CNT_r <= CNT_r + 1;
      elsif (SampledOnce='1') then
        -- Adjust 2 clks forward for RxClkEn during the resync after framing error
        CNT_r <= "0010";
      else
        CNT_r <= (others => '0');
      end if;
    end if;
  end process CNT_Proc;

--------------------------------------------------------------------------------
-- Generate Hunt_r
--------------------------------------------------------------------------------

  -- Hunt_r : will be TRUE when start bit is found
  Hunt_r_Proc: process (Reset, Clk16X)
  begin
    if (Reset='1') then
      Hunt_r <= FALSE;
    elsif rising_edge(Clk16X) then
      if (Rx_State=idle) and (SIN='0') and (SIN1_r='1') then
        -- Set Hunt_r when SIN falling edge is found at the idle state
        Hunt_r <= TRUE;
      elsif (SampledOnce='1') and (SIN='0') then
        -- Start bit is successfully sampled twice after framing error
        -- set Hunt_r "true" for resynchronizing of next frame
        Hunt_r <= TRUE;
      elsif (RxIdle_r='0') or (SIN='1') then
        -- Clear Hunt_r when data shifting starts or when SIN returns to '1'
        Hunt_r <= FALSE;
      end if;
    end if;
  end process Hunt_r_Proc;

  -- HuntOne_r :
  --   HuntOne_r, used for BI flag generation, indicates that there is at
  --   least a '1' in the (data + parity + stop) bits of the frame.
  --   Break Interrupt flag(BI) is set to '1' whenever the received input
  --   is held at the '0' state for all bits in the frame (Start bit +
  --   Data bits + Parity bit + Stop bit).  So, as long as HuntOne_r is still
  --   low after all bits are received, BI will be set to '1'.
  HuntOne_r_Proc: process(Clk16X, Reset)
  begin
    if (Reset='1') then
      HuntOne_r <= '0';
    elsif rising_edge(Clk16X) then
      if (Hunt_r) then
        HuntOne_r <= '0';
      elsif (RxIdle_r='0') and (CNT_r(3)='1') and (SIN='1') then
        HuntOne_r <= '1';
      end if;
    end if;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产日产av| 亚洲三级免费电影| 国产成人综合亚洲网站| 亚洲免费大片在线观看| 91激情在线视频| 亚洲一卡二卡三卡四卡| 7777精品伊人久久久大香线蕉经典版下载 | 国产精品一二三区| 国产精品少妇自拍| 91福利在线看| 久久精品二区亚洲w码| 国产日韩影视精品| 在线视频欧美精品| 免费成人av在线| 国产精品狼人久久影院观看方式| 91美女片黄在线| 午夜视频在线观看一区二区三区| 精品久久一二三区| 成人美女视频在线看| 亚洲444eee在线观看| 久久精品欧美一区二区三区不卡 | 亚洲成av人在线观看| 2020国产精品| 欧美性生活久久| 国产suv一区二区三区88区| 一区二区三区不卡视频| 久久午夜羞羞影院免费观看| 欧美在线观看一区| 国产激情一区二区三区四区| 午夜成人免费视频| 国产精品福利一区| 日韩欧美国产综合| 日本韩国欧美一区二区三区| 久久精品理论片| 亚洲aⅴ怡春院| 1000精品久久久久久久久| 精品少妇一区二区三区日产乱码| 99视频一区二区| 国内不卡的二区三区中文字幕| 亚洲欧美偷拍另类a∨色屁股| 久久日韩粉嫩一区二区三区| 欧美精品自拍偷拍动漫精品| jlzzjlzz国产精品久久| 免费xxxx性欧美18vr| 亚洲成人动漫一区| 亚洲欧美另类久久久精品| 亚洲免费在线观看| 久久男人中文字幕资源站| 欧美群妇大交群的观看方式| 国产精品亚洲视频| 日本不卡一二三区黄网| 一区二区三区在线免费视频| 中文一区二区在线观看| 精品国产一区a| 日韩久久精品一区| 欧美二区三区91| 欧美日韩国产综合草草| 国产欧美日韩中文久久| 欧美精品在线视频| 欧美日韩不卡在线| 欧美日韩一区成人| 欧美无乱码久久久免费午夜一区 | 久久精品欧美一区二区三区麻豆| 日韩午夜精品视频| 欧美电影免费提供在线观看| 91精品国产色综合久久不卡电影| 欧美人与z0zoxxxx视频| 欧美日韩亚洲综合一区二区三区 | 成年人国产精品| 成人毛片视频在线观看| 国产91精品精华液一区二区三区| 精品一区二区在线播放| 蜜桃视频第一区免费观看| 日韩不卡一二三区| 日韩av一级电影| 麻豆精品视频在线观看视频| 久草这里只有精品视频| 极品少妇一区二区三区精品视频| 国内精品免费在线观看| 国产成人综合网站| 成人国产亚洲欧美成人综合网| 成人免费毛片高清视频| 色视频欧美一区二区三区| 欧美天堂一区二区三区| 欧美精品久久一区二区三区| 欧美一级片免费看| 久久只精品国产| 国产精品盗摄一区二区三区| 亚洲激情在线激情| 首页国产丝袜综合| 久久成人久久爱| 成人一级片网址| 欧美性色欧美a在线播放| 日韩一区二区三区免费看| 久久久国产精华| 一区二区三区成人在线视频| 五月婷婷欧美视频| 国产成人在线观看免费网站| 91美女福利视频| 91精品国产手机| 国产精品美日韩| 无码av免费一区二区三区试看| 久久91精品久久久久久秒播| 成人免费观看男女羞羞视频| 欧美中文字幕一区二区三区亚洲 | 日韩一级成人av| 中文字幕巨乱亚洲| 亚洲电影在线播放| 久久草av在线| 欧美综合天天夜夜久久| 欧美精品一区二区三区视频| 亚洲色图丝袜美腿| 久久成人免费网站| 日本精品一区二区三区高清| 精品国产在天天线2019| 亚洲精品美腿丝袜| 国产一区亚洲一区| 日本韩国欧美国产| 国产欧美日韩麻豆91| 五月天精品一区二区三区| 国产精品99久| 欧美一区二区黄色| 亚洲九九爱视频| 高清久久久久久| 欧美一区二区三区视频在线观看 | 91黄色免费看| 国产亚洲欧美日韩在线一区| 亚洲成av人片在线观看| 成人午夜av在线| 欧美成人a在线| 亚洲午夜激情网站| 99国产欧美另类久久久精品| 久久亚洲欧美国产精品乐播| 日韩精品乱码av一区二区| 91麻豆视频网站| 国产精品毛片久久久久久| 蜜桃久久精品一区二区| 精品污污网站免费看| 国产精品久久久久9999吃药| 国产麻豆午夜三级精品| 欧美一区二区人人喊爽| 亚洲成人www| 欧美性感一区二区三区| 中文字幕一区二区三区蜜月| 国产成人a级片| 日韩欧美一级在线播放| 偷窥国产亚洲免费视频| 欧美怡红院视频| 亚洲精品高清在线| 99精品久久只有精品| 国产片一区二区| 高清av一区二区| 久久久久国产精品人| 国产九色精品成人porny| 精品成人一区二区三区| 久久不见久久见免费视频7| 日韩欧美国产一区二区在线播放| 亚洲bt欧美bt精品| 欧美精品色一区二区三区| 五月天婷婷综合| 欧美精品aⅴ在线视频| 午夜精品久久久久久不卡8050| 欧美三级韩国三级日本三斤| 夜夜爽夜夜爽精品视频| 欧洲一区在线观看| 亚洲国产三级在线| 欧美日韩一级片网站| 午夜精品福利在线| 日韩欧美激情在线| 国产精品一二三区| 国产精品久久久久毛片软件| 99久久精品国产导航| 亚洲精品大片www| 欧美日韩一二区| 免费三级欧美电影| 久久综合九色综合久久久精品综合 | 亚洲柠檬福利资源导航| 在线影院国内精品| 日韩国产欧美在线观看| 精品久久久久久久人人人人传媒| 黄页网站大全一区二区| 国产欧美精品国产国产专区| www.色综合.com| 亚洲午夜免费视频| 欧美成人一区二区| 成人免费观看视频| 亚洲成在线观看| 精品国产91久久久久久久妲己| 激情欧美一区二区| 亚洲欧洲日韩女同| 欧美福利一区二区| 国产一区二区免费在线| 亚洲日本在线视频观看| 欧美日本一区二区| 国产成人精品综合在线观看 | 欧美精品乱人伦久久久久久| 国产综合色精品一区二区三区| 136国产福利精品导航| 日韩一区二区三区在线视频| 成人av在线网站|