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

Mono & Mono4

DSP related issues, mathematics, processing and techniques

Mono & Mono4

Postby HughBanton » Wed Apr 15, 2020 10:54 am

I use 'pack' & 'unpack' prims from time to time, and I believe I understand exactly what's happening - loading the four SSE streams with four different signals or data, processing them in parallel on the 4x32-bit-wide bus; then extracting the four signals at the end, but ...

It only struck me the other day that it seems to be perfectly legitimate, between the pack & unpack elements, to use regular mono blue. Seems I can do whatever I like, dsp, assem anything, .. still all in mono blue .. and the result is exactly the same, hey presto, the four packed values still appear after unpacking at the end.

From which I conclude that there isn't actually any difference between mono and mono-4. :?:

Which seems a bit of a weird conclusion - someone tell me I'm missing something!

H
User avatar
HughBanton
 
Posts: 265
Joined: Sat Apr 12, 2008 3:10 pm
Location: Evesham, Worcestershire

Re: Mono & Mono4

Postby trogluddite » Wed Apr 15, 2020 2:18 pm

Your conclusion is mostly true, but not always. The vast majority of stream components will work equally well as mono, mono4, and poly components, because exactly the same code is used for all three.

For the CPU SSE instructions, it never makes any difference, as they will process all four channels whether they're used or not - so, for those parts, it's always true that there's no difference between mono and mono4 - so long as the input streams are packed, the code and all of the interconnecting links will also carry packed values.

However, not all stream processing uses SSE instructions. There are some processes, such as reading/writing arrays, which have to be done one channel at a time, each with its own code. Most stock components, and anything created using DSP code, will always do this for all four channels, so can still be used "universally" with any kind of stream. As you may guess, this means that some CPU power is wasted on the unused channels when such components are processing mono streams.

Using the assembly component (ASM), it is possible to write code which doesn't apply that kind of processing to all four channels, so that you can save CPU by not processing the unused channels in the non-SSE parts. So there are some user-created components which really are mono-only - their code would still run OK with packed values, but the unused channels would return invalid results.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Mono & Mono4

Postby HughBanton » Wed Apr 15, 2020 8:50 pm

Thanks for that Trog, that's pretty much how I saw it. I've done array look-ups in assembler where you can lose all but channel 0 to save processing, a lesson I learnt early on from KG on Flowstone Guru.

I'm embarrassed that it's taken me so long for the rest of the penny to finally drop, but I have to say I don't think FS helps our understanding by having the two formats, Mono & Mono4, and indicating that they're different. It all scared me off for about two years!! Apart from some kind of indication on the actual pack & unpack prims I can't see it's very helpful differentiating the connector types.

You'd have thought, in the user manual, some kind of physical analogy might help such as - 'a 4-core cable, where only 1 is used by default (- but feel free to use the other 3)', or maybe, a train in a station with 4 carriages, 3 of which are normally empty' (maybe a bit puerile that one!).

I note that FS_3 doesn't let you connect Mono4 connectors to Mono (without <cntrl><shift>), whereas FS_4 does. I suppose that's when I first went : Err? hang on a minute .....

H
User avatar
HughBanton
 
Posts: 265
Joined: Sat Apr 12, 2008 3:10 pm
Location: Evesham, Worcestershire


Return to DSP

Who is online

Users browsing this forum: No registered users and 3 guests