def conv_from_name(name):
    """
    Understand simulink syntax for fixed types and returns the proper
    conversion structure. 
    @param name: the type name as in simulin (i.e. UFix_8_7 ... )
    @raise ConversionError: When cannot decode the string
    """
    _match = re.match(r"^(?P<signed>u?fix)_(?P<bits>\d+)_(?P<binary>\d+)", 
            name, flags = re.I)
    if not _match:
        raise ConversionError("Cannot interpret name: " + name)
    params = _match.groupdict()
    if params['signed'] == 'fix':
        signed = True
    else:
        signed = False
    bits = int(params['bits'])
    binary = int(params['binary'])
    return get_conv(bits, binary, signed)
def conv_from_name ( name ) : _match = re . match ( r"^(?P<signed>u?fix)_(?P<bits>\d+)_(?P<binary>\d+)" , name , flags = re . I ) if not _match : raise ConversionError ( "Cannot interpret name: " + name ) params = _match . groupdict ( ) if params [ 'signed' ] == 'fix' : signed = True else : signed = False bits = int ( params [ 'bits' ] ) binary = int ( params [ 'binary' ] ) return get_conv ( bits , binary , signed )
Understand simulink syntax for fixed types and returns the proper
    conversion structure. 
    @param name: the type name as in simulin (i.e. UFix_8_7 ... )
    @raise ConversionError: When cannot decode the string