Hi, Laura,

On Nov 19, 2014, at 9:04 AM, Vertatschitsch, Laura E. wrote:

> I'm using the sma-wideband fork of mlib_devel, and I am at commit 263df71 
> from Sep 24 this year.
> 
> Rurik checked in a design he made with a software register, and when I 
> attempt to edit it and double click to view the options, I get a popup error:
> -->Error evaluating 'MaskCallback' callback of swreg block (mask) 'r2dbe_top 
> /r2dbe/quantize_0/thresh'. -->Not enough input arguments. -->Error evaluating 
> 'MaskCallback' callback of swreg block (mask) 'r2dbe_top 
> /r2dbe/quantize_0/thresh'. -->Undefined function 'swreg_maskcheck' for input 
> arguments of type 'char'. -->Error evaluating 'MaskCallback' callback of 
> swreg block (mask) 'r2dbe_top /r2dbe/quantize_0/thresh'. -->Undefined 
> function 'swreg_maskcheck' for input arguments of type 'char'. -->Error 
> evaluating 'MaskCallback' callback of swreg block (mask) 'r2dbe_top 
> /r2dbe/quantize_0/thresh'. -->Undefined function 'swreg_maskcheck' for input 
> arguments of type 'char'.
> 
> Ignoring the obvious names of variables in our particular design, seems there 
> are callback issues with swreg_maskcheck.  After closing the popup, I get to 
> the options dialog:
> Mode: one value

This "Mode: one value" does not appear in the mask of the software register 
block in mlib_devel commit 263df71 (or in any of its ancestral commits).  
Either Rurik was using a different mlib_devel version or he copied this yellow 
block from a model that was built using a different mlib_devel version (or some 
other nefarious misdeeds occurred).

I think the fix Jack described should resolve this:

On Nov 7, 2014, at 3:03 AM, Jack Hickish wrote:

> For sanity, you can do this automatically from the matlab prompt with the 
> command (open your model first so bdroot points to it):
> 
> >> update_casper_blocks(bdroot, 'Tag', 'xps:sw_reg')
> 
> You can update *all* casper blocks with:
> >> update_casper_blocks(bdroot)

...but it might fail if you don't have the fixed-point toolbox because the 
swreg_init.m script seems to require the 'simulink/Commonly Used Blocks/Data 
Type Conversion' block which I think is part of the fixed-point toolbox.  I 
think this might be required even if the register only has one value.  It would 
be great to eliminate this dependency on the fixed-point toolbox.

HTH,
Dave


Reply via email to