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
Timer Bug
11 posts
• Page 2 of 2 • 1, 2
Re: Timer Bug
In this instance, in the line "levelOut = 0 + (levelIn > threshold & 1);", you don't need the '0'.
Declared streamins, streamouts and floats are all treated as variables, and are initialised to 0 unless you specify otherwise, as you have done here with "float _F_1=1".
In ASM watch out that you don't send a previously uninitialised xmm register to a streamout. It's OK here because of "movaps xmm0,levelIn;", which ensures that xmm0 always gets a value, 0 or otherise, before the cmmps comparison.
So:
streamin levelIn; //<------ DSP code
streamin threshold;
streamout levelOut;
levelOut = levelIn > threshold & 1;
streamin levelIn, threshold; //<------ ASM converted
streamout levelOut;
float _F_1=1;
movaps xmm0,levelIn;
cmpps xmm0,threshold,6;
andps xmm0,_F_1;
movaps levelOut,xmm0;
Every prune helps!
H
Declared streamins, streamouts and floats are all treated as variables, and are initialised to 0 unless you specify otherwise, as you have done here with "float _F_1=1".
In ASM watch out that you don't send a previously uninitialised xmm register to a streamout. It's OK here because of "movaps xmm0,levelIn;", which ensures that xmm0 always gets a value, 0 or otherise, before the cmmps comparison.
So:
streamin levelIn; //<------ DSP code
streamin threshold;
streamout levelOut;
levelOut = levelIn > threshold & 1;
streamin levelIn, threshold; //<------ ASM converted
streamout levelOut;
float _F_1=1;
movaps xmm0,levelIn;
cmpps xmm0,threshold,6;
andps xmm0,_F_1;
movaps levelOut,xmm0;
Every prune helps!
H
-
HughBanton - Posts: 265
- Joined: Sat Apr 12, 2008 3:10 pm
- Location: Evesham, Worcestershire
11 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 63 guests