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

Is it possible to use the mem adress ?

DSP related issues, mathematics, processing and techniques

Is it possible to use the mem adress ?

Postby Tepeix » Sat Sep 17, 2022 2:19 pm

After hours of trying, i ask the question, is the mem address usable in some way ?

I could easily make a code that read or write the mem.
The true problem is when you save the schematic with this code connected.
(you better have to save it unconnected in another file !)

It almost always crash on load.
The only exception was to use a timer to wait a little before to read. It worked few time.
Then i try to wait less sample and now it crash every time on load whatever the timing...

What happen here ?
Tepeix
 
Posts: 350
Joined: Sat Oct 16, 2021 3:11 pm

Re: Is it possible to use the mem adress ?

Postby adamszabo » Sat Sep 17, 2022 5:01 pm

When you use a mem input in the assembly you have a few options. So lets say you have "memrefin mem; " this will create the "mem" memory input.

Here are your options:
0 = Address
1 = Size
2 = Floats
3 = Channels
4 = [fLimit,fLimit]
5 = [fLimit,fLimit]

when the memory is not loaded its size is 0, so you can use that to skip a code thats not loaded to prevent a crash. So you can write:

cmp mem[1],0; // we check if the memory size is 0, and if it is, skip the mem code
je end;

//your code here

end:

Once the memory is assigned it will now have a size and address and then it can safely load
adamszabo
 
Posts: 657
Joined: Sun Jul 11, 2010 7:21 am

Re: Is it possible to use the mem adress ?

Postby Tepeix » Sat Sep 17, 2022 7:40 pm

Thanks for the response !)
But i'm on 3.6.. So i don't have memrefin..

Will try to load the alpha someday.. But the slack have disappear.. Is there another place now ?

Hum doing some more research, now i suspect the array to mem and mem address prim to have some problem with loading in my version.. I use a bunch of code to detect if the address is not 0.
But i think, it's like the mem address keep the last address, when the array to mem create a new one...
Tepeix
 
Posts: 350
Joined: Sat Oct 16, 2021 3:11 pm

Re: Is it possible to use the mem adress ?

Postby Tepeix » Sun Sep 18, 2022 12:53 am

No more crash for now, but i'm a little paranoid after getting so much..

My big error i suppose was to use the text prim to the array to mem.
In my version 3.6 it almost always crash on load, even if i disconnect the text.

With an array prim it's ok.
Attachments
array text to mem.png
array text to mem.png (38.07 KiB) Viewed 8400 times
Tepeix
 
Posts: 350
Joined: Sat Oct 16, 2021 3:11 pm

Re: Is it possible to use the mem adress ?

Postby Tepeix » Mon Sep 19, 2022 2:28 pm

Hum.. It work better without the text and i also try the mem create.

But whatever i do to transform the address, a crash finish to occur when i load a new address..
It's like some address are not well decoded.
Will investigate more..
Maybe a timer to not load directly the new address, maybe something wrong in the float/int translation..
Tepeix
 
Posts: 350
Joined: Sat Oct 16, 2021 3:11 pm

Re: Is it possible to use the mem adress ?

Postby Tepeix » Tue Sep 20, 2022 10:29 pm

hum, thinking more about it, my new instability maybe come from the way i try to change the mem.
Creating a new one, as green are involved, the code could try to read a mem that no longer exist while it doesn't had receive the new address change...

Maybe a system where first the code know that it must stop to read or write then a new mem creation would solve this...
Tepeix
 
Posts: 350
Joined: Sat Oct 16, 2021 3:11 pm


Return to DSP

Who is online

Users browsing this forum: Google [Bot] and 26 guests