Stacking DSP codes

For general discussion related FlowStone
Post Reply
Nowhk
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Stacking DSP codes

Post by Nowhk »

How do you "sync" output/input between DSP codes in FlowStone? For example here:

Immagine.png
Immagine.png (12.27 KiB) Viewed 14268 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 947 times

Thanks for help me, as usual!
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Stacking DSP codes

Post by KG_is_back »

EDIT: sorry, doublepost...
Last edited by KG_is_back on Tue Mar 01, 2016 8:05 pm, edited 1 time in total.
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Stacking DSP codes

Post 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.
Nowhk
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Re: Stacking DSP codes

Post 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.
Tronic
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: Stacking DSP codes

Post 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.
Nowhk
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Re: Stacking DSP codes

Post 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!
Post Reply