hwt/hdl/types/structValBase.py
def fromPy(cls, val, typeObj, vldMask=None):
        """
        :param val: None or dict {field name: field value}
        :param typeObj: instance of String HdlType
        :param vldMask: if is None validity is resolved from val
            if is 0 value is invalidated
            if is 1 value has to be valid
        """
        if vldMask == 0:
            val = None
        return cls(val, typeObj)
def fromPy(cls, val, typeObj, vldMask=None):
        """
        :param val: None or dict {field name: field value}
        :param typeObj: instance of String HdlType
        :param vldMask: if is None validity is resolved from val
            if is 0 value is invalidated
            if is 1 value has to be valid
        """
        if vldMask == 0:
            val = None
        return cls(val, typeObj)
def fromPy ( cls , val , typeObj , vldMask = None ) : if vldMask == 0 : val = None return cls ( val , typeObj )
:param val: None or dict {field name: field value}
        :param typeObj: instance of String HdlType
        :param vldMask: if is None validity is resolved from val
            if is 0 value is invalidated
            if is 1 value has to be valid
: param val : None or dict { field name : field value } : param typeObj : instance of String HdlType : param vldMask : if is None validity is resolved from val if is 0 value is invalidated if is 1 value has to be valid