From 78823b17c155e563eff815a54accd8573cc383bc Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 27 Nov 2020 18:47:19 +0100 Subject: [PATCH] Transfer of blif2vst.py & yosys.py from alliance-check-toolkit. --- cumulus/src/CMakeLists.txt | 3 ++- cumulus/src/tools/blif2vst.py | 16 ++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/cumulus/src/CMakeLists.txt b/cumulus/src/CMakeLists.txt index fcfd11d4..0a8ad3db 100644 --- a/cumulus/src/CMakeLists.txt +++ b/cumulus/src/CMakeLists.txt @@ -48,6 +48,7 @@ set ( pyPluginAlphaBlock ${CMAKE_CURRENT_SOURCE_DIR}/plugins/alpha/__init__.py ${CMAKE_CURRENT_SOURCE_DIR}/plugins/alpha/block/__init__.py ${CMAKE_CURRENT_SOURCE_DIR}/plugins/alpha/block/configuration.py + ${CMAKE_CURRENT_SOURCE_DIR}/plugins/alpha/block/iospecs.py ${CMAKE_CURRENT_SOURCE_DIR}/plugins/alpha/block/bigvia.py ${CMAKE_CURRENT_SOURCE_DIR}/plugins/alpha/block/spares.py ${CMAKE_CURRENT_SOURCE_DIR}/plugins/alpha/block/block.py @@ -81,4 +82,4 @@ install ( FILES ${pyPluginAlphaBlock} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha/block ) install ( FILES ${pyPluginAlphaC2C} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha/core2chip ) install ( FILES ${pyPluginAlphaChip} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus/plugins/alpha/chip ) - #install ( PROGRAMS ${pyTools} DESTINATION bin ) + install ( PROGRAMS ${pyTools} DESTINATION bin ) diff --git a/cumulus/src/tools/blif2vst.py b/cumulus/src/tools/blif2vst.py index 737b4aef..2dea9c7c 100755 --- a/cumulus/src/tools/blif2vst.py +++ b/cumulus/src/tools/blif2vst.py @@ -50,19 +50,23 @@ def renameNMigenUniquify ( topCell ): if __name__ == '__main__': parser = optparse.OptionParser() - parser.add_option( '-c', '--cell' , type='string', dest='cellName' , help='The name of the BLIF to convert, without extension.') - parser.add_option( '-v', '--verbose' , action='store_true', dest='verbose' , help='First level of verbosity.') - parser.add_option( '-V', '--very-verbose' , action='store_true', dest='veryVerbose' , help='Second level of verbosity.') - parser.add_option( '--vst-use-concat' , action='store_true', dest='vstUseConcat' , help='The VST driver will use "&" (concat) in PORT MAP.') + parser.add_option( '-c', '--cell' , type='string' , dest='cellName' , help='The name of the BLIF to convert, without extension.') + parser.add_option( '-v', '--verbose' , action='store_true', dest='verbose' , help='First level of verbosity.') + parser.add_option( '-V', '--very-verbose' , action='store_true', dest='veryVerbose' , help='Second level of verbosity.') + parser.add_option( '--vst-use-concat' , action='store_true', dest='vstUseConcat' , help='The VST driver will use "&" (concat) in PORT MAP.') + parser.add_option( '--vst-no-lowercase', action='store_true', dest='vstNoLowerCase', help='The VST will keep the case of all identifiers.') + parser.add_option( '--vst-no-linkage' , action='store_true', dest='vstNoLinkage' , help='Undefined direction will be set to "in" instead of "linkage".') (options, args) = parser.parse_args() - views = CRL.Catalog.State.Logical + views = CRL.Catalog.State.Logical if options.verbose: Cfg.getParamBool('misc.verboseLevel1').setBool(True) if options.veryVerbose: Cfg.getParamBool('misc.verboseLevel1').setBool(True) Cfg.getParamBool('misc.verboseLevel2').setBool(True) - if options.vstUseConcat: views |= CRL.Catalog.State.VstUseConcat + if options.vstUseConcat: views |= CRL.Catalog.State.VstUseConcat + if options.vstNoLowerCase: views |= CRL.Catalog.State.VstNoLowerCase + if options.vstNoLinkage: views |= CRL.Catalog.State.VstNoLinkage cell = CRL.Blif.load( options.cellName ) if cell.getName() == 'top':