背景

前面我们已经知道7 series FPGA的总体架构,其中包括CLBs,本篇博文根据赛灵思官方文档,专门介绍一下CLBs。

7 Series FPGAs Configurable Logic Block,简称CLB,也就是可编程逻辑块;

用户手册上说:

Usually, logic synthesis assigns the CLB resources without system designer intervention. It can be advantageous for the designer to understand certain CLB details, including the varying capabilities of the look-up tables (LUTs), the physical direction of the carry propagation, the number and distribution of the available flip-flops, and the availability of the very efficient shift registers.

意思是,通常来讲,逻辑综合分配CLB资源,无需系统设计人员干预。也就是说事实上,我们在设计一个FPGA电路时,通过赛灵思综合工具(XST)这一块会自动分配CLB资源,不需要设计者干预,但对于设计者来说,理解某些CLB细节是有利无害的,包括查找表的不同能力,进位传播的物理方向,可用触发器的数量以及分布,以及移位寄存器的有效性等。

因此,了解一下FPGA的底层架构之CLB是很有必要的。


CLB Overview

CLBs are the main logic resources for implementing sequential as well as combinatorial circuits. Each CLB element is connected to a switch matrix for access to the general routing matrix (shown in Figure 1-1). A CLB element contains a pair of slices.

CLBs是实现时序以及组合电路的主要逻辑资源,每个CLB都与一个开关矩阵相连以访问the general routing maxtrix,(这个矩阵是啥,我确定了再解释)。一个CLB包含一对slices,见下图,Slices以及Switch Matrix的分布情况:

从上面的介绍知道了CLB是由一对Slice组成,那么Slice又是什么组成的呢?

The LUTs in 7 series FPGAs can be configured as either a 6-input LUT with one output, or as two 5-input LUTs with separate outputs but common addresses or logic inputs. Each 5-input LUT output can optionally be registered in a flip-flop. Four such 6-input LUTs and their eight flip-flops as well as multiplexers and arithmetic carry logic form a slice, and two slices form a CLB. Four flip-flops per slice (one per LUT) can optionally be configured as latches. In that case, the remaining four flip-flops in that slice must remain unused.

我来解释下这段话:

Slice是由4个6输入的查找表(LUT,Look Up Table)、8个触发器(flip-flop)、多路复用器以及算数进位逻辑组成,然后两个Slice组成一个CLB。

每个Slice中有4个触发器(flip-flop)可以配置成锁存器(latch),但是在这种情况下,在该Slice中剩下的4个flip-flop不能被使用。

7 series FPGA的LUT可以被配置为6输入、1输出的LUT,或者有独立输出的两个5输入的LUT,这两个5输入的LUT共享地址和逻辑输入。而且,每一个5输入的LUT可以选择被配置为一个触发器(flip-flop)。

总的来说,就是CLB由两个Slice组成,每个Slice又由LUT、flip-flop、multiplexers以及arithmetic carry logic组成。

这还没完,用户手册还说:

Approximately two-thirds of the slices are SLICEL logic slices and the rest are SLICEM, which can also use their LUTs as distributed 64-bit RAM or as 32-bit shift registers (SRL32) or as two SRL16s. Modern synthesis tools take advantage of these highly efficient logic, arithmetic, and memory features. Expert designers can also instantiate them.

大约三分之二的Slice是SLICEL,其余的是SLICEM,也可以将它们的LUT用作分布式64位RAM或32位移位寄存器(SRL32)或作为两个SRL16。 现代综合工具利用这些高效逻辑,算术和记忆功能。 专家设计师也可以实例化它们。

上面说的,可以将它们的LUT用作分布式64位RAM或32位移位寄存器(SRL32)或作为两个SRL16,是不是有点歧义呢?是SLICEM可以这样用还是SLICEM和SLICEL都可以这样用呢?

我从用户手册上找到了这句话:

The 7 series FPGA CLB six-input LUT, abundant flip-flops and latches, carry logic, and the ability to create distributed RAM or shift
registers in the SLICEM, increase the effective capacity. The ratio between the number of logic cells and 6-input LUTs is 1.6:1.

