FPGA: UltraScale+ bitslip实现(ISERDESE3)

收获

    一晃五年~
    五年前那个夏夜,我对着泛蓝的屏幕敲下《给十年后的自己》,在2020年的疫情迷雾中编织着对未来的想象。此刻回望,第四届集创赛的参赛编号仍清晰如昨,而那个在家熬夜焊电路板的"不眠者",现在也渐渐熬不动夜了😹😹
    如果遇见五年前的自己,我想告诉他:当年在博客里追问的"职业门路",答案就藏在每个调试通宵的星光里;那些担心被时代抛下的焦虑,终会熔铸成攀登技术栈的勇气。🙆🙆
    十年之约才过半程,职业的时钟域仍在扩展,就像我们永远年轻的技术信仰。下一个五年,愿芯片上的每一个逻辑门都通往星辰,愿每个深夜的坚持都能被未来温柔解码——因为代码从不辜负时光,正如奋斗永远眷顾追梦人。🍃 🍃
在这里插入图片描述

目录

  • 收获
  • 正文
    • 1、参考文献
    • 2、Bitslip in Logic(方案)
      • 2.1、现状
      • 2.2、bitslip原理
      • 2.3、解决方案A
      • 2.4、解决方案B
    • 3、RX_BITSLICE功能
    • 4、工程获取
      • 4.1、部分代码
      • 4.2、完整工程(含仿真)
  • 总结

正文

1、参考文献

本文主要讲UltraScale+ bitslip方案,iserdese3等概念,有文章说过了,这里就不做赘述:
1、Ultrascale selectio 仿真之 ISERDESE3和OSERDESE3
2、ISERDESE3/OSERDESE3例化和仿真
3、LVDS系列11:Xilinx Ultrascale系可编程输入延迟(一)
4、Xilinx IDELAYE3原语详细解读
5、iodelay 使用总结
(5这篇参数比较详细)

本文工程会放在最后一节。
注意:
一些争议点:

ISERDESE3有个地方,xilinx手册可能有点歧义:
从手册看,Q[7:0]的输出是占了2个CLKDIV时钟周期,但是实际仿真,只占了1个。
在这里插入图片描述
      不管是其他博主的仿真,还是我自己仿的,都是1个clkdiv周期,有知道的朋友,可以评论区留言交流。
在这里插入图片描述

    看了几篇文章,每篇文章一个tap多少ps说的总是有些出入,这里结合我的仿真,算了一下,一个tap是4ps(事实上,我在一个器件文档里面是有提到硬件决定了这就是4ps的,但是忘记哪个文档了):
    0级的时候,输入和输出直接的延迟是127ps;后面每次算,都要减去或者加上这个127ps。
有其他看法的朋友,也可以评论区交流。
在这里插入图片描述

2、Bitslip in Logic(方案)

2.1、现状

      这小节结论:ISERDESE3没有bitslip功能了,需要用逻辑实现。(可以结合小结3的RX_BITSLICE结构图看一下)

      UltraScale器件中的I/O逻辑是指位于专用的I/O处理组件在I/O缓冲区和一般互连之间。这个I/O逻辑在UltraScale中是不同的。与以前的系列(如7系列和Virtex-6 fpga)相比,UltraScale器件中的I/O逻辑设置提供更快的I/O处理,更好的抖动规格,还有更多的功能。但是,它忽略了以前器件系列的I/O逻辑中可用的一些功能。
      位滑(bitslip)是一个在UltraScale器件I/O逻辑中原生不可用的功能。这个应用程序注描述了在一般互连中实现的位滑解决方案,可用于超规模的设备组件以及以前的设备架构。
      参考设计实现了位滑函数,并扩展了几个额外的基本功能选项。使用基本的 UltraScale 器件 BITSLICE I/O 原语被称为“本机模式(native mode)”,而使用具有“组件模式(component mode)”原语的 UltraScale 器件 I/O 来模仿以前设备系列的 I/O 逻辑功能。

      位滑函数在以前的器件系列的每个ISERDES中都是本地可用的,它作用于串行输入流。
      在UltraScale器件中,ISERDES等效(组件模式)或 本机RX_BITSLICE函数没有实现Bitslip功能。
      本应用说明描述了以前的设备系列中原生支持的Bitslip功能,以及如何在UltraScale设备中实现等效的Bitslip。
      参考设计将所描述的解决方案作为现成的设计提供,可以在必要时进行修改。所提供的参考设计可用于具有4位和8位输出的组件模式(ISERDES)或本机模式(RX_BITSLICE),并且可以使用VHDL代码中的“属性/泛型”进行自定义。参考设计也可以用于7系列和Virtex-6 FPGA设计,这可以使设计的重新定位更容易。修改原始设计,使用通用互连实现的Bitslip代替原生Bitslip。在原始设备技术中测试设计后,将其移植到UltraScale设备中。
      在逻辑中实现的Bitslip功能的组件块下图所示。此块及其引脚和属性将在本文档后面详细解释。

在这里插入图片描述
注意:
      讲bitslip之前,我觉得有必要插入CLKDIV概念:
      CLKDIV 是 CLK 的分频版本。当 DATA_WIDTH 设置为 8 且 ISERDES 用于单数据速率 (SDR) 模式时,CLKDIV 为 CLK 的 8 分频。当 ISERDES 用于双数据速率 (DDR) 模式时,CLKDIV 为 CLK 的 4 分频。

假设DATA_WIDTH 设置为 8:

  • 以 CLK 速率将位捕获到 ISERDES 的输入串并寄存器中。
  • ISERDES 中以相同 CLK 运行的状态机每次达到 DATA_WIDTH 设置的值时,都会生成一个时钟脉冲,将串并寄存器中的位捕获到内部寄存器中。在这种情况下,当串并寄存器中捕获到 8 位时,状态机就会为内部寄存器生成一个时钟脉冲。
  • 内部状态机生成的时钟等效于外部提供的 CLKDIV 时钟。该内部生成的时钟与 CLK 时钟相关,且与外部施加的 CLKDIV 时钟相位不一致。
  • 数据通过外部应用的 CLKDIV 时钟从内部寄存器传输到并行输出寄存器 Q。

