Multiply and Accumulate (access the MACC in the DFB the easy way)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

 Ladies and Gents!  May I introduce the hardware Multiply and Accumulate block!

Gain access to the powerful 24x24 bit multiply and accumulate block inside the DFB!  This component transforms the DFB into an easy to use DSP processing engine for FIR filters, IIR filters, PID controllers, convolution, correlation, you name it!  This pure hardware block will crunch through massive arrays of data and produce results while your CPU twiddles its thumbs!

Hardware 24x24 bit multiplier with 47 bit accumulator (top 24 bits passed out)

   

Q23 fixed point input and output (with conversion functions and conversion calculator built in to the customizer)

   

Zero CPU required for processing massive blocks of data

   

Simple, easy to use API and interface

   

18 cycles per multiply and accumulate (includes DMA transfer time for getting data into the MACC)

   

process blocks of data up to 1023 elements = sum(An*Bn, n=0:1023) (limited by DMA transfer size)

0 Likes
17 Replies
Anonymous
Not applicable

 Very interesting 🙂

0 Likes
Anonymous
Not applicable
        I'm getting an error when using PSoC5 ("Pulse output mode not valid for this silicon"). It's to do with the Control Register. Is there any easy workaround for this? Many Thanks Ollie   
0 Likes
Anonymous
Not applicable

 Same problem

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored
        There have been some changes between PSoC5 and 5LP - in regards to the digital stuff the 5LP is closer to the PSoC3 than top the PSoC4. So there might have been some changes to the DFB as well. Unfortunately there seems to be no document which describes all changes between PSoC5 and 5LP... (Funny fact is that I cannot find, via full text search, the error message anywhere in the Creator installation...)   
0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored
        I rechecked with the PSoC5 TRM. On page 175, it specifically mentions the pulsed output mode for the control registers. So this seems to be an error with the DRC in Creator. (The Control register DS also doesn't mention any limitations). Maybe you can file a support case with Cypress to get this clarified? (I tested with a project just containing a control register - i gives the same error message for both the '5588ES1 and the '5568 silicon).   
0 Likes
Anonymous
Not applicable
        Yeah, the project is designed to work with PSoC 3 and PSoC 5LP. There are some significant hardware differences between PSoC 5 and PSoC 5LP (and you ran into one of them)   
0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

So youre saying that the control register component data sheet lies (because it doesn't imply any restriction on using the pulse mode), and the PSoC5 TRM with it (because it also explains the pulse mode in detail)?

   

Note that I tested this in separation, not within your project. One cannot seem to use a control reg in pulse mode on PSoC5.

0 Likes
Anonymous
Not applicable

The multiply and accumulate component once used consumed uses 50% of SRAM in my case, A and B array are both 512 in length. Is there a way I can free up this space once I am done using Multiply and Accumulate component?

0 Likes
Anonymous
Not applicable

 Not really.  The arrays are defined statically, not dynamically allocated with malloc().

   

 

   

What are you using it for that you only need to run it once? : )

0 Likes
Anonymous
Not applicable
        
   
        
   

If I want to see the output of this block with my psoc pins what should I do

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

DMA the output to a port register. Some ap notes on DMA -

   

 

   

    

   

          

   

http://www.cypress.com/?rID=37793     AN52705     Getting Started with DMA

   

http://www.cypress.com/?rID=82680     AN84810     PSoC® 3 and PSoC 5LP Advanced DMA Topics

   

http://www.cypress.com/?rID=44335     AN61102 PSoC® 3 and PSoC 5LP - ADC Data Buffering Using DMA

   

http://video.cypress.com/video-library/search/dma/     Videos on DMA

   

https://www.youtube.com/results?search_query=dma+psoc Videos on DMA (some overlap)

   

 

   

Or use DFB assembler to do the job.

   

 

   

    

   

 

   

          

   

http://www.cypress.com/?rID=60720     DFB Assembler, MAC Topics

   

 

   

 

   

 

   

Regards, Dana.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Note if you want to output the filtered signal then DMA the filter

   

to VDAC, VDAC out to a pin. There is an example project doing just

   

this in Creator, see Creator start page, example projects.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable
        
   
        
   

yes, I saw that example project but I want to see the digital output of DFB

   

Is tehre any way to see digital response?

   

I don't know where I can import inputs,I found coefficients in main.c file but I want to know where this cofficients multiply with input?

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given


Is tehre any way to see digital response?

   

 

   

Yes, you could use an ISR and load an array with output using uint16 Filter_Read8/16/24(uint8/16/24 channel)

   

and uint8 Filter_IsInterruptChannelA(void)


   

I don't know where I can import inputs,I found coefficients in main.c file but I want to know where this cofficients multiply with input?

   

 

   

The multiplication is done in the DFB.

   

 

   

Regards, Dana.

0 Likes
lock attach
Attachments are accessible only for community members.
alfi_297226
Level 1
Level 1
5 questions asked Welcome! 5 replies posted

 I down loaded this from the Validated component site rather than from this post thread. I got a scary sounding message - see the attached - when I tried to open the example project. This is the frst time I've seen this message yet I've downloaded several coponents from this site before. What is different about this one?
 

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

There is a C# file that accompanies the component to set the properties. Due to security reasons you need to allow this program to be run by Creator. Nothing that should scare you,

   

 

   

Bob

0 Likes
kep_284046
Level 2
Level 2
First like given

That post, i tried multiply and accumulate component.
i multiplied 0.3 x 0.3 but the result wasn't true.

0 Likes