Stratix V Avalon-ST Interface for PCIe Solutions: User Guide

ID 683093
Date 5/03/2019
Public
Document Table of Contents

5.11.1. Configuration Space Register Access Timing

The signals of the tl_cfg_* interface include multi-cycle paths. Depending on the parameterization, the tl_cfg_add and tl_cfg_ctl signals update every four or eight coreclkout_hip cycles.

To ensure correct values are captured, your Application RTL must include code to force sampling to the middle of this window. The following example RTL captures the correct values of the tl_cfg busses in the case of an eight-cycle window. A generated strobe signal, cfgctl_addr_strobe, captures the address and data values by sampling them in the middle of the window.

// register LSB bit of tl_cfg_add
      always @(posedge coreclkout_hip)
      begin
      tl_cfg_add_reg <= tl_cfg_add[0];
      tl_cfg_add_reg2 <= tl_cfg_add_reg;
      end
      // detect the address change to generate a strobe to sample the input 32-bit data
      always @(posedge coreclkout_hip)
      begin
      cfgctl_addr_change <= tl_cfg_add_reg2 != tl_cfg_add_reg; 
      cfgctl_addr_change2 <= cfgctl_addr_change; 
      cfgctl_addr_strobe <= cfgctl_addr_change2;
      end
      // capture cfg ctl addr/data bus with the strobe
      always @(posedge coreclkout_hip)
      if(cfgctl_addr_strobe)
      begin
      captured_cfg_addr_reg[3:0] <= tl_cfg_add[3:0];
      captured_cfg_data_reg[31:0] <= tl_cfg_ctl[31:0];
      end
Figure 21. Sample tl_cfg_ctl in the Middle of Eight-Cycle Window