2.2、bitslip原理

      (本节如果看起来抽象,可以看看这篇文章:xilinx原语详解及仿真之ISERDESE)
      图 2(SDR 操作)显示了一个功能示例。数据采集​​从位值 7 开始。位以 CLK 时钟速率移入串并寄存器。垂直堆叠的块代表该寄存器。这些块显示值为 7 的位首先移入,然后移至底部。最后移入的位是值为 D 的位。当串并寄存器包含八个采集位时,内部寄存器会采集其中的内容。在下一个 CLKDIV 上升沿,内容移至并行输出寄存器。该寄存器随后包含值 DCBA0987。
(不是你屏幕长蚊子了,是我翻译贴图了😹)
在这里插入图片描述
      一旦数据从串行到并行寄存器被转移到内部存储寄存器,连续的新数据就被转移到串行到并行寄存器中。
      当使用Bitslip功能时,捕获、传输到内部寄存器和传输到输出寄存器的操作方式相同。
      当ISERDES位滑输入信号被断言时,在串行到并行寄存器和内部寄存器之间的数据传输延迟一个CLK周期。
      当数据传输延迟一个CLK周期时,一个额外的位被移到串行-并行寄存器中,另一端丢失一个位。
当数据在内部寄存器中被捕获时,看起来好像数据被移动了一位。图3显示了与图2相同的行为,除了在串行到并行寄存器中捕获第二个字节时执行Bitslip操作。数据不是在捕获第8位之后传输到并行寄存器,而是在捕获第9位之后。看起来好像图案移动了一位。在串行-并行寄存器的底部(末尾),移位的第一个位丢失。
在这里插入图片描述
      每次BITSLIP输入保持高位超过半个CLKDIV周期,就对数据执行一次BITSLIP操作。连续捕获相同的输入位模式会导致位的移位。因此,这种机制可以很容易地用于将数据与模式对齐,或将一个数据通道与另一个数据通道对齐。

      Bitslip 功能也可以在 I/O 逻辑的输出端使用通用互连来实现。这意味着该功能必须对并行反序列化数据执行,而不是像在先前架构中(7系列FPGA)的原生 Bitslip 功能中解释的那样,对输入的串行数据执行。

      本文提供了一种电路,可以以 CLKDIV 速率对并行数据字中的位进行 Bitslip 或移位。可以构建几种可能的电路来执行此操作。

2.3、解决方案A

      现在介绍一种动态移位和预定移位解决方案。
      以CLKDIV速率旋转串行顺序并行寄存器中的位。为了在所有可能性中进行位滑或移位,它将占用与寄存器宽度一样多的CLKDIV时钟周期
在这里插入图片描述
      图4显示了8位字上所有可能的移位或位滑步。要执行这些操作,至少需要两个8位寄存器和一个多路复用器。图5到图7详细显示了当执行单个Bitslip步骤时发生的情况。
在这里插入图片描述


觉得下面这个图抽象不好理解的,可以结合2.2节第二个图理解。


在这里插入图片描述
Step C,原理跟上面Step B一样,只不过每次可以滑动2bit。
在这里插入图片描述

布局布线后框图:
在这里插入图片描述

2.4、解决方案B

      获取ISERDES、RX_BITSLICE或其他并行逻辑的输出,并将所有位同时旋转到一组并行放置的寄存器中。该解决方案需要一个CLKDIV循环来遍历所有可能的值。在操作开始时,需要两个时钟周期来获得有效的输出:一个初始时钟周期用于加载历史寄存器,第二个时钟周期用于加载输出寄存器中的所有位排列。从那时起,每个时钟周期都会产生有效的输出数据。然后,应用程序可以选择具有所需位排列的小块或字节。当必须检测和匹配预先确定的模式时,此解决方案是理想的(参见图8)。
在这里插入图片描述

在这里插入图片描述
这个表格,就是上面框架图4bit的。
在这里插入图片描述
布局布线后的框图:
在这里插入图片描述
0x76,需要找到0xB3,不停bitslip知道找到0xB3。
请添加图片描述
请添加图片描述

参考设计包含上述两种电路,所选的选项决定了所使用的电路和选项。参考设计是一个可实例化的组件,包含一组可选选项。两种可能的电路各自使用一组选项来应用设计特性。
参考设计组件如图 1 所示。引脚功能如下:
• DataIn:4 位或 8 位输入。在 4 位模式下,使用 LSB 半字节。
• BitSlip:控制输入,当脉冲为高电平时,将调用解决方案 A 的 Bitslip 和解决方案 B 的电路使能。
• SlipVal:3 位输入,允许电路在使能输出之前进行定义的 Bitslip 次数。
• CompVal:8 位输入,用于检测数据中的模式。在 4 位模式下,使用 LSB 半字节。
• Ena:电路使能,高电平有效。
• Rst:电路复位,高电平有效。
• Clk:时钟,通常等于 CLKDIV 时钟。
• DataOut:4 位或 8 位输出。在 4 位模式下,使用 LSB 半字节。
• ErrOut:错误和状态输出:
• “Slip” 模式:执行 8 个 Bitslip 后输出高电平脉冲。
• “Nmbr” 模式:表示在执行“Nmbr”个 Bitslip 后输出数据已准备就绪。
• “Comp” 模式:表示检测到请求的模式。


方案B,有空再继续补充了。
未完,待续~~~

