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

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

?? rxcver.vhd

?? UART的rs232通信接口VHDL語言
?? 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一区二区三区免费野_久草精品视频
久久久精品免费网站| 久久精品国产亚洲a| 欧美日韩国产bt| 国模套图日韩精品一区二区| 亚洲精品一卡二卡| 欧美一级黄色录像| 欧美日韩一区二区三区免费看| 久久99热99| 一区二区三区波多野结衣在线观看| 久久久久久日产精品| 欧美午夜精品久久久| 白白色 亚洲乱淫| 精品一区二区三区影院在线午夜| 欧美va亚洲va香蕉在线| 成人av第一页| 免费精品视频最新在线| 欧美视频完全免费看| 色婷婷久久久久swag精品| 国产不卡高清在线观看视频| 蜜桃视频在线一区| 亚洲国产日日夜夜| 亚洲国产成人av网| 日韩一区中文字幕| 亚洲美女在线国产| 91久久精品网| 欧美在线不卡一区| 日韩二区三区在线观看| 亚洲永久免费av| 亚洲综合一二区| 夜夜爽夜夜爽精品视频| 亚洲卡通动漫在线| 亚洲精选视频免费看| 亚洲另类春色校园小说| 1区2区3区欧美| 欧美成人性战久久| 亚洲人成7777| 亚洲综合在线电影| 午夜精品福利一区二区蜜股av| 中文字幕一区二区三区蜜月| 日韩精品一区二区三区在线播放 | 国产成人精品午夜视频免费| 国产资源在线一区| 久久草av在线| 99精品久久久久久| 欧美在线视频你懂得| 欧美日韩在线观看一区二区| 国产性色一区二区| 最新国产精品久久精品| 亚洲精品少妇30p| 日韩av电影免费观看高清完整版| 亚洲色图在线视频| 国产视频在线观看一区二区三区| 欧美人妇做爰xxxⅹ性高电影| 欧美日韩国产成人在线免费| 欧美剧情片在线观看| 欧美精品久久天天躁| 亚洲精品伦理在线| 亚洲美女一区二区三区| 美腿丝袜亚洲三区| 成人av在线网| 欧美一卡二卡在线| 国产精品电影一区二区| 五月综合激情婷婷六月色窝| 一区二区不卡在线播放 | 成人精品视频网站| 欧美日韩国产综合视频在线观看| 精品国产三级a在线观看| 国产精品久久看| 2021久久国产精品不只是精品| 亚洲天堂2016| 韩国毛片一区二区三区| 91色.com| 中文无字幕一区二区三区| 亚洲欧美欧美一区二区三区| 99国产精品久久| 亚洲免费av高清| 欧美日韩在线免费视频| 亚洲成人资源在线| 欧美人与禽zozo性伦| 日日噜噜夜夜狠狠视频欧美人 | 欧美一区二区三区啪啪| 亚洲gay无套男同| 欧美区在线观看| 欧美成人综合网站| 亚洲综合成人在线视频| 中文字幕一区二区三区四区 | 国产.欧美.日韩| 久久99久久久久久久久久久| 亚洲精品免费视频| 一区二区三区中文在线观看| 国产精品乱人伦| 亚洲欧美自拍偷拍色图| 欧美精品aⅴ在线视频| 99久久免费精品| 成人激情av网| 欧美—级在线免费片| 欧美xxxxx牲另类人与| 欧美影院一区二区| 色哟哟欧美精品| 色狠狠桃花综合| 91精品福利在线一区二区三区| 国产成a人亚洲精品| 美女被吸乳得到大胸91| 亚洲成av人片一区二区梦乃| 日本美女一区二区三区视频| 色素色在线综合| 欧美大片在线观看一区二区| 日本麻豆一区二区三区视频| 国产精品久久久久久久午夜片| 成人97人人超碰人人99| 久久久www成人免费无遮挡大片| 91麻豆精品在线观看| 欧美日韩一区久久| 理论片日本一区| 99国产精品久久久| 日韩精品资源二区在线| 欧美精品一区二区在线观看| 国产精品日产欧美久久久久| 午夜精品成人在线| 成人va在线观看| 7777精品久久久大香线蕉| 中文字幕一区二区三区四区| 国产色一区二区| 性久久久久久久| av高清久久久| 精品久久久网站| 亚洲高清在线精品| 美腿丝袜在线亚洲一区| 久久国产免费看| 在线观看亚洲一区| 精品区一区二区| 精品毛片乱码1区2区3区| 成人午夜私人影院| 99视频一区二区| 国产成人精品影视| 日韩欧美专区在线| 亚洲一二三区视频在线观看| 寂寞少妇一区二区三区| 欧美性大战久久久久久久| 色婷婷av一区二区三区软件| 国产日韩综合av| 亚洲1区2区3区视频| 九色|91porny| 日韩欧美中文字幕制服| 亚洲国产欧美日韩另类综合| 亚洲成人综合视频| 一本大道久久a久久综合| 国产精品天干天干在观线| 激情欧美一区二区| 91蜜桃网址入口| 久久精品人人做人人综合| 亚洲国产乱码最新视频| 91蜜桃免费观看视频| 国产欧美中文在线| 亚洲人精品一区| 成人三级伦理片| 日本一区二区三区在线不卡 | 欧美精品tushy高清| 精品国产一区二区在线观看| 亚洲精选视频在线| 99re免费视频精品全部| 中文字幕在线不卡一区| 日韩精品免费视频人成| heyzo一本久久综合| 久久九九99视频| 国产凹凸在线观看一区二区| 日韩欧美国产综合一区 | 色婷婷综合视频在线观看| 亚洲欧洲av在线| 欧美色手机在线观看| 亚洲最快最全在线视频| 亚洲欧美日韩久久| 欧美在线高清视频| 亚洲大片免费看| 在线视频欧美精品| 国产精品美女久久久久久| 国产精品香蕉一区二区三区| 国产午夜亚洲精品理论片色戒 | 国产日韩欧美一区二区三区乱码| 麻豆精品精品国产自在97香蕉| 国产亚洲一本大道中文在线| 午夜电影网亚洲视频| 精品国产99国产精品| 99久久777色| 亚洲国产精品影院| 欧美吻胸吃奶大尺度电影| 三级欧美韩日大片在线看| 精品国产免费视频| 国产传媒久久文化传媒| 亚洲免费在线看| 国产自产高清不卡| 欧美福利一区二区| 亚洲自拍偷拍av| 欧美久久久久久久久久| 亚洲大片免费看| 久久青草欧美一区二区三区| 国产成人自拍高清视频在线免费播放| 国产精品白丝在线| a级精品国产片在线观看| 中文在线资源观看网站视频免费不卡|