Page 1 of 1

Stacking DSP codes

Posted: Tue Mar 01, 2016 4:01 pm
by Nowhk
How do you "sync" output/input between DSP codes in FlowStone? For example here:

Immagine.png
Immagine.png (12.27 KiB) Viewed 14257 times

how can I assure that output2 is always i+1 and output3 (i+1)*2 on every i-sample?

For example, output 3 should run (i+1)*2 before input2 be incremented by 1 on the first (left) DSP module.

Or chaining DSP modules automatically guarantee the order of execution (a sort of ask "backwards" values when processing)?

DSP Stack.fsm
(1.05 KiB) Downloaded 946 times

Thanks for help me, as usual!

Re: Stacking DSP codes

Posted: Tue Mar 01, 2016 8:03 pm
by KG_is_back
EDIT: sorry, doublepost...

Re: Stacking DSP codes

Posted: Tue Mar 01, 2016 8:04 pm
by KG_is_back
In case of streams, correct order of execution is ensured, by how streams are pre-compiled.

It is done from end to start - Flowstone checks the modules connected to some output (most prims with blue inputs, for example soundcard output, various blue to green type of prims, etc.). Then checks which modules are connected to those modules and so on so on and finally puts them together in correct order.

In the example you provided, the right module always gets executed last, because its directly connected to output (mono-readout module) and the left module gets executed second-to-last, because it directly connects to the right module.

Modules which do not have outputs connected to any type of output-prim will not be executed at all.

Re: Stacking DSP codes

Posted: Tue Mar 01, 2016 9:21 pm
by Nowhk
KG_is_back wrote:In case of streams, correct order of execution is ensured, by how streams are pre-compiled.

It is done from end to start - Flowstone checks the modules connected to some output (most prims with blue inputs, for example soundcard output, various blue to green type of prims, etc.). Then checks which modules are connected to those modules and so on so on and finally puts them together in correct order.

In the example you provided, the right module always gets executed last, because its directly connected to output (mono-readout module) and the left module gets executed second-to-last, because it directly connects to the right module.

Modules which do not have outputs connected to any type of output-prim will not be executed at all.

I see. Nice, thank you very much. Where did you get these informations? I can't help myself, because I don't find any infos about this, nor in the manual.

Re: Stacking DSP codes

Posted: Tue Mar 01, 2016 11:12 pm
by Tronic
It must think normally like the stack execution ...
take a look at the assembler language in the manual,
and using the output(S) of the code module,
you will see the sequence of execution of the process instructions as the processor will run.

Re: Stacking DSP codes

Posted: Wed Mar 02, 2016 9:08 am
by Nowhk
Tronic wrote:It must think normally like the stack execution ...
take a look at the assembler language in the manual,
and using the output(S) of the code module,
you will see the sequence of execution of the process instructions as the processor will run.

Well, yes! But it shown only the assembler of the linked DSP code, not the whole chain. It seems informations that I need to "derive", I know. But for this kind of stuff, I'd like to be sure on what I'm doing ;)

I think reading the forum and such will help during the learning. Thanks both!