3、RX_BITSLICE功能

      讨论UltraScale(UltraScale+) IO,那就避不开RX_BITSLICE。
      在Ultrascale (plus即+)系列上的FPGA中,Xilinx引入了bitslice硬核,它取代了7系列上的IDELAYCTRL/IODELAY/IOSERDES/IODDR系列硬核,用于为HP(High Performance)类型Bank上的IO接口提供串并转化、信号延时、三态控制等功能。Xilinx为bitslice硬核提供了TXRX_BITSLICE/TX_BITSLICE/RX_BITSLICE/BITSLICE_CONTROL/TX_BITSLICE_TRI/RIU_OR      这些与bitslice硬核接口一致的原生原语便于用户直接调用例化。同时为了提供向前兼容性,IDELAYCTRL/IODELAY/IOSERDES/IODDR系列原语作为组件原语仍能继续使用,在综合时会被软件综合为bitslice。

      使用bitslice原生原语的优势在于其能够对位于一个字节组上的接口进行批量控制,这对于存储控制器(如DDR)的接口信号时序的优化十分有效。此外bitslice在接收侧增加了一个异步FIFO,便于用户逻辑通过用户时钟读取数据。

      官方手册是这样解释功能的:
      在本机模式下,RX_BITSLICE包含反序列化逻辑和512分接输入延迟(iddelay),可以连续调整VT变化(这个类似之前的IDELAYCTRL)。RX_BITSLICE包含用于1:4或1:8反序列化的反序列化逻辑,以及允许连接到另一个时钟域的浅FIFO。
在这里插入图片描述
RX_BITSLICE模块结构图:
在这里插入图片描述
在这里插入图片描述

管脚信号,这里就不写了,自己看看ug974。


// RX_BITSLICE : In order to incorporate this function into the design,
//   Verilog   : the following instance declaration needs to be placed
//  instance   : in the body of the design code.  The instance name
// declaration : (RX_BITSLICE_inst) and/or the port declarations within the
//    code     : parenthesis may be changed to properly reference and
//             : connect this function to the design.  All inputs
//             : and outputs must be connected.//  <-----Cut code below this line---->// RX_BITSLICE: RX_BITSLICE for input using Native Mode//              Kintex UltraScale// Xilinx HDL Language Template, version 2022.2RX_BITSLICE #(.CASCADE("FALSE"),              // Enables cascading of IDELAY and ODELAY lines.DATA_TYPE("DATA"),             // Defines what the input pin is carrying (CLOCK, DATA, DATA_AND_CLOCK,// SERIAL).DATA_WIDTH(8),                 // Defines the width of the serial-to-parallel converter (4-8).DELAY_FORMAT("TIME"),          // Units of the DELAY_VALUE (COUNT, TIME).DELAY_TYPE("FIXED"),           // Set the type of tap delay line (FIXED, VARIABLE, VAR_LOAD).DELAY_VALUE(0),                // Input delay value setting in ps.DELAY_VALUE_EXT(0),            // Value of the extended input delay value in ps.FIFO_SYNC_MODE("FALSE"),       // Always set to FALSE. TRUE is reserved for later use..IS_CLK_EXT_INVERTED(1'b0),     // Optional inversion for CLK_EXT.IS_CLK_INVERTED(1'b0),         // Optional inversion for CLK.IS_RST_DLY_EXT_INVERTED(1'b0), // Optional inversion for RST_DLY_EXT.IS_RST_DLY_INVERTED(1'b0),     // Optional inversion for RST_DLY.IS_RST_INVERTED(1'b0),         // Optional inversion for RST.REFCLK_FREQUENCY(300.0),       // Specification of the reference clock frequency in MHz (200.0-2667.0).SIM_DEVICE("ULTRASCALE"),      // Set the device version for simulation functionality (ULTRASCALE).UPDATE_MODE("ASYNC"),          // Determines when updates to the delay will take effect (ASYNC, MANUAL,// SYNC).UPDATE_MODE_EXT("ASYNC")       // Determines when updates to the extended input delay will take effect// (ASYNC, MANUAL, SYNC))RX_BITSLICE_inst (.CNTVALUEOUT(CNTVALUEOUT),         // 9-bit output: Counter value to device logic.CNTVALUEOUT_EXT(CNTVALUEOUT_EXT), // 9-bit output: Optional extended (cascaded delay) counter value// going to the device logic.FIFO_EMPTY(FIFO_EMPTY),           // 1-bit output: FIFO empty flag.FIFO_WRCLK_OUT(FIFO_WRCLK_OUT),   // 1-bit output: FIFO source synchronous write clock out to the device// logic (currently unsupported, do not connect).Q(Q),                             // 8-bit output: Registered output data from FIFO.RX_BIT_CTRL_OUT(RX_BIT_CTRL_OUT), // 40-bit output: Output bus to BITSLICE_CONTROL.TX_BIT_CTRL_OUT(TX_BIT_CTRL_OUT), // 40-bit output: Output bus to BITSLICE_CONTROL.CE(CE),                           // 1-bit input: Clock enable for IDELAY.CE_EXT(CE_EXT),                   // 1-bit input: Optional extended (cascaded delay) clock enable.CLK(CLK),                         // 1-bit input: Clock used to sample LOAD, CE, INC.CLK_EXT(CLK_EXT),                 // 1-bit input: Optional extended (cascaded delay) clock.CNTVALUEIN(CNTVALUEIN),           // 9-bit input: Counter value from device logic.CNTVALUEIN_EXT(CNTVALUEIN_EXT),   // 9-bit input: Optional extended (cascaded delay) counter value from// device logic.DATAIN(DATAIN),                   // 1-bit input: Input signal from IBUF.EN_VTC(EN_VTC),                   // 1-bit input: Enable IDELAYCTRL to keep stable delay over VT.EN_VTC_EXT(EN_VTC_EXT),           // 1-bit input: Optional extended (cascaded delay) to keep stable// delay over VT.FIFO_RD_CLK(FIFO_RD_CLK),         // 1-bit input: FIFO read clock.FIFO_RD_EN(FIFO_RD_EN),           // 1-bit input: FIFO read enable.INC(INC),                         // 1-bit input: Increment the current delay tap setting.INC_EXT(INC_EXT),                 // 1-bit input: Optional extended (cascaded delay) increments the// current delay tap setting.LOAD(LOAD),                       // 1-bit input: Load the CNTVALUEIN tap setting.LOAD_EXT(LOAD_EXT),               // 1-bit input: Optional extended (cascaded delay) load the// CNTVALUEIN_EXT tap setting.RST(RST),                         // 1-bit input: Asynchronous assert, synchronous deassert for// RX_BITSLICE ISERDES.RST_DLY(RST_DLY),                 // 1-bit input: Reset the internal DELAY value to DELAY_VALUE.RST_DLY_EXT(RST_DLY_EXT),         // 1-bit input: Optional extended (cascaded delay) reset delay to// DELAY_VALUE_EXT.RX_BIT_CTRL_IN(RX_BIT_CTRL_IN),   // 40-bit input: Input bus from BITSLICE_CONTROL.TX_BIT_CTRL_IN(TX_BIT_CTRL_IN)    // 40-bit input: Input bus from BITSLICE_CONTROL);// End of RX_BITSLICE_inst instantiation

