block addressing
I'm referring to this post https://ez.analog.com/message/32330#32330
about "grown" blocks addressing and i'm facing the same problem.
In detail, i would have the addresses of a grown simple block, in my
case a linear gain, contiguous in order to have my inter-processor
communications more efficient.
But on my, quite large, project i see that, at least in one case, i see
that this is not respected: i have the addresses of a gain block one
at location 442, one at location 444.
In the post i attached, Brett said that grown blocks should have
contiguous addresses, but i'm guessing that this is not a fixed rule.
Isn't it?
If so, will i have to modify all sigma-dsp writes in order to transfer all
grown blocks parameters independently as they were belonging to different blocks ?
May AD try to optimize their sigma-studio compiler in order to achieve this ?
Thanks
Tom
Unfortunately this seems to be an issue with how the compiler assigns parameter addresses. I think in your situation there isn't really a short-term fix, so unfortunately you'll have to break up communications into contiguous "chunks."
Hi all:
If variables belong to the same algorithm (grow), variables will be continous. If variables belong to a separate algorithm (add algorithm, or what we call internally stacking), then there is no guarantee that variables will be continous.
From a uC perspective, maintaining continguos adressing is very complicated and at times impossible. Picture having 2 blocks and needing to insert one in the middle. The assembler will need to assign memory pools scattered across memories to make this possible in the first place. However we have thought of the complications that this will cause the users and have implemented the generation of microcontroller code (export file) to fix this need. The implemented method exports variables using names (think references) removing the need to keep track of absolute addresse in memory assigned by the assembler.
In short, call variables from their name in your uC code using the code SigmaStudio generates and you will not have to think about where in memory those variables are.
Hope this helps.
Miguel
Thanks, Miguel!
For those of you who don't know, there's a tutorial describing this process here:
How do I create the microcontroller code to interface to my SigmaDSP?
Hi Miguel,
i don't know if i fell into a sigmadsp bug, but this is the code:
/* Module clipdrive - Linear Gain*/
#define MOD_CLIPDRIVE_COUNT 2
#define MOD_CLIPDRIVE_DEVICE "IC2"
#define MOD_CLIPDRIVE_ALG0_GAIN1940ALGNS24_ADDR 421
#define MOD_CLIPDRIVE_ALG0_GAIN1940ALGNS24_FIXPT 0x00533333
#define MOD_CLIPDRIVE_ALG0_GAIN1940ALGNS24_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(0.65)
#define MOD_CLIPDRIVE_ALG0_GAIN1940ALGNS24_TYPE SIGMASTUDIOTYPE_FIXPOINT
#define MOD_CLIPDRIVE_ALG1_GAIN1940ALGNS25_ADDR 423
#define MOD_CLIPDRIVE_ALG1_GAIN1940ALGNS25_FIXPT 0x00533333
#define MOD_CLIPDRIVE_ALG1_GAIN1940ALGNS25_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(0.65)
#define MOD_CLIPDRIVE_ALG1_GAIN1940ALGNS25_TYPE SIGMASTUDIOTYPE_FIXPOINT
/* Module constant - Linear Gain*/
#define MOD_CONSTANT_MULT_2_COUNT 1
#define MOD_CONSTANT_MULT_2_DEVICE "IC2"
#define MOD_CONSTANT_MULT_2_GAIN1940ALGNS7_ADDR 422
#define MOD_CONSTANT_MULT_2_GAIN1940ALGNS7_FIXPT 0x00E66666
#define MOD_CONSTANT_MULT_2_GAIN1940ALGNS7_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(1.8)
#define MOD_CONSTANT_MULT_2_GAIN1940ALGNS7_TYPE SIGMASTUDIOTYPE_FIXPOINT
It is a stereo linear gain block and i was struggling for some time because, assuming that on a single block i should have contiguous addresses, i was not able to set both channels (i take the first address, then i do a block write till the second one).
See that the address 422 is assigned to another gain block which is absolutely unrelated to the first one.
I'm using SigmaStudio 3.9 build 2 rev 1244.
This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.
Thank you,
EZ Admin
Please log in to reply.