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

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

?? spi串口的內核實現spicore.vhd

?? 基于FPGA的SPI控制器.doc,包括FPGA實現地源代碼和協議的基本介紹
?? VHD
?? 第 1 頁 / 共 2 頁
字號:
-------------------------------------------------------------------------- Copyright 1997-1998 VAutomation Inc. Nashua NH USA. -- Visit HTTP://www.vautomation.com for mor details on our other-- Synthesizable microprocessor and peripheral cores.---- This program is free software; you can redistribute it and/or modify-- it under the terms of the GNU General Public License version 2 as-- published by the Free Software Foundation.---- This program is distributed in the hope that it will be useful,-- but WITHOUT ANY WARRANTY; without even the implied warranty of-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the-- GNU General Public License for more details.---- The GNU Public License can be found at HTTP://www.gnu.org.-- -- The copyright notice above MUST remain in the source code at all-- times!---- File: vspi.vhd-- Revision: $Name: REV9910 $-- Gate Count: 500 gates (LSI Logic 10K)-- Description:----      Serial Peripheral Interface (SPI)---- The VSPI core implements an SPI interface compatible with the many-- serial EEPROMs, and microcontrollers. The VSPI core is typically used-- as an SPI master, but it can be configured as an SPI slave as well.---- The SPI bus is a 3 wire bus that in effect links a serial shift-- register between the "master" and the "slave". Typically both the-- master and slave have an 8 bit shift register so the combined-- register is 16 bits. When an SPI transfer takes place, the master and-- slave shift their shift registers 8 bits and thus exchange their 8-- bit register values.---- The VPSI core is completely software configurable. The clock-- polarity, clock phase, the clock frequency in master mode, and the-- number of bits to be transferred are all software programmable. These-- configuration bits are usually determined by the capabilities of the-- other device you wish to communicate with.---- SPI supports multiple slaves on a single 3 wire bus by using seperate-- SLaVe SELect signals (SVLSEL) to enable the desired slave. Multiple-- masters are also supported and some support is provided for detecting-- collisions when multiple masters attempt to transfer at the same-- time.---- A Wired-OR mode is provided which allows multiple masters to collide-- on the bus without risk of damage. In this mode, an external pullup-- resisitor is required on the SI and SO pins. WOR mode also allows the-- SPI bus to operate as a 2 wire bus by connecting the SI and SO pins-- together to form a single bidirectional data pin.---- Generally, pullups are recommended on all of the external SPI signals-- to insure they are held in a valid state even when the VSPI core is-- disabled.---- Limitations:--      When operating as a slave, the SPI clock signal (SCK) must be--      slower than 1/8th of the CPU clock. 1/16th is recommended. Note--      that this core is fully synchronous to the cpu CLK and thus SCK--      is sampled and then operated on. This results in 3 to 4 clocks--      of delay which will violate the SPI spec if SCK is faster than--      1/8th of the CPU clock. When the VSPI core is in master mode, it--      operates exactly on the proper edges since it is generating SCK.----      The VSPI core was specifically designed to be an SPI master and--      to be connected to a microprocessor such as VAutomations--      V8-uRISC CPU. This core also has the capability to be a slave--      but that feature is considered secondary which is why it is--      speed limited.---- Register Definition:-- Addr Name    R/W     Description--  0   DOUT    W       8 Bit data out register--  0   DIN     R       8 Bit data in register--  1   CTL     R/W     Control Register--                      [0]=Reserved.--                      [1]=MSTENB      Enable SPI master mode--                      [2]=WOR Wire-OR mode enabled--                      [3]=CKPOL       Clock Polarity 1=SCK idles high,--                                      0=SCK idles low--                      [4]=PHASE       Phase Select--                      [6:5]=DVD       Clock divide - 00=8, 01=16,--                                      10=32, 11=64--                      [7]=IRQENB      Interrupt enable--  2   STATUS  R/W     Interrupt Status register--                      Each bit of the status register is cleared to--                      zero by by writting ONE to the respective bit.--                      [7]=IRQ Interrupt active--                              Set at the end of a master mode--                              transfer, or when SLVSEL goes high on a--                              slave transfer--                      [6]=Overrun--                              This bit is set when the DOUT register--                              is written while an SPI transfer is in--                              progress.--                      [5]=COL--                              This bit is set when there is a master--                              mode collision between multiple SPI--                              masters. It is set when SLVSEL goes low--                              while MSTENB=1.--                      [2:4]=zero--                      [1]=TXRUN--                              1=Master mode operation underway.--                              This bit is read only.--                      [0]=SLVSEL--                              This bit corresponds to the SLVSEL pin--                              on the VSPI core (note that this is--                              normally interted at the IO pin). read--                              only.--  3   SSEL    R/W     Slave Select/bit count register--                      SSEL[7:5]--                              Number of bits to shift in master mode, --                              000=8 bits, 001=1 bit, 111=7 bits.--                      SSEL[4:0]--                              5 individual Slave Selects for master--                              mode---- The VSPI core operates in two fundamentally different modes based on-- the PHASE bit (CTL[4]). The two modes are depicted in the timing-- diagrams below. The key difference centers around the fact that SPI-- data is clocked out on one edge of the clock, and sampled on the-- other. The two modes select where the opposite edge DFF is placed.-- When PHASE=0, a negative edge flop is inserted into the shift_in-- path. The shift_out data is tricky because we must output data from-- the TX_HOLD register for the first bit as we have not seen a clock on-- SCK to clock the data into the shift register. When PHASE=1, the-- negative edge flop is inserted into the shift_out path to hold the-- data for an extra 1/2 clock.---- Microprocessor interface--      The VSPI microprocessor interface is quite simple and connects-- easily to VAutomations V8-uRISC CPU. Transfers are fully synchronous-- to the CLK signal. When CHIP_SEL and WRITE are both active at the-- rising edge of CLK, a write to the desired register occurs. CHIP_SEL-- and WRITE should only be active for 1 clock cycle.---- Timing diagram:---- PHASE=0 (POLCK=0 shown, invert SCKI if POLCK=1)-- Cycle #     | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |--                _   _   _   _   _   _   _   _      -- SCK    _______| |_| |_| |_| |_| |_| |_| |_| |_____--              ___ ___ ___ ___ ___ ___ ___ ___-- MOSI  ------<_7_X_6_X_5_X_4_X_3_X_2_X_1_X_0_>-------            _____ ___ ___ ___ ___ ___ ___ _______-- MISO  ----<___7_X_6_X_5_X_4_X_3_X_2_X_1_X_0_XXXX>---            _____________________________________-- SLVSEL ___/                                     \_-- Shift register runs on the second edge of SCKI. A negative edge flop-- is placed in the shift_in path to sample data on the first edge of-- SCKI.-- PHASE=1 (POLCK=0 shown, invert SCKI if POLCK=1)-- Cycle #       | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |--                _   _   _   _   _   _   _   _      -- SCK   ________| |_| |_| |_| |_| |_| |_| |_| |_______--                ___ ___ ___ ___ ___ ___ ___ ___-- MOSI  --------<_7_X_6_X_5_X_4_X_3_X_2_X_1_X_0_>-------                _ ___ ___ ___ ___ ___ ___ _________-- MISO  ----XXXXX_7_X_6_X_5_X_4_X_3_X_2_X_1_X_0_____>---            _______________________________________-- SLVSEL ___/                                       \_-- Shift register runs on the second edge of SCKI. A negative edge flop-- is placed in the shift_out path to hold data data for an extra 1/2-- clock.---- Crude block diagram:---- DATAIN--------------------------+--                                 |--                    |\           |-- MISO-------+-------> \      +---v--------+                |\--            |       |  >-----> 8bit Shift >-------+--------> \--            |    +--> /      |> Register  |       |        |  >-->MOSI--            |    |  |/       +---v--------+       |   +----> /        --            |    |               |                |   |    |/--            |    |               +---DATAOUT      |   |      --            |    |                                |   |      --            |    +-------------------------+      |   |               --            |     +------------------------|------+   |--            |     |  |\                    |          | --            |     +--> \        +----+     |          | --            |        |  >------->Neg >-----+----------+ --            +--------> /        |DFF |                  --                     |/        O|>   |                  --                                +----+                  -- Not shown are the control and status registers, the master mode bit-- counters and other control logic.-- -- IO cell Requirements:-- The IO cells required for the SPI bus are quite simple. The following-- VHDL code will synthesize to the appropriate cells.----   miso <= misoo when misoe='1' ELSE 'Z';  -- tristate buffer--   mosi <= mosio when mosie='1' ELSE 'Z';  -- tristate buffer--   sck  <= scko  when scke ='1' ELSE 'Z';  -- tristate buffer------------------------------------------------------------------------- This product is licensed to:-- $name$ of $company$-- for use at site(s):-- $site$--------------Revision History------------------------------------------- $Log: vspi.vhd,v $-- Revision 1.7  1999/09/09 16:02:37  scott-- std_ulogic'ified, numeric_std'ified, RMM'ified---- Revision 1.6  1999/02/17 00:51:50  eric-- Added more checking on various error conditions.---- Revision 1.5  1999/02/02 19:56:13  eric-- Changes to fully sync to the CPU clock.---- Revision 1.4  1998/10/16 13:54:57  eric-- Corrected missing sensitiviy list signals for FIRST_BIT.---- Revision 1.3  1998/09/30 14:56:56  eric-- Initial release level.---- Revision 1.2  1998/09/24 02:51:44  eric-- Master mode works in phase=0.-------------------------------------------------------------------------library ieee;use ieee.std_logic_1164.all; -- we use IEEE standard 1164 logic types.use ieee.numeric_std.all;    -- + and - operatorsentity vspi is  ----------------------------ENTITY---------------------  port(    clk      : in  std_ulogic;   -- everything clocks on rising edge    rst      : in  std_ulogic;   -- reset    addr     : in  std_ulogic_vector(1 downto 0);  -- address bus    datain   : in  std_ulogic_vector(7 downto 0);  -- data bus    dataout  : out std_ulogic_vector(7 downto 0);  -- data bus    write    : in  std_ulogic;   -- write enable    chip_sel : in  std_ulogic;   -- device Select    irq      : out std_ulogic;   -- interrupt request    -- SPI interface without IO cells    misoe    : out std_ulogic;   -- MISO tristate enable    misoi    : in  std_ulogic;   -- Master in/Slave out data in    misoo    : out std_ulogic;   -- MISO data out    mosie    : out std_ulogic;   -- MOSI tristate enable    mosii    : in  std_ulogic;   -- Master out/Slave in data in    mosio    : out std_ulogic;   -- MOSI data out    scke     : out std_ulogic;   -- SCK Clock tristate enable    scki     : in  std_ulogic;    -- SCK Clock input (shift register runs on this)    scko     : out std_ulogic;   -- SCK clock output    slvsele  : out std_ulogic;   -- tristate enable for slave selects    slvselo  : out std_ulogic_vector(4 downto 0);    -- external slave selects    slvsel   : in  std_ulogic    -- Slave Select    );end vspi;architecture empty of vspi is -------- ARCHITECTURE empty --------  -- This architecture is provided to easily and quickly remove the SPI  -- core for your ASIC or FPGA.begin   dataout <= (others => '0');  irq     <= '0';  misoo   <= '0';  misoe   <= '0';  mosie   <= '0';  mosio   <= '0';  scko    <= '0';  scke    <= '0';  slvsele <= '0';  slvselo <= "00000";end empty;architecture rtl of vspi is -----------ARCHITECTURE rtl-----------  attribute sync_set_reset : string; -- required for synopsys  attribute sync_set_reset of rst : signal is "true";  -- required for synopsys  signal bit_ctr     : std_ulogic_vector(2 downto 0);  -- # bits in a byte  signal ctl_reg     : std_ulogic_vector(7 downto 0);  -- control register  signal col_flag    : std_ulogic; -- collision flag  signal dvd_ctr     : std_ulogic_vector(4 downto 0); -- clock divider  signal dvd2        : std_ulogic;  signal dvd_zero    : std_ulogic; -- clk divider controls  signal irq_flag    : std_ulogic;  -- local version of IRQ before gated with IRQENB  signal master_mode : std_ulogic; -- Master mode when 1  signal misoe_lcl   : std_ulogic; -- local version

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩国产在线一| 精品视频免费在线| 欧美日韩一本到| 99re8在线精品视频免费播放| 久草在线在线精品观看| 欧美在线观看视频一区二区三区| 久久久久99精品一区| 国产精品一区二区在线观看不卡| 欧美一区二区三区在线观看| 久久精品国内一区二区三区| 欧美在线三级电影| 丝袜亚洲另类欧美综合| 日本久久一区二区| 日本系列欧美系列| 欧美精品自拍偷拍| 欧美一卡在线观看| 精油按摩中文字幕久久| 91精品国模一区二区三区| 蜜臀精品一区二区三区在线观看 | 亚洲第一久久影院| 日本精品一级二级| 毛片一区二区三区| 精品久久久久久久人人人人传媒| 久久91精品国产91久久小草| 国产农村妇女毛片精品久久麻豆 | 中文成人av在线| 国产黑丝在线一区二区三区| 中文字幕日韩av资源站| 色成人在线视频| 欧美日本在线看| 国产东北露脸精品视频| 亚洲国产精品99久久久久久久久| 欧美日韩综合一区| 亚洲成人av一区二区三区| 亚洲国产精品99久久久久久久久| 成人免费毛片a| 久久激情五月激情| 久久久久国产精品人| 欧美视频中文字幕| 日韩电影在线看| 亚洲精品你懂的| 欧美视频中文一区二区三区在线观看| 国产综合久久久久久久久久久久| 中文字幕人成不卡一区| 久久这里只有精品首页| 综合在线观看色| 91老司机福利 在线| 911精品国产一区二区在线| 成人激情开心网| 一区二区在线免费| 8x福利精品第一导航| 蜜桃av一区二区| 香蕉加勒比综合久久| 欧美一级国产精品| 国产白丝网站精品污在线入口| 国产精品色哟哟网站| 国产精品久久久久9999吃药| 另类成人小视频在线| 色哟哟一区二区在线观看| 午夜成人免费视频| 国产美女av一区二区三区| 中文字幕在线不卡一区| 国产精品一区二区在线看| 久久久久久久久久久久久久久99 | 久久精品日韩一区二区三区| 97精品电影院| 亚洲愉拍自拍另类高清精品| 精品动漫一区二区三区在线观看| 午夜精品久久久久久久99樱桃| 久久亚洲影视婷婷| 粉嫩嫩av羞羞动漫久久久| 日韩欧美一区电影| 在线影视一区二区三区| 另类中文字幕网| 综合av第一页| www国产精品av| 欧美午夜精品理论片a级按摩| 91国偷自产一区二区使用方法| 麻豆精品一二三| 亚洲欧美另类综合偷拍| av综合在线播放| 国产日韩欧美激情| 亚洲精品一区二区三区蜜桃下载| 国产成人夜色高潮福利影视| 午夜激情一区二区| 精品国产不卡一区二区三区| 欧美亚洲国产怡红院影院| 中文字幕国产一区二区| 国产精品麻豆视频| 欧美国产精品v| 欧美大尺度电影在线| 久久99精品久久久久婷婷| 一区二区三区欧美在线观看| 欧美国产一区在线| 精品久久久久久久一区二区蜜臀| 欧美影视一区二区三区| 欧美激情在线一区二区| 国产一区二区三区在线观看免费视频 | 日本一区二区三区国色天香| 91麻豆精品国产91久久久久| 久久久美女毛片| 国产精品午夜久久| 一区二区三区毛片| 久久久美女艺术照精彩视频福利播放 | 亚洲精品国产无天堂网2021| 午夜精品一区二区三区电影天堂 | 久久中文娱乐网| 精品少妇一区二区三区在线视频| 精品午夜久久福利影院| 欧美色图免费看| 欧美日韩三级在线| 一区二区三区高清在线| 欧美韩国日本一区| 91丝袜呻吟高潮美腿白嫩在线观看| 懂色av一区二区在线播放| 久久激五月天综合精品| 蜜臀91精品一区二区三区| 日韩精品综合一本久道在线视频| 欧美精品丝袜久久久中文字幕| 狠狠色伊人亚洲综合成人| 日本午夜一本久久久综合| 一区二区三区在线观看网站| 欧美一区二区三区爱爱| 欧美挠脚心视频网站| 日韩一区二区高清| 欧美一卡2卡3卡4卡| 国产一区二区伦理| 粉嫩绯色av一区二区在线观看| 粉嫩av一区二区三区在线播放 | 国产一区999| 日韩国产欧美在线视频| 五月综合激情网| 久久精品国产亚洲高清剧情介绍| 99久免费精品视频在线观看| 日韩免费电影一区| 欧美一区二区视频在线观看| 在线91免费看| 久久亚洲捆绑美女| 国产精品进线69影院| 欧美怡红院视频| 日韩欧美一二区| 国产精品剧情在线亚洲| 亚洲日本免费电影| 久久久久久久久久久久久女国产乱| 日韩精品亚洲专区| 国产乱子伦视频一区二区三区| 国产麻豆视频一区二区| 99久久777色| 欧美激情一区在线| 亚洲国产日韩一区二区| 毛片一区二区三区| 成人永久aaa| eeuss鲁片一区二区三区 | 日本二三区不卡| 欧美成人在线直播| 一区免费观看视频| 美女国产一区二区三区| 国产精品影视天天线| 色婷婷久久综合| 精品伦理精品一区| 日韩午夜激情电影| 精品久久免费看| 亚洲男人的天堂在线观看| 午夜精品成人在线视频| 亚洲精选一二三| 国产一区二区精品久久99| 中文字幕第一区二区| 国产激情一区二区三区桃花岛亚洲| 欧美精品在线观看播放| 国产女人18毛片水真多成人如厕 | 亚洲国产精品天堂| 麻豆成人久久精品二区三区红| 国产99久久久国产精品潘金| 欧美理论电影在线| 久久精品男人的天堂| 久久久久国色av免费看影院| 亚洲成年人网站在线观看| 大桥未久av一区二区三区中文| 欧美精品在线一区二区| 亚洲男人的天堂av| 懂色av一区二区在线播放| 在线不卡免费欧美| 亚洲欧美日韩一区二区三区在线观看| 麻豆国产91在线播放| 日本福利一区二区| 亚洲日本在线看| 国产成人综合亚洲网站| 欧美一级高清大全免费观看| 欧美一区二视频| 亚洲小少妇裸体bbw| 五月激情综合网| 色偷偷88欧美精品久久久| 九九精品视频在线看| 成人免费毛片片v| 91一区二区三区在线观看| 久久久99免费| 奇米精品一区二区三区在线观看 | 亚洲一区在线视频| 日韩精品三区四区| 极品少妇一区二区三区精品视频|