PipelineC
PipelineC copied to clipboard
Allow user defined pipelines of fixed latency
Consider this pipeline...
void frame_buffer_display()
{
vga_signals_t vga_signals = vga_timing();
pixel_t vga_pixel = user_func(vga_signals);
pmod_register_outputs(vga_signals, color);
}
Right now if the user's user_func
is autopipelined then functionality is maintained.
But if the user has hand coded user_func
with some other fixed delay (ex. maybe 1 or 2 cycle BRAM latency...) then auto pipelining does not work. The function is seen as combinatorial logic, zero latency, like a regular function using static local state vars etc...
Instead allow users to pragma specify the fixed latency they have coded. Ex. maybe like...
#pragma FUNC_LATENCY user_func 2
pixel_t user_func(vga_signals_t vga)
...
Which would do the proper 2 cycle delaying of signals in the places where user_func
is used...
Makes the --comb
flag for 'everything comb logic' mean something different...