RXTX_BITSLICE模块结构图:
除了接收,也有发送或者双向的同样模块:RXTX_BITSLICE。
功能类似,这里不赘述。
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述


// RXTX_BITSLICE : In order to incorporate this function into the design,
//    Verilog    : the following instance declaration needs to be placed
//   instance    : in the body of the design code.  The instance name
//  declaration  : (RXTX_BITSLICE_inst) and/or the port declarations within the
//     code      : parenthesis may be changed to properly reference and
//               : connect this function to the design.  All inputs
//               : and outputs must be connected.//  <-----Cut code below this line---->// RXTX_BITSLICE: RXTX_BITSLICE for bidirectional I/O using Native Mode//                Kintex UltraScale// Xilinx HDL Language Template, version 2022.2RXTX_BITSLICE #(.ENABLE_PRE_EMPHASIS("FALSE"), // Enable the pre-emphasis.FIFO_SYNC_MODE("FALSE"),      // Always set to FALSE. TRUE is reserved for later use..INIT(1'b1),                   // Defines initial O value.IS_RX_CLK_INVERTED(1'b0),     // Optional inversion for RX_CLK.IS_RX_RST_DLY_INVERTED(1'b0), // Optional inversion for RX_RST_DLY.IS_RX_RST_INVERTED(1'b0),     // Optional inversion for RX_RST.IS_TX_CLK_INVERTED(1'b0),     // Optional inversion for TX_CLK.IS_TX_RST_DLY_INVERTED(1'b0), // Optional inversion for TX_RST_DLY.IS_TX_RST_INVERTED(1'b0),     // Optional inversion for TX_RST.RX_DATA_TYPE("DATA"),         // Defines what the RX input pin is carrying (CLOCK, DATA, DATA_AND_CLOCK,// SERIAL).RX_DATA_WIDTH(8),             // Defines the width of the serial-to-parallel converter (4-8).RX_DELAY_FORMAT("TIME"),      // Units of the RX DELAY_VALUE (COUNT, TIME).RX_DELAY_TYPE("FIXED"),       // Set the type of RX tap delay line (FIXED, VARIABLE, VAR_LOAD).RX_DELAY_VALUE(0),            // RX Input delay value setting in ps.RX_REFCLK_FREQUENCY(300.0),   // Specification of the RX reference clock frequency in MHz (200.0-2667.0).RX_UPDATE_MODE("ASYNC"),      // Determines when updates to the RX delay will take effect (ASYNC,// MANUAL, SYNC).SIM_DEVICE("ULTRASCALE"),     // Set the device version for simulation functionality (ULTRASCALE).TBYTE_CTL("TBYTE_IN"),        // Select between T and TBYTE_IN inputs.TX_DATA_WIDTH(8),             // Parallel data input width (4-8).TX_DELAY_FORMAT("TIME"),      // Units of the TX DELAY_VALUE (COUNT, TIME).TX_DELAY_TYPE("FIXED"),       // Set the type of TX tap delay line (FIXED, VARIABLE, VAR_LOAD).TX_DELAY_VALUE(0),            // TX Input delay value setting in ps.TX_OUTPUT_PHASE_90("FALSE"),  // Delays the output phase by 90-degrees.TX_REFCLK_FREQUENCY(300.0),   // Specification of the TX reference clock frequency in MHz (200.0-2667.0).TX_UPDATE_MODE("ASYNC")       // Determines when updates to the delay will take effect (ASYNC, MANUAL,// SYNC))RXTX_BITSLICE_inst (.FIFO_EMPTY(FIFO_EMPTY),           // 1-bit output: FIFO empty flag.FIFO_WRCLK_OUT(FIFO_WRCLK_OUT),   // 1-bit output: FIFO source synchronous write clock out to the device// logic (currently unsupported, do not connect).O(O),                             // 1-bit output: Serialized output going to output buffer.Q(Q),                             // 8-bit output: Registered output data from FIFO.RX_BIT_CTRL_OUT(RX_BIT_CTRL_OUT), // 40-bit output: RX Output bus to BITSLICE_CONTROL.RX_CNTVALUEOUT(RX_CNTVALUEOUT),   // 9-bit output: RX Counter value from device logic.TX_BIT_CTRL_OUT(TX_BIT_CTRL_OUT), // 40-bit output: Output bus to BITSLICE_CONTROL for TX.TX_CNTVALUEOUT(TX_CNTVALUEOUT),   // 9-bit output: TX Counter value to device logic.T_OUT(T_OUT),                     // 1-bit output: Byte group 3-state output.D(D),                             // 8-bit input: Data from device logic.DATAIN(DATAIN),                   // 1-bit input: Input signal from IOBUF.FIFO_RD_CLK(FIFO_RD_CLK),         // 1-bit input: FIFO read clock.FIFO_RD_EN(FIFO_RD_EN),           // 1-bit input: FIFO read enable.RX_BIT_CTRL_IN(RX_BIT_CTRL_IN),   // 40-bit input: RX Input bus from BITSLICE_CONTROL.RX_CE(RX_CE),                     // 1-bit input: Clock enable for IDELAY.RX_CLK(RX_CLK),                   // 1-bit input: RX Clock used to sample LOAD, CE, INC.RX_CNTVALUEIN(RX_CNTVALUEIN),     // 9-bit input: RX Counter value from device logic.RX_EN_VTC(RX_EN_VTC),             // 1-bit input: RX Enable to keep stable delay over VT.RX_INC(RX_INC),                   // 1-bit input: RX Increment the current delay tap setting.RX_LOAD(RX_LOAD),                 // 1-bit input: RX Load the CNTVALUEIN tap setting.RX_RST(RX_RST),                   // 1-bit input: RX Asynchronous assert, synchronous deassert for// RXTX_BITSLICE ISERDES.RX_RST_DLY(RX_RST_DLY),           // 1-bit input: RX Reset the internal DELAY value to DELAY_VALUE.T(T),                             // 1-bit input: Legacy T byte input from device logic.TBYTE_IN(TBYTE_IN),               // 1-bit input: Byte group 3-state input from TX_BITSLICE_TRI.TX_BIT_CTRL_IN(TX_BIT_CTRL_IN),   // 40-bit input: TX Input bus from BITSLICE_CONTROL.TX_CE(TX_CE),                     // 1-bit input: Clock enable for ODELAY.TX_CLK(TX_CLK),                   // 1-bit input: TX Clock used to sample LOAD, CE, INC.TX_CNTVALUEIN(TX_CNTVALUEIN),     // 9-bit input: TX Counter value from device logic.TX_EN_VTC(TX_EN_VTC),             // 1-bit input: TX Enable to keep stable delay over VT.TX_INC(TX_INC),                   // 1-bit input: TX Increment the current delay tap setting.TX_LOAD(TX_LOAD),                 // 1-bit input: TX Load the CNTVALUEIN tap setting.TX_RST(TX_RST),                   // 1-bit input: TX Asynchronous assert, synchronous deassert for// RXTX_BITSLICE OSERDES.TX_RST_DLY(TX_RST_DLY)            // 1-bit input: TX Reset the internal DELAY value to DELAY_VALUE);// End of RXTX_BITSLICE_inst instantiation

