ADC -> DMA -> DFB( A^2+(A+1)^2+(A+2)^2+......+(A+n)^2= sqrt(X) ) -> DMA -> Variable
Do you have to make examples, please? I could not somehow.
My goal is not to filter. I want to use as a calculator DFB. The main loop cannot correctly run the other transactions because the time is not enough.
(i am so sorry. I had use google translate for translation because my bad english. :)))
The DFB has to be programmed with the DFB-assembler which really is not easy to handle.
Manipulating data might be done better/faster (as long as integer arithmetic is used) using UDBs and datapath objects. You have got 24 of them within your PSoC5. Each contains some PLD, registers, a programmable ALU, two FIFOs and a counter. These UDBs can be programmed using a hardware definition language (HDL) named Verilog which is already installed together with documentation on your system.
DFB assembly is
1st quite complex
2nd has a geometry adapted to the need of digital signal filtering
So, what exactly is the calculation you have to make and how much time have you got. Can you post your complete project as an example, so that we all can have a look at all of your settings? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Another approach could be to write some asm statements using the CPU's multiply instructions directly
I gave I sent in earlier posts. I sent the above 2. post. I want to do the actual RMS calculation. I am a repeat calculations (RMS) every 10 ms for 200 sample. but the cpu calculate another jobs.
i want to do with DFB for learn and develop. I couldn't do it with DFB. I decided to start from the beginning to the DFB is complex. I begin with an example that can only multiply. so i want simply example.
Thank you very much for your interest.
there is multiply and accumulate component which utilizes DFB block, and does exactly what are you looking for:
MACC works fine, you must correctly convert your values to Q-numbers and back. There are several posts discussing "incorrect" output from MACC, please check this thread for example:
I tried the post and it doesn't show value one byte. I am using max value 0xFFFF and This value insignificant for Q23.
For example: 0x0000099A * 0x0000099A= 0x000000 5C30A4 --> so lower values are lost
I want to make the most of 16-bit multiplication makes the DFB for this reason.