We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Showing results for 
Search instead for 
Did you mean: 
Visitor amol_aeva
Registered: ‎01-23-2018

clock must be initialized to 0 when using xpm_fifo

I spend more than a day trying to debug this so I thought I'd add this here in the hopes that someone else will find it useful. 

I am using an XPM_FIFO in my design configured in async mode. The wr_clk being driven from my testbench was created like this:



  logic wr_clk;

  initial begin
    wr_clk = 1'b1;

  // 250MHz
  always #2 wr_clk = ~wr_clk;

When I run the simulation, the wr_rst_busy output from the fifo never goes low! After much trial and error, I found out that initializing the clock to 0 and not 1 makes everything work! Go figure. If anyone knows the logic behind this please chime in. This may be the case with other IP as well. 


initial begin
  wr_clk = 1'b0; // MUST BE 0!


0 Kudos
2 Replies
Scholar jmcclusk
Registered: ‎02-24-2014

Re: clock must be initialized to 0 when using xpm_fifo

Can you post a test case showing this behavior?   It will help to diagnose (and fix) this behavior.

Don't forget to close a thread when possible by accepting a post as a solution.
0 Kudos
Xilinx Employee
Xilinx Employee
Registered: ‎09-20-2012

Re: clock must be initialized to 0 when using xpm_fifo

Hi @amol_aeva


I have seen a similar issue in the past when using vivado XSIM. The design works fine when using Questa simulator. I have filed CR 989523 to get this fixed. 

Google your question before posting. If someone's post answers your question, mark the post as answer with "Accept as solution". If you see a particularly good and informative post, consider giving it Kudos (the star on the left)