- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
i have two questions: 1- how the altmult_add megafunction can be used in a pipelined structure? 2- which method is the best to calculate inner product of two vectors, having 3 elements, in a pipelined structure:a altmult_add with 3 input or 2 lpmmult mfs and 2 lpmadd_sub mfs? Regards, BedriLink Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. It is already pipelined.
2. Im not quite sure what you mean? do you mean 2 vectors with 3 elemenents in each: sum( a(0) * b(0) a(1) * b(1) a(2) * b(2) ); ? In this case you need 3 multipliers and 2 adders. I would suggest the altmult_add will probably work better than a custom made pipeline, if it suits your purpose. Why not simulate them and find out?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reply.
--- Quote Start --- 1. It is already pipelined. 2. Im not quite sure what you mean? do you mean 2 vectors with 3 elemenents in each: sum( a(0) * b(0) a(1) * b(1) a(2) * b(2) ); ? In this case you need 3 multipliers and 2 adders. --- Quote End --- i did mistake and yes you are right that i need 3 multipliers. --- Quote Start --- I would suggest the altmult_add will probably work better than a custom made pipeline, if it suits your purpose.out? --- Quote End --- Thank you for suggestion. --- Quote Start --- Why not simulate them and find --- Quote End --- I'm a beginner. Sometimes my simulation results may be different real works on DE2-115 board. Nevertheless i have trying to simulate. Well, i have implemented my calculations in pipelined structures and i think that this type implementations need latencies of the pipelined blocks. i have searched to find whether altmult_add megafunction has a latency or output ready signal? if i have to calculate the equation below how can i detect that the output of the altmult_add is ready for adder which will add the output of the altmult_add to 5? sum( a(0) * b(0) a(1) * b(1) a(2) * b(2) ) + 5; Regards, Bedri- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Thank you for your reply. if i have to calculate the equation below how can i detect that the output of the altmult_add is ready for adder which will add the output of the altmult_add to 5? sum( a(0) * b(0) a(1) * b(1) a(2) * b(2) ) + 5; Regards, Bedri --- Quote End --- you need one mult (inputs a,b). accumulate results over 3 samples adding 5 as well. latency issues can be seen in simulation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If there are differences between what you have in simulation and what you have in hardware, there is a problem.
The latency is always fixed, and depends on the settings you gave it. So you can always work out the latency based on the various clock source settings for the various registers: http://www.altera.co.uk/literature/ug/ug_lpm_alt_mfug.pdf
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page