If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Bool Help Please
3 posts
• Page 1 of 1
Bool Help Please
Hello Gang,
Again I need a little help! Why does the 7 input (or lower) AND gate work, but 8 or more inputs do NOT. This is probably something really simple , yes?
At this time I need the 8 input AND gate to work for me.
Many thanks in advance!
Later then, BobF.....
- BobF
- Posts: 598
- Joined: Mon Apr 20, 2015 9:54 pm
Re: Bool Help Please
It is a limitation of the DSP code - you can't have more than 8 operations in the same line. It is explained in the manual... Just put few parentheses between the and statements.
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: Bool Help Please
the reason for it is that the dsp code gets translated to assembler code where it produces a lot of (often unneeded) register movings
connect a text primitive to the "c" output of the dsp code primitive and you will find
make the parentheses KG assumed and watch again, now only the registers from xmm0-xmm7 are used and it works
further you can copy the text code into an assembler code primitive and optimize it, there you can get rid of the most movaps and end up like this
with this version of the code you can add as many inputs you want with just appending the
if the chain is very long it maybe would make sense to use more registers to check up to 7 groups in parallel for faster processing.
- Code: Select all
movaps xmmB,xmmA
connect a text primitive to the "c" output of the dsp code primitive and you will find
- Code: Select all
xmm999
make the parentheses KG assumed and watch again, now only the registers from xmm0-xmm7 are used and it works
further you can copy the text code into an assembler code primitive and optimize it, there you can get rid of the most movaps and end up like this
- Code: Select all
streamin in1;streamin in2;
streamin in3;streamin in4;
streamin in5;streamin in6;
streamin in7;streamin in8;
streamout out;
float F1=1;
movaps xmm0,in1;
andps xmm0,in2;
andps xmm0,in3;
andps xmm0,in4;
andps xmm0,in5;
andps xmm0,in6;
andps xmm0,in7;
andps xmm0,in8;
cmpps xmm0,F1,0;
movaps xmm1,F1;
andps xmm1,xmm0;
movaps out,xmm1;
with this version of the code you can add as many inputs you want with just appending the
- Code: Select all
streamin inX;
- Code: Select all
andps xmm0,inX;
if the chain is very long it maybe would make sense to use more registers to check up to 7 groups in parallel for faster processing.
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 56 guests