diff --git a/logic_memory_mapper/memMapperBase.py b/logic_memory_mapper/memMapperBase.py index 52425ae..d59871d 100644 --- a/logic_memory_mapper/memMapperBase.py +++ b/logic_memory_mapper/memMapperBase.py @@ -269,6 +269,7 @@ class MemMapperBase : # --------------------------------------------------------- # Search a QSYS file for references to 'baseAddress' and # extract associated IP and bus information. + # modified to add compatibility for Altera 22.1 Qsys format # (private method) # --------------------------------------------------------- @staticmethod @@ -279,11 +280,13 @@ class MemMapperBase : readFileName = qsysPaths[topBlock + qsysSuffix] readFile = open(readFileName, 'r') for line in readFile: - if ('end=' in lineArray[2]) and ('baseAddress' in line) : + if ('end=' in lineArray[2]) and ('baseAddress' in line): for bus in busArray: testStr = '.'+bus+'\"' if testStr in lineArray[2]: - lineList = re.split(r'[".]', lineArray[2]) + endPos = lineArray[2].find('end=') + line2 = lineArray[2][endPos:] + lineList = re.split(r'[".]', line2) block = lineList[1] wordList = block.split('_') ip = '_'.join(wordList[:-1])