- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone,
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.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you post your complete project, 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.
Did you already read this document and this one for advanced techniques
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the reason you use the DFB component which you have to program separately and not the Filter-component?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob,
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. :)))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you write DFB assembly sample program, that can multiply? Please, I was so confused.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob,
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
kenan_re,
there is multiply and accumulate component which utilizes DFB block, and does exactly what are you looking for:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That post, i tried multiply and accumulate component.
i multiplied 0.3 x 0.3 but the result wasn't true.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
kenan_re,
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:
http://www.cypress.com/forum/psoc-5-device-programming/signed-multiplication
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Odissey1,
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.