Altera_Forum
Honored Contributor
11 years agoElongate pipeline voluntarily
Hi peeps,
Suppose I have a global memory access which, according to profiling, stalls the pipeline very often. Well, first of all, is there a way to know for how many cycles is the pipeline stalling? Let's say this number is 'P'. Then, is there a way to elongate the pipeline voluntarily to wait for the memory access without stalling? For example, in pseudo code:
var = getFromGlobal(randomIndex) // Stalls very often
var = var
var = var
...
var = var
var = var
calculate(var) // Use the result
And then, there would be a bypass for when the memory access takes a long time, to put the result directly in var[P] after the result is received. This way, we could keep inserting the work-items in the pipeline at every clock cycle, and retrieve them at the same rate. If it's not clear enough, I can try to explain in another way.