Skip to content

Commit

Permalink
[CORRECTIVE] Changed path search to accept initiator interfaces with …
Browse files Browse the repository at this point in the history
…a connected subspace map.
  • Loading branch information
teuhom committed Feb 13, 2024
1 parent f586029 commit 04e2b32
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 9 deletions.
49 changes: 48 additions & 1 deletion editors/MemoryDesigner/MasterSlavePathSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ QVector<QSharedPointer<ConnectivityInterface> > MasterSlavePathSearch::findIniti

for (auto const& vertex : graph->getInterfaces())
{
if ((vertex->getMode() == General::MASTER || vertex->getMode() == General::INITIATOR) && vertex->getConnectedMemory())
if (isStartInterface(vertex) && isConnectedToMemory(vertex))
{
masterInterfaces.append(vertex);
}
Expand All @@ -69,6 +69,53 @@ QVector<QSharedPointer<ConnectivityInterface> > MasterSlavePathSearch::findIniti
return masterInterfaces;
}

//-----------------------------------------------------------------------------
// Function: MasterSlavePathSearch::isStartInterface()
//-----------------------------------------------------------------------------
bool MasterSlavePathSearch::isStartInterface(QSharedPointer<const ConnectivityInterface> vertex) const
{
return vertex->getMode() == General::MASTER || vertex->getMode() == General::INITIATOR;
}

//-----------------------------------------------------------------------------
// Function: MasterSlavePathSearch::isConnectedToMemory()
//-----------------------------------------------------------------------------
bool MasterSlavePathSearch::isConnectedToMemory(QSharedPointer<const ConnectivityInterface> vertex) const
{
if (vertex->getMode() == General::MASTER)
{
return vertex->isConnectedToMemory();
}
else if (vertex->getMode() == General::INITIATOR && vertex->getInstance())
{
return vertex->isConnectedToMemory() || isConnectedToSubspaceMap(vertex);
}

return false;
}

//-----------------------------------------------------------------------------
// Function: MasterSlavePathSearch::isConnectedToSubspaceMap()
//-----------------------------------------------------------------------------
bool MasterSlavePathSearch::isConnectedToSubspaceMap(QSharedPointer<const ConnectivityInterface> vertex) const
{
for (auto memoryItem : vertex->getInstance()->getMemories())
{
if (memoryItem->getType() == MemoryDesignerConstants::MEMORYMAP_TYPE)
{
for (auto memoryBlock : memoryItem->getChildItems())
{
if (memoryBlock->getType() == MemoryDesignerConstants::SUBSPACEMAP_TYPE && memoryBlock->getInitiatorReference() == vertex->getName())
{
return true;
}
}
}
}

return false;
}

//-----------------------------------------------------------------------------
// Function: MasterSlavePathSearch::findPaths()
//-----------------------------------------------------------------------------
Expand Down
27 changes: 27 additions & 0 deletions editors/MemoryDesigner/MasterSlavePathSearch.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,33 @@ class MasterSlavePathSearch
QVector<QSharedPointer<ConnectivityInterface> > findInitialMasterInterfaces(
QSharedPointer<const ConnectivityGraph> graph) const;

/*!
* Check if the selected interface is a starting interface.
*
* @param [in] vertex The selected interface.
*
* @return True, if the interface is a starting interface, false otherwise.
*/
bool isStartInterface(QSharedPointer<const ConnectivityInterface> vertex) const;

/*!
* Check if the selected interface is connected to a memory item.
*
* @param [in] vertex The selected interface.
*
* @return True, if the interface is a starting interface, false otherwise.
*/
bool isConnectedToMemory(QSharedPointer<const ConnectivityInterface> vertex) const;

/*!
* Check if the selected interface is connected to a subspace map.
*
* @param [in] vertex The selected interface.
*
* @return True, if the interface is connected to a subspace map, false otherwise.
*/
bool isConnectedToSubspaceMap(QSharedPointer<const ConnectivityInterface> vertex) const;

/*!
* Finds all the paths branching from the given start vertex.
*
Expand Down
16 changes: 8 additions & 8 deletions version.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
#ifndef VERSIONNO__H
#define VERSIONNO__H

#define VERSION_FULL 3.13.144.0
#define VERSION_FULL 3.13.150.0

#define VERSION_BASEYEAR 0
#define VERSION_DATE "2024-02-12"
#define VERSION_TIME "14:44:47"
#define VERSION_DATE "2024-02-13"
#define VERSION_TIME "12:07:11"

#define VERSION_MAJOR 3
#define VERSION_MINOR 13
#define VERSION_BUILDNO 144
#define VERSION_BUILDNO 150
#define VERSION_EXTEND 0

#define VERSION_FILE 3,13,144,0
#define VERSION_PRODUCT 3,13,144,0
#define VERSION_FILESTR "3,13,144,0"
#define VERSION_PRODUCTSTR "3,13,144,0"
#define VERSION_FILE 3,13,150,0
#define VERSION_PRODUCT 3,13,150,0
#define VERSION_FILESTR "3,13,150,0"
#define VERSION_PRODUCTSTR "3,13,150,0"

#endif

0 comments on commit 04e2b32

Please sign in to comment.