UPGRADE YOUR BROWSER

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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor jacklovell
Visitor
5,570 Views
Registered: ‎10-21-2014

Resetting FIR compiler after coefficient reload but before data stream starts breaks the core

I have an FIR filter taking interleaved data channels, set up to use one reloadable coefficient set, and with aresetn set to reset the data vector. I am able to get this to work successfully:

  • When I load the full coefficient set, the reload_tready signal goes low.
  • I then apply config_tvalid for one clock cycle.
  • After a complete interleaved channel sequence has gone through the filter, reload_tready goes high again, and I'm able to repeat the process to load another filter set.

However, if I set aresetn low after applying config_tvalid, but before any data has arrived (which may be many seconds, as my application is shot-based data acquisition), the reload_tready signal never goes high after aresetn is set high again, even after many data samples have passed through the core. The only way to fix this is to reprogram the FPGA.

 

This behaviour was extremely difficult to spot, and I can't find any documentation which suggests that I should avoid resetting the core before reload_tready is high again (i.e. before a full interleaved sample has been processed). Is this a bug? If not, it should be made more clear in the FIR compiler product guide (PG149).

9 Replies
5,565 Views
Registered: ‎03-27-2014

Re: Resetting FIR compiler after coefficient reload but before data stream starts breaks the core

@jacklovell,

 

any particular reasons for using aresetn? just reload the coefficients like you do and wait for a full cycle (latency should be around the filter order), maybe discard corrupted samples at some point

G.W.,
NIST - Time Frequency metrology
0 Kudos
Visitor jacklovell
Visitor
5,560 Views
Registered: ‎10-21-2014

Re: Resetting FIR compiler after coefficient reload but before data stream starts breaks the core

The shot-based acquisition terminates after a given number of output samples are received. However, due to the filter latency (and downsampling), a full sequence of interleaved output samples may occur half way through a full sample of interleaved input samples. This means the data stream may be stopped mid-way through a series of input samples.

 

When the data stream restarts, the first input is from the first channel, but the FIR compiler thinks it is part-way through an interleaved sequence. This means that my output channel ordering is wrong. Resetting the filter once an acquisition has finished guarantees that the samples will be in the correct order for the next shot.

 

This in itself isn't a particular problem. What I do have a problem with is the way the reload sequence can get stuck if a reset is applied at the wrong time, and this behaviour isn't documented anywhere that I can find.

0 Kudos
5,540 Views
Registered: ‎03-27-2014

Re: Resetting FIR compiler after coefficient reload but before data stream starts breaks the core


@jacklovell wrote:

The shot-based acquisition terminates after a given number of output samples are received. However, due to the filter latency (and downsampling), a full sequence of interleaved output samples may occur half way through a full sample of interleaved input samples. This means the data stream may be stopped mid-way through a series of input samples.


ok I understand the problem.

Have you thought about pushing dummy samples into the core while the burst has just stopped, so you can get the last interleaved outputs? I just had this idea, might be too hard to implement (keeping track of the amount of dummy samples that have been pushed & discard them in software).

 

does this problem show up in real implementation or we are just talking about simulation here

G.W.,
NIST - Time Frequency metrology
0 Kudos
Visitor jacklovell
Visitor
5,525 Views
Registered: ‎10-21-2014

Re: Resetting FIR compiler after coefficient reload but before data stream starts breaks the core

In theory this would be possible, but I only know when a shot is active when the data_tvalid signal is high. The design is a plug-in module for a larger design, so it's not a simple task to modify the interface to provide additional information.

 

In any case, what I have now works, as long as I don't accidentally apply a reset after a reload and before a data stream. I'm happy to keep my design. But I would like to know from Xilinx if the reload/reset behaviour is intended, and if so it should be more clearly documented.

 

I saw the problem in real implementation first (trying to reload a second set of coefficients would stall the Zynq AXI bus and require power-cycling the board), but verified it with simulation after I discovered the cause.

0 Kudos
Adventurer
Adventurer
145 Views
Registered: ‎09-25-2007

Re: Resetting FIR compiler after coefficient reload but before data stream starts breaks the core


@jacklovell wrote:

However, if I set aresetn low after applying config_tvalid, but before any data has arrived (which may be many seconds, as my application is shot-based data acquisition), the reload_tready signal never goes high after aresetn is set high again, even after many data samples have passed through the core. The only way to fix this is to reprogram the FPGA.

I would like to thank you for making this post. I have been banging my head against the wall for several days trying to figure out why I could not reload my coefficients and what you described was exactly my problem.

I was also resetting my FIR between one-shot captures just like you, and for the same reasons as you.

It does seem very strange that asserting resetting causes reload_tready to never go high again. Especially since the datasheet for the FIR compiler says nothing about this being a potential issue.

TLDR below;

The following works:

  • Load new coefficients on RELOAD port (reload_tready deasserts after all coeffs loaded)
  • Assert tvalid for 1 cycle on CONFIG port (reload_tready still deasserted)
  • Run data through FIR on DATA port (reload_tready reasserts after several input samples pumped through)

The following does NOT work (i.e. reload_tready will stick low indefinitely until FPGA reprogramming):

  • Load new coefficients on RELOAD port
  • Assert tvalid for 1 cycle on CONFIG port
  • Assert aresetn to FIR (for minimum required 2 cycles)
  • Run data through FIR on DATA port (reload_tready never reasserts)

Thank you so much for your post. It really helped me out!

-- Jonathon
0 Kudos
Xilinx Employee
Xilinx Employee
118 Views
Registered: ‎09-18-2018

Re: Resetting FIR compiler after coefficient reload but before data stream starts breaks the core

Hi @jacklovell ,

This behavior was recently noted by us internally too and it is under investigation. This seems to be a bug in the core.

The FIR core does not recover the reload_tready, when the reset signal is applied on the very next cycle after config_tvalid is applied. The reload channel is getting blocked.

However if the reset signal is applied after atleast two clock cycles following the config_tvalid, the relaod_tready goes high.

Attached are few simulation snapshots of the same.

Hope this helps.

 

config_delayed_reset.png
Config_reset.png
config_reset_2clkcyc.png
0 Kudos
Adventurer
Adventurer
108 Views
Registered: ‎09-25-2007

Re: Resetting FIR compiler after coefficient reload but before data stream starts breaks the core

My assertion of the FIR core's aresetn does not take place in the cycle immediately following the assertion of config_tvalid. My aresetn assertion occurs several seconds after assertion of config_tvalid. The reload_tready never recovers for me even in this case. I am not running a simulation, I am making the observation running in hardware with a System ILA core.

-- Jonathon
0 Kudos
Xilinx Employee
Xilinx Employee
103 Views
Registered: ‎09-18-2018

Re: Resetting FIR compiler after coefficient reload but before data stream starts breaks the core

Hi @jwdonal ,

Could you share the FIR configuration through xci. I see that in your case, the config packet is applied and then reset is applied before the data vector is applied.

Let me check if this issue is similar to what is found already.

0 Kudos
Adventurer
Adventurer
96 Views
Registered: ‎09-25-2007

Re: Resetting FIR compiler after coefficient reload but before data stream starts breaks the core

Sure. I have attached the file.

-- Jonathon
0 Kudos