function subsysPortInfo = CacheSubsysPortInfo(mdl)
    subsysPortInfo =  containers.Map('KeyType', 'double', 'ValueType', 'any');

    allSubSysHs = find_system(mdl,  'FindAll',          'on', ...
                                    'LookUnderMasks',   'on', ...
                                    'BlockType',         'SubSystem');

    for idx = 1:numel(allSubSysHs)
        blkH = allSubSysHs(idx);
        ph = get_param(blkH,'PortHandles');
        subsysPortInfo(blkH) = ph;
    end
    
