Xilinx源语(Primitives)和宏(Macros)

本文转载自:FPGA开源工作室微信公众号

源语(Primitives)-Xilinx库中最简单的设计元素。Primitives 基元是设计元素“原子”。Xilinx原语的示例包括简单缓冲区BUF和带有时钟使能和清除功能的D触发器FDCE。
宏(Macros)-Xilinx库的设计元素“分子”。可以从设计元素原语或宏创建宏。例如,FD4CE触发器宏是4个FDCE原语的组合。

1. 源语分类
Xilinx的原语分为10类,包括:计算组件,IO端口组件,寄存器/锁存器,时钟组件,处理器组件,移位寄存器,配置和检测组件,RAM/ROM组件,Slice/CLB组件,G-tranceiver。具体原语资源更详尽描述请参考文档UG799以及UG768。

2. 源语调用
1>打开PROJECT MANAGER-->Language Templates

2>语言模板如下图5大部分

3>选择相应的器件类型和模块组件。

4>BUFG示例

// BUFG : 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 : (BUFG_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---->

// BUFG: Global Clock Simple Buffer
// Kintex-7
// Xilinx HDL Language Template, version 2019.1

BUFG BUFG_inst (
.O(O), // 1-bit output: Clock output
.I(I) // 1-bit input: Clock input
);

// End of BUFG_inst instantiation

3. BUFG
Primitive: Global Clock Simple Buffer

介绍:
该设计元素是一个高扇出缓冲器,可将信号连接到全局路由资源,以实现信号的低偏斜分布。BUFG通常用于时钟网络以及其他高扇出网络,如置位/复位和时钟使能。
端口描述: