Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20704 Discussions

faster FP accumulation

Altera_Forum
Honored Contributor II
1,371 Views

Hi,  

 

I'm working on a project that requires accumulation. The input comes from a pipeline that outputs node id and value, and the accumulation result must be stored in a block ram. So this involves a memory read, an addition(single precision FP), and a memory write. Is there any way to do this? or do I have to halt the pipeline? (afaik the shortest latency for a single-precision FP adder by Altera IP is 6 cycles.) 

 

Thanks in advance for suggestions!
0 Kudos
8 Replies
Altera_Forum
Honored Contributor II
603 Views

Not halt the pipeline, but perform an interleaved write. Trying to desig a FP adder without latency wouldn't give good results, I fear.

0 Kudos
Altera_Forum
Honored Contributor II
603 Views

Thanks for the reply, but I'm a little bit confused - what so you mean by "interleaved" write?

0 Kudos
Altera_Forum
Honored Contributor II
603 Views

I understand that each result has to be stored to a different RAM address, otherwise no RAM would be needed.  

My suggestion is to store the result after 6 pipeline clocks.
0 Kudos
Altera_Forum
Honored Contributor II
603 Views

I know what you're saying - but what I worry about is what if data to the same address shows up within 6 cycles. I.e. 

Cycle 0 comes in with id 15, data 12.5 

cycle 1 comes in with id 20, data 32.5 

cycle 2 comes in with id 15,data 13.5 

... 

 

The question here is, what should I do if in cycle 4 comes id 15?the first addition for id15 hasn't Finished yet(it finishes at cycle 8) 

 

hope this clarifies my question a little bit. Thanks
0 Kudos
Altera_Forum
Honored Contributor II
603 Views

Yes, I understand that you have arbitrary addresses, I didn't asume this. The suggestion doesn't work in this case and I fear, there is no simple solution at all. Designing a special FP adder with a higher grade of parallelization (and higher resource requirement) may be the only feasible way.

0 Kudos
Altera_Forum
Honored Contributor II
603 Views

Ok thank you very much for the replies. I guess I'll go for stalling the pipeline, it's easier to implement, at the price of lowering performance.

0 Kudos
Altera_Forum
Honored Contributor II
603 Views

maybe you could have a small manifest of what IDs already exist in the read-modify-write pipeline, and only halt when an ID value shows up that is already being prodcessed, otherwise just let it flow.

0 Kudos
Altera_Forum
Honored Contributor II
603 Views

 

--- Quote Start ---  

maybe you could have a small manifest of what IDs already exist in the read-modify-write pipeline, and only halt when an ID value shows up that is already being prodcessed, otherwise just let it flow. 

--- Quote End ---  

 

 

That's the general idea I'm thinking. However, lots of detailed stuff to be considered. Thanks for the reply.
0 Kudos
Reply