分析这段话就可以知道,SLICEM可以用作分布式RAM或者移位寄存器。


7 Series FPGA CLB Resources

7 Series FPGA CLB Resources也就是7系列FPGA的CLB资源,我贴出了一种吧。

从上图可见,LUT的数量是SLICE的4倍,这也就是说每个Slice中有4个LUT,触发器的数量是Slice的8倍说明每个Slice中有8个触发器(flip-flop);

只有SLICEM可以使用它们的LUT作为分布式的RAM或者移位寄存器。


Recommended Design Flow(推荐设计流程)

CLB resources are inferred for generic design logic and do not require instantiation. Good HDL design is sufficient. A few items to note:
• CLB flip-flops have either a set or a reset. The designer must not use both set and reset.
• Flip-flops are abundant. Pipelining should be considered to improve performance.
• Control inputs are shared across a slice or CLB. The number of unique control inputs required for a design should be minimized. Control inputs include clock, clock enable, set/reset, and write enable.
• A 6-input LUT can be used as a 32-bit shift register for efficient implementation.
• A 6-input LUT can be used as a 64 x 1 memory for small storage requirements.
• Dedicated carry logic implements arithmetic functions effectively.

意思是:

CLB资源是针对通用设计逻辑推断的,不需要实例化。 好的HDL设计就足够了。 一些注意事项:
•CLB触发器具有置位或复位功能,设计师不能同时使用set和reset。
•触发器是丰富的,应考虑使用流水线来提高性能。
•控制输入在切片或CLB上共享。 应尽量减少设计所需的独特控制输入的数量。 控制输入包括时钟,时钟使能,置位/复位和写使能。
•6输入LUT可用作32位移位寄存器,以实现高效实现。
•6输入LUT可用作64 x 1存储器,以满足小型存储要求。
•专用进位逻辑有效地实现算术功能。

These steps indicate the recommended design flow:

1. Implement the design using preferred methodologies (HDL, IP, etc.).
2. Evaluate utilization reports to determine resources used.
Check to make sure arithmetic logic, distributed RAM, and SRL are used, when helpful.
3. Consider flip-flop usage.
a. Pipeline for performance
b. Use dedicated flip-flops at the outputs of dedicated resources (block RAM, DSP)
c. Allow shift registers to use SRL (avoid set/resets)
4. Minimize the use of set/resets.

可以大致理解为:

这些步骤意味着下面的设计流程:

1、用好的方法实现设计,例如HDL,IP等

2、评估利用率报告以确定使用的资源。

检查确保使用了算术逻辑、分布式RAM以及移位寄存器,是很有帮助的。

3、考虑使用触发器;

a:流水线以提高性能;

b:在专用资源(Block RAM,DSP)的输出端使用专用触发器;

c:允许移位寄存器使用SRL,但避免set和reset同时使用。

4、尽量少使用set和reset。


这篇博文暂时就记到这里,当然还没有完,但是长博文不便于阅读,给出续集的地址:Xilinx® 7 series FPGAs CLBs专题介绍(二)

