cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
baileyji
Adventurer
Adventurer
519 Views
Registered: ‎02-20-2019

Seeking HLS FIR Compiler Reload Example

Can someone provide an example or documentation of how to use the FIR Compiler core in HLS with reloadable coefficients? I'm trying to modify the fir_config example project in 2019.2 to set

struct config1 : hls::ip_fir::params_t {
    static const bool reloadable = true;
};

and changethe run call to

fir1.run(fir_in, fir_out, &fir_config, reload);

but I'm running into some difficulties understanding the magic in the dummy_fe and dummy_be functions in the example. I gather something along those lines will also need to be run on the new reload stream I'm adding?

I'm also unclear how to ensure that HLS doesn't drive the axis stream into the reload channel all the time. Seems I could call

fir1.run(fir_in, fir_out, &fir_config);

sometimes and the 4 argument variant others, I'm not clear what HLS is actually DOING under the hood if I do that. Most of the time I won't be reloading coefficients!

Finally, the header file suggests that reload has array dimensions [CONFIG_T::num_coeffs + ((CONFIG_T::coeff_sets == 1) ? 0 : 1)]. There isn't any guidance on how to fill it. It seems that extra element is the coefficent set index for reloading, great, so I'll need to do some sort of typecast to ensure I get the ap_uint<8> coefficient index shoehorned into the coeff_t of the array?

0 Kudos
0 Replies