K7 IDELAY2 仿真实验

news/2025/1/11 11:20:57/

FPGA类型

xilinx K7

仿真记录

模块例化

    IDELAYE2 #(.CINVCTRL_SEL("FALSE"),          // Enable dynamic clock inversion (FALSE, TRUE).DELAY_SRC("IDATAIN"),           // Delay input (IDATAIN, DATAIN).HIGH_PERFORMANCE_MODE("FALSE"), // Reduced jitter ("TRUE"), Reduced power ("FALSE").IDELAY_TYPE("FIXED"),           // FIXED, VARIABLE, VAR_LOAD, VAR_LOAD_PIPE.IDELAY_VALUE(31),                // Input delay tap setting (0-31).PIPE_SEL("FALSE"),              // Select pipelined mode, FALSE, TRUE.REFCLK_FREQUENCY(200.0),        // IDELAYCTRL clock input frequency in MHz (190.0-210.0, 290.0-310.0)..SIGNAL_PATTERN("DATA")          // DATA, CLOCK input signal)IDELAYE2_inst (.CNTVALUEOUT(), // 5-bit output: Counter value output.DATAOUT(data_out),         // 1-bit output: Delayed data output.C(1'b1),                     // 1-bit input: Clock input.CE(1'b1),                   // 1-bit input: Active high enable increment/decrement input.CINVCTRL(1'b0),       // 1-bit input: Dynamic clock inversion input.CNTVALUEIN(0),   // 5-bit input: Counter value input.DATAIN(1'b0),           // 1-bit input: Internal delay data input.IDATAIN(data_in),         // 1-bit input: Data input from the I/O.INC(1),                 // 1-bit input: Increment / Decrement tap delay input.LD(1),                   // 1-bit input: Load IDELAY_VALUE input.LDPIPEEN(1'b0),       // 1-bit input: Enable PIPELINE register to load data input.REGRST(1'b0)            // 1-bit input: Active-high reset tap-delay input);

modelsim仿真波形

 

 

仿真结果

rgmii_rx_ctl_delay和rgmii_rxd_delay信号是RGMII接口输入信号rgmii_rx_ctl和rgmii_rxd经过IDELAYE2延迟的信号,RGMII接口输出信号rgmii_tx_ctl和rgmii_txd是rgmii_tx_ctl_nodelay和rgmii_txd_nodelay信号经过ODELAYE2延迟的信号,IDELAYE2和ODELAYE2的输入输出本身有600ps的延迟,另外可以通过设置IDELAYE2和ODELAYE2里的IDELAY_VALUE和ODELAY_VALUE参数来增加延迟,这两个参数取值在0到31之间,表示增加几个标准延迟tap,tap与参考时钟频率f之间的关系是:tap=1/(64*f),单位为ps,参考时钟频率f一般为200MHz或300MHz,如果f为200M,则tap=78ps,如果f为300M,则tap=52ps。以200M为例,当IDELAY_VALUE/ODELAY_VALUE参数值设为0,则IDELAYE2/ODELAYE2的延迟为600ps,当IDELAY_VALUE/ODELAY_VALUE参数值设为31,则IDELAYE2/ODELAYE2的延迟为(600+31*78)ps。在本仿真中,IDELAY_VALUE设的是8,ODELAY_VALUE设的是24,因此IDELAYE2的延迟为(600+8*78)=1224ps,ODELAYE2的延迟为(600+24*78)=2472ps。这两个参数值在正式工程中可根据实际情况调整。

 

仿真文件

