This is a Simulink problem, not a CASPER issue.   It is solvable by writing 
a .m initialization script and using matlab's set_param( )  with handles 
and num2str()  
e.g.

set_param(buffer_blkHandle 'nsamples' , num2str(len));  


On Monday, January 13, 2025 at 8:23:20 PM UTC-5 Ken Semanov wrote:

> This should be considered a bug report, unless someone has a magical 
> work-around. The following is how to recreate the error.
>
>
>    1. Simply create a snapshot block(call it buffer), inside of a white 
>    container block in simulink Name it "whiteblock". 
>    2. Edit the mask of the upper whiteblock and promote the value 
>    'nsamples' up to it. That is, promote whiteblock>>buffer>>nsamples
>    3.  Do the usual saving and simulating of the design.
>
> This design will compile to a bit stream via jasper.  But when the 
> bitstream is sent to your board,  snap.py will die on line 53.  
>
> * num_bytes = pow(2, int(device_info['nsamples'])) * (word_bits/8)*
>
> device_info['samples']   no longer represents a textualized integer.  
> Instead this is now storing the string literal, "nsamples".   As expected, 
> python dies  with a Value Error "invalid literal for int() with base 10 
> 'nsamples'.  
>

-- 
You received this message because you are subscribed to the Google Groups 
"casper@lists.berkeley.edu" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to casper+unsubscr...@lists.berkeley.edu.
To view this discussion visit 
https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/83415060-6bdf-4962-a412-075e985b22f2n%40lists.berkeley.edu.

Reply via email to