Xilinx® 7 series FPGAs CLBs专题介绍(一)相关推荐

  1. Xilinx® 7 series FPGAs CLBs专题介绍(二)

    目录 背景 CLB布局(CLB Arrangement) ASMBL Architecture CLB Slices CLB/Slice Configurations Slice Descriptio ...

  2. 7 series FPGAs Transceiver Wizard IP核使用和测试

    学习FPGA一段时间了,前面一直没有系统的总结,这学期把在项目中用到的IP核和一些调试过程中遇到的问题总结一下发出来,坚持下去,一起进步! 今天总结一下的GTH核的使用和测试. 软件版本:Vivado ...

  3. Xilinx 7 series设计单元Buffer与IO——BUFG、IBUFG、IBUFDS_GTE2等

    文章转载于Xilinx 7 series设计单元Buffer与IO--BUFG.IBUFG.IBUFDS_GTE2等 文章目录 概述 Buffer IO 概述 FPGA里面有2种电路的基本设计元素 p ...

  4. xilinx FPGA的远程更新(动态加载)详解(Using a Microprocessor to Configure 7 Series FPGAs)

    目录 1 概述 2 参考文件 3 远程更新思路 4 MIC配置FPGA的模式 4.1 slave serial mode情况 4.2 slave selectMAP mode情况 5 FPGA配置时序 ...

  5. 7 series FPGAs GTX资源及工作原理

    目录 第一章 GTX概述... 4 第二章 GTX结构... 4 1.GTX资源封装... 4 2.项目示例... 6 第三章 Transmitter(TX)... 7 1.PMA与PCS. 7 2. ...

  6. 使用PlanAhead查看Virtex-7系列FPGA的底层架构

    FPGA整体架构 下图是FPGA架构的一个整体架构图,可见,Virtex-7系列的FPGA分为20个时钟域(Clock Region),左侧从X0Y0到X0Y9,右侧从X1Y0到X1Y9,命名方式为: ...

  7. Xilinx FPGA高速串行收发器简介

    1 Overview 与传统的并行实现方法相比,基于串行I/O的设计具有很多优势,包括:器件引脚数较少.降低了板空间要求.印刷电路板(PCB)层数较少.可以轻松实现PCB设计.连接器较小.电磁干扰降低 ...

  8. xilinx A7 (artix 7)serdes GTP 生成的example例程注释解析

    本文首发于hifpga.com XILINX的 serdes GT IP真的是够复杂的,生成的例子也是复杂,而且为了适配各种情况,代码里很多冗余的东西,发送部分比较简单 ,接收部分有点繁琐,我做了点注 ...

  9. Xilinx-7系列FPGA架构—— CLB

    xilinx7系列FPGA主要包括:Spartan®-7/Artix®-7/Kintex®-7/Virtex®-7.其性能/密度/价格也随着系列的不同而提升.其中以Virtex-7有着极高的系统性能和 ...

最新文章

  1. 量子计算机个人化时间,科学家发现量子算法可以停止时间
  2. java冒泡排序程序流图_java实现选择排序和冒泡排序及执行流程图解
  3. HTML5--sessionStorage、localStorage、manifest
  4. dropout层_深度学习两大基础Tricks:Dropout和BN详解
  5. (转) Core Animation 简介
  6. 318. 最大单词长度乘积 golang
  7. 排队 题解 组合数学+高精度
  8. python argparse_Python 命令行之旅——初探 argparse
  9. 素数五个为一行的_对标交流 ▏潍坊市心理咨询师协会名誉理事长、潍坊医学院王力教授一行到昌邑市妇幼保健院指导交流工作...
  10. 安卓开发大全、系列文章、精品教程
  11. BMFont 快速入门教程
  12. 如何软件项目电子投标
  13. html js打开一个新页面跳转,js页面跳转
  14. linux压缩一个tar.xz文件,Linux下解压tar.xz格式压缩文件
  15. [转] 蝴蝶效应,青蛙现象,鳄鱼法则,鲇鱼效应,羊群效应,刺猬法则,手表定律,破窗理论,二八定律,木桶理论,马太效应,这些你都明白吗?...
  16. PCB设计之线宽、线距规则设置
  17. IDEA编译器Debug方法启动:method breakpoints may dramatically slow down debugging
  18. 2008春晚,赵本山之《火炬手》(现场版最新完整台词)
  19. 表白套路计算机公式,520 超酷表白公式-520表白套路【蜜匠婚礼】
  20. 登录拦截之后,登录页面出现在iframe的src里面

热门文章

  1. RedHat开机启动流程
  2. VS2010数据库项目不能正常工作解决方案
  3. spring boot 应用设置session path_kubernetes configmap 热更新spring-boot应用
  4. sql exists用法_新同事不讲武德,这SQL语句写得忒野了
  5. java直接内存为什么快_直接内存与 JVM 源码分析
  6. html5中text-align,text-align
  7. reddit android app,reddit安卓版app
  8. c语言中.h文件中的宏定义,endian.h这个头文件里面的宏可以直接用么?
  9. 基于RT-Thread开发智能视觉组智能车-乐山师范学院
  10. 利用AVR单片机 专用下载 USBtinyISP对Arduino UNO下载程序