Support

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

Code processing (only) upon input change

DSP related issues, mathematics, processing and techniques

Code processing (only) upon input change

Postby Rocko » Wed Nov 30, 2016 8:15 am

Hi,

I'm working with 'blue code' calculation, in which the input is (say): A,B,C and output is X,Y,Z.

I would like the code to process ONLY if A,B or C have changed and for a single code flow.
I remember (from the synthmaker) forum using such a technique, by converting from 'blue code' to assembley and adding a unique code.

But -I couldn't find examples in the new forum.
Can anyone please re-explain this method ?

Appreciated
Rocko
 
Posts: 186
Joined: Tue May 15, 2012 12:42 pm

Re: Code processing (only) upon input change

Postby KG_is_back » Wed Nov 30, 2016 3:59 pm

you basically need to use conditional jump

Code: Select all

//code that checks whether inputs changed
//result is in "temp" variable

mov eax,temp[0];
cmp eax,0; //compare with zero
jz theEnd; //jump if equal

//code that you want to skip

theEnd:

//additional code you don't want to skip


It should be easy to check where the "checking code" ends. It should end with "movaps temp,xmm?;" (where ? is 0-7)
To be sure, just check where the code ends when only the "checking code" is present in the code module.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia


Return to DSP

Who is online

Users browsing this forum: No registered users and 34 guests