def ScenarioSet(Sig, Val, ArraySizes):
    """
	Return a string of scenario GPIO SET command for TBGen.
	"""
    SetString = ''
    SIZE = Sig.GetSize()
    if Sig.Type == 'logic':
        if SIZE == 1:
            SetString += '\nGPIO SET {Name} {Value}'.format(Name=Sig.Name,
                Value=0 if Val == 0 else 1)
        else:
            SetString += ('\nGPIO SET_VECT {Name}_{MSb} {Name}_0 {Value:#010x}'
                .format(Name=Sig.Name, MSb=SIZE - 1, Value=Val))
    else:
        for j in range(SIZE):
            SetString += (
                '\nGPIO SET_VECT {Name}_{Index}_{MSb} {Name}_{Index}_0 {Value:#010x}'
                .format(Name=Sig.Name, Index=j, MSb=ArraySizes[Sig.Type] - 
                1, Value=Val))
    return SetString