4、工程获取

4.1、部分代码

    美中不足,xilinx参考代码是VHD写的,顶层文件BitSlipInLogic_Toplevel如下:

---------------------------------------------------------------------------------------------
--   ____  ____
--  /   /\/   /
-- /___/  \  /
-- \   \   \/    ?Copyright 2014 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.
-- \   \  /  \
--  \___\/\___\
--
---------------------------------------------------------------------------------------------
-- Device:              UltraScale, 7-Series
-- Author:              Defossez
-- Entity Name:         BitSlipInLogic_Toplevel
-- Purpose:             Is same design as Bitslip.vhd but now with front and back-end
--                      registers added. These are added for software timing measurements.
--                      Perform bitslip operations on parallel data.
--                      Extended functionality of native Virtex and 7-Series bitslip.
-- Tools:               Vivado_2014.1 or newer
-- Limitations:         none
--
-- Vendor:              Xilinx Inc.
-- Version:             V0.01
-- Filename:            BitSlipInLogic_Toplevel.vhd
-- Date Created:        5 Dec 2014
-- Date Last Modified:  May 2014
---------------------------------------------------------------------------------------------
-- 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.
--
-- Contact:    e-mail  hotline@xilinx.com        phone   + 1 800 255 7778
---------------------------------------------------------------------------------------------
-- Revision History:
--  Rev. May 2014
--  Checked simulations and implementation.
--  Reorganise design to fit Olympus and UltraScale, 7-Series XiPhy / ISERDES.
---------------------------------------------------------------------------------------------
-- Naming Conventions:
--  Generics start with:                                    "C_*"
--  Ports
--      All words in the label of a port name start with a upper case, AnInputPort.
--      Active low ports end in                             "*_n"
--      Active high ports of a differential pair end in:    "*_p"
--      Ports being device pins end in _pin                 "*_pin"
--      Reset ports end in:                                 "*Rst"
--      Enable ports end in:                                "*Ena", "*En"
--      Clock ports end in:                                 "*Clk", "ClkDiv", "*Clk#"
--  Signals and constants
--      Signals and constant labels start with              "Int*"
--      Registered signals end in                           "_d#"
--      User defined types:                                 "*_TYPE"
--      State machine next state:                           "*_Ns"
--      State machine current state:                        "*_Cs"
--      Counter signals end in:                             "*Cnt", "*Cnt_n"
--   Processes:                                 "<Entity_><Function>_PROCESS"
--   Component instantiations:                  "<Entity>_I_<Component>_<Function>"
---------------------------------------------------------------------------------------------
library IEEE;use IEEE.std_logic_1164.all;use IEEE.std_logic_UNSIGNED.all;
library UNISIM;use UNISIM.vcomponents.all;
library work;use work.all;
library Common;use Common.all;
---------------------------------------------------------------------------------------------
-- Entity pin description
-- View also PDF documentation in the /Documents Folder
--  GENERICS / ATTRIBUTES
--  C_Function      :   "Slip" = Normal bitslip. One bit at a time when C_PulsedSlip is 1,
--                  :            else bitslip will happen as long as the BitSlip_Pin is high.
--                  :   "Nmbr" = Perform the given amount of bitslips.
--                  :   "Comp" = Compare. Auto bitslip until the given value is detected.
--                  :   "FstC" = Fast Compare. Different (Low latency) implementation of the 
--                  :            compare bitslip solution.
--  C_DataWidth     :   8, 4
--  C_PulsedSlip    :   If set to 1, bitslip is reduced to a clock period.
--                  :   Leave this at '1', unless you are sure that bitslip given by an
--                  :   application is not longer than one Clk_pin cycle.
--  C_ErrOut        :   1 = ErrOut pin available.
--  C_InputReg      :   0 = No. Provide an extra input register for the module.
--
--  INPUT / OUTPUT PINS
--  DataIn_pin      :   in : Data input 4 or 8-bit wide.
--  Bitslip_pin     :   in : Perform bitslip when high
--  SlipVal_pin     :   in : Given number of bitslips. For 8-bit this is a 3-bit binary value.
--                  :        For 4-bit this is a 2-bit binary value (Pull MSB bit low)
--  CompVal_pin     :   in : Provided value to compare the input data against.
--  Ena_pin         :   in 
--  Rst_pin         :   in 
--  Clk_pin         :   in 
--  DataOut_pin     :   out 4-bit or 8-bit output data.
--  ErrOut_pin      :   out Error or status depending on C_Function.
---------------------------------------------------------------------------------------------
entity BitSlipInLogic_Toplevel isgeneric (C_Function      : string    := "Comp";  -- Slip, Nmbr, Comp, FstCC_DataWidth     : integer   := 8;       -- 8, 4C_PulsedSlip    : integer   := 1;       -- 1 = bitslip is reduced to a clock period.-- Leave this at '1', unless you are sure that-- a bitslip given by an application is longer-- than one Clk_pin cycle.C_ErrOut        : integer   := 1;       -- 1 = ErrOut pin available.C_InputReg      : integer   := 0        -- 0, No, 1 = Yes);port (DataIn_pin      : in std_logic_vector(C_DataWidth-1 downto 0);Bitslip_pin     : in std_logic;SlipVal_pin     : in std_logic_vector(2 downto 0);CompVal_pin     : in std_logic_vector(C_DataWidth-1 downto 0);Ena_pin         : in std_logic;Rst_pin         : in std_logic;Clk_pin         : in std_logic;DataOut_pin     : out std_logic_vector(C_DataWidth-1 downto 0);ErrOut_pin      : out std_logic);
end BitSlipInLogic_Toplevel;
---------------------------------------------------------------------------------------------
-- Architecture section
---------------------------------------------------------------------------------------------
architecture BitSlipInLogic_Toplevel_arch of BitSlipInLogic_Toplevel is
---------------------------------------------------------------------------------------------
-- Component Instantiation
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
-- Constants, Signals and Attributes Declarations
---------------------------------------------------------------------------------------------
-- Functions
-- Constants
constant Low  : std_logic	:= '0';
constant High : std_logic	:= '1';
-- Signals
signal IntBitslip_pin   : std_logic;signal Int_Reg_DataIn_pin      : std_logic_vector(C_DataWidth-1 downto 0);
signal Int_Reg_Bitslip_pin     : std_logic;
signal Int_Reg_SlipVal_pin     : std_logic_vector(2 downto 0);
signal Int_Reg_CompVal_pin     : std_logic_vector(C_DataWidth-1 downto 0);
signal Int_Reg_Ena_pin         : std_logic;
signal Int_Reg_Rst_pin         : std_logic;
signal Int_Reg_DataOut_pin     : std_logic_vector(C_DataWidth-1 downto 0);
signal Int_Reg_ErrOut_pin      : std_logic;
-- Attributes
attribute KEEP_HIERARCHY : string;attribute KEEP_HIERARCHY of BitSlipInLogic_Toplevel_arch : architecture is "YES";
attribute LOC : string;
---------------------------------------------------------------------------------------------
begin
---------------------------------------------------------------------------------------------
-- Input registers
---------------------------------------------------------------------------------------------
BitSlipInLogic_Toplevel_InReg_PROCESS : process(Clk_pin)
beginif (Clk_pin'event and Clk_pin = '1') thenInt_Reg_DataIn_pin <= DataIn_pin;Int_Reg_Bitslip_pin <= Bitslip_pin;Int_Reg_SlipVal_pin <= SlipVal_pin;Int_Reg_CompVal_pin <= CompVal_pin;Int_Reg_Ena_pin <= Ena_pin; Int_Reg_Rst_pin <= Rst_pin;end if;
end process;
---------------------------------------------------------------------------------------------
-- Output registers
---------------------------------------------------------------------------------------------
BitSlipInLogic_Toplevel_OutReg_PROCESS : process(Clk_pin)
beginif (Clk_pin'event and Clk_pin = '1') thenDataOut_pin <= Int_Reg_DataOut_pin;ErrOut_pin <= Int_Reg_ErrOut_pin;end if;
end process;
---------------------------------------------------------------------------------------------
-- Generate or not, from a input signal that goes high and stay high a single pulse.
-- The input signal can stay high for 1 to n clock cycles, the output will be a 
-- pulse of the length of a clock period.
-----------------------------------------------------------------------------------------
Gen_0 : if C_PulsedSlip = 1 generateBitSlipInLogic_Toplevel_I_GenPulsedSlip : entity Common.GenPulseport map (Clk => Clk_pin, Ena => High, SigIn => Int_Reg_Bitslip_pin, SigOut => IntBitslip_pin);
end generate Gen_0;
--
Gen_1 : if C_PulsedSlip = 0 generateIntBitslip_pin <= Bitslip_pin;
end generate Gen_1;
-----------------------------------------------------------------------------------------
Gen_2 : if C_DataWidth = 8 generateGen_2_0 : if C_Function /= "FstC" generateBitSlipInLogic_Toplevel_I_Btslp8b : entity work.BitSlipInLogic_8bgeneric map (C_Function      => C_Function, -- Slip, Nmbr, CompC_ErrOut        => C_ErrOut, -- 1 = ErrOut pin available.C_InputReg      => C_InputReg -- 0, No, 1 = Yes)port map (DataIn_pin      => Int_Reg_DataIn_pin, -- in [7:0]Bitslip_pin     => IntBitslip_pin, -- in SlipVal_pin     => Int_Reg_SlipVal_pin(2 downto 0), -- in [2:0]CompVal_pin     => Int_Reg_CompVal_pin, -- in [7:0]Ena_pin         => Int_Reg_Ena_pin, -- inRst_pin         => Int_Reg_Rst_pin, -- inClk_pin         => Clk_pin, -- inDataOut_pin     => Int_Reg_DataOut_pin, -- out [7:0]ErrOut_pin      => Int_Reg_ErrOut_pin);end generate Gen_2_0;--Gen_2_1 : if C_Function = "FstC" generateBitSlipInLogic_Toplevel_I_BtslpFstC8b : entity work.BitSlipInLogic_FstCmp_8bgeneric map (C_Function      => C_Function, -- FstC, --C_ErrOut        => C_ErrOut, -- 1 = ErrOut pin available., --C_InputReg      => C_InputReg -- 0, No, 1 = Yes --)port map (DataIn_pin      => Int_Reg_DataIn_pin, -- in [7:0]Bitslip_pin     => IntBitslip_pin, -- in CompVal_pin     => Int_Reg_CompVal_pin, -- in [7:0],Ena_pin         => Int_Reg_Ena_pin, -- in, -- inRst_pin         => Int_Reg_Rst_pin, -- in, -- inClk_pin         => Clk_pin, -- in, -- inDataOut_pin     => Int_Reg_DataOut_pin, -- out [7:0],ErrOut_pin      => Int_Reg_ErrOut_pin -- out);end generate Gen_2_1;
end generate Gen_2;
-----------------------------------------------------------------------------------------
Gen_3 : if C_DataWidth = 4 generateGen_3_0 : if C_Function /= "FstC" generateBitSlipInLogic_Toplevel_I_Btslp4b : entity work.BitSlipInLogic_4bgeneric map (C_Function      => C_Function, -- Slip, Nmbr, CompC_ErrOut        => C_ErrOut, -- 1 = ErrOut pin available.C_InputReg      => C_InputReg -- 0, No, 1 = Yes)port map (DataIn_pin      => Int_Reg_DataIn_pin, -- in [3:0]Bitslip_pin     => IntBitslip_pin, -- in SlipVal_pin     => Int_Reg_SlipVal_pin(1 downto 0), -- in [1:0]CompVal_pin     => Int_Reg_CompVal_pin, -- in [3:0]Ena_pin         => Int_Reg_Ena_pin, -- inRst_pin         => Int_Reg_Rst_pin, -- inClk_pin         => Clk_pin, -- inDataOut_pin     => Int_Reg_DataOut_pin, -- out [3:0]ErrOut_pin      => Int_Reg_ErrOut_pin);end generate Gen_3_0;--Gen_3_1 : if C_Function = "FstC" generateBitSlipInLogic_Toplevel_I_BtslpFstC4b : entity work.BitSlipInLogic_FstCmp_4bgeneric map (C_Function      => C_Function, -- FstC, --C_ErrOut        => C_ErrOut, -- 1 = ErrOut pin available., --C_InputReg      => C_InputReg -- 0, No, 1 = Yes --)port map (DataIn_pin      => Int_Reg_DataIn_pin, -- in [3:0]Bitslip_pin     => IntBitslip_pin, -- in CompVal_pin     => Int_Reg_CompVal_pin, -- in [3:0],Ena_pin         => Int_Reg_Ena_pin, -- in, -- inRst_pin         => Int_Reg_Rst_pin, -- in, -- inClk_pin         => Clk_pin, -- in, -- inDataOut_pin     => Int_Reg_DataOut_pin, -- out [3:0],ErrOut_pin      => Int_Reg_ErrOut_pin -- out);end generate Gen_3_1;
end generate Gen_3;end BitSlipInLogic_Toplevel_arch;
--

4.2、完整工程(含仿真)

https://download.csdn.net/download/weixin_46423500/90841574

总结

      本文主要学习并描述Xilinx UltraScale+ bitslip实现的2个方案,后续会根据这2个方案,自己设计一个新的DDR bitslip方案。 届时,再重启一篇文章进行分享。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/80939.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

用 wireshark 解密 SIP over TLS 以及 SRTP 解密

--todo 有空再搞 MicroSIP 向 FreeSWITCH 注册&#xff0c;transport 设置为 tls 同时 Media Encryption 设置为强制 FreeSWITCH 做一个这样的路由&#xff1a; <action application"set" data"rtp_secure_mediaoptional"/> <action applicat…

Delphi 12.3调用Chrome/edge内核实现DEMO源码

DELPHI使用调用Chrome/Edge内核浏览器&#xff0c;虽然旧的WebBrowser也还可以用&#xff0c;但大势所趋&#xff0c;新版的已经不需要使用第三方的组件了&#xff0c;算是全内置的开发了&#xff0c;不废话 Unit1 源码 Form 源码 unit Unit1;interfaceusesWinapi.Windows, W…

快速搭建一个electron-vite项目

1. 初始化项目 在命令行中运行以下命令 npm create quick-start/electronlatest也可以通过附加命令行选项直接指定项目名称和你想要使用的模版。例如&#xff0c;要构建一个 Electron Vue 项目&#xff0c;运行: # npm 7&#xff0c;需要添加额外的 --&#xff1a; npm cre…

26考研 | 王道 | 计算机组成原理 | 一、计算机系统概述

26考研 | 王道 | 计算机组成原理 | 一、计算机系统概述 文章目录 26考研 | 王道 | 计算机组成原理 | 一、计算机系统概述1.1 计算机的发展1.2 计算机硬件和软件1.2.1 计算机硬件的基本组成1.2.2 各个硬件的工作原理1.2.3 计算机软件1.2.4 计算机系统的层次结构1.2.5 计算机系统…

01-数据结构概述和时间空间复杂度

数据结构概述和时间空间复杂度 1. 什么是数据结构 数据结构&#xff08;Data Structure&#xff09;是计算机存储、组织数据的方式&#xff0c;指相互之间存在一种或多种特定关系的数据元素的集合。 2. 什么是算法 算法&#xff08;Algorithm&#xff09;就是定义良好的计算…

大数据架构选型全景指南:核心架构对比与实战案例 解析

目录 大数据架构选型全景指南&#xff1a;核心架构对比与实战案例解析1. 主流架构全景概览1.1 核心架构类型1.2 关键选型维度 2. 架构对比与选型矩阵2.1 主流架构对比表2.2 选型决策树 3. 案例分析与实现案例1&#xff1a;电商实时推荐系统&#xff08;Lambda架构&#xff09;案…

(51单片机)LCD显示红外遥控相关数字(Delay延时函数)(LCD1602教程)(Int0和Timer0外部中断教程)(IR红外遥控模块教程)

前言&#xff1a; 本次Timer0模块改装了一下&#xff0c;注意&#xff01;&#xff01;&#xff01;今天只是简单的实现一下&#xff0c;明天用次功能显示遥控密码锁 演示视频&#xff1a; 在审核 源代码&#xff1a; 如上图将9个文放在Keli5 中即可&#xff0c;然后烧录在…

网络实验-防火墙双机热备份

实验目的 了解防火墙双机热备份配置&#xff0c;提供部署防火墙可靠性。 网络拓扑 左侧为trust域&#xff0c;右侧为untrust域。防火墙之间配置双机热备份。 配置内容 master VRRP 由于防火墙是基于会话表匹配回程流量&#xff0c;流量去向和回程必须通过同一个防火墙。…

【2025最新】VSCode Cline插件配置教程:免费使用Claude 3.7提升编程效率

 2025年最新VSCode Cline插件安装配置教程&#xff0c;详解多种免费使用Claude 3.7的方法&#xff0c;集成DeepSeek-R1与5大实用功能&#xff0c;专业编程效率提升指南。 Cline是VSCode中功能最强大的AI编程助手插件之一&#xff0c;它能与Claude、OpenAI等多种大模型无缝集…

考研英一真题学习笔记 2018年

2018 年全国硕士研究生招生考试 英语 &#xff08;科目代码&#xff1a;201&#xff09; Section Ⅰ Use of English Directions: Read the following text. Choose the best word(s) for each numbered blank and mark A, B, C or D on the ANSWER SHEET. (10 points) Trust i…

华硕服务器-品类介绍

目录 一、核心产品线解析 1. 机架式服务器 2. 塔式服务器 3. 高密度计算服务器 二、关键技术与模组配置 1. 主板与管理模块 2. 电源与散热 3. 存储与网络 三、应用场景与行业解决方案 1. 人工智能与高性能计算 2. 云计算与虚拟化 3. 边缘计算与工业物联网 一、核心…

硅基计划2.0 学习总结 贰

一、程序逻辑控制&#xff08;顺序、选择&循环&#xff09; 顺序结构就不多介绍了&#xff0c;就是各个语句按照先后顺序进行执行 &#xff08;1&#xff09;选择结构 三大选择类型&#xff1a;if、if-else、if-else if-else以及悬浮else的问题 基本已经在之前在C语言文章…

RabbitMQ最新入门教程

文章目录 RabbitMQ最新入门教程1.什么是消息队列2.为什么使用消息队列3.消息队列协议4.安装Erlang5.安装RabbitMQ6.RabbitMQ核心模块7.RabbitMQ六大模式7.1 简单模式7.2 工作模式7.3 发布订阅模式7.4 路由模式7.5 主题模式7.6 RPC模式 8.RabbitMQ四种交换机8.1 直连交换机8.2 主…

工具学习_VirusTotal使用

VirusTotal Intelligence 允许用户在其庞大的数据集中进行搜索&#xff0c;以查找符合特定条件的文件&#xff0c;例如哈希值、杀毒引擎检测结果、元数据信息、提交时的文件名、文件结构特征、文件大小等。可以说&#xff0c;它几乎是恶意软件领域的“谷歌搜索引擎”。 网页使…

计算机系统----软考中级软件设计师(自用学习笔记)

目录 1、计算机的基本硬件系统 2、CPU的功能 3、运算器的组成 4、控制器 5、计算机的基本单位 6、进制转换问题 7、原码、反码、补码、移码 8、浮点数 9、寻址方式 10、奇偶校验码 11、海明码 12、循环冗余校验码 13、RISC和CISC 14、指令的处理方式 15、存储器…

扬州卓韵酒店用品:优质洗浴用品,提升酒店满意度与品牌形象

在酒店提供的服务里&#xff0c;沐浴用品占据了非常重要的地位&#xff0c;其质量与种类直接关系到客人洗澡时的感受。好的沐浴用品能让客人洗澡时感到舒心和快乐&#xff0c;反之&#xff0c;质量不好的用品可能会影响客人整个住宿期间的愉悦心情。挑选恰当的洗浴用品不仅能够…

学习笔记:黑马程序员JavaWeb开发教程(2025.4.5)

12.4 登录认证-登录校验-会话跟踪方案一 设置cookie&#xff0c;服务器给浏览器响应数据&#xff0c;通过control方法形参当中获取response&#xff0c;调用response当中的addCookie方法实现 获取cookie&#xff0c;调用getCookie方法 用户可以通过浏览器设置禁用cookie 跨域…

进程替换讲解

1. 基本概念 1.1 进程替换 vs. 进程创建 进程创建&#xff1a;使用fork()或clone()等系统调用创建一个新的子进程&#xff0c;子进程是父进程的副本&#xff0c;拥有相同的代码和数据。进程替换&#xff1a;使用exec系列函数在当前进程中加载并执行一个新的程序&#xff0c;替…

【微服务】SpringBoot + Docker 实现微服务容器多节点负载均衡详解

目录 一、前言 二、前置准备 2.1 基本环境 2.2 准备一个springboot工程 2.2.1 准备几个测试接口 2.3 准备Dockerfile文件 2.4 打包上传到服务器 三、制作微服务镜像与运行服务镜像 3.1 拷贝Dockerfile文件到服务器 3.2 制作服务镜像 3.3 启动镜像服务 3.4 访问一下服…

1.2.2.1.4 数据安全发展技术发展历程:高级公钥加密方案——同态加密

引言 在密码学领域&#xff0c;有一种技术被图灵奖得主、著名密码学家Oded Goldreich誉为"密码学圣杯"&#xff0c;那就是全同态加密&#xff08;Fully Homomorphic Encryption&#xff09;。今天我们就来聊聊这个神秘而强大的加密方案是如何从1978年的概念提出&…