//
// Design Name: 
// Module Name: example
// Project Name: 
// Target Devices: xc7k325tffg900-2
// Tool Versions: Vivado 2016.4 
//
`timescale 1ns/1psmodule tb_idelay();//**************************** Wire &  reg Declarations ******************localparam  IDELAY_EN = "YES" ;reg  lvds_clk_p ;wire lvds_clk_n ;wire lvds_clk_ibuf ;wire lvds_clk_dly ;reg  clk_200m ;wire [4:0] delay_tapout ;reg  [4:0] delay_tapin ;reg  rst ;
//******************************** main code *****************************initial begin lvds_clk_p = 1'b0 ;forever #4000  lvds_clk_p =  !lvds_clk_p ;end assign lvds_clk_n = !lvds_clk_p ;    initial begin clk_200m = 1'b0 ;forever #2500 clk_200m =  !clk_200m ;    end initial begin rst = 1'b1 ;delay_tapin = 5'd10 ;#1000000 ; rst = 1'b0 ;delay_tapin = 5'd1 ;#1000000 ;delay_tapin = 5'd8 ;#1000000 ;delay_tapin = 5'd15 ;#1000000 ;delay_tapin = 5'd23 ;#1000000 ;delay_tapin = 5'd31 ;#1000000 ;$stop ;end IBUFDS #(.DIFF_TERM("FALSE"),       // Differential Termination.IBUF_LOW_PWR("TRUE"),     // Low power="TRUE", Highest performance="FALSE" .IOSTANDARD("DEFAULT")     // Specify the input I/O standard) IBUFDS_inst (.O(lvds_clk_ibuf),  // Buffer output.I(lvds_clk_p),  // Diff_p buffer input (connect directly to top-level port).IB(lvds_clk_n) // Diff_n buffer input (connect directly to top-level port));generate if(IDELAY_EN == "YES" )begin : idelay_enable IDELAYE2 #(.CINVCTRL_SEL         ( "FALSE"      ),// Enable dynamic clock inversion (FALSE, TRUE).DELAY_SRC            ( "IDATAIN"    ),// Delay input (IDATAIN, DATAIN).HIGH_PERFORMANCE_MODE( "FALSE"      ),// Reduced jitter ("TRUE"), Reduced power ("FALSE").IDELAY_TYPE          ( "VAR_LOAD"   ),// FIXED, VARIABLE, VAR_LOAD, VAR_LOAD_PIPE.IDELAY_VALUE         ( 0            ),// Input delay tap setting (0-31).PIPE_SEL             ( "FALSE"      ),// Select pipelined mode, FALSE, TRUE.REFCLK_FREQUENCY     ( 200.0        ),// IDELAYCTRL clock input frequency in MHz (190.0-210.0, 290.0-310.0)..SIGNAL_PATTERN       ( "CLOCK"      ) // DATA, CLOCK input signal)IDELAYE2_inst (.CNTVALUEOUT          ( delay_tapout ), // 5-bit output: Counter value output.DATAOUT              ( lvds_clk_dly ), // 1-bit output: Delayed data output.C                    ( clk_200m     ), // 1-bit input: Clock input.CE                   ( 1'b0         ), // 1-bit input: Active high enable increment/decrement input.CINVCTRL             ( 1'b0         ), // 1-bit input: Dynamic clock inversion input.CNTVALUEIN           ( delay_tapin  ), // 5-bit input: Counter value input.DATAIN               ( 1'b0         ), // 1-bit input: Internal delay data input.IDATAIN              ( lvds_clk_ibuf), // 1-bit input: Data input from the I/O.INC                  ( 1'b0         ), // 1-bit input: Increment / Decrement tap delay input.LD                   ( 1'b1         ), // 1-bit input: Load IDELAY_VALUE input.LDPIPEEN             ( 1'b0         ), // 1-bit input: Enable PIPELINE register to load data input.REGRST               ( rst          )  // 1-bit input: Active-high reset tap-delay input);//(* IODELAY_GROUP = <iodelay_group_name> *) // Specifies group name for associated IDELAYs/ODELAYs and IDELAYCTRLend else begin : idelay_disable assign lvds_clk_dly = lvds_clk_ibuf ;end 
endgenerateendmodule 

 


http://www.ppmy.cn/news/452372.html

相关文章

Flink状态编程:为什么不建议在ValueState里面存Map?

文章目录 先说结论性能&#xff1a;TTL&#xff1a; State需要存什么数据Heap 模式 ValueState 和 MapState 如何存储StateBackend模式 如何存储和读写State 数据1. RocksDB 模式 ValueState 和 MapState 如何存储1.1 ValueState如何映射为RocksDB的kv1.2 MapState如何映射为Ro…

【WebPack】前端工程化

文章目录 前端工程化一、前端工程化概念二、前端工程化优点三、前端工程化解决方案四、webpack 的基本使用4.1 什么是 webpack4.2 创建列表隔行变色项目4.3 安装 webpack4.4 配置 webpack4.5 自定义 打包入口与出口 五、webpack 的插件使用5.1 webpack 常见插件5.2 webpack-dev…

2023年护网常见面试题汇总!看过的都通过面试啦!

​时间过得很快&#xff0c;回想起去年的这个时候&#xff0c;我也正在准备秋招&#xff0c;今天的我刚刚结束培训。 我的个人情况就读于某双非大学&#xff0c;信息与计算科学&#xff08;大数据方向&#xff0c;校企合作&#xff0c;一个介于数学与计算机之间的专业&#xf…

LLM系列 | 09: 基于ChatGPT构建智能客服系统(query分类安全审核防注入)

简介 竹斋眠听雨&#xff0c;梦里长青苔。门寂山相对&#xff0c;身闲鸟不猜。小伙伴们好&#xff0c;我是卖热干面的小女孩。紧接前面几篇ChatGPT Prompt工程系列文章&#xff1a; 04:ChatGPT Prompt编写指南05:如何优化ChatGPT Prompt&#xff1f;06:ChatGPT Prompt实践&am…

3D立体中国山水画

英文关键词:Super cute Chinese landscape painting oil cake 3d three-dimensional cake, colorful crystal ice style, she wants to have a deer painting as charming, three-dimensional pure background, highly defined details, movie lighting, fluorescent design,HD…

中国山水画欣赏

雪溪放舟图 钟钦礼&#xff0c;明代&#xff0c;号会嵇山人&#xff0c;浙江上虞人。画山水纵笔粗豪&#xff0c;横刮外强&#xff0c;学戴进而有所变化。成化、弘治年间入直仁治殿&#xff0c;为内廷画师中顶尖高手。《雪溪放舟图》是钟钦礼的代表作&#xff0c;画中表现的是渔…

中国山水画蛋糕(正式版)

英文关键词:Super cute antique landscape painting cean cake cut cake, blue crystal ice pattern, he wants to be as charming as mountain paper painting, solid color background, high definition details, movie lighting, fluorescent design, pure high definition,…

中国山水画蛋糕(最新版)

英文关键词:Super cute Chinese landscape painting oil cake 3d three-dimensional cake, colorful crystal ice style, she wants to have a deer painting as charming, three-dimensional pure background, highly defined details, movie lighting, fluorescent design,HD…