SRIO IP介绍 (三) SRIO IP时钟、复位及例程分析

本文详细解释了SRIOIP中的时钟系统,包括phy_clk、gt_pcs_clk、refclk等,强调了log_clk的重要性及其与数据传输的关系。同时介绍了复位设计,特别是复位信号的同步扩展。核心模块如srio_clk和srio_rst的职责也被解析。旨在帮助用户理解并应用SRIOIP进行数据传输。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.时钟

        首先,在讲时钟之前,其实我们用户实际进行数据传输的时候,只需要考虑log_clk即可,这里介绍其他时钟,只是为了加深对于核底层的理解。

        phy_clk是主内核时钟,gt_pcs_clk用于串行收发器接口。gt_clk不由PHY使用,但由串行收发器接口使用。gt_pcs_clk是gt_clk的速率的一半。作为一般规则,phy_clk等于(gt_clk * 操作链路宽度)/4。因此,对于以2x操作的核,phy_clk是gt_clk的频率的一半。如果内核向下训练到1x模式,则phy_clk必须切换到gt_clk速率的四分之一。串行收发器还需要使用收发器专用时钟引脚的参考时钟(refclk)。在生成内核时选择参考时钟频率(可用选项取决于架构和线路速率)。

        下面给出参考时钟和线速率的关系:

        这个表列举出了常见的线速率所对应的参考时钟,当然,在VIVADO里面输入了一个线速率之后,参考时钟只能固定的选某几个频率。这个表的意义就在于,如果板子上参考时钟是125M,那么,线速率就可以选1.25,2.5,3.125, 5,6.25Gbps。如果板子参考时钟是156.25M,那么线速率只能选3.125或6.25Gbps。就不需要一个一个试,到底多大的线速率可以用156.25的参考时钟。

        LOG在log_clk域上操作。为了获得最佳吞吐量,log_clk应该至少与phy_clk一样快。

        下面给出几种常用通道下,线速率与各时钟之间的对应关系:

        4X(4通道模式):

        2X(2通道模式):

          1X(1通道模式):

          通过上表,我们也能看出来phy_clk和log_clk时钟频率是一样的,正好呼应了前面所说的,为了获得最佳吞吐量,log_clk应该至少和phy_clk一样快,默认情况下,他俩确实是一样的。

        对于时钟参考的设计,如下图所示:

        MMCM乘法器和分频器的值取决于参考时钟频率和线速率。在4x配置中,log_clk和gt_clk共享BUFG。在1x配置中,log_data和phy_data共享一个BUFG(不需要BUFGMUX,因为只有一个可能的phy_data速率)。此外,如果在Vivado IDE中选择了Unified Clock选项,则log_clk和phy_clk需要具有相同的速率。这意味着log_clk/cfg_clk的BUFG可以被移除,并且log_clk/cfg_clk被绑定到phy_clk。BUFG是全局缓冲,它的输入是IBUFG的输出,BUFG的输出到达FPGA内部的IOB、CLB、选择性块RAM的时钟延迟和抖动最小。

        最后总结一句,其实只要知道log_clk的频率是多少,和线速率以及通道数是什么关系就可以了,其实数据传输的本质其实就是,用多少时间,传多少数据,搞清楚这些,SRIO IP的使用就没什么大问题了。

2.复位

        通过以上的介绍,大家也看到了时钟有好多个,但是我们关心的只是其中的某一两个就可以,同样,复位也是如此,接下来会在官方例程中给大家作简单介绍。

        每个时钟域具有相关联的复位。复位应在相应时钟域的最少四个时钟周期内置位,并同步解除置位(注意,如果内核被训练下降,phy_clk的运行速度低于原始速率,复位仍必须在四个完整周期内置位)。

        内置的复位参考设计模块(srio_rst.v)具有单个复位输入sys_rst。此信号为异步输入。该模块将复位同步到每个时钟域,并扩展脉冲以满足最小复位周期要求。

3. 例程分析

        

        1. instruction_list.vh模块

        主要包括一些参数信息,传递给其他模块使用。 

        2.maintenance_list.vh

        包含在srio_quick_start中的此文件包含示例设计发出的维护说明。当然,这个模块我们也是不需要关心的。

        3.srio_clk模块

        它是HDL时钟模块,用于生成内核时钟。可以看到,就是之前咱们所介绍的几个时钟信号。

        4.srio_rst模块

        示例重置模块,从sys_rst输入生成必要的重置并对其进行排序。其实之前也说过,它的核心其实就是脉冲扩展,必须复位达到至少4个时钟周期。

        

        其他的复位也是同样的方式进行脉冲扩展,以达到上述的要求。

        5.srio_request_gen模块

        此模块生成要发送到链接伙伴的请求事务。它使用事务类型进行参数化,以便仅发送适合于端口并由核心支持的事务。其实一句话,就是发送数据相关的模块,看它的端口信号一下就清楚了。

 

        6.srio_response_gen模块

        该文件包含创建对传入事务的响应的逻辑(如果它们是响应生成数据包类型)。简而言之就是与接收数据有关的模块,同样,看它的端口信号

        最后,对于其他没有介绍到的模块,我们一般情况下是用不到的。大家学习SRIO IP的目的,我想也都是为了收发自己特定格式的数据吧,这个在第二讲已经做了很详细的解释说明。对于仿真部分,这里就不展开进行了。

        

 

Core name: Xilinx LogiCORE Serial RapidIO Version: 5.5 Release Date: April 19, 2010 ================================================================================ This document contains the following sections: 1. Introduction 2. New Features 3. Supported Devices 4. Resolved Issues 5. Known Issues 6. Technical Support 7. Other Information (optional) 8. Core Release History 9. Legal Disclaimer ================================================================================ 1. INTRODUCTION For the most recent updates to the IP installation instructions for this core, please go to: http://www.xilinx.com/ipcenter/coregen/ip_update_install_instructions.htm For system requirements: http://www.xilinx.com/ipcenter/coregen/ip_update_system_requirements.htm This file contains release notes for the Xilinx LogiCORE IP Serial RapidIO v5.5 solution. For the latest core updates, see the product page at: http://www.xilinx.com/rapidio/ 2. NEW FEATURES - ISE 12.1 software support - Designed to RapidIO Interconnect Specification v2.1 - Virtex-6 LXT/HXT/SXT 5.0 Gbps support - Spartan-6 3.125 Gbps and 4x support - Expanded simulator support - Support for ML505, ML605 and SP605 boards (see Release Notes AR for details) 3. SUPPORTED DEVICES - Virtex-6 LXT/HXT/SXT/CXT - Spartan-6 LXT - Virtex-5 LXT/FXT/SXT - Virtex-4 FX 4. RESOLVED ISSUES - PHY does not properly pass CRF bit to Buffer - Version fixed : v5.5 - CR# 519603 - Updated PHY to properly pass CRF - GT settings for Spartan-6 and Virtex-6 updated based on characterization - Version fixed : v5.5 - PORT_INITIALIZED toggles indefinitely - Version fixed : v5.5 - CR# 551271 - GT wrappers updated so that the core will detect invalid data until RESETDONE asserts. - Processing Element Features CAR implemented incorrectly - Version fixed : v5.5 - CR# 528369 - Part of the PEF CAR was implemented in the PHY configuration space, now it is merged into the LOGIO configuration space as directed by the spec. See core User Guide for map of configuration space. - Recommended modifications to Example Design reset scheme - Version fixed : v5.5 - CR# 533208, 533209, 533212 - Updated reset sequence, see AR# 33574 for specifics. - Example design "implement.bat" file has error - Version fixed : v5.5 - CR# 533796 - Corrected syntax for NGDBuild command. - Virtex-6 clock modules not using production MMCM settings - Version fixed : v5.4rev1 - CR#546021 - Using outdated values from the clocking wizard in clock modules. - Buffer BRAM using READ_FIRST mode - Version fixed : v5.4rev1 - CR#546424 - Using READ_FIRST mode for buffer BRAMs - need to update to WRITE_FIRST mode for Spartan-6 and Virtex-6 based on characterization. - VHDL example design simulation error when CRF bit de-selected - Version fixed : v5.4rev1 - CR# 532020 - Updated example design so that CRF signals not added when CRF support is disabled. - Virtex-6 bring-up issues - Version fixed : v5.4 - CR#527725, CR#525309, CR#531695 - Using integer values for the MMCM_ADV, regenerated Virtex-6 wrappers based on general hardware characterization results, revised reset sequence. Please see core Release Notes for updates. - GUI settings incorrect or not properly reflected in hardware. - Version fixed : v5.4 - CR#507334, CR#528369, CR#528370 / AR#32122 - The following register fields were corrected: Re-transmit Suppression mask, Logical Layer extended features pointer, DeviceVendorID. - Latches inferred in VHDL example design - Version fixed: v5.2 - CR#509670 / AR#32189 - Added intermediate values for partial register and combinational assignments. - lnk_trdy_n does not assert in evaluation core simulations - Version fixed : v5.1rev1 - CR#493479 / AR#31864 - Modified initial state in evaluation cores. - PHY won't generate stand-alone due to missing module - Version fixed : v5.1rev1 - CR#493162 / AR#31834 - Shared file between buffer and log added to buffer file list. - Virtex-4 core has long initialization time - Version fixed : v5.1rev1 - CR#481684 / AR#31617 - Virtex-4 initSM modified to prevent branch to silent when RX PCS resets in DISCOVERY state. - LogIO local arbitration doesn't account for valid causing re-arbitration prior to legitimatepacket completion. - Version fixed : v5.1 - CR#478748 - Valid used to gate mresp_eof_n and iresp_eof_n for local arbitration. - A ireq_dsc_n asserted for an undefined packet type does not get propogated by the logical layer. - Version fixed : v5.1 - CR#478541 - undefined packet type decode now passes dsc to buffer allowing packet to be dropped. - 16-bit deviceID cores may see a maintenance response transaction presented but not validated on the IResp interface resulting in a lost transaction. by the logical layer. - Version fixed : v5.1 - CR#474894 - Fixed issue when the maintenance response is followed immediatly by a single DWord SWrite packet. - SourceID not configureable for IReq port. - Version fixed : v5.1 - CR#473938 - Added ireq_src_id port to logical layer. All transmit source IDs should now be configureable and all received destination IDs observable. - Write enables into LogIO registers aren't allowing partial register writes. - Version fixed : v5.1 - CR#473441 - Write enables now implementedfor all LogIO registers allowing byte-wise writes of CSRs such as the deviceID register and BAR. - Message response transaction received as a user defined packet type using 16-bit device IDs appears as a corrupted packet on the IResp interface. - Version fixed : v5.1 - CR#473400, CR#473693 - Fixed LogIO RX to properly handle all user-defined types. - PHY core does not dsc upon retry when coincident with TX packet eof resulting in potential buffer lock-up - Version fixed : v4.4rev2 - CR#478246 / AR#31407 - lnk_tdst_dsc_n now asserted for all retry and error scenarios. - Retry of packet being sent causes packet to get stuck in buffer - Version fixed : v4.4rev2 - CR#477217 / AR#31318 - No longer applicable, v5.1 introduces new buffer. - Core accepts muddled packet when reinitializing during packet receipt - Version fixed : v4.4rev1 - CR#477115 / AR#31308 - Core PNAs packet in receipt when link goes down. - Core LCSBA implementation removes 64MB of possible addressing space. - Version fixed : v4.4 - CR#472992 / AR#30939 - Use 10-bit mask with full 34-bit address for LCSBA intercept. - CRC error on stalled packet - Version fixed : v4.4 - CR#469678 / AR#30940 - Fixed condition which loaded in new CRC sequence on a stall just after sof received by PHY. This is a non-concern for Xilinx buffer users. - Virtex-4 4x core may intermittenly train down to 1x mode - Version fixed : v4.4 - CR#467616 / AR#30314 - Modified oplm_pcs_rst_sequence.v file supplied with the core to register asynchronous TXLOCK and RXLOCK signals. - Re-initialization not forced following a change to Port Width Override - Version fixed : v4.4 - CR#459427 / AR#30323 - Modified PHY Layer to detect a change in the port width override field and reinitialize when updated. - Messaging packets providing incorrect treq_byte_count value - Version fixed : v4.4 - CR#467116 / AR#30320 - Modified Logical Layer to properly decode Messaging size field. Modified testbench to properly check byte count for messaging type packets. - 8-bit SWrite transactions usign 16-bit deviceIDs suffer lost eofs - Version fixed : v4.4 - CR#467668 / AR#30322 - Modified Logical Layer to properly forward eof through the pipeline. - Some Logical Layer CARs are not being set correctly in the core. - Version fixed : v4.4 - CR#458414 / AR#30054 - The following Logical Layer CARs are not being set correctly in the core: - Assembly Information CAR (offset 0xC) - ExtendedFeaturesPtr portion - Processing Element Features CAR (offset 0x10) - Switch Port Information CAR (offset 0x14) - Destination Operations CAR (offset 0x1C) - Switch Route Table Destination ID Limit CAR (offset 0x34) - Core does not have functionality to enable the user to drop unintended packets based on Device ID. - Version fixed: v4.3. - CR#455552 - Added a new port called deviceid which indicates the current Device ID value stored in the Base Device ID CSR. - Receive side buffer design may corrupt packets - user may see corrupted packets from the logical layer when many small packets cause the status FIFO to fill. - Version fixed: v4.2 - CR#447884 / AR#29263 - No longer applicable, v5.1 introduces new buffer. - Repeated, transmitted packet accepted control symbols referencing the same AckID cause loss of AckID sync - The user will see this as potentially duplicated received packets which ultimately result in a port error condition. - Version fixed: v4.2 - CR#444561 / AR#29233 - Modified the transmit encoder to send a single packet accepted symbol per back-to-back control symbol. - Stomped packet sent after RFR (Restart-from-Retry)control symbol - The user will occasionally see error recovery on a retry which will affect system bandwidth. - Version fixed: v4.2 - CR#435188 / AR#24837 - Modified the PHY interface to kill a packet if discontinued on eof and prevent entry to the buffer. 5. KNOWN ISSUES The following are known issues for v5.5 of this core at time of release: - NGDBuild errors when using ISE GUI unless XST Keep Hierarchy set to Soft - Version to be fixed : Fix Not Scheduled - CR#534514 / AR#33528 - Please reference the Answer Record for additional information and recommendations. - Virtex-4 FX 3.125G, 4x core may not meet timing. - Version to be fixed : Fix Not Scheduled - CR#506364 / AR#32195 - Please reference the Answer Record for additional information and recommendations. - Unable to traindown to x1 mode in Lane 2. - Version to be fixed : Fix Not Scheduled - CR#457109 / AR#30023 - Traindown in Lane 0 works successfully but the Serial RapidIO endpoint is unable to traindown to Lane 2. The RocketIO transceivers only allow traindown to the channel bonding master. - Core reinitialization during error recovery causes recoverable protocol error. - Version to be fixed : Fix Not Scheduled - CR#457885 / AR#30021 - This is an corner condition that could occur if core is forced to reinitialize (i.e. - force_reinit) while it is in the process of error recovery. If this condition occurs, packets will be sent during recovery's quiet period. This situation is recoverable. - Post-Synplicity synthesis implementation runs may exhibit ucf failures - Version to be fixed : Fix Not Scheduled - CR#447782 / AR#29522 - Synplicity generated net names are not consistent with XST generated names and may not be consistent between core types. The .ucf file must be edited in these failure cases. Please reference the Serial RapidIO v5.1 web Release Notes for suggested work around. - PNA cause field may occasionally reflect a reserved value - Version to be fixed : Fix Not Scheduled - CR#436767 / AR#24982 - The cause field is for debug purposes only and will not affect functionality. Occurrence is rare and requires alignment of multiple control symbols. - Control Symbols may be lost on reinit - Version to be fixed : Fix Not Scheduled - CR#436768 / AR#24970 - This is an unusual and ultimately recoverable error. Set the "Additional Link Request Before Fatal" value on the Physical Configuration page of the GUI to "4" in order to prevent a lost Link Request or Link Response from causing the core to enter the port error state. - Logical Rx does not support core side stalls - Version to be fixed : Fix Not Scheduled - CR#436770 / AR#24968 - The rx buffer must provide packets to the logical layer without buffer induced stall cycles. The buffer reference design provided with the core is a store and forward buffer and complies with this rule. The most recent information, including known issues, workarounds, and resolutions for this version is provided in the IP Release Notes Guide located at www.xilinx.com/support/documentation/user_guides/xtp025.pdf 6. TECHNICAL SUPPORT To obtain technical support, create a WebCase at www.xilinx.com/support. Questions are routed to a team with expertise using this product. Xilinx provides technical support for use of this product when used according to the guidelines described in the core documentation, and cannot guarantee timing, functionality, or support of this product for designs that do not follow specified guidelines. 7. OTHER INFORMATION - N/A 8. CORE RELEASE HISTORY Date By Version Description ================================================================================ 04/2010 Xilinx, Inc. 5.5 5.0 Gbps support 03/2010 Xilinx, Inc. 5.4 Revision 1 11.5 support/Patch Release 09/2009 Xilinx, Inc. 5.4 Spartan-6 support 06/2009 Xilinx, Inc. 5.3 Virtex-6 support 04/2009 Xilinx, Inc. 5.2 11.1i support 11/2008 Xilinx, Inc. 5.1 Revision 1 Patch Release 09/2008 Xilinx, Inc. 5.1 New Buffer LogiCore 07/2008 Xilinx, Inc. 4.4 Revision 2 Patch Release 07/2008 Xilinx, Inc. 4.4 Revision 1 Patch Release 06/2008 Xilinx, Inc. 4.4 Bug Fixes 03/2008 Xilinx, Inc. 4.3 10.1i support 10/2007 Xilinx, Inc. 4.2 9.2i support 02/2007 Xilinx, Inc. 4.1 9.1i support 02/2006 Xilinx, Inc. 3.1 Revision 1 Patch Release 01/2006 Xilinx, Inc. 3.1 8.1i support ================================================================================ 9. Legal Disclaimer (c) Copyright 2006 - 2010 Xilinx, Inc. All rights reserved. This file contains confidential and proprietary information of Xilinx, Inc. and is protected under U.S. and international copyright and other intellectual property laws. DISCLAIMER This disclaimer is not a license and does not grant any rights to the materials distributed herewith. Except as otherwise provided in a valid license issued to you by Xilinx, and to the maximum extent permitted by applicable law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and (2) Xilinx shall not be liable (whether in contract or tort, including negligence, or under any other theory of liability) for any loss or damage of any kind or nature related to, arising under or in connection with these materials, including for any direct, or any indirect, special, incidental, or consequential loss or damage (including loss of data, profits, goodwill, or any type of loss or damage suffered as a result of any action brought by a third party) even if such damage or loss was reasonably foreseeable or Xilinx had been advised of the possibility of the same. CRITICAL APPLICATIONS Xilinx products are not designed or intended to be fail- safe, or for use in any application requiring fail-safe performance, such as life-support or safety devices or systems, Class III medical devices, nuclear facilities, applications related to the deployment of airbags, or any other applications that could lead to death, personal injury, or severe property or environmental damage (individually and collectively, "Critical Applications"). Customer assumes the sole risk and liability of any use of Xilinx products in Critical Applications, subject only to applicable laws and regulations governing limitations on product liability. THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS PART OF THIS FILE AT ALL TIMES.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

爱你等于